Re: [Qemu-devel] [RFC PATCH 3/4] vfio-pci: add aer capability support

2015-01-15 Thread Chen Fan
On 01/12/2015 09:14 PM, Paolo Bonzini wrote: On 12/01/2015 04:04, Chen Fan wrote: +static int vfio_add_ext_capabilities(VFIOPCIDevice *vdev) +{ +PCIDevice *pdev = &vdev->pdev; +PCIExpressDevice *exp; +uint32_t header; +uint16_t next = PCI_CONFIG_SPACE_SIZE; + +if (pci_confi

Re: [Qemu-devel] [RFC PATCH 3/4] vfio-pci: add aer capability support

2015-01-15 Thread Chen Fan
On 01/12/2015 11:26 PM, Alex Williamson wrote: On Mon, 2015-01-12 at 11:04 +0800, Chen Fan wrote: This patch isn't trivial enough for a blank commit log. Why do we need to make those bits emulated? Do we only care about AER for now? I think the vfio extend capabilities control registers shoul

Re: [Qemu-devel] [RFC PATCH 3/4] vfio-pci: add aer capability support

2015-01-12 Thread Alex Williamson
On Mon, 2015-01-12 at 11:04 +0800, Chen Fan wrote: This patch isn't trivial enough for a blank commit log. Why do we need to make those bits emulated? Do we only care about AER for now? > Signed-off-by: Chen Fan > --- > hw/vfio/pci.c | 40 > 1 file cha

Re: [Qemu-devel] [RFC PATCH 3/4] vfio-pci: add aer capability support

2015-01-12 Thread Paolo Bonzini
On 12/01/2015 04:04, Chen Fan wrote: > +static int vfio_add_ext_capabilities(VFIOPCIDevice *vdev) > +{ > +PCIDevice *pdev = &vdev->pdev; > +PCIExpressDevice *exp; > +uint32_t header; > +uint16_t next = PCI_CONFIG_SPACE_SIZE; > + > +if (pci_config_size(pdev) <= PCI_CONFIG_SPACE