[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 0/6] uq/master: TPR access optimization for Windows
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH 0/6] uq/master: TPR access optimization for Windows guests |
Date: |
Sun, 5 Feb 2012 13:39:06 +0100 |
And yet another qemu-kvm piece: Windows 32-bit guests make heavy use of
the MMIO-based TPR register. On older Intel CPUs and current AMDs, this
causes significant KVM vmexit rates as the register needs to be trapped
by the hypervisor.
This series introduces a workaround for this hardware limitation: A
paravirtual APIC extension, based on guest extension using an options
ROM and a special VAPIC device that patches TPR accesses of Windows to
call into the option ROM instead. See patch 3 for details.
The speedup is noteworthy: I measured 15 vs. 45 s XP bootup time (disk
cached) with the VAPIC enabled vs. disabled on an Intel CPU with
flexpriority=0.
Therefore, the VAPI is enabled by default, even in TCG mode. Here, no
speedup can be achieved as the emulation overhead of the TPR register is
marginal compared to instruction emulation. On the other hand, enabling
the optimization causes not measurable slowdown of Windows guests.
The patches depend on the follow upstream or uq/master patches:
- kvm: Implement kvm_irqchip_in_kernel
http://thread.gmane.org/gmane.comp.emulators.qemu/134399
- KVM: Fix breakages of QOM conversion
http://permalink.gmane.org/gmane.comp.emulators.qemu/134844
It is based on upstream commit cb437e48ab (before the VGA breakage). The
series plus dependencies is also available at
git://git.kiszka.org/qemu-kvm.git queues/kvm-tpr
Please review carefully.
Jan Kiszka (6):
target-i386: Add infrastructure for reporting TPR MMIO accesses
kvmvapic: Add option ROM
kvmvapic: Introduce TPR access optimization for Windows guests
kvmvapic: Simplify mp/up_set_tpr
optionsrom: Reserve space for checksum
kvmvapic: Use optionrom helpers
.gitignore | 1 +
Makefile | 2 +-
Makefile.target | 3 +-
cpu-all.h | 3 +-
hw/apic.c | 126 +++++++-
hw/apic.h | 2 +
hw/apic_common.c | 68 ++++-
hw/apic_internal.h | 27 ++
hw/kvm/apic.c | 32 ++
hw/kvmvapic.c | 738 +++++++++++++++++++++++++++++++++++++++++
pc-bios/optionrom/Makefile | 2 +-
pc-bios/optionrom/kvmvapic.S | 335 +++++++++++++++++++
pc-bios/optionrom/optionrom.h | 3 +-
target-i386/cpu.h | 9 +
target-i386/helper.c | 19 +
target-i386/kvm.c | 24 ++-
16 files changed, 1374 insertions(+), 20 deletions(-)
create mode 100644 hw/kvmvapic.c
create mode 100644 pc-bios/optionrom/kvmvapic.S
--
1.7.3.4
- [Qemu-devel] [PATCH 0/6] uq/master: TPR access optimization for Windows guests,
Jan Kiszka <=
- [Qemu-devel] [PATCH 2/6] kvmvapic: Add option ROM, Jan Kiszka, 2012/02/05
- [Qemu-devel] [PATCH 6/6] kvmvapic: Use optionrom helpers, Jan Kiszka, 2012/02/05
- [Qemu-devel] [PATCH 1/6] target-i386: Add infrastructure for reporting TPR MMIO accesses, Jan Kiszka, 2012/02/05
- [Qemu-devel] [PATCH 5/6] optionsrom: Reserve space for checksum, Jan Kiszka, 2012/02/05
- [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests, Jan Kiszka, 2012/02/05
- Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests, Avi Kivity, 2012/02/09