ia64/xen-unstable

changeset 15943:c2d651811741

vmx: Fix 64-bit asm stub for VM entry/exit.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Thu Sep 20 10:31:49 2007 +0100 (2007-09-20)
parents 1902a21dd1ae
children be5f27ff147b a93ebecda83b
files xen/arch/x86/hvm/vmx/x86_64/exits.S
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/x86_64/exits.S	Thu Sep 20 10:13:25 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/vmx/x86_64/exits.S	Thu Sep 20 10:31:49 2007 +0100
     1.3 @@ -25,8 +25,8 @@
     1.4  
     1.5  #define VMRESUME     .byte 0x0f,0x01,0xc3
     1.6  #define VMLAUNCH     .byte 0x0f,0x01,0xc2
     1.7 -#define VMREAD(off)  .byte 0x0f,0x78,0x44,0x24,off
     1.8 -#define VMWRITE(off) .byte 0x0f,0x79,0x44,0x24,off
     1.9 +#define VMREAD(off)  .byte 0x0f,0x78,0x47,((off)-UREGS_rip)
    1.10 +#define VMWRITE(off) .byte 0x0f,0x79,0x47,((off)-UREGS_rip)
    1.11  
    1.12  /* VMCS field encodings */
    1.13  #define GUEST_RSP    0x681c
    1.14 @@ -77,8 +77,10 @@
    1.15  ENTRY(vmx_asm_vmexit_handler)
    1.16          HVM_SAVE_ALL_NOSEGREGS
    1.17  
    1.18 +        leaq UREGS_rip(%rsp),%rdi
    1.19          movl $GUEST_RIP,%eax
    1.20 -        VMREAD(UREGS_rip)
    1.21 +        /*VMREAD(UREGS_rip)*/
    1.22 +        .byte 0x0f,0x78,0x07  /* vmread %rax,(%rdi) */
    1.23          movl $GUEST_RSP,%eax
    1.24          VMREAD(UREGS_rsp)
    1.25          movl $GUEST_RFLAGS,%eax
    1.26 @@ -110,8 +112,10 @@ ENTRY(vmx_asm_do_vmentry)
    1.27          movq %rax,%cr2
    1.28          call vmx_trace_vmentry
    1.29  
    1.30 +        leaq UREGS_rip(%rsp),%rdi
    1.31          movl $GUEST_RIP,%eax
    1.32 -        VMWRITE(UREGS_rip)
    1.33 +        /*VMWRITE(UREGS_rip)*/
    1.34 +        .byte 0x0f,0x79,0x07  /* vmwrite (%rdi),%rax */
    1.35          movl $GUEST_RSP,%eax
    1.36          VMWRITE(UREGS_rsp)
    1.37          movl $GUEST_RFLAGS,%eax