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.