|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] Support more Capability Structures (including MSI/MS
To: |
xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Dong, Eddie" <eddie.dong@xxxxxxxxx>, "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> |
Subject: |
[Xen-devel] [PATCH] Support more Capability Structures (including MSI/MSI-X) and Device Specific Registers for pt device. |
From: |
Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx> |
Date: |
Fri, 04 Jul 2008 15:26:52 +0900 |
Cc: |
|
Delivery-date: |
Thu, 03 Jul 2008 23:27:33 -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 |
I am submitting the patch which supports more Capability Structures
including MSI/MSI-X Capability Structure and Device Specific
Registers for passthrough device. The purpose of the patch is enabling
various I/O device to be assigned to guest domain.
I hope the patch is applied to xen 3.3 unstable tree, and tested by
many developers.
I implemented following Capability Structures and Device Specific
Registers.
* Configuration Header Type 0
-> emulation.
"emulation" does not mean no accessing real I/O device.
Access real I/O device, but guest value and real value
might be different.
* MSI Capability Structure
-> emulation.
Behavior is not changed from existed implementation in
pt-msi.c, although code is changed.
* MSI-X Capability Structure
-> emulation.
Behavior is not changed from existed implementation in
pt-msi.c, although code is changed.
* PCI Express Capability Structure
-> emulation.
* PCI Power Management Capability Structure
-> emulation.
* Vital Product Data Capability Structure
-> emulation.
Emulated register is only Next Capability Pointer Register.
All other registers are passthrough.
* Vendor Specific Capability Structure
-> emulation
Emulated register is only Next Capability Pointer Register.
All other registers are passthrough.
* Device Specific Register (exclude capability structures)
-> passthrough.
The device drivers in guest domain are allowed to access
Device Specific Register. So various I/O device will work.
I assigned following device to guest domain, and they worked fine.
- PCIe NIC (MSI)
- PCI NIC (MSI)
- UHCI (INTx interrupt)
- IDE Controller (INTx interrupt)
To assign device with MSI to guest domain, please add "msi_irq_enable"
to xen hypervisor's boot parameter. If you would like to disable
MSI/MSI-X, please add "pci=nomsi" to guest linux boot parameter.
I have not tested MSI-X much. I hope developers in xen community test
them.
Other Capability Structures are hidden from guest software. To do
this, I change Next Capability Pointer's value to point only the
Capability Structure that need to be exported to guest software (see
emulate capabilities above). And some Capability Structures are 0
hardwired, and others are passthrough.
This patch removes "switch" statements for emulation, and introduces
table based emulation derived from pciback driver. You can implement
new Capability Structure by adding new table.
The other advantage of using this table is that you can easily change
the emulation policy of each field/bit by just simply modifying the
"emu_mask" value provided in each register table.
And for only special emulation or interacting with other components
(like hypervisor), you have to implement function corresponding to the
register.
Thanks.
Signed-off-by: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
pci_config_passthrough_with_msi_msix.patch
Description: Binary data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] Support more Capability Structures (including MSI/MSI-X) and Device Specific Registers for pt device.,
Yuji Shimada <=
|
|
|
|
|