KVM: async_pf: Force a nested vmexit if the injected #PF is async_pf
Add an nested_apf field to vcpu->arch.exception to identify an async page fault, and constructs the expected vm-exit information fields. Force a nested VM exit from nested_vmx_check_exception() if the injected #PF is async page fault. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
This commit is contained in:
@@ -23,6 +23,7 @@ struct x86_exception {
|
||||
u16 error_code;
|
||||
bool nested_page_fault;
|
||||
u64 address; /* cr2 or nested page fault gpa */
|
||||
u8 async_page_fault;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -550,6 +550,7 @@ struct kvm_vcpu_arch {
|
||||
bool reinject;
|
||||
u8 nr;
|
||||
u32 error_code;
|
||||
u8 nested_apf;
|
||||
} exception;
|
||||
|
||||
struct kvm_queued_interrupt {
|
||||
@@ -651,6 +652,7 @@ struct kvm_vcpu_arch {
|
||||
u32 id;
|
||||
bool send_user_only;
|
||||
u32 host_apf_reason;
|
||||
unsigned long nested_apf_token;
|
||||
} apf;
|
||||
|
||||
/* OSVW MSRs (AMD only) */
|
||||
|
Reference in New Issue
Block a user