Received: from eggs.gnu.org ([2001:4830:134:3::10]:52794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnMKm-0008Lq-7A for qemu-devel@nongnu.org; Fri, 23 Sep 2016 04:59:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnMKh-0001VG-G5 for qemu-devel@nongnu.org; Fri, 23 Sep 2016 04:59:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnMKh-0001UQ-6g for qemu-devel@nongnu.org; Fri, 23 Sep 2016 04:59:47 -0400 References: <57D90289.6020003@huawei.com> <57E3D9AF.4060502@huawei.com> <57E4ED02.3060204@huawei.com> From: Paolo Bonzini Message-ID: Date: Fri, 23 Sep 2016 10:59:41 +0200 MIME-Version: 1.0 In-Reply-To: <57E4ED02.3060204@huawei.com> Content-Type: text/plain; charset=utf-8 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: "Herongguang (Stephen)" , qemu-devel@nongnu.org, quintela@redhat.com, amit.shah@redhat.com Cc: arei.gonglei@huawei.com, "Huangweidong (C)" 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? Thanks, Paolo > >> . >> >