[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] nested vmx: fix handling of RDTSC
# HG changeset patch # User Dongxiao Xu <dongxiao.xu@xxxxxxxxx> # Date 1354812981 0 # Node ID a09150b57ace2fa786dcaefa958f0b197b1b6d4c # Parent 312f0713dfc98635fd9ed4b42481581489faa28f nested vmx: fix handling of RDTSC If L0 is to handle the TSC access, then we need to update guest EIP by calling update_guest_eip(). Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Committed-by: Keir Fraser <keir@xxxxxxx> --- diff -r 312f0713dfc9 -r a09150b57ace xen/arch/x86/hvm/vmx/vmx.c --- a/xen/arch/x86/hvm/vmx/vmx.c Thu Dec 06 16:54:26 2012 +0000 +++ b/xen/arch/x86/hvm/vmx/vmx.c Thu Dec 06 16:56:21 2012 +0000 @@ -1555,7 +1555,7 @@ static int get_instruction_length(void) return len; } -static void update_guest_eip(void) +void update_guest_eip(void) { struct cpu_user_regs *regs = guest_cpu_user_regs(); unsigned long x; diff -r 312f0713dfc9 -r a09150b57ace xen/arch/x86/hvm/vmx/vvmx.c --- a/xen/arch/x86/hvm/vmx/vvmx.c Thu Dec 06 16:54:26 2012 +0000 +++ b/xen/arch/x86/hvm/vmx/vvmx.c Thu Dec 06 16:56:21 2012 +0000 @@ -1614,6 +1614,7 @@ int nvmx_n2_vmexit_handler(struct cpu_us tsc += __get_vvmcs(nvcpu->nv_vvmcx, TSC_OFFSET); regs->eax = (uint32_t)tsc; regs->edx = (uint32_t)(tsc >> 32); + update_guest_eip(); return 1; } diff -r 312f0713dfc9 -r a09150b57ace xen/include/asm-x86/hvm/vmx/vmx.h --- a/xen/include/asm-x86/hvm/vmx/vmx.h Thu Dec 06 16:54:26 2012 +0000 +++ b/xen/include/asm-x86/hvm/vmx/vmx.h Thu Dec 06 16:56:21 2012 +0000 @@ -399,6 +399,8 @@ void ept_p2m_init(struct p2m_domain *p2m void ept_walk_table(struct domain *d, unsigned long gfn); void setup_ept_dump(void); +void update_guest_eip(void); + /* EPT violation qualifications definitions */ #define _EPT_READ_VIOLATION 0 #define EPT_READ_VIOLATION (1UL<<_EPT_READ_VIOLATION) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |