Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 542472b5 authored by Laurent Vivier's avatar Laurent Vivier Committed by Avi Kivity
Browse files

KVM: Add coalesced MMIO support (x86 part)



This patch enables coalesced MMIO for x86 architecture.
It defines KVM_MMIO_PAGE_OFFSET and KVM_CAP_COALESCED_MMIO.
It enables the compilation of coalesced_mmio.c.

Signed-off-by: default avatarLaurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent 5f94c174
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2,7 +2,8 @@
# Makefile for Kernel-based Virtual Machine module
# Makefile for Kernel-based Virtual Machine module
#
#


common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o)
common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \
                coalesced_mmio.o)
ifeq ($(CONFIG_KVM_TRACE),y)
ifeq ($(CONFIG_KVM_TRACE),y)
common-objs += $(addprefix ../../../virt/kvm/, kvm_trace.o)
common-objs += $(addprefix ../../../virt/kvm/, kvm_trace.o)
endif
endif
+3 −0
Original line number Original line Diff line number Diff line
@@ -885,6 +885,9 @@ int kvm_dev_ioctl_check_extension(long ext)
	case KVM_CAP_MP_STATE:
	case KVM_CAP_MP_STATE:
		r = 1;
		r = 1;
		break;
		break;
	case KVM_CAP_COALESCED_MMIO:
		r = KVM_COALESCED_MMIO_PAGE_OFFSET;
		break;
	case KVM_CAP_VAPIC:
	case KVM_CAP_VAPIC:
		r = !kvm_x86_ops->cpu_has_accelerated_tpr();
		r = !kvm_x86_ops->cpu_has_accelerated_tpr();
		break;
		break;
+1 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@
#define KVM_PRIVATE_MEM_SLOTS 4
#define KVM_PRIVATE_MEM_SLOTS 4


#define KVM_PIO_PAGE_OFFSET 1
#define KVM_PIO_PAGE_OFFSET 1
#define KVM_COALESCED_MMIO_PAGE_OFFSET 2


#define CR3_PAE_RESERVED_BITS ((X86_CR3_PWT | X86_CR3_PCD) - 1)
#define CR3_PAE_RESERVED_BITS ((X86_CR3_PWT | X86_CR3_PCD) - 1)
#define CR3_NONPAE_RESERVED_BITS ((PAGE_SIZE-1) & ~(X86_CR3_PWT | X86_CR3_PCD))
#define CR3_NONPAE_RESERVED_BITS ((PAGE_SIZE-1) & ~(X86_CR3_PWT | X86_CR3_PCD))