Re: [PATCH v6 7/7] KVM: selftests: Add test for user space MSR handling

2020-09-03 Thread Aaron Lewis
> +static void handle_rdmsr(struct kvm_run *run) > +{ > + run->msr.data = run->msr.index; > + msr_reads++; > + > + if (run->msr.index == MSR_SYSCALL_MASK || > + run->msr.index == MSR_GS_BASE) { > + TEST_ASSERT(run->msr.reason != KVM_MSR_EXIT_REASON_FILTER,

[PATCH v6 7/7] KVM: selftests: Add test for user space MSR handling

2020-09-02 Thread Alexander Graf
Now that we have the ability to handle MSRs from user space and also to select which ones we do want to prevent in-kernel KVM code from handling, let's add a selftest to show case and verify the API. Signed-off-by: Alexander Graf --- v2 -> v3: -