|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/pv: Improve code generation in async_exception_cleanup()
commit fcc3289cdf18c5ae5d7b066f7c6c82c188f7e679
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Nov 2 16:22:11 2026 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Nov 4 18:11:35 2026 +0000
x86/pv: Improve code generation in async_exception_cleanup()
Use new helpers to simplfiy the logic. No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/pv/iret.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/pv/iret.c b/xen/arch/x86/pv/iret.c
index 39ce316b8d..52430f38d2 100644
--- a/xen/arch/x86/pv/iret.c
+++ b/xen/arch/x86/pv/iret.c
@@ -31,8 +31,8 @@ static void async_exception_cleanup(struct vcpu *curr)
if ( !curr->arch.async_exception_mask )
return;
- if ( !(curr->arch.async_exception_mask & (curr->arch.async_exception_mask
- 1)) )
- trap = __scanbit(curr->arch.async_exception_mask, VCPU_TRAP_NONE);
+ if ( !multiple_bits_set(curr->arch.async_exception_mask) )
+ trap = ffs(curr->arch.async_exception_mask) - 1;
else
for ( trap = VCPU_TRAP_NONE + 1; trap <= VCPU_TRAP_LAST; ++trap )
if ( (curr->arch.async_exception_mask ^
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |