From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUb14-0007qU-C1 for qemu-devel@nongnu.org; Thu, 18 Sep 2014 08:41:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUb0u-00044N-Uf for qemu-devel@nongnu.org; Thu, 18 Sep 2014 08:40:54 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:17342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUb0u-00041A-3P for qemu-devel@nongnu.org; Thu, 18 Sep 2014 08:40:44 -0400 Message-ID: <541AD29D.4040903@huawei.com> Date: Thu, 18 Sep 2014 20:39:57 +0800 From: Linhaifeng MIME-Version: 1.0 References: <20140917083815.GA10450@redhat.com> <541956B8.1070203@huawei.com> <20140917095638.GA11743@redhat.com> <541A2B31.5000808@huawei.com> <20140918051657.GA23433@redhat.com> In-Reply-To: <20140918051657.GA23433@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] vhost-user: VHOST_SET_MEM_TABLE, VHOST_SET_VRING_CALL need a reply? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, n.nikolaev@virtualopensystems.com, jerry.lilijun@huawei.com On 2014/9/18 13:16, Michael S. Tsirkin wrote: > On Thu, Sep 18, 2014 at 08:45:37AM +0800, Linhaifeng wrote: >> >> >> On 2014/9/17 17:56, Michael S. Tsirkin wrote: >>> On Wed, Sep 17, 2014 at 05:39:04PM +0800, Linhaifeng wrote: >>>> I think maybe is not need for the backend to wait for response. >>>> >>>> There is another way.vhost-user send "VHOST_GET_MEM_TABLE" to qemu then qemu send VHOST_SET_MEM_TABLE to update the regions of vhost-user.same as other command. >>>> If qemu could response the request of the vhost-user.the vhost-user could update date at anytime. >>> >>> The updates are initiated by QEMU, as a result of IOMMU, >>> memory hotplug or some other configuration change. >> >> How to deal with the vhost-user restart? >> when vhost-user restart it will lost the infomation which QEMU send. >> >> In the kernel mode vhost will restart with QEMU but in the user mode vhost will not. > > vhost-user must restart with qemu only. > Sometimes qemu not allowed to restart. e.g. The customer want to update the vhost-user to a newer version but don't want to restart the VM. > The nature of virtio protocol is such that there's not enough in-memory > state for host to gracefully recover from losing VQ state. > > We could add a new feature to allow recovery by reporting > failure to guest, and disabling processing new requests. > Guest could respond by recovering / discarding submitted > requests, re-enabling the device (likely by executing a reset) > and re-submitting requests. > > > This would need a new feature bit though, and would have to > be acknowledged by guest. As such this would have to be > virtio 1.0 feature, virtio 0.x is frozen. > >>> >>>> I think it's very useful for Commercialization. >>>> >>>> On 2014/9/17 16:38, Michael S. Tsirkin wrote: >>>>> Reply-To: >>>>> >>>>> Thinking about the vhost-user protocol, VHOST_SET_MEM_TABLE >>>>> is used to update the memory mappings. >>>>> >>>>> So shouldn't we want for response? >>>>> Otherwise e.g. guest can start using the memory >>>>> that vhost-user can't access. >>>>> >>>>> Similarly, with an IOMMU vhost-user might access memory it shouldn't. >>>>> >>>>> VHOST_SET_VRING_CALL is used for MSI-X masking. >>>>> Again, after vector is masted by switching the call fd, >>>>> backend shouldn't assert the old one. >>>>> >>>>> Thoughts? >>>>> >>>>> >>> >>> . >>> > > . >