[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] pci: introduce a devfn field to pci_sbdf_t



commit 016b1efb590b12402baefb69f2294d43b54e9f38
Author:     Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Tue Jun 11 17:16:59 2019 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Jun 11 17:16:59 2019 +0200

    pci: introduce a devfn field to pci_sbdf_t
    
    This is equivalent to the current extfunc field in term of contents.
    
    Switch the two current users of extfunc to use devfn instead for
    correctness.
    
    No functional change.
    
    Requested-by: Jan Beulich <jbeulich@xxxxxxxx>
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/drivers/vpci/vpci.c | 4 ++--
 xen/include/xen/pci.h   | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c
index b03232fe30..ca598675ea 100644
--- a/xen/drivers/vpci/vpci.c
+++ b/xen/drivers/vpci/vpci.c
@@ -327,7 +327,7 @@ uint32_t vpci_read(pci_sbdf_t sbdf, unsigned int reg, 
unsigned int size)
     }
 
     /* Find the PCI dev matching the address. */
-    pdev = pci_get_pdev_by_domain(d, sbdf.seg, sbdf.bus, sbdf.extfunc);
+    pdev = pci_get_pdev_by_domain(d, sbdf.seg, sbdf.bus, sbdf.devfn);
     if ( !pdev )
         return vpci_read_hw(sbdf, reg, size);
 
@@ -432,7 +432,7 @@ void vpci_write(pci_sbdf_t sbdf, unsigned int reg, unsigned 
int size,
      * Find the PCI dev matching the address.
      * Passthrough everything that's not trapped.
      */
-    pdev = pci_get_pdev_by_domain(d, sbdf.seg, sbdf.bus, sbdf.extfunc);
+    pdev = pci_get_pdev_by_domain(d, sbdf.seg, sbdf.bus, sbdf.devfn);
     if ( !pdev )
     {
         vpci_write_hw(sbdf, reg, size, data);
diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
index dab1a86dd4..c61fd7e262 100644
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -49,7 +49,8 @@ typedef union {
                         uint8_t fn   : 3,
                                 dev  : 5;
                     };
-                    uint8_t     extfunc;
+                    uint8_t     devfn,
+                                extfunc;
                 };
                 uint8_t         bus;
             };
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.