KVM: Use vcpu-specific gva->hva translation when querying host page size
Use kvm_vcpu_gfn_to_hva() when retrieving the host page size so that the
correct set of memslots is used when handling x86 page faults in SMM.
Fixes: 54bf36aac5
("KVM: x86: use vcpu-specific functions to read/write/translate GFNs")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
このコミットが含まれているのは:
@@ -1402,14 +1402,14 @@ bool kvm_is_visible_gfn(struct kvm *kvm, gfn_t gfn)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kvm_is_visible_gfn);
|
||||
|
||||
unsigned long kvm_host_page_size(struct kvm *kvm, gfn_t gfn)
|
||||
unsigned long kvm_host_page_size(struct kvm_vcpu *vcpu, gfn_t gfn)
|
||||
{
|
||||
struct vm_area_struct *vma;
|
||||
unsigned long addr, size;
|
||||
|
||||
size = PAGE_SIZE;
|
||||
|
||||
addr = gfn_to_hva(kvm, gfn);
|
||||
addr = kvm_vcpu_gfn_to_hva(vcpu, gfn);
|
||||
if (kvm_is_error_hva(addr))
|
||||
return PAGE_SIZE;
|
||||
|
||||
|
新しいイシューから参照
ユーザーをブロックする