aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-05-14 13:41:13 -0400
committerAvi Kivity <avi@qumranet.com>2007-07-16 05:05:41 -0400
commitcd2276a795b013d1416c96b38eec90a66cdd10c4 (patch)
treebfd0e9c1e151c636e7f74b82c9c34b62ddba0301 /drivers/kvm
parentcd0536d7cb4d5d5c5aa37ccd3edd71c4b0524add (diff)
KVM: VMX: Use local labels in inline assembly
This makes oprofile dumps and disassebly easier to read. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm')
-rw-r--r--drivers/kvm/vmx.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 34171d9008ff..c4c553588a20 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1188,7 +1188,7 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
1188 struct descriptor_table dt; 1188 struct descriptor_table dt;
1189 int i; 1189 int i;
1190 int ret = 0; 1190 int ret = 0;
1191 extern asmlinkage void kvm_vmx_return(void); 1191 unsigned long kvm_vmx_return;
1192 1192
1193 if (!init_rmode_tss(vcpu->kvm)) { 1193 if (!init_rmode_tss(vcpu->kvm)) {
1194 ret = -ENOMEM; 1194 ret = -ENOMEM;
@@ -1306,8 +1306,8 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
1306 get_idt(&dt); 1306 get_idt(&dt);
1307 vmcs_writel(HOST_IDTR_BASE, dt.base); /* 22.2.4 */ 1307 vmcs_writel(HOST_IDTR_BASE, dt.base); /* 22.2.4 */
1308 1308
1309 1309 asm ("mov $.Lkvm_vmx_return, %0" : "=r"(kvm_vmx_return));
1310 vmcs_writel(HOST_RIP, (unsigned long)kvm_vmx_return); /* 22.2.5 */ 1310 vmcs_writel(HOST_RIP, kvm_vmx_return); /* 22.2.5 */
1311 1311
1312 rdmsr(MSR_IA32_SYSENTER_CS, host_sysenter_cs, junk); 1312 rdmsr(MSR_IA32_SYSENTER_CS, host_sysenter_cs, junk);
1313 vmcs_write32(HOST_IA32_SYSENTER_CS, host_sysenter_cs); 1313 vmcs_write32(HOST_IA32_SYSENTER_CS, host_sysenter_cs);
@@ -1997,12 +1997,11 @@ again:
1997 "mov %c[rcx](%3), %%ecx \n\t" /* kills %3 (ecx) */ 1997 "mov %c[rcx](%3), %%ecx \n\t" /* kills %3 (ecx) */
1998#endif 1998#endif
1999 /* Enter guest mode */ 1999 /* Enter guest mode */
2000 "jne launched \n\t" 2000 "jne .Llaunched \n\t"
2001 ASM_VMX_VMLAUNCH "\n\t" 2001 ASM_VMX_VMLAUNCH "\n\t"
2002 "jmp kvm_vmx_return \n\t" 2002 "jmp .Lkvm_vmx_return \n\t"
2003 "launched: " ASM_VMX_VMRESUME "\n\t" 2003 ".Llaunched: " ASM_VMX_VMRESUME "\n\t"
2004 ".globl kvm_vmx_return \n\t" 2004 ".Lkvm_vmx_return: "
2005 "kvm_vmx_return: "
2006 /* Save guest registers, load host registers, keep flags */ 2005 /* Save guest registers, load host registers, keep flags */
2007#ifdef CONFIG_X86_64 2006#ifdef CONFIG_X86_64
2008 "xchg %3, (%%rsp) \n\t" 2007 "xchg %3, (%%rsp) \n\t"