Re: [PATCH v3 4/4] KVM: x86: Add support for local interrupt requests from userspace

2015-06-26 Thread Paolo Bonzini
On 26/06/2015 02:26, Steve Rutherford wrote: Implemented a basic version of this, and ran into some potential issues with this strategy. Supporting PIC masking/unmasking by the CPU/APIC means that either: A) PIC interrupts need to be bufferable in the kernel (with some way of comparing

Re: [PATCH v3 4/4] KVM: x86: Add support for local interrupt requests from userspace

2015-06-25 Thread Steve Rutherford
However, why is the roundtrip to userspace necessary? Could you pass the extint index directly as an argument to KVM_INTERRUPT? It's backwards-compatible, because KVM_INTERRUPT so far could not be used together with an in-kernel LAPIC. If you could do that, you could also avoid the new

Re: [PATCH v3 4/4] KVM: x86: Add support for local interrupt requests from userspace

2015-06-21 Thread Paolo Bonzini
On 20/06/2015 02:41, Steve Rutherford wrote: Pinging this thread. Should I go with skipping the round trip, and combining KVM_REQUEST_PIC_INJECTION with the KVM_INTERRUPT (a VCPU IOCTL)? [It's currently a VM IOCTL, which seems reasonable, given that the PIC is a per VM device. When

Re: [PATCH v3 4/4] KVM: x86: Add support for local interrupt requests from userspace

2015-06-19 Thread Steve Rutherford
On Wed, Jun 03, 2015 at 11:38:21AM +0200, Paolo Bonzini wrote: On 03/06/2015 01:51, Steve Rutherford wrote: In order to enable userspace PIC support, the userspace PIC needs to be able to inject local interrupt requests. This adds the ioctl KVM_REQUEST_PIC_INJECTION and kvm exit

Re: [PATCH v3 4/4] KVM: x86: Add support for local interrupt requests from userspace

2015-06-04 Thread Steve Rutherford
On Wed, Jun 03, 2015 at 11:38:21AM +0200, Paolo Bonzini wrote: However, why is the roundtrip to userspace necessary? Could you pass the extint index directly as an argument to KVM_INTERRUPT? It's backwards-compatible, because KVM_INTERRUPT so far could not be used together with an

Re: [PATCH v3 4/4] KVM: x86: Add support for local interrupt requests from userspace

2015-06-03 Thread Paolo Bonzini
On 03/06/2015 01:51, Steve Rutherford wrote: In order to enable userspace PIC support, the userspace PIC needs to be able to inject local interrupt requests. This adds the ioctl KVM_REQUEST_PIC_INJECTION and kvm exit KVM_EXIT_GET_EXTINT. The vm ioctl KVM_REQUEST_PIC_INJECTION makes a

[PATCH v3 4/4] KVM: x86: Add support for local interrupt requests from userspace

2015-06-02 Thread Steve Rutherford
In order to enable userspace PIC support, the userspace PIC needs to be able to inject local interrupt requests. This adds the ioctl KVM_REQUEST_PIC_INJECTION and kvm exit KVM_EXIT_GET_EXTINT. The vm ioctl KVM_REQUEST_PIC_INJECTION makes a KVM_REQ_EVENT request on the BSP, which causes the BSP