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 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.



[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