]> err.no Git - linux-2.6/commitdiff
KVM: Add coalesced MMIO support (powerpc part)
authorLaurent Vivier <Laurent.Vivier@bull.net>
Fri, 30 May 2008 14:05:56 +0000 (16:05 +0200)
committerAvi Kivity <avi@qumranet.com>
Sun, 20 Jul 2008 09:42:31 +0000 (12:42 +0300)
This patch enables coalesced MMIO for powerpc architecture.
It defines KVM_MMIO_PAGE_OFFSET and KVM_CAP_COALESCED_MMIO.
It enables the compilation of coalesced_mmio.c.

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/powerpc/kvm/Makefile
arch/powerpc/kvm/powerpc.c
include/asm-powerpc/kvm_host.h

index d0d358d367ecaa359ffed9a351971a5748620fa0..04e3449e1f427f0ee644443a6a66c233afef58fc 100644 (file)
@@ -4,7 +4,7 @@
 
 EXTRA_CFLAGS += -Ivirt/kvm -Iarch/powerpc/kvm
 
-common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o)
+common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o)
 
 kvm-objs := $(common-objs) powerpc.o emulate.o booke_guest.o
 obj-$(CONFIG_KVM) += kvm.o
index 0513b359851ba601ac4df5168c4d8a1954415b45..b850d24970272cd130bcf6047f9583d4c310422b 100644 (file)
@@ -145,6 +145,9 @@ int kvm_dev_ioctl_check_extension(long ext)
        case KVM_CAP_USER_MEMORY:
                r = 1;
                break;
+       case KVM_CAP_COALESCED_MMIO:
+               r = KVM_COALESCED_MMIO_PAGE_OFFSET;
+               break;
        default:
                r = 0;
                break;
index 81a69d7110171bc5bc51fda14d8704de28af4b11..2655e2a4831ead92bfc16f2b764ac80a2c2dbd31 100644 (file)
@@ -31,6 +31,8 @@
 /* memory slots that does not exposed to userspace */
 #define KVM_PRIVATE_MEM_SLOTS 4
 
+#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
+
 /* We don't currently support large pages. */
 #define KVM_PAGES_PER_HPAGE (1<<31)