KVM: Add coalesced MMIO support (powerpc part)
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>
This commit is contained in:
committed by
Avi Kivity
parent
542472b53e
commit
588968b6b7
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
EXTRA_CFLAGS += -Ivirt/kvm -Iarch/powerpc/kvm
|
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
|
kvm-objs := $(common-objs) powerpc.o emulate.o booke_guest.o
|
||||||
obj-$(CONFIG_KVM) += kvm.o
|
obj-$(CONFIG_KVM) += kvm.o
|
||||||
|
@@ -145,6 +145,9 @@ int kvm_dev_ioctl_check_extension(long ext)
|
|||||||
case KVM_CAP_USER_MEMORY:
|
case KVM_CAP_USER_MEMORY:
|
||||||
r = 1;
|
r = 1;
|
||||||
break;
|
break;
|
||||||
|
case KVM_CAP_COALESCED_MMIO:
|
||||||
|
r = KVM_COALESCED_MMIO_PAGE_OFFSET;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
r = 0;
|
r = 0;
|
||||||
break;
|
break;
|
||||||
|
@@ -31,6 +31,8 @@
|
|||||||
/* memory slots that does not exposed to userspace */
|
/* memory slots that does not exposed to userspace */
|
||||||
#define KVM_PRIVATE_MEM_SLOTS 4
|
#define KVM_PRIVATE_MEM_SLOTS 4
|
||||||
|
|
||||||
|
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
|
||||||
|
|
||||||
/* We don't currently support large pages. */
|
/* We don't currently support large pages. */
|
||||||
#define KVM_PAGES_PER_HPAGE (1<<31)
|
#define KVM_PAGES_PER_HPAGE (1<<31)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user