[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/pv: Move async_exception_cleanup() into pv/iret.c
commit 094796affb7c87f6b2daccdbe192208af715e088 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue Jul 23 20:46:35 2019 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Wed Jul 24 14:40:10 2019 +0100 x86/pv: Move async_exception_cleanup() into pv/iret.c All callers are in pv/iret.c. Move the function and make it static. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Juergen Gross <jgross@xxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/pv/iret.c | 25 ++++++++++++++++++++++++- xen/arch/x86/traps.c | 24 ------------------------ xen/include/asm-x86/traps.h | 2 -- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/xen/arch/x86/pv/iret.c b/xen/arch/x86/pv/iret.c index c359a1dbfd..16b449ff64 100644 --- a/xen/arch/x86/pv/iret.c +++ b/xen/arch/x86/pv/iret.c @@ -22,7 +22,30 @@ #include <xen/sched.h> #include <asm/current.h> -#include <asm/traps.h> + +static void async_exception_cleanup(struct vcpu *curr) +{ + unsigned int trap; + + if ( !curr->async_exception_mask ) + return; + + if ( !(curr->async_exception_mask & (curr->async_exception_mask - 1)) ) + trap = __scanbit(curr->async_exception_mask, VCPU_TRAP_NONE); + else + for ( trap = VCPU_TRAP_NONE + 1; trap <= VCPU_TRAP_LAST; ++trap ) + if ( (curr->async_exception_mask ^ + curr->async_exception_state(trap).old_mask) == (1u << trap) ) + break; + if ( unlikely(trap > VCPU_TRAP_LAST) ) + { + ASSERT_UNREACHABLE(); + return; + } + + /* Restore previous asynchronous exception mask. */ + curr->async_exception_mask = curr->async_exception_state(trap).old_mask; +} unsigned long do_iret(void) { diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 08d7edc568..38d12013db 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1593,30 +1593,6 @@ static void pci_serr_softirq(void) outb(inb(0x61) & 0x0b, 0x61); /* re-enable the PCI SERR error line. */ } -void async_exception_cleanup(struct vcpu *curr) -{ - int trap; - - if ( !curr->async_exception_mask ) - return; - - if ( !(curr->async_exception_mask & (curr->async_exception_mask - 1)) ) - trap = __scanbit(curr->async_exception_mask, VCPU_TRAP_NONE); - else - for ( trap = VCPU_TRAP_NONE + 1; trap <= VCPU_TRAP_LAST; ++trap ) - if ( (curr->async_exception_mask ^ - curr->async_exception_state(trap).old_mask) == (1 << trap) ) - break; - if ( unlikely(trap > VCPU_TRAP_LAST) ) - { - ASSERT_UNREACHABLE(); - return; - } - - /* Restore previous asynchronous exception mask. */ - curr->async_exception_mask = curr->async_exception_state(trap).old_mask; -} - static void nmi_hwdom_report(unsigned int reason_idx) { struct domain *d = hardware_domain; diff --git a/xen/include/asm-x86/traps.h b/xen/include/asm-x86/traps.h index b88f2a4f2f..ec23d3a70b 100644 --- a/xen/include/asm-x86/traps.h +++ b/xen/include/asm-x86/traps.h @@ -19,8 +19,6 @@ #ifndef ASM_TRAP_H #define ASM_TRAP_H -void async_exception_cleanup(struct vcpu *); - const char *trapstr(unsigned int trapnr); #endif /* ASM_TRAP_H */ -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |