]>
vVMX: use reg_read()
authorJan Beulich <jbeulich@suse.com>
Thu, 12 Jun 2025 12:46:51 +0000 (14:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 12 Jun 2025 12:46:51 +0000 (14:46 +0200)
Let's avoid such open-coding. There's also no need to use
guest_cpu_user_regs(), when the function has a suitable parameter.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/vmx/vvmx.c

index 3c848ef5467c27d917c1a11dadadaa44af36fd1b..2432af58e0e09c68ce41b657b5720992aa31aa51 100644 (file)
@@ -2675,7 +2675,7 @@ int nvmx_n2_vmexit_handler(struct cpu_user_regs *regs,
             {
             case VMX_CR_ACCESS_TYPE_MOV_TO_CR:
             {
-                val = *decode_gpr(guest_cpu_user_regs(), qual.gpr);
+                val = reg_read(regs, qual.gpr);
 
                 if ( qual.cr == 0 )
                 {