Re: [PATCH v3 7/7] selftests: KVM: Add test case for MMIO during vectoring

From: Sean Christopherson
Date: Wed Dec 18 2024 - 13:44:27 EST


KVM: selftests:

On Tue, Dec 17, 2024, Ivan Orlov wrote:
> Extend the 'set_memory_region_test' with a test case which covers the
> MMIO during vectoring error handling. The test case

Probably a good idea to explicitly state this is x86-only (hard to see that
from the diff alone).

>
> 1) Sets an IDT descriptor base to point to an MMIO address
> 2) Generates a #GP in the guest
> 3) Verifies that we got a correct exit reason and suberror code

No "we". It's very specifically userspace that needs to see the exit.

> 4) Verifies that we got a corrent reported GPA in internal.data[3]

s/corrent/correct?

And #4 can be combined with #3:

3) Verifies userspace gets the correct exit reason, suberror code, and
GPA in internal.data[3]