selftests: kvm: provide common function to enable eVMCS
There are two tests already enabling eVMCS and a third is coming. Add a function that enables the capability and tests the result. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -220,6 +220,8 @@ struct hv_enlightened_vmcs {
|
||||
struct hv_enlightened_vmcs *current_evmcs;
|
||||
struct hv_vp_assist_page *current_vp_assist;
|
||||
|
||||
int vcpu_enable_evmcs(struct kvm_vm *vm, int vcpu_id);
|
||||
|
||||
static inline int enable_vp_assist(uint64_t vp_assist_pa, void *vp_assist)
|
||||
{
|
||||
u64 val = (vp_assist_pa & HV_X64_MSR_VP_ASSIST_PAGE_ADDRESS_MASK) |
|
||||
|
||||
Reference in New Issue
Block a user