Re: [Qemu-devel] [PULL 10/19] vfio/pci: Foundation for new quirk structure

2015-09-23 Thread Wen Congyang
On 09/24/2015 11:22 AM, Alex Williamson wrote: > On Thu, 2015-09-24 at 10:54 +0800, Wen Congyang wrote: >> On 09/24/2015 04:23 AM, Alex Williamson wrote: >>> @@ -275,12 +276,15 @@ static void >>> vfio_vga_probe_ati_3c3_quirk(VFIOPCIDevice *vdev) >>> } >>> >>> quirk = g_malloc0(sizeof(*

Re: [Qemu-devel] [PULL 10/19] vfio/pci: Foundation for new quirk structure

2015-09-23 Thread Alex Williamson
On Thu, 2015-09-24 at 10:54 +0800, Wen Congyang wrote: > On 09/24/2015 04:23 AM, Alex Williamson wrote: > > @@ -275,12 +276,15 @@ static void > > vfio_vga_probe_ati_3c3_quirk(VFIOPCIDevice *vdev) > > } > > > > quirk = g_malloc0(sizeof(*quirk)); > > -quirk->vdev = vdev; > > +leg

Re: [Qemu-devel] [PULL 10/19] vfio/pci: Foundation for new quirk structure

2015-09-23 Thread Wen Congyang
On 09/24/2015 04:23 AM, Alex Williamson wrote: > VFIOQuirk hosts a single memory region and a fixed set of data fields > that try to handle all the quirk cases, but end up making those that > don't exactly match really confusing. This patch introduces a struct > intended to provide more flexibilit

[Qemu-devel] [PULL 10/19] vfio/pci: Foundation for new quirk structure

2015-09-23 Thread Alex Williamson
VFIOQuirk hosts a single memory region and a fixed set of data fields that try to handle all the quirk cases, but end up making those that don't exactly match really confusing. This patch introduces a struct intended to provide more flexibility and simpler code. VFIOQuirk is stripped to its basic