kvm: add a memslot flag for incoherent memory regions
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 17 Nov 2014 14:58:51 +0000 (14:58 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 25 Nov 2014 13:57:27 +0000 (13:57 +0000)
Memory regions may be incoherent with the caches, typically when the
guest has mapped a host system RAM backed memory region as uncached.
Add a flag KVM_MEMSLOT_INCOHERENT so that we can tag these memslots
and handle them appropriately when mapping them.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
include/linux/kvm_host.h

index a6059bd..e4d8f70 100644 (file)
@@ -43,6 +43,7 @@
  * include/linux/kvm_h.
  */
 #define KVM_MEMSLOT_INVALID    (1UL << 16)
+#define KVM_MEMSLOT_INCOHERENT (1UL << 17)
 
 /* Two fragments for cross MMIO pages. */
 #define KVM_MAX_MMIO_FRAGMENTS 2