WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] RE: one question to PHYSDEVOP_manage_pci_remove

To: Espen Skoglund <espen.skoglund@xxxxxxxxxxxxx>
Subject: [Xen-devel] RE: one question to PHYSDEVOP_manage_pci_remove
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Wed, 26 Nov 2008 00:51:27 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 25 Nov 2008 08:53:40 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <18732.10568.989274.839459@xxxxxxxxxxxxxxxxxx>
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>
References: <E2263E4A5B2284449EEBD0AAB751098401C2FAC70E@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <18732.10568.989274.839459@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AclPHATszluWcQ5+TG2U66pFicl/CAAAZ+2g
Thread-topic: one question to PHYSDEVOP_manage_pci_remove
Espen Skoglund <mailto:espen.skoglund@xxxxxxxxxxxxx> wrote:
> The idea was to use PHYSDEVOP_manage_pci_{add,remove} for
> hot-pluggable devices and SR-IOV or ARI capable devices.  In general,
> when a new PCI device function is added or removed during runtime,
> dom0 will invoke the hypercall to register or unrigister the
> corresponding struct pci_dev within Xen.
> 
> Xen clears the VT-d entry because the device is about to be removed
> from the system --- either physically removed or just completely
> disabled by dom0.  The device is forcibly removed from the guest if it
> is assigned to one.  It is up to dom0 to do the actual device
> reassignment.  Although the device can not access any host memory I
> suppose it would not hurt to also do deassign_device() when the device
> is removed.  This would tear down the IOMMU page tables for the domain
> if they are not needed anymore.
> 
>       eSk

Thanks for your information, so I think at least a log is needed if the device 
is still assigned to a guest. 
Also, have you checked if dom0 have chance to "do the actual device 
reassignment"? I suppose user space tools should be involeved in such process.

Thanks
Yunhong Jiang

> 
> 
> [Yunhong Jiang]
>> Hi, Espen, when I'm working on the MSI lock issue, I have one
>> question to PHYSDEVOP_manage_pci_remove. From the kernel, seems it
>> will happen for PCI device remove. Is it target only for pci
>> hotplug?
> 
>> I asked this because I noticed that in current code, it will always
>> clear the VT-d entry, no matter if the device is owned by other
>> domain, I'm not sure if it reqiures the device is not owned by a
>> guest (maybe except dom0).
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>