Re: [PATCH v2 4/5] KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit

2015-08-19 Thread Avi Kivity
On 08/18/2015 10:57 PM, Paolo Bonzini wrote: On 18/08/2015 11:30, Avi Kivity wrote: KVM_USER_EXIT in practice should be so rare (at least with in-kernel LAPIC) that I don't think this matters. KVM_USER_EXIT is relatively uninteresting, it only exists to provide an alternative to signals that

Re: [PATCH v2 4/5] KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit

2015-08-18 Thread Avi Kivity
On 08/17/2015 04:15 PM, Paolo Bonzini wrote: On 16/08/2015 13:27, Avi Kivity wrote: On 08/05/2015 07:33 PM, Radim Krčmář wrote: The guest can use KVM_USER_EXIT instead of a signal-based exiting to userspace. Availability depends on KVM_CAP_USER_EXIT. Only x86 is implemented so far.

Re: [PATCH v2 4/5] KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit

2015-08-18 Thread Paolo Bonzini
On 18/08/2015 11:30, Avi Kivity wrote: KVM_USER_EXIT in practice should be so rare (at least with in-kernel LAPIC) that I don't think this matters. KVM_USER_EXIT is relatively uninteresting, it only exists to provide an alternative to signals that doesn't require expensive atomics on each

Re: [PATCH v2 4/5] KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit

2015-08-17 Thread Paolo Bonzini
On 16/08/2015 13:27, Avi Kivity wrote: On 08/05/2015 07:33 PM, Radim Krčmář wrote: The guest can use KVM_USER_EXIT instead of a signal-based exiting to userspace. Availability depends on KVM_CAP_USER_EXIT. Only x86 is implemented so far. Signed-off-by: Radim Krčmář rkrc...@redhat.com ---

Re: [PATCH v2 4/5] KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit

2015-08-16 Thread Avi Kivity
On 08/05/2015 07:33 PM, Radim Krčmář wrote: The guest can use KVM_USER_EXIT instead of a signal-based exiting to userspace. Availability depends on KVM_CAP_USER_EXIT. Only x86 is implemented so far. Signed-off-by: Radim Krčmář rkrc...@redhat.com --- v2: * use vcpu ioctl instead of vm one

Re: [PATCH v2 4/5] KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit

2015-08-06 Thread Radim Krčmář
2015-08-06 15:52+0200, Paolo Bonzini: On 06/08/2015 15:44, Radim Krčmář wrote: The two obvious extensions are flags to skip kvm_make_request() or kvm_vcpu_kick(), both of dubious use. Skipping kvm_make_request() would make some sense if you can set vcpu-run-request_interrupt_window

Re: [PATCH v2 4/5] KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit

2015-08-06 Thread Paolo Bonzini
On 06/08/2015 15:44, Radim Krčmář wrote: Can we just return EINVAL if the parameter is not NULL? It complicates handling if we extend the ioctl, but removes the useless clearing/copying/checking now ... Yes. The two obvious extensions are flags to skip kvm_make_request() or

Re: [PATCH v2 4/5] KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit

2015-08-06 Thread Radim Krčmář
2015-08-05 18:36+0200, Paolo Bonzini: On 05/08/2015 18:33, Radim Krčmář wrote: +4.97 KVM_USER_EXIT + +Capability: KVM_CAP_USER_EXIT +Architectures: x86 +Type: vcpu ioctl +Parameters: struct kvm_user_exit (in) +Returns: 0 on success, + -EFAULT if the parameter couldn't be read, +

Re: [PATCH v2 4/5] KVM: add KVM_USER_EXIT vcpu ioctl for userspace exit

2015-08-05 Thread Paolo Bonzini
On 05/08/2015 18:33, Radim Krčmář wrote: The guest can use KVM_USER_EXIT instead of a signal-based exiting to userspace. Availability depends on KVM_CAP_USER_EXIT. Only x86 is implemented so far. Signed-off-by: Radim Krčmář rkrc...@redhat.com --- v2: * use vcpu ioctl instead of vm