Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-20 Thread Paolo Bonzini
On 20/01/2016 18:31, 'Roman Kagan' wrote: > On Wed, Jan 20, 2016 at 06:02:25PM +0100, Paolo Bonzini wrote: >> >> >> On 20/01/2016 16:20, 'Roman Kagan' wrote: > So we should not add a new exit >>> Why? VCPU exit codes are not a scarse resource. >> >> Indeed, but grouping makes things easier t

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-20 Thread 'Roman Kagan'
On Wed, Jan 20, 2016 at 06:02:25PM +0100, Paolo Bonzini wrote: > > > On 20/01/2016 16:20, 'Roman Kagan' wrote: > >> > So we should not add a new exit > > Why? VCPU exit codes are not a scarse resource. > > Indeed, but grouping makes things easier to understand. > > > So far we've envisaged two

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-20 Thread Paolo Bonzini
On 20/01/2016 16:20, 'Roman Kagan' wrote: >> > Because, as the docs say, we don't want to do that. We want to use >> > KVM_EXIT_IO or KVM_EXIT_MMIO, with two exceptions: s390 and wherever we >> > can't do that for compatibility purposes. > I must admit I saw this part in the docs but failed to u

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-20 Thread Roman Kagan
On Wed, Jan 20, 2016 at 02:43:01PM +0100, Paolo Bonzini wrote: > > > On 12/01/2016 11:50, Andrey Smetanin wrote: > > The patch implements KVM_EXIT_HV_HCALL functionality > > for Hyper-V VMBus hypercalls: HV_X64_HCALL_POST_MESSAGE, > > HV_X64_HCALL_SIGNAL_EVENT. > > > > Signed-off-by: Andrey Smet

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-20 Thread Paolo Bonzini
On 12/01/2016 11:50, Andrey Smetanin wrote: > The patch implements KVM_EXIT_HV_HCALL functionality > for Hyper-V VMBus hypercalls: HV_X64_HCALL_POST_MESSAGE, > HV_X64_HCALL_SIGNAL_EVENT. > > Signed-off-by: Andrey Smetanin > Reviewed-by: Roman Kagan > CC: Gleb Natapov > CC: Paolo Bonzini > CC

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-20 Thread 'Roman Kagan'
On Wed, Jan 20, 2016 at 02:59:08PM +0100, Paolo Bonzini wrote: > >> --- a/Documentation/virtual/kvm/api.txt > >> +++ b/Documentation/virtual/kvm/api.txt > >> @@ -3359,6 +3359,14 @@ Hyper-V SynIC state change. Notification is used to > >> remap SynIC > >> event/message pages and to enable/disable

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-20 Thread Pavel Fedin
Hello! > Because, as the docs say, we don't want to do that. Where do they say this? I remember that "we want to use KVM_EXIT_IO or KVM_EXIT_MMIO for handling device I/O". In other words - we should not introduce anything that requires any other mechanism (e. g. hypercalls) to handle this. An

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-20 Thread Paolo Bonzini
On 14/01/2016 09:30, Pavel Fedin wrote: > Hello! > >> --- a/Documentation/virtual/kvm/api.txt >> +++ b/Documentation/virtual/kvm/api.txt >> @@ -3359,6 +3359,14 @@ Hyper-V SynIC state change. Notification is used to >> remap SynIC >> event/message pages and to enable/disable SynIC messages/eve

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-14 Thread 'Roman Kagan'
On Thu, Jan 14, 2016 at 01:50:20PM +0300, Pavel Fedin wrote: > > We thought reusing KVM_EXIT_HYPERCALL was a bad idea exactly because of > > that. Hypercalls are not universal, the calling and return conventions > > are hypervisor-specific. > > Treatment of them is hypervisor-specific, but from

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-14 Thread Pavel Fedin
Hello! > We thought reusing KVM_EXIT_HYPERCALL was a bad idea exactly because of > that. Hypercalls are not universal, the calling and return conventions > are hypervisor-specific. Treatment of them is hypervisor-specific, but from CPUs point of view they are the same. You load something into

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-14 Thread 'Roman Kagan'
On Thu, Jan 14, 2016 at 11:30:43AM +0300, Pavel Fedin wrote: > > --- a/Documentation/virtual/kvm/api.txt > > +++ b/Documentation/virtual/kvm/api.txt > > @@ -3359,6 +3359,14 @@ Hyper-V SynIC state change. Notification is used to > > remap SynIC > > event/message pages and to enable/disable SynIC m

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-14 Thread Pavel Fedin
Hello! > --- a/Documentation/virtual/kvm/api.txt > +++ b/Documentation/virtual/kvm/api.txt > @@ -3359,6 +3359,14 @@ Hyper-V SynIC state change. Notification is used to > remap SynIC > event/message pages and to enable/disable SynIC messages/events processing > in userspace. > > +

[Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-12 Thread Andrey Smetanin
The patch implements KVM_EXIT_HV_HCALL functionality for Hyper-V VMBus hypercalls: HV_X64_HCALL_POST_MESSAGE, HV_X64_HCALL_SIGNAL_EVENT. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: R