From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cam Macdonell Subject: Re: [PATCH v5 4/5] Inter-VM shared memory PCI device Date: Mon, 10 May 2010 10:48:29 -0600 Message-ID: References: <1271872408-22842-1-git-send-email-cam@cs.ualberta.ca> <1271872408-22842-2-git-send-email-cam@cs.ualberta.ca> <1271872408-22842-3-git-send-email-cam@cs.ualberta.ca> <1271872408-22842-4-git-send-email-cam@cs.ualberta.ca> <1271872408-22842-5-git-send-email-cam@cs.ualberta.ca> <4BE7F517.5010707@redhat.com> <4BE82623.4000905@redhat.com> <4BE836E5.9070106@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, Anthony Liguori To: Avi Kivity Return-path: Received: from mail-vw0-f46.google.com ([209.85.212.46]:63367 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754214Ab0EJQsa convert rfc822-to-8bit (ORCPT ); Mon, 10 May 2010 12:48:30 -0400 Received: by vws17 with SMTP id 17so245345vws.19 for ; Mon, 10 May 2010 09:48:29 -0700 (PDT) In-Reply-To: <4BE836E5.9070106@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, May 10, 2010 at 10:40 AM, Avi Kivity wrote: > On 05/10/2010 06:41 PM, Cam Macdonell wrote: >> >>> What would happen to any data written to the BAR before the the han= dshake >>> completed? =A0I think it would disappear. >>> >> >> But, the BAR isn't there until the handshake is completed. =A0Only a= fter >> receiving the shared memory fd does my device call pci_register_bar(= ) >> in the callback function. =A0So there may be a case with BAR2 (the >> shared memory BAR) missing during initialization. =A0FWIW, I haven't >> encountered this. >> > > Well, that violates PCI. =A0You can't have a PCI device with no BAR, = then have > a BAR appear. =A0It may work since the BAR is registered a lot faster= than the > BIOS is able to peek at it, but it's a race nevertheless. Agreed. I'll get Anthony's idea up and running. It seems that is the way forward. Cam