Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282057
b: refs/heads/master
c: fee84b0
h: refs/heads/master
i:
  282055: 174f1ca
v: v3
  • Loading branch information
Avi Kivity committed Dec 27, 2011
1 parent c64bf69 commit fbd1697
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 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: 332b56e4841ef62db4dbf1b4b92195575e1c7338
refs/heads/master: fee84b079d5ddee2247b5c1f53162c330c622902
15 changes: 14 additions & 1 deletion trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1956,6 +1956,7 @@ static __init void nested_vmx_setup_ctls_msrs(void)
#endif
CPU_BASED_MOV_DR_EXITING | CPU_BASED_UNCOND_IO_EXITING |
CPU_BASED_USE_IO_BITMAPS | CPU_BASED_MONITOR_EXITING |
CPU_BASED_RDPMC_EXITING |
CPU_BASED_ACTIVATE_SECONDARY_CONTROLS;
/*
* We can allow some features even when not supported by the
Expand Down Expand Up @@ -2410,7 +2411,8 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf)
CPU_BASED_USE_TSC_OFFSETING |
CPU_BASED_MWAIT_EXITING |
CPU_BASED_MONITOR_EXITING |
CPU_BASED_INVLPG_EXITING;
CPU_BASED_INVLPG_EXITING |
CPU_BASED_RDPMC_EXITING;

if (yield_on_hlt)
min |= CPU_BASED_HLT_EXITING;
Expand Down Expand Up @@ -4613,6 +4615,16 @@ static int handle_invlpg(struct kvm_vcpu *vcpu)
return 1;
}

static int handle_rdpmc(struct kvm_vcpu *vcpu)
{
int err;

err = kvm_rdpmc(vcpu);
kvm_complete_insn_gp(vcpu, err);

return 1;
}

static int handle_wbinvd(struct kvm_vcpu *vcpu)
{
skip_emulated_instruction(vcpu);
Expand Down Expand Up @@ -5563,6 +5575,7 @@ static int (*kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu) = {
[EXIT_REASON_HLT] = handle_halt,
[EXIT_REASON_INVD] = handle_invd,
[EXIT_REASON_INVLPG] = handle_invlpg,
[EXIT_REASON_RDPMC] = handle_rdpmc,
[EXIT_REASON_VMCALL] = handle_vmcall,
[EXIT_REASON_VMCLEAR] = handle_vmclear,
[EXIT_REASON_VMLAUNCH] = handle_vmlaunch,
Expand Down

0 comments on commit fbd1697

Please sign in to comment.