Jean Guyader
2011-Nov-23 13:51 UTC
[PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write
pt_pci_host_read/write now takes a struct pci_dev*. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> --- hw/pass-through.c | 19 +++++++------------ hw/pass-through.h | 5 +++-- hw/pt-graphics.c | 24 +++++++++++++----------- 3 files changed, 23 insertions(+), 25 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jean Guyader
2011-Nov-23 13:51 UTC
[PATCH 2/3] qemu-xen: Clean pt-graphic, use defined value.
Used defined value for 0x8086 (PCI_VENDOR_ID_INTEL) and some PCI config space offsets. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> --- hw/pci.h | 1 + hw/pt-graphics.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> --- hw/pass-through.c | 97 +++++++++++++++++++---------------------------------- hw/pass-through.h | 5 +++ hw/pt-graphics.c | 14 ++++--- 3 files changed, 48 insertions(+), 68 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Nov-24 18:56 UTC
Re: [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write
Jean Guyader writes ("[Xen-devel] [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write"):> pt_pci_host_read/write now takes a struct pci_dev*.Why ? Ian.
Jean Guyader
2011-Nov-25 09:29 UTC
Re: [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write
On 24/11 06:56, Ian Jackson wrote:> Jean Guyader writes ("[Xen-devel] [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write"): > > pt_pci_host_read/write now takes a struct pci_dev*. > > Why ? > > Ian.I found it more elegant that having to do thing like that: val = pt_pci_host_read(0, PCI_SLOT(pci_dev->devfn), 0, config_addr, len); pci_dev is already of the right type. With the old approach you would give a B:D:F to pt_pci_host_read then the function will call to libpci to get a pci_dev from that to do the config space access. In pretty much all the cases we already have a pci_dev, so I figured that we should be using it directly. Jean
Jean Guyader
2011-Nov-30 13:43 UTC
Re: [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write
On 25/11 09:29, Jean Guyader wrote:> On 24/11 06:56, Ian Jackson wrote: > > Jean Guyader writes ("[Xen-devel] [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write"): > > > pt_pci_host_read/write now takes a struct pci_dev*. > > > > Why ? > > > > Ian. > > I found it more elegant that having to do thing like that: > val = pt_pci_host_read(0, PCI_SLOT(pci_dev->devfn), > 0, config_addr, len); > pci_dev is already of the right type. > > With the old approach you would give a B:D:F to pt_pci_host_read > then the function will call to libpci to get a pci_dev from that > to do the config space access. In pretty much all the cases we > already have a pci_dev, so I figured that we should be using it > directly. >Hi Ian, Any thought about this serie? Jean
Ian Jackson
2011-Dec-01 18:24 UTC
Re: [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write
Jean Guyader writes ("Re: [Xen-devel] [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write"):> I found it more elegant that having to do thing like that: > val = pt_pci_host_read(0, PCI_SLOT(pci_dev->devfn), > 0, config_addr, len); > pci_dev is already of the right type.Right, OK. I have applied all three of your patches. Ian.