From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0ED6C2D0E4 for ; Fri, 27 Nov 2020 15:29:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A425221FF for ; Fri, 27 Nov 2020 15:29:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AjAXuczT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730171AbgK0P3K (ORCPT ); Fri, 27 Nov 2020 10:29:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:37285 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729344AbgK0P3K (ORCPT ); Fri, 27 Nov 2020 10:29:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606490948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oXKdmvLkDWwHXIC1vCfXtPKtHEwtoC4CPS+KvE2OLhs=; b=AjAXuczT5MLVwZMNhZrrrMknP7FLdUrtzRa+iy2V4ADQXi8CCur7twE61a4Gx6OWu/HONq hIdEBQnZb9cVZL50SNkLazautqd/vUwPw/HghbGfbDg/CeYNbt6UZzABV0VDFhgiOgKeTV LxWG8NsSFQb6fQhw+E7D8sIdNAGpTz8= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-173-uITk0hcoNHGrd3pF5pjkRg-1; Fri, 27 Nov 2020 10:29:06 -0500 X-MC-Unique: uITk0hcoNHGrd3pF5pjkRg-1 Received: by mail-wm1-f69.google.com with SMTP id k128so3327903wme.7 for ; Fri, 27 Nov 2020 07:29:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=oXKdmvLkDWwHXIC1vCfXtPKtHEwtoC4CPS+KvE2OLhs=; b=Oq7ZmdAGx1balzqFa+7KNZieXp+OX8w2cM7V5GvE8J6HBMC2c/uSCPy8rS+BCzJ0qN m6CdJN7Acx7UUwE7bFdd+j5v9V5DrKRu6f5x7qTjFFwSklK9kOwvohuFo/EB0CMGXwem ojRnX6p52mndmK9G1+GJE2HqgmrYjgEjiifytoVkNhCwQeYFM19QKf9RdUsrjxwOUx0o xmOWH3r4WRF+HMjK3TPwHUJUKLrI+gcyH1d7LUB5QWYkfIzV41gDGShsXCEphGdXnwIY cbongw+qsNvm/gEQl6G2fu51cd6TSF1zlrfQ3dPxYC9OpvhmLM58h9ClwfbReiBxPlmU jHBw== X-Gm-Message-State: AOAM530RJWcsN4rNlkKcG9qMGowb67+/04vOcBIcx+P4KK8BN44en5RS Rmmq5VOqQBqEqr0zTz8udOjb+qIbsWmG3JPpZcLPofP5ruPFxry8iqfzT1o3iKSl9XarSLsX498 93L65YW7A8tOA X-Received: by 2002:a5d:67c5:: with SMTP id n5mr11453730wrw.179.1606490945471; Fri, 27 Nov 2020 07:29:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/4cCpUXCG3PtHNxRVLUGmUfj2FFttkpnXAUAHHS8uWedyJzj98T7fAMDHerVy+9j1MoYo4Q== X-Received: by 2002:a5d:67c5:: with SMTP id n5mr11453684wrw.179.1606490945268; Fri, 27 Nov 2020 07:29:05 -0800 (PST) Received: from steredhat (host-79-17-248-175.retail.telecomitalia.it. [79.17.248.175]) by smtp.gmail.com with ESMTPSA id d3sm14667103wrr.2.2020.11.27.07.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 07:29:04 -0800 (PST) Date: Fri, 27 Nov 2020 16:29:01 +0100 From: Stefano Garzarella To: Eugenio =?utf-8?B?UMOpcmV6?= Cc: qemu-devel@nongnu.org, Lars Ganrot , virtualization@lists.linux-foundation.org, Salil Mehta , "Michael S. Tsirkin" , Liran Alon , Rob Miller , Max Gurtovoy , Alex Barba , Stefan Hajnoczi , Jim Harford , Jason Wang , Harpreet Singh Anand , Christophe Fontaine , vm , Daniel Daly , Michael Lilja , Nitin Shrivastav , Lee Ballard , Dmytro Kazantsev , Juan Quintela , kvm@vger.kernel.org, Howard Cai , Xiao W Wang , Sean Mooney , Parav Pandit , Eli Cohen , Siwei Liu , Stephen Finucane Subject: Re: [RFC PATCH 23/27] vhost: unmap qemu's shadow virtqueues on sw live migration Message-ID: <20201127152901.cbfu7rmewbxventr@steredhat> References: <20201120185105.279030-1-eperezma@redhat.com> <20201120185105.279030-24-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201120185105.279030-24-eperezma@redhat.com> Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, Nov 20, 2020 at 07:51:01PM +0100, Eugenio Pérez wrote: >Since vhost does not need to access it, it has no sense to keep it >mapped. > >Signed-off-by: Eugenio Pérez >--- > hw/virtio/vhost.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c >index f640d4edf0..eebfac4455 100644 >--- a/hw/virtio/vhost.c >+++ b/hw/virtio/vhost.c >@@ -1124,6 +1124,7 @@ static int vhost_sw_live_migration_start(struct vhost_dev *dev) > > dev->sw_lm_shadow_vq[idx] = vhost_sw_lm_shadow_vq(dev, idx); > event_notifier_set_handler(&vq->masked_notifier, vhost_handle_call); >+ vhost_virtqueue_memory_unmap(dev, &dev->vqs[idx], true); IIUC vhost_virtqueue_memory_unmap() is already called at the end of vhost_virtqueue_stop(), so we can skip this call, right? > > vhost_vring_write_addr(dev->sw_lm_shadow_vq[idx], &addr); > r = dev->vhost_ops->vhost_set_vring_addr(dev, &addr); >-- 2.18.4 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33C11C2D0E4 for ; Fri, 27 Nov 2020 15:30:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B0EE20B80 for ; Fri, 27 Nov 2020 15:30:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Dwn8xf80" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B0EE20B80 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kifhi-00040s-72 for qemu-devel@archiver.kernel.org; Fri, 27 Nov 2020 10:30:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kifgO-0002bI-F2 for qemu-devel@nongnu.org; Fri, 27 Nov 2020 10:29:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:56663) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kifgL-0001Ip-Aw for qemu-devel@nongnu.org; Fri, 27 Nov 2020 10:29:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606490948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XKH3Q9C0g9DkG272hqpSTp7g2ugMtGEgrEgUqH3qkKE=; b=Dwn8xf80lBCmLF3eehtY/sO64uOhz7UpR452xLS08JazHSXoiN+eurNzOgFWrOy00JJftj SR+TEdDFvLU2izSXb3Z2/5zMAyeeVQ+f/ej8Dc8L32SBGFpuNjevKjfL6eCyINBPvSJYeD L875SwvgXI6uLU4YUaGEbJsPTGiMa84= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-163-smW6JAWbN4ihQjdF4qKi2A-1; Fri, 27 Nov 2020 10:29:06 -0500 X-MC-Unique: smW6JAWbN4ihQjdF4qKi2A-1 Received: by mail-wr1-f69.google.com with SMTP id w17so3556176wrp.11 for ; Fri, 27 Nov 2020 07:29:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=oXKdmvLkDWwHXIC1vCfXtPKtHEwtoC4CPS+KvE2OLhs=; b=JxtuZZ9DgRB/9kAHZYwMqMFcUi5DdUqS4GVxVKXPakXZJUeHEId4ehp34rHYhpVBJc nRxjGaMxMCfJhZU6zT6rBotKwt6ZzFoyI8u4iJ9IE/FpnpsVxfcmwAcKn8984RcvgsZP gNq+MQxNPHVZYs4buYw5MUdow0G5HDCPKXmCFrD+wKBHr3ko8dPI0SUuwODl+ARdLCOQ oAmQGwcZtkSNLEt1+jnpo3bcoNTn4X6WW/8p8vdrlWtEUYonOFfZZ3yGyvHVmYdqF998 dO/eB5ceDatfE4vxSY3YJvXz7i5rdR6Z9kkgsKMqQu/ykgCiw9gfizLxpO8MZ+MYzhZ0 2qVw== X-Gm-Message-State: AOAM5318J4gOAp/1uh8SGVKm8STkfFqcgym1ny8Cu3z75YcgDll6HZ7H /fRM8Dqf8QU3fCdlddO8Btvbm5qk2KAs0DwneINT8M1f9Th6BBrkVIt18HOB/KmqQzyNO4/9luH TCoOAHmuU248Leos= X-Received: by 2002:a5d:67c5:: with SMTP id n5mr11453731wrw.179.1606490945471; Fri, 27 Nov 2020 07:29:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/4cCpUXCG3PtHNxRVLUGmUfj2FFttkpnXAUAHHS8uWedyJzj98T7fAMDHerVy+9j1MoYo4Q== X-Received: by 2002:a5d:67c5:: with SMTP id n5mr11453684wrw.179.1606490945268; Fri, 27 Nov 2020 07:29:05 -0800 (PST) Received: from steredhat (host-79-17-248-175.retail.telecomitalia.it. [79.17.248.175]) by smtp.gmail.com with ESMTPSA id d3sm14667103wrr.2.2020.11.27.07.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 07:29:04 -0800 (PST) Date: Fri, 27 Nov 2020 16:29:01 +0100 From: Stefano Garzarella To: Eugenio =?utf-8?B?UMOpcmV6?= Subject: Re: [RFC PATCH 23/27] vhost: unmap qemu's shadow virtqueues on sw live migration Message-ID: <20201127152901.cbfu7rmewbxventr@steredhat> References: <20201120185105.279030-1-eperezma@redhat.com> <20201120185105.279030-24-eperezma@redhat.com> MIME-Version: 1.0 In-Reply-To: <20201120185105.279030-24-eperezma@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=sgarzare@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=216.205.24.124; envelope-from=sgarzare@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, "Michael S. Tsirkin" , Jason Wang , qemu-devel@nongnu.org, Daniel Daly , virtualization@lists.linux-foundation.org, Liran Alon , Eli Cohen , Nitin Shrivastav , Alex Barba , Christophe Fontaine , Juan Quintela , Lee Ballard , Lars Ganrot , Rob Miller , Howard Cai , Parav Pandit , vm , Salil Mehta , Stephen Finucane , Xiao W Wang , Sean Mooney , Stefan Hajnoczi , Jim Harford , Dmytro Kazantsev , Siwei Liu , Harpreet Singh Anand , Michael Lilja , Max Gurtovoy Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Fri, Nov 20, 2020 at 07:51:01PM +0100, Eugenio PĂ©rez wrote: >Since vhost does not need to access it, it has no sense to keep it >mapped. > >Signed-off-by: Eugenio PĂ©rez >--- > hw/virtio/vhost.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c >index f640d4edf0..eebfac4455 100644 >--- a/hw/virtio/vhost.c >+++ b/hw/virtio/vhost.c >@@ -1124,6 +1124,7 @@ static int vhost_sw_live_migration_start(struct vhost_dev *dev) > > dev->sw_lm_shadow_vq[idx] = vhost_sw_lm_shadow_vq(dev, idx); > event_notifier_set_handler(&vq->masked_notifier, vhost_handle_call); >+ vhost_virtqueue_memory_unmap(dev, &dev->vqs[idx], true); IIUC vhost_virtqueue_memory_unmap() is already called at the end of vhost_virtqueue_stop(), so we can skip this call, right? > > vhost_vring_write_addr(dev->sw_lm_shadow_vq[idx], &addr); > r = dev->vhost_ops->vhost_set_vring_addr(dev, &addr); >-- 2.18.4 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A37DEC63798 for ; Fri, 27 Nov 2020 15:29:14 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DAAEF20B80 for ; Fri, 27 Nov 2020 15:29:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Dwn8xf80" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAAEF20B80 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5776E87A3A; Fri, 27 Nov 2020 15:29:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LhITp+DbFM7c; Fri, 27 Nov 2020 15:29:12 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id C2DD38792E; Fri, 27 Nov 2020 15:29:12 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A3DD2C163C; Fri, 27 Nov 2020 15:29:12 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 24992C0052 for ; Fri, 27 Nov 2020 15:29:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0939C8792E for ; Fri, 27 Nov 2020 15:29:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JQPzpOfz6H2T for ; Fri, 27 Nov 2020 15:29:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by hemlock.osuosl.org (Postfix) with ESMTPS id F27CA87A56 for ; Fri, 27 Nov 2020 15:29:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606490948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XKH3Q9C0g9DkG272hqpSTp7g2ugMtGEgrEgUqH3qkKE=; b=Dwn8xf80lBCmLF3eehtY/sO64uOhz7UpR452xLS08JazHSXoiN+eurNzOgFWrOy00JJftj SR+TEdDFvLU2izSXb3Z2/5zMAyeeVQ+f/ej8Dc8L32SBGFpuNjevKjfL6eCyINBPvSJYeD L875SwvgXI6uLU4YUaGEbJsPTGiMa84= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-461-R__lzFEHOQefCFkEAAC9Tg-1; Fri, 27 Nov 2020 10:29:06 -0500 X-MC-Unique: R__lzFEHOQefCFkEAAC9Tg-1 Received: by mail-wr1-f70.google.com with SMTP id n13so3614300wrs.10 for ; Fri, 27 Nov 2020 07:29:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=oXKdmvLkDWwHXIC1vCfXtPKtHEwtoC4CPS+KvE2OLhs=; b=GxVgflL1IXkLgjxm1DztJ/EhQqFKgtAq263lb3EJtl8Q46i+M5y4myJTpO6nZ7Bag1 3CRxYtU/fK3LzP5ua0oZSuFJmwEqVuOBy7RIZ1IoSgaPe0gArUR7YY46XUXhuRVdMmWR K9FyDWZqA5Xyol2QCdNO4wTvdi1KfeKaEO3v2124L22pmYTDYyaUN5iMwhHnBFRULxAU 7pCt7/zkmc3a16aO6qIQ0kkfGsRwWxFYiRDpgT5cgauP/JeIomy/xgwAEk/MfymsK5Q/ rcL1/Gg5/Er0WXeEzJx6aDIHFA6dswSn7v837YR/Y2+jgkVdD1GLlHX2If82wMfVhKr+ IKuQ== X-Gm-Message-State: AOAM5334yrpvupzTa1j03g5cItvibiGI91RQyaRi+2fusaYE9h1isZA7 pexaGRXdffwSbEQxLPFbcuYvAaqoTpd7YZdeR3td96VxyPZBDVgpQ4fsLIfadnvLl5IrDsuDdZs vmkTFS9TpKtnrVOZjXBGWN9RM89aDqxvlfebHx7lcEg== X-Received: by 2002:a5d:67c5:: with SMTP id n5mr11453729wrw.179.1606490945471; Fri, 27 Nov 2020 07:29:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/4cCpUXCG3PtHNxRVLUGmUfj2FFttkpnXAUAHHS8uWedyJzj98T7fAMDHerVy+9j1MoYo4Q== X-Received: by 2002:a5d:67c5:: with SMTP id n5mr11453684wrw.179.1606490945268; Fri, 27 Nov 2020 07:29:05 -0800 (PST) Received: from steredhat (host-79-17-248-175.retail.telecomitalia.it. [79.17.248.175]) by smtp.gmail.com with ESMTPSA id d3sm14667103wrr.2.2020.11.27.07.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 07:29:04 -0800 (PST) Date: Fri, 27 Nov 2020 16:29:01 +0100 From: Stefano Garzarella To: Eugenio =?utf-8?B?UMOpcmV6?= Subject: Re: [RFC PATCH 23/27] vhost: unmap qemu's shadow virtqueues on sw live migration Message-ID: <20201127152901.cbfu7rmewbxventr@steredhat> References: <20201120185105.279030-1-eperezma@redhat.com> <20201120185105.279030-24-eperezma@redhat.com> MIME-Version: 1.0 In-Reply-To: <20201120185105.279030-24-eperezma@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=sgarzare@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: kvm@vger.kernel.org, "Michael S. Tsirkin" , qemu-devel@nongnu.org, Daniel Daly , virtualization@lists.linux-foundation.org, Liran Alon , Eli Cohen , Nitin Shrivastav , Alex Barba , Christophe Fontaine , Lee Ballard , Lars Ganrot , Rob Miller , Howard Cai , Parav Pandit , vm , Salil Mehta , Stephen Finucane , Xiao W Wang , Sean Mooney , Stefan Hajnoczi , Jim Harford , Dmytro Kazantsev , Siwei Liu , Harpreet Singh Anand , Michael Lilja , Max Gurtovoy X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Fri, Nov 20, 2020 at 07:51:01PM +0100, Eugenio P=C3=A9rez wrote: >Since vhost does not need to access it, it has no sense to keep it >mapped. > >Signed-off-by: Eugenio P=C3=A9rez >--- > hw/virtio/vhost.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c >index f640d4edf0..eebfac4455 100644 >--- a/hw/virtio/vhost.c >+++ b/hw/virtio/vhost.c >@@ -1124,6 +1124,7 @@ static int vhost_sw_live_migration_start(struct vhos= t_dev *dev) > > dev->sw_lm_shadow_vq[idx] =3D vhost_sw_lm_shadow_vq(dev, idx); > event_notifier_set_handler(&vq->masked_notifier, vhost_handle_cal= l); >+ vhost_virtqueue_memory_unmap(dev, &dev->vqs[idx], true); IIUC vhost_virtqueue_memory_unmap() is already called at the end of = vhost_virtqueue_stop(), so we can skip this call, right? > > vhost_vring_write_addr(dev->sw_lm_shadow_vq[idx], &addr); > r =3D dev->vhost_ops->vhost_set_vring_addr(dev, &addr); >-- 2.18.4 > _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization