From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqPeQ-0008Rb-EL for qemu-devel@nongnu.org; Mon, 08 Aug 2011 09:13:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqPeN-00035x-QL for qemu-devel@nongnu.org; Mon, 08 Aug 2011 09:13:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqPeN-00035O-Fu for qemu-devel@nongnu.org; Mon, 08 Aug 2011 09:13:47 -0400 Date: Mon, 8 Aug 2011 16:14:27 +0300 From: "Michael S. Tsirkin" Message-ID: <20110808131427.GA28006@redhat.com> References: <1312463195-13605-1-git-send-email-avi@redhat.com> <1312463195-13605-2-git-send-email-avi@redhat.com> <4E3BF599.4050207@codemonkey.ws> <20110808103606.GA10372@redhat.com> <4E3FDA5F.5050105@codemonkey.ws> <20110808125647.GA27643@redhat.com> <4E3FDE50.3060702@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E3FDE50.3060702@codemonkey.ws> Subject: Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org On Mon, Aug 08, 2011 at 08:02:08AM -0500, Anthony Liguori wrote: > On 08/08/2011 07:56 AM, Michael S. Tsirkin wrote: > >On Mon, Aug 08, 2011 at 07:45:19AM -0500, Anthony Liguori wrote: > >>On 08/08/2011 05:36 AM, Michael S. Tsirkin wrote: > >>>>Thinking more closely, I don't think this right. > >>>> > >>>>Updating on map ensured that the config was refreshed after each > >>>>time the bar was mapped. In the very least, the config needs to be > >>>>refreshed during reset because the guest may write to the guest > >>>>space which should get cleared after reset. > >>>> > >>>>Regards, > >>>> > >>>>Anthony Liguori > >>> > >>>Not sure I understand. Which register, for example, > >>>do you have in mind? > >>>Could you clarify please? > >> > >>Actually, you never need to call config_get() AFAICT. It's called > >>in every read/write access. > > > >Every read, yes. But every write? Are you sure? > > Yeah, not on write, but I think this is a bug. get_config() should > be called before doing the memcpy() in order to have a proper RMW. > > Regards, > > Anthony Liguori Probably not noticeable because guests don't do the RMW in practice. We also send the config over on migration. That's probably a bug as well ... -- MST