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: main_pcilist_assignable

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: [Xen-devel] RE: main_pcilist_assignable
From: "Kay, Allen M" <allen.m.kay@xxxxxxxxx>
Date: Tue, 1 Mar 2011 19:19:55 -0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 01 Mar 2011 19:20:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1102281109030.19277@kaball-desktop>
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: <987664A83D2D224EAE907B061CE93D53019D874CD2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <alpine.DEB.2.00.1102281109030.19277@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvXOFAXt6mik2+LQ72skJ2X08YoKgBTzKkg
Thread-topic: main_pcilist_assignable
Stefano,

I found libxl missing many of the checking we had in xm python code when we 
passthrough pci devices to the guest.

Attached patch makes sure the passthrough device belongs to pciback before 
allow them passthrough to the guest.  There are still many other checks missing.

Xm terminates the guest startup process when this type of condition is found.  
This patch just allows the guest to continue to boot but with no device 
passthrough.  I tried to call exit() by the guest windows still hangs around.  
Is there an example code for calling exit that also closes the guest (QEMU VGA) 
window?

Allen

-----Original Message-----
From: Stefano Stabellini [mailto:stefano.stabellini@xxxxxxxxxxxxx] 
Sent: Monday, February 28, 2011 3:14 AM
To: Kay, Allen M
Cc: Stefano Stabellini; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: main_pcilist_assignable

On Sat, 26 Feb 2011, Kay, Allen M wrote:
> Hi Stefano,
> 
> I found xl allows me to passthrough PCI devices to guests even when I did not 
> hide them to either pciback or pci-stub (xm has this check).
> 
> Libxl has main_pcilist_assignable() that seems suppose to do something 
> similar but I'm having trouble finding the callers.
> 
> Can you tell me which code calls this function?
 
main_pcilist_assignable is called when the user executes

xl pci-list-assignable-devices

the function main_pcilist_assignable is in the cmd_table
(tools/libxl/xl_cmdtable.c).
In any case main_pcilist_assignable is just a wrapper around
libxl_device_pci_list_assignable, that contains the interesting
implementation details. 
libxl_device_pci_list_assignable is only called by
main_pcilist_assignable, but it could be called before actually doing
any device assignement, for example in xl_cmdimpl.c:pciattach.

Attachment: libxl_pci.patch
Description: libxl_pci.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>