This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: [PATCH][RFC] fix some spinlock issues in vmsi

To: Qing He <qing.he@xxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH][RFC] fix some spinlock issues in vmsi
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 06 Mar 2009 18:12:47 +0000
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Delivery-date: Fri, 06 Mar 2009 10:13:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090306174320.GA12981@ub-qhe2>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmegtZmFNCTcTOHS0eH2lmWiUq0UAABFCqf
Thread-topic: [PATCH][RFC] fix some spinlock issues in vmsi
User-agent: Microsoft-Entourage/
On 06/03/2009 17:43, "Qing He" <qing.he@xxxxxxxxx> wrote:

>> Do you mean deinitialised and unloaded the device driver?
> Yes, the racey condition we just talked happens here. Consider
> the following case, when remove_pci_device is called, the device
> data structure is removed by the hypervisor. But there is no
> guarauntee in the hypervisor that guest already has knowledge,
> for example the guest may continue to access the device resources.
> It's in this case msixtbl_{read,write} has a little racey condition.
> I don't think this scenario is desirable, but does it happen in the
> current logic?

Uh, well since dom0 is in fact mostly in charge of PCI access, there's not
much we can do in Xen to enforce this. At that level we kind of have to
assume that dom0 has sequenced hotplug/hotunplug sensibly.

 -- Keir

Xen-devel mailing list