From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnMcb-0000G2-17 for qemu-devel@nongnu.org; Fri, 23 Sep 2016 05:18:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnMcX-0001WV-RR for qemu-devel@nongnu.org; Fri, 23 Sep 2016 05:18:16 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:8673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnMcX-0001Re-66 for qemu-devel@nongnu.org; Fri, 23 Sep 2016 05:18:13 -0400 References: <57D90289.6020003@huawei.com> <57E3D9AF.4060502@huawei.com> <57E4ED02.3060204@huawei.com> From: "Herongguang (Stephen)" Message-ID: <57E4F278.2050401@huawei.com> Date: Fri, 23 Sep 2016 17:14:32 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org, quintela@redhat.com, amit.shah@redhat.com Cc: arei.gonglei@huawei.com, "Huangweidong (C)" On 2016/9/23 16:59, Paolo Bonzini wrote: > > > On 23/09/2016 10:51, Herongguang (Stephen) wrote: >> >> >> On 2016/9/23 15:17, Paolo Bonzini wrote: >>> >>> >>> On 22/09/2016 15:16, Herongguang (Stephen) wrote: >>>> I have some concern: >>>> 1. For example, vhost does not know about as_id, I wonder if guests in >>>> SMM can operate disk or ether card, as in >>>> that case vhost would not logging dirty pages correctly, without knowing >>>> as_id. >>> >>> In the end memory is logged by ram_addr_t, not by address space. So if >>> vhost_sync_dirty_bitmap is called on the right region everything works. >>> >>> Guests in SMM can operate on storage devices, but storage devices cannot >>> write to 0xA0000-0xBFFFF so that's safe. >> You are right, as vhost does not have a smram address space listener. So >> is this a qemu's flaw that virtual devices can not write to SMRAM? > > No, it's how it works in real hardware. However, it is a (minor) bug > that vhost doesn't have the equivalent of kvm_set_phys_mem's call to > kvm_physical_sync_dirty_bitmap. > >> Fine, your patch is simpler than I thought and functions right. > > Great! > >> Reviewed-by: He Rongguang > > Also Tested-by? Yes, I will test this patch in these days. > > Thanks, > > Paolo >> >>> . >>> >> > > . >