[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging-4.17] x86/emul: cope with internal handlers returning X86EMUL_RETRY



commit e275898f007bcc7377bf698303b3f42575f6ebfb
Author:     Roger Pau Monne <roger@xxxxxxxxxxxxxx>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Aug 26 17:51:38 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    hvm_io_intercept() can return X86EMUL_RETRY, and as such it needs to be
    handled in the switch in hvmemul_do_io() to avoid triggering the BUG() from
    the default case.
    
    Reset the vCPU state to no in-flight IOREQ and return X86EMUL_RETRY so that
    the access is retried.
    
    This is XSA-510 / CVE-2026-79602.
    
    Reported-by: Jiqian Chen <Jiqian.Chen@xxxxxxx>
    Signed-off-by: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 xen/arch/x86/hvm/emulate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index 464c43d035..610696d971 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -249,6 +249,7 @@ static int hvmemul_do_io(
     switch ( rc )
     {
     case X86EMUL_OKAY:
+    case X86EMUL_RETRY:
         vio->req.state = STATE_IOREQ_NONE;
         break;
     case X86EMUL_UNHANDLEABLE:
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.17



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.