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] [PATCH][RFC] Support more Capability Structures and Device S

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH][RFC] Support more Capability Structures and Device Specific
From: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
Date: Fri, 27 Jun 2008 16:38:16 +0900
Delivery-date: Fri, 27 Jun 2008 00:38:57 -0700
Envelope-to: www-data@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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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
and Device Specific Registers for passthrough device.

In Xen 3.3 unstable, qemu-dm supports Configuration Header, MSI
Capability Structure, and MSI-X Capability Structure. But qemu-dm does
not support PCI Express Capability Structure, Device Specific
Registers, etc (writing them is ignored).

To support various I/O devices, 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.
    * PCI Express Capability Structure
        -> emulation.
    * PCI Power Management Capability Structure
        -> emulation.
    * Vital Product Data Capability Structure
        -> emulation (almost passthrough).
    * Vendor Specific Capability Structure
        -> emulation (almost 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.

Currently MSI Capability Structure and MSI-X Capability Structure is
not implemented, and they are hidden from guest software. I disabled
MSI and MSI-X in qemu-dm temporary. I am implementing MSI Capability
Structure and merging current MSI routines. I will release the patch
if you agree with me.

MSI-X will be after MSI. I will be very happy if anyone can help me.

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.

Signed-off-by: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>

--
Yuji Shimada

Attachment: pci_config_passthrough.patch
Description: Binary data

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