android_kernel_samsung_msm8976/virt/kvm
Alex Williamson f0736cf055 KVM: Restrict non-existing slot state transitions
The API documentation states:

	When changing an existing slot, it may be moved in the guest
	physical memory space, or its flags may be modified.

An "existing slot" requires a non-zero npages (memory_size).  The only
transition we should therefore allow for a non-existing slot should be
to create the slot, which includes setting a non-zero memory_size.  We
currently allow calls to modify non-existing slots, which is pointless,
confusing, and possibly wrong.

With this we know that the invalidation path of __kvm_set_memory_region
is always for a delete or move and never for adding a zero size slot.

Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-12-13 23:21:50 -02:00
..
assigned-dev.c kvm: deliver msi interrupts from irq handler 2012-12-05 15:10:53 +02:00
async_pf.c KVM: do not release the error page 2012-08-06 16:04:58 +03:00
async_pf.h
coalesced_mmio.c
coalesced_mmio.h
eventfd.c kvm: Fix irqfd resampler list walk 2012-12-10 18:16:36 -02:00
ioapic.c KVM: x86: drop parameter validation in ioapic/pic 2012-08-14 22:35:22 -03:00
ioapic.h KVM: fix race with level interrupts 2012-07-20 16:12:00 -03:00
iodev.h
iommu.c KVM: do not treat noslot pfn as a error pfn 2012-10-29 20:31:04 -02:00
irq_comm.c kvm: add kvm_set_irq_inatomic 2012-12-05 15:10:45 +02:00
Kconfig KVM: Add config to support ple or cpu relax optimzation 2012-07-23 13:00:53 +03:00
kvm_main.c KVM: Restrict non-existing slot state transitions 2012-12-13 23:21:50 -02:00