[PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write

Jean Guyader

pt_pci_host_read/write now takes a struct pci_dev*.

Signed-off-by: Jean Guyader <[hidden email]>
---
 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
[hidden email]
http://lists.xensource.com/xen-devel

0001-qemu-xen-Change-prototype-for-pt_pci_host_read-write.patch (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/3] qemu-xen: Clean pt-graphic, use defined value.

Jean Guyader

Used defined value for 0x8086 (PCI_VENDOR_ID_INTEL) and some PCI config
space offsets.

Signed-off-by: Jean Guyader <[hidden email]>
---
 hw/pci.h         |    1 +
 hw/pt-graphics.c |   12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)


_______________________________________________
Xen-devel mailing list
[hidden email]
http://lists.xensource.com/xen-devel

0002-qemu-xen-Clean-pt-graphic-use-defined-value.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[PATCH 3/3] qemu-xen: passthrough, add PT_LOG_DEV

Jean Guyader

Signed-off-by: Jean Guyader <[hidden email]>
---
 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
[hidden email]
http://lists.xensource.com/xen-devel

0003-qemu-xen-passthrough-add-PT_LOG_DEV.patch (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write

Ian Jackson-2
In reply to this post by Jean Guyader
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.

_______________________________________________
Xen-devel mailing list
[hidden email]
http://lists.xensource.com/xen-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write

Jean Guyader
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

_______________________________________________
Xen-devel mailing list
[hidden email]
http://lists.xensource.com/xen-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write

Jean Guyader
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

_______________________________________________
Xen-devel mailing list
[hidden email]
http://lists.xensource.com/xen-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/3] qemu-xen: Change prototype for pt_pci_host_read/write

Ian Jackson-2
In reply to this post by Jean Guyader
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.

_______________________________________________
Xen-devel mailing list
[hidden email]
http://lists.xensource.com/xen-devel