From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 20/39] virtio-pci: convert to memory API Date: Tue, 02 Aug 2011 15:39:53 +0300 Message-ID: <4E37F019.1090606@redhat.com> References: <1312135082-31985-1-git-send-email-avi@redhat.com> <1312135082-31985-21-git-send-email-avi@redhat.com> <20110801082600.GD5439@redhat.com> <4E367370.6070100@redhat.com> <20110801195343.GA16682@redhat.com> <4E37C092.8060108@redhat.com> <20110802093451.GA22427@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , qemu-devel@nongnu.org, kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:63691 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754255Ab1HBMj7 (ORCPT ); Tue, 2 Aug 2011 08:39:59 -0400 In-Reply-To: <20110802093451.GA22427@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/02/2011 12:34 PM, Michael S. Tsirkin wrote: > On Tue, Aug 02, 2011 at 12:17:06PM +0300, Avi Kivity wrote: > > On 08/01/2011 10:53 PM, Michael S. Tsirkin wrote: > > >> > > >> > > >> Just because a memory region becomes visible to the cpu is no reason > > >> to have a callback. From the device perspective, it can't tell that > > >> it happened. > > > > > >BTW this is what qxl does, too, conceptually: on config writes, it peeks > > >at the bar to detect whether that got unmapped. > > > > Can you elaborate? why? what does it do? > > > Disables vga mapping when it sees io has been disabled. > What it really should do is check the io enable bit I think ... > > vga_dirty_log_stop(vga); > pci_default_write_config(d, address, val, len); > if (vga->map_addr&& qxl->pci.io_regions[0].addr == -1) { > vga->map_addr = 0; > } > vga_dirty_log_start(vga); If the memory is not visible to the guest, logging has no effect. -- error compiling committee.c: too many arguments to function