From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit Date: Wed, 20 Jan 2016 14:59:08 +0100 Message-ID: <569F92AC.4030506@redhat.com> References: <1452595842-20880-1-git-send-email-asmetanin@virtuozzo.com> <1452595842-20880-5-git-send-email-asmetanin@virtuozzo.com> <009401d14ea5$dc8cf250$95a6d6f0$@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: 'Gleb Natapov' , 'Joerg Roedel' , "'K. Y. Srinivasan'" , 'Haiyang Zhang' , 'Roman Kagan' , "'Denis V. Lunev'" , qemu-devel@nongnu.org To: Pavel Fedin , 'Andrey Smetanin' , kvm@vger.kernel.org Return-path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:33768 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932261AbcATN7M (ORCPT ); Wed, 20 Jan 2016 08:59:12 -0500 Received: by mail-wm0-f65.google.com with SMTP id u188so4316399wmu.0 for ; Wed, 20 Jan 2016 05:59:12 -0800 (PST) In-Reply-To: <009401d14ea5$dc8cf250$95a6d6f0$@samsung.com> Sender: kvm-owner@vger.kernel.org List-ID: 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/events processing >> in userspace. >> >> + /* KVM_EXIT_HYPERV_HCALL */ >> + struct { >> + __u64 input; >> + __u64 params[2]; >> + __u64 result; >> + } hv_hcall; >> +Indicates that the VCPU exits into userspace to process some guest >> +Hyper-V hypercalls. > > Why introducing this? We already have KVM_EXIT_HYPERCALL, which is > exactly the same. AFAIK it's not used at the moment. > Additionally, in theory we could have hypercalls handled in > userspace for something else except HyperV. And not only for x86. 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. This is the latter. So we should not add a new exit (I suggested elsewhere the existing hyper-v exit) but we shouldn't use KVM_EXIT_HYPERCALL either. There is a precedent in fact of using "something else than KVM_EXIT_HYPERCALL" for interoperability/compatibility hypercalls, namely KVM_EXIT_PAPR_HCALL. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLtI4-0003aH-57 for qemu-devel@nongnu.org; Wed, 20 Jan 2016 08:59:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLtI0-0004P8-VZ for qemu-devel@nongnu.org; Wed, 20 Jan 2016 08:59:16 -0500 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:36027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLtI0-0004Oy-Nz for qemu-devel@nongnu.org; Wed, 20 Jan 2016 08:59:12 -0500 Received: by mail-wm0-x244.google.com with SMTP id l65so4305289wmf.3 for ; Wed, 20 Jan 2016 05:59:12 -0800 (PST) Sender: Paolo Bonzini References: <1452595842-20880-1-git-send-email-asmetanin@virtuozzo.com> <1452595842-20880-5-git-send-email-asmetanin@virtuozzo.com> <009401d14ea5$dc8cf250$95a6d6f0$@samsung.com> From: Paolo Bonzini Message-ID: <569F92AC.4030506@redhat.com> Date: Wed, 20 Jan 2016 14:59:08 +0100 MIME-Version: 1.0 In-Reply-To: <009401d14ea5$dc8cf250$95a6d6f0$@samsung.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Fedin , 'Andrey Smetanin' , kvm@vger.kernel.org Cc: 'Gleb Natapov' , 'Joerg Roedel' , qemu-devel@nongnu.org, 'Roman Kagan' , "'Denis V. Lunev'" , "'K. Y. Srinivasan'" , 'Haiyang Zhang' 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/events processing >> in userspace. >> >> + /* KVM_EXIT_HYPERV_HCALL */ >> + struct { >> + __u64 input; >> + __u64 params[2]; >> + __u64 result; >> + } hv_hcall; >> +Indicates that the VCPU exits into userspace to process some guest >> +Hyper-V hypercalls. > > Why introducing this? We already have KVM_EXIT_HYPERCALL, which is > exactly the same. AFAIK it's not used at the moment. > Additionally, in theory we could have hypercalls handled in > userspace for something else except HyperV. And not only for x86. 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. This is the latter. So we should not add a new exit (I suggested elsewhere the existing hyper-v exit) but we shouldn't use KVM_EXIT_HYPERCALL either. There is a precedent in fact of using "something else than KVM_EXIT_HYPERCALL" for interoperability/compatibility hypercalls, namely KVM_EXIT_PAPR_HCALL. Paolo