[PATCH 7/9] kvm/x86: split ioapic-handled and EOI exit bitmaps

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin The function to determine if the vector is handled by ioapic used to rely on the fact that only ioapic-handled vectors were set up to cause vmexits when virtual apic was in use. We're going to break this assumption when introducing Hyper-V

[PATCH 2/9] kvm/eventfd: factor out kvm_notify_acked_gsi()

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin Factor out kvm_notify_acked_gsi() helper to iterate over EOI listeners and notify those matching the given gsi. It will be reused in the upcoming Hyper-V SynIC implementation. Signed-off-by: Andrey Smetanin Reviewed-by:

[PATCH 3/9] kvm/eventfd: add arch-specific set_irq

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin Allow for arch-specific interrupt types to be set. For that, add kvm_arch_set_irq() which takes interrupt type-specific action if it recognizes the interrupt type given, and -EWOULDBLOCK otherwise. The default implementation always returns

[PATCH 4/9] kvm/irqchip: allow only multiple irqchip routes per GSI

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin Any other irq routing types (MSI, S390_ADAPTER, upcoming Hyper-V SynIC) map one-to-one to GSI. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev

[PATCH 5/9] kvm/irqchip: kvm_arch_irq_routing_update renaming split

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin Actually kvm_arch_irq_routing_update() should be kvm_arch_post_irq_routing_update() as it's called at the end of irq routing update. This renaming frees kvm_arch_irq_routing_update function name. kvm_arch_irq_routing_update() weak function which

[PATCH 1/9] kvm/eventfd: avoid loop inside irqfd_update()

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin The loop(for) inside irqfd_update() is unnecessary because any other value for irq_entry.type will just trigger schedule_work(>inject). Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan

[PATCH v2 0/9] Hyper-V synthetic interrupt controller

2015-10-16 Thread Denis V. Lunev
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

[PATCH 8/9] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin SynIC (synthetic interrupt controller) 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

[PATCH 9/9] kvm/x86: Hyper-V kvm exit

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin A new vcpu exit is introduced to notify the userspace of the changes in Hyper-V SynIC configuration triggered by guest writing to the corresponding MSRs. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan

[PATCH 6/9] drivers/hv: share Hyper-V SynIC constants with userspace

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin Moved Hyper-V synic contants from guest Hyper-V drivers private header into x86 arch uapi Hyper-V header. Added Hyper-V synic msr's flags into x86 arch uapi Hyper-V header. Signed-off-by: Andrey Smetanin Reviewed-by:

Re: [PATCH 9/9] kvm/x86: Hyper-V kvm exit

2015-10-16 Thread Paolo Bonzini
On 16/10/2015 09:07, Denis V. Lunev wrote: > > + /* KVM_EXIT_HYPERV */ > +struct kvm_hyperv_exit hyperv; > +Indicates that the VCPU exits into userspace to process some tasks > +related with Hyper-V emulation. Currently used to synchronize modified > +Hyper-V SynIC

Re: [PATCH 9/9] kvm/x86: Hyper-V kvm exit

2015-10-16 Thread Roman Kagan
On Fri, Oct 16, 2015 at 09:51:58AM +0200, Paolo Bonzini wrote: > The documentation should include the definition of the struct and the > definition of the subtypes (currently KVM_EXIT_HYPERV_SYNIC only). > > Documentation for KVM_CAP_HYPERV_SINIC and KVM_IRQ_ROUTING_HV_SINT is > missing, too. >