[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 0/5] KVM: Hyper-V synthetic interrupt controller
From: |
Andrey Smetanin |
Subject: |
[Qemu-devel] [PATCH v4 0/5] KVM: Hyper-V synthetic interrupt controller |
Date: |
Tue, 10 Nov 2015 15:36:30 +0300 |
This patchset implements the KVM part of the synthetic interrupt
controller (SynIC) which is a building block of the Hyper-V
paravirtualized device bus (vmbus).
SynIC is a lapic extension, which is controlled via MSRs and maintains
for each vCPU
- 16 synthetic interrupt "lines" (SINT's); each can be configured to
trigger a specific interrupt vector optionally with auto-EOI
semantics
- a message page in the guest memory with 16 256-byte per-SINT message
slots
- an event flag page in the guest memory with 16 2048-bit per-SINT
event flag areas
The host triggers a SINT whenever it delivers a new message to the
corresponding slot or flips an event flag bit in the corresponding area.
The guest informs the host that it can try delivering a message by
explicitly asserting EOI in lapic or writing to End-Of-Message (EOM)
MSR.
The userspace (qemu) triggers interrupts and receives EOM notifications
via irqfd with resampler; for that, a GSI is allocated for each
configured SINT, and irq_routing api is extended to support GSI-SINT
mapping.
Besides, a new vcpu exit is introduced to notify the userspace of the
changes in SynIC configuraion triggered by guest writing to the
corresponding MSRs.
Since auto-EOI behavior of SynIC cannot be made compatible with APIC
hardware virtualization, the latter is disabled using a newly
introduced flag, when SynIC is activated.
This patches seria has been tested by running of kvm-unit-tests
(which also includes previosly sent 'hyperv_synic' test) with
host CPU which supports APICv (Intel(R) Xeon(R) CPU E5-2407 v2 @ 2.40GHz)
Signed-off-by: Andrey Smetanin <address@hidden>
Reviewed-by: Roman Kagan <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
CC: Gleb Natapov <address@hidden>
CC: Paolo Bonzini <address@hidden>
CC: Roman Kagan <address@hidden>
CC: Denis V. Lunev <address@hidden>
CC: address@hidden
Changes v4:
* disable APICv in case Hyper-V SynIC enabled
* patchset rebase into latest kvm/queue (10 Nov 2015)
* do Hyper-V SynIC exit only at !host(guest) msr's writes
Changes v3:
* Hyper-V SynIC KVM API documentation fixes
Changes v2:
* irqchip/eventfd preparation improvements to support
arch specific routing entries like Hyper-V SynIC.
* add Hyper-V SynIC vectors into EOI exit bitmap.
* do not use posted interrupts in case of Hyper-V SynIC
AutoEOI vectors
Andrey Smetanin (5):
kvm/irqchip: kvm_arch_irq_routing_update renaming split
kvm/x86: split ioapic-handled and EOI exit bitmaps
kvm/x86: per-vcpu apicv deactivation support
kvm/x86: Hyper-V synthetic interrupt controller
kvm/x86: Hyper-V kvm exit
Documentation/virtual/kvm/api.txt | 41 +++++
arch/x86/include/asm/kvm_host.h | 26 ++-
arch/x86/kvm/hyperv.c | 335 ++++++++++++++++++++++++++++++++++++++
arch/x86/kvm/hyperv.h | 23 +++
arch/x86/kvm/ioapic.c | 4 +-
arch/x86/kvm/ioapic.h | 7 +-
arch/x86/kvm/irq.c | 2 +-
arch/x86/kvm/irq_comm.c | 41 ++++-
arch/x86/kvm/lapic.c | 40 +++--
arch/x86/kvm/lapic.h | 9 +-
arch/x86/kvm/svm.c | 13 +-
arch/x86/kvm/vmx.c | 48 +++---
arch/x86/kvm/x86.c | 66 +++++++-
include/linux/kvm_host.h | 12 +-
include/uapi/linux/kvm.h | 25 +++
virt/kvm/irqchip.c | 7 +-
16 files changed, 625 insertions(+), 74 deletions(-)
--
2.4.3
- [Qemu-devel] [PATCH v4 0/5] KVM: Hyper-V synthetic interrupt controller,
Andrey Smetanin <=
- [Qemu-devel] [PATCH v4 1/5] kvm/irqchip: kvm_arch_irq_routing_update renaming split, Andrey Smetanin, 2015/11/10
- [Qemu-devel] [PATCH v4 2/5] kvm/x86: split ioapic-handled and EOI exit bitmaps, Andrey Smetanin, 2015/11/10
- [Qemu-devel] [PATCH v4 5/5] kvm/x86: Hyper-V kvm exit, Andrey Smetanin, 2015/11/10
- [Qemu-devel] [PATCH v4 3/5] kvm/x86: per-vcpu apicv deactivation support, Andrey Smetanin, 2015/11/10
- [Qemu-devel] [PATCH v4 4/5] kvm/x86: Hyper-V synthetic interrupt controller, Andrey Smetanin, 2015/11/10