Hi Sheng, On Mon, Mar 02, 2009 at 04:29:27PM +0800, Sheng Yang wrote: > This framework can be easily extended to support device capability, like > MSI/MSI-x. > > Signed-off-by: Sheng Yang <sheng@xxxxxxxxxxxxxxx> > --- > qemu/hw/pci.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > qemu/hw/pci.h | 30 ++++++++++++++++++++ > 2 files changed, 115 insertions(+), 0 deletions(-) > > @@ -205,6 +215,15 @@ struct PCIDevice { > > /* Current IRQ levels. Used internally by the generic PCI code. */ > int irq_state[4]; > + > + /* Device capability configuration space */ > + struct { > + int supported; > + uint8_t config[PCI_CAPABILITY_CONFIG_MAX_LENGTH]; > + unsigned int start, length; > + PCICapConfigReadFunc *config_read; > + PCICapConfigWriteFunc *config_write; > + } cap; > }; Why do you have a copy of the capabilities config space? Why not just access PCIDevice->config directly? -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html