]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86: Don't fault-in APIC access page during initial allocation
authorSean Christopherson <seanjc@google.com>
Thu, 10 Oct 2024 18:23:38 +0000 (11:23 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Oct 2024 16:59:08 +0000 (12:59 -0400)
commitfcd366b95e6e356ae5069753938988b6c6286fa8
tree7a0a75af48655d259880afbbc0c0a2bbe1b5fbc6
parent68e51d0a437b09dcef621b4cc8e4fe02605bf5c4
KVM: x86: Don't fault-in APIC access page during initial allocation

Drop the gfn_to_page() lookup when installing KVM's internal memslot for
the APIC access page, as KVM doesn't need to immediately fault-in the page
now that the page isn't pinned.  In the extremely unlikely event the
kernel can't allocate a 4KiB page, KVM can just as easily return -EFAULT
on the future page fault.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20241010182427.1434605-37-seanjc@google.com>
arch/x86/kvm/lapic.c