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

[xen master] x86/emul: Remove ops->{read,write}_segment checks for swapgs



commit 98610a6c342d0b491f0466806e213975f2134bd3
Author:     Teddy Astie <teddy.astie@xxxxxxxxxx>
AuthorDate: Thu Apr 9 08:26:27 2026 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Apr 9 08:26:27 2026 +0200

    x86/emul: Remove ops->{read,write}_segment checks for swapgs
    
    Remove these checks now that we don't use these 2 ops anymore.
    
    Amends: 4bedbe47eef4f ("x86/emul: Remove fallback path from SWAPGS")
    Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/x86_emulate/0f01.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/0f01.c b/xen/arch/x86/x86_emulate/0f01.c
index 54bd6faf0f..4d36c7d289 100644
--- a/xen/arch/x86/x86_emulate/0f01.c
+++ b/xen/arch/x86/x86_emulate/0f01.c
@@ -187,8 +187,7 @@ int x86emul_0f01(struct x86_emulate_state *s,
     case 0xf8: /* swapgs */
         generate_exception_if(!mode_64bit(), X86_EXC_UD);
         generate_exception_if(!mode_ring0(), X86_EXC_GP, 0);
-        fail_if(!ops->read_segment || !ops->read_msr ||
-                !ops->write_segment || !ops->write_msr);
+        fail_if(!ops->read_msr || !ops->write_msr);
         if ( (rc = ops->read_msr(MSR_GS_BASE, &sreg.base,
                                  ctxt)) != X86EMUL_OKAY ||
              (rc = ops->read_msr(MSR_SHADOW_GS_BASE, &msr_val,
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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