From: Cornelia Huck Subject: Re: [PATCH V6 6/6] kvm: add fast mmio capabilitiy Date: Tue, 15 Sep 2015 18:13:19 +0200 Message-ID: <20150915181319.097e341c.cornelia.huck@de.ibm.com> References: <1442299319-5253-1-git-send-email-jasowang@redhat.com> <1442299319-5253-7-git-send-email-jasowang@redhat.com> <55F8344B.50300@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Jason Wang , gleb@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mst@redhat.com To: Paolo Bonzini Return-path: Received: from e06smtp08.uk.ibm.com ([195.75.94.104]:36520 "EHLO e06smtp08.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbbIOQNZ (ORCPT ); Tue, 15 Sep 2015 12:13:25 -0400 Received: from /spool/local by e06smtp08.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 15 Sep 2015 17:13:24 +0100 In-Reply-To: <55F8344B.50300@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 15 Sep 2015 17:07:55 +0200 Paolo Bonzini wrote: > On 15/09/2015 08:41, Jason Wang wrote: > > +With KVM_CAP_FAST_MMIO, a zero length mmio eventfd is allowed for > > +kernel to ignore the length of guest write and get a possible faster > > +response. Note the speedup may only work on some specific > > +architectures and setups. Otherwise, it's as fast as wildcard mmio > > +eventfd. > > I don't really like tying the capability to MMIO, especially since > zero length ioeventfd is already accepted for virtio-ccw. Actually, zero length ioeventfd does not make sense for virtio-ccw; we just don't check it (although we probably should). > > What about the following? > > diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt > index 7a3cb48a644d..247944071cc8 100644 > --- a/Documentation/virtual/kvm/api.txt > +++ b/Documentation/virtual/kvm/api.txt > @@ -1627,11 +1627,10 @@ to the registered address is equal to datamatch in struct kvm_ioeventfd. > For virtio-ccw devices, addr contains the subchannel id and datamatch the > virtqueue index. > > -With KVM_CAP_FAST_MMIO, a zero length mmio eventfd is allowed for > -kernel to ignore the length of guest write and get a possible faster > -response. Note the speedup may only work on some specific > -architectures and setups. Otherwise, it's as fast as wildcard mmio > -eventfd. > +With KVM_CAP_IOEVENTFD_ANY_LENGTH, a zero length ioeventfd is allowed, and > +the kernel will ignore the length of guest write and get a faster vmexit. s/get/may get/ ? > +The speedup may only apply to specific architectures, but the ioeventfd will > +work anyway.