From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxwoF-0004Sw-CG for qemu-devel@nongnu.org; Thu, 28 May 2015 08:21:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxwoA-0007jI-By for qemu-devel@nongnu.org; Thu, 28 May 2015 08:21:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxwoA-0007iv-7L for qemu-devel@nongnu.org; Thu, 28 May 2015 08:21:10 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id D2C002B7878 for ; Thu, 28 May 2015 12:21:09 +0000 (UTC) Date: Thu, 28 May 2015 14:21:06 +0200 From: "Michael S. Tsirkin" Message-ID: <20150528141210-mutt-send-email-mst@redhat.com> References: <1430133591-6197-1-git-send-email-ghammer@redhat.com> <1430133591-6197-5-git-send-email-ghammer@redhat.com> <5566ED24.3060205@redhat.com> <5567030D.8050606@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5567030D.8050606@redhat.com> Subject: Re: [Qemu-devel] [PATCH V15 4/5] i386: add a Virtual Machine Generation ID device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gal Hammer Cc: Paolo Bonzini , qemu-devel@nongnu.org, imammedo@redhat.com On Thu, May 28, 2015 at 02:59:09PM +0300, Gal Hammer wrote: > On 28/05/2015 13:25, Paolo Bonzini wrote: > > > > > >On 27/04/2015 13:19, Gal Hammer wrote: > >>+static void vmgenid_init(Object *obj) > >>+{ > >>+ SysBusDevice *sbd = SYS_BUS_DEVICE(obj); > >>+ VmGenIdState *s = VMGENID(obj); > >>+ > >>+ memory_region_init_io(&s->iomem, obj, &vmgenid_ram_ops, s, "vgid", 16); > > > >This is a small problem. The spec says the memory of the VMGENID should > >not be uncacheable, but MMIO _should_ be uncacheable. > > > >This is running on a VM so we maybe not care, but it's worth pointing it > >out. > > And the way I can fix it would be...? Is there another memory region I can > use? > > Thanks, > > Gal. I think we hammered out an interesting alternative off-list: get hold of some AddressRegionNVS memory and copy data from MMIO or port io over there when you get an interrupt. > >Paolo > > > >>+ sysbus_init_mmio(sbd, &s->iomem); > >>+ > >>+ object_property_add_str(obj, PROPERTY_UUID, NULL, vmgenid_set_uuid, NULL); > >>+} > >>+