[PATCH 1/6] vVMX: use reg_read()

Jan Beulich posted 6 patches 4 months, 3 weeks ago
There is a newer version of this series
[PATCH 1/6] vVMX: use reg_read()
Posted by Jan Beulich 4 months, 3 weeks ago
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>

--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -2675,7 +2675,7 @@ int nvmx_n2_vmexit_handler(struct cpu_us
             {
             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 )
                 {
Re: [PATCH 1/6] vVMX: use reg_read()
Posted by Andrew Cooper 4 months, 3 weeks ago
On 11/06/2025 11:42 am, Jan Beulich wrote:
> 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>