Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172326
b: refs/heads/master
c: 92c0d90
h: refs/heads/master
v: v3
  • Loading branch information
Avi Kivity committed Dec 3, 2009
1 parent b8cd555 commit 1c830d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f5c35aad5ccaa8f1bd5d9e12f9f5251f3180093
refs/heads/master: 92c0d900159a4fa582e1c8ebcc1c4a8020defff5
10 changes: 3 additions & 7 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ struct vcpu_vmx {
struct shared_msr_entry *guest_msrs;
int nmsrs;
int save_nmsrs;
int msr_offset_efer;
#ifdef CONFIG_X86_64
u64 msr_host_kernel_gs_base;
u64 msr_guest_kernel_gs_base;
Expand Down Expand Up @@ -584,14 +583,11 @@ static void reload_tss(void)
load_TR_desc();
}

static bool update_transition_efer(struct vcpu_vmx *vmx)
static bool update_transition_efer(struct vcpu_vmx *vmx, int efer_offset)
{
int efer_offset = vmx->msr_offset_efer;
u64 guest_efer;
u64 ignore_bits;

if (efer_offset < 0)
return false;
guest_efer = vmx->vcpu.arch.shadow_efer;

/*
Expand Down Expand Up @@ -926,8 +922,8 @@ static void setup_msrs(struct vcpu_vmx *vmx)
move_msr_up(vmx, index, save_nmsrs++);
}
#endif
vmx->msr_offset_efer = index = __find_msr_index(vmx, MSR_EFER);
if (index >= 0 && update_transition_efer(vmx))
index = __find_msr_index(vmx, MSR_EFER);
if (index >= 0 && update_transition_efer(vmx, index))
move_msr_up(vmx, index, save_nmsrs++);

vmx->save_nmsrs = save_nmsrs;
Expand Down

0 comments on commit 1c830d6

Please sign in to comment.