Re: [PATCH v2 7/8] KVM: selftests: Expect #PF(RSVD) when TDP is disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 27, 2022 at 5:31 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> On Tue, Oct 18, 2022, David Matlack wrote:
> > @@ -50,6 +73,9 @@ int main(int argc, char *argv[])
> >       TEST_REQUIRE(kvm_has_cap(KVM_CAP_SMALLER_MAXPHYADDR));
> >
> >       vm = vm_create_with_one_vcpu(&vcpu, guest_code);
> > +     vm_init_descriptor_tables(vm);
> > +     vcpu_init_descriptor_tables(vcpu);
> > +     vm_install_exception_handler(vm, PF_VECTOR, guest_page_fault_handler);
>
> Instead of installing an exception handler,
>
>         u8 vector = kvm_asm_safe(KVM_ASM_SAFE(FLDS_MEM_EAX),
>                                  "a"(MEM_REGION_GVA));
>
> then the guest/test can provide more precise information if a #PF doesn't occur.

I gave this a shot and realized this would prevent checking that it is
a reserved #PF, since kvm_asm_safe() only returns the vector.

It's probably more important to have more precise testing rather than
more precise failure reporting. But what did you have in mind
specifically? Maybe there's another way.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux