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] Dom0 hypercall for adding and removing PCI devices

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Dom0 hypercall for adding and removing PCI devices
From: "Han, Weidong" <weidong.han@xxxxxxxxx>
Date: Wed, 23 Jul 2008 17:04:58 +0800
Cc: joshua.levasseur@xxxxxxxxxxxxx, "Li, Xin B" <xin.b.li@xxxxxxxxx>, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, espen.skoglund@xxxxxxxxxxxxx, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Wed, 23 Jul 2008 02:06:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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: AcjsoyzrD56bd9JvSOmaq0goPi5bgQ==
Thread-topic: [Xen-devel] Dom0 hypercall for adding and removing PCI devices
Now dom0 uses hypercalls to add and remove PCI devices. In
pci_bus_probe_wrapper(), it firstly adds device, then use
pci_bus_probe() to probe it, remove the device if probe fails. The
approach is good to only assign workable devices (pci_bus_probe()
successes) to dom0, but it obviously misses RMRR. During dom0 booting,
BIOS will use RMRRs. If don't map RMRRs, system will hang. There are two
options:

1) Add a check in domain_context_unmap_one(), don't remove the device
from dom0 if it has RMRR. This check is added yesterday. But it's not
clean enough. The device is not assigned to dom0, while it is mapped in
dom0 VT-d page table.

2) Establish a separate RMRR page table. If the device with RMRR is
removed from dom0, unmap it from dom0 VT-d page table, instead map it to
the separate RMRR page table. This solution is clean, but it introduces
a new VT-d page table. Currently each domain has only one VT-d page
table.

What's your opinions?

Randy (Weidong) 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel