kernel-ark/virt/kvm
Andrea Arcangeli 11feeb4980 kvm: optimize away THP checks in kvm_is_mmio_pfn()
The checks on PG_reserved in the page structure on head and tail pages
aren't necessary because split_huge_page wouldn't transfer the
PG_reserved bit from head to tail anyway.

This was a forward-thinking check done in the case PageReserved was
set by a driver-owned page mapped in userland with something like
remap_pfn_range in a VM_PFNMAP region, but using hugepmds (not
possible right now). It was meant to be very safe, but it's overkill
as it's unlikely split_huge_page could ever run without the driver
noticing and tearing down the hugepage itself.

And if a driver in the future will really want to map a reserved
hugepage in userland using an huge pmd it should simply take care of
marking all subpages reserved too to keep KVM safe. This of course
would require such a hypothetical driver to tear down the huge pmd
itself and splitting the hugepage itself, instead of relaying on
split_huge_page, but that sounds very reasonable, especially
considering split_huge_page wouldn't currently transfer the reserved
bit anyway.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
2013-08-27 11:01:10 +03:00
..
arm KVM fixes for 3.11 2013-07-03 13:21:40 -07:00
assigned-dev.c KVM: Move irq routing to generic code 2013-04-26 20:27:17 +02:00
async_pf.c KVM: do not release the error page 2012-08-06 16:04:58 +03:00
async_pf.h KVM: Halt vcpu if page it tries to access is swapped out 2011-01-12 11:21:39 +02:00
coalesced_mmio.c KVM: make checks stricter in coalesced_mmio_in_range() 2011-12-27 11:17:07 +02:00
coalesced_mmio.h KVM: Make coalesced mmio use a device per zone 2011-09-25 19:17:57 +03:00
eventfd.c kvm: exclude ioeventfd from counting kvm_io_range limit 2013-06-04 11:49:38 +03:00
ioapic.c KVM: Set TMR when programming ioapic entry 2013-04-16 16:32:40 -03:00
ioapic.h KVM: Set TMR when programming ioapic entry 2013-04-16 16:32:40 -03:00
iodev.h KVM: remove in_range from io devices 2009-09-10 08:33:05 +03:00
iommu.c kvm: Obey read-only mappings in iommu 2013-01-27 12:41:41 +02:00
irq_comm.c KVM: Fix RTC interrupt coalescing tracking 2013-06-27 14:20:53 +03:00
irqchip.c KVM: Move irq routing setup to irqchip.c 2013-04-26 20:27:18 +02:00
Kconfig KVM: Introduce CONFIG_HAVE_KVM_IRQ_ROUTING 2013-04-26 20:27:14 +02:00
kvm_main.c kvm: optimize away THP checks in kvm_is_mmio_pfn() 2013-08-27 11:01:10 +03:00