[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.7] arm/x86: change [modify, destroy]_xen_mappings to return error
commit ffcfc40e0bcde130a42a5a9bbdace552c146e1e8 Author: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> AuthorDate: Fri Oct 6 15:12:26 2017 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Oct 6 15:12:26 2017 +0200 arm/x86: change [modify,destroy]_xen_mappings to return error The implementation on x86 always returns zero, but other platforms may return error values. Reviewed-by: Julien Grall <julien.grall@xxxxxxx> [arm bits] Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> [x86 bits] Suggested-by: Julien Grall <julien.grall@xxxxxxx> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> master commit: 3eb51dda7106cbee5ff52a976c1ed842744e09a4 master date: 2016-09-16 11:32:42 -0400 --- xen/arch/arm/mm.c | 4 ++-- xen/arch/x86/livepatch.c | 4 +--- xen/arch/x86/mm.c | 7 ++++--- xen/include/xen/mm.h | 4 ++-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index d4b84b0..0a82698 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -930,9 +930,9 @@ int populate_pt_range(unsigned long virt, unsigned long mfn, return create_xen_entries(RESERVE, virt, mfn, nr_mfns, 0); } -void destroy_xen_mappings(unsigned long v, unsigned long e) +int destroy_xen_mappings(unsigned long v, unsigned long e) { - create_xen_entries(REMOVE, v, 0, (e - v) >> PAGE_SHIFT, 0); + return create_xen_entries(REMOVE, v, 0, (e - v) >> PAGE_SHIFT, 0); } enum mg { mg_clear, mg_ro, mg_rw, mg_rx }; diff --git a/xen/arch/x86/livepatch.c b/xen/arch/x86/livepatch.c index 1ff52f3..d96e4d2 100644 --- a/xen/arch/x86/livepatch.c +++ b/xen/arch/x86/livepatch.c @@ -234,9 +234,7 @@ int arch_livepatch_secure(const void *va, unsigned int pages, enum va_type type) else flag = PAGE_HYPERVISOR_RO; - modify_xen_mappings(start, start + pages * PAGE_SIZE, flag); - - return 0; + return modify_xen_mappings(start, start + pages * PAGE_SIZE, flag); } void __init arch_livepatch_init(void) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index e97eccc..22c7849 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -6052,7 +6052,7 @@ int populate_pt_range(unsigned long virt, unsigned long mfn, * * It is an error to call with present flags over an unpopulated range. */ -void modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) +int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) { bool_t locking = system_state > SYS_STATE_boot; l2_pgentry_t *pl2e; @@ -6227,13 +6227,14 @@ void modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) flush_area(NULL, FLUSH_TLB_GLOBAL); #undef FLAGS_MASK + return 0; } #undef flush_area -void destroy_xen_mappings(unsigned long s, unsigned long e) +int destroy_xen_mappings(unsigned long s, unsigned long e) { - modify_xen_mappings(s, e, _PAGE_NONE); + return modify_xen_mappings(s, e, _PAGE_NONE); } void __set_fixmap( diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h index 4b3b013..1100409 100644 --- a/xen/include/xen/mm.h +++ b/xen/include/xen/mm.h @@ -105,8 +105,8 @@ int map_pages_to_xen( unsigned long nr_mfns, unsigned int flags); /* Alter the permissions of a range of Xen virtual address space. */ -void modify_xen_mappings(unsigned long s, unsigned long e, unsigned int flags); -void destroy_xen_mappings(unsigned long v, unsigned long e); +int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int flags); +int destroy_xen_mappings(unsigned long v, unsigned long e); /* * Create only non-leaf page table entries for the * page range in Xen virtual address space. -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.7 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |