mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-23 05:57:33 +00:00
hv: trap RDPMC instruction execution from any guest
PMU is hidden from any guest, UD is expected when guest try to execute 'rdpmc' instruction. this patch sets 'RDPMC exiting' in Processorbased VM-execution control. Tracked-On: #3453 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
3d412266bc
commit
450d2cf2e9
@ -283,6 +283,11 @@ static void init_exec_ctrl(struct acrn_vcpu *vcpu)
|
||||
*/
|
||||
value32 &= ~VMX_PROCBASED_CTLS_INVLPG;
|
||||
|
||||
/*
|
||||
* Enable VM_EXIT for rdpmc execution.
|
||||
*/
|
||||
value32 |= VMX_PROCBASED_CTLS_RDPMC;
|
||||
|
||||
exec_vmwrite32(VMX_PROC_VM_EXEC_CONTROLS, value32);
|
||||
pr_dbg("VMX_PROC_VM_EXEC_CONTROLS: 0x%x ", value32);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user