[Top][All Lists]

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

Re: [PATCH 4/7] s390x/pci: use a PCI Group structure

From: Matthew Rosato
Subject: Re: [PATCH 4/7] s390x/pci: use a PCI Group structure
Date: Fri, 25 Sep 2020 10:17:37 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

On 9/25/20 5:41 AM, Cornelia Huck wrote:
On Sat, 19 Sep 2020 11:34:29 -0400
Matthew Rosato <mjrosato@linux.ibm.com> wrote:

From: Pierre Morel <pmorel@linux.ibm.com>

We use a S390PCIGroup structure to hold the information related to a
zPCI Function group.

This allows us to be ready to support multiple groups and to retrieve
the group information from the host.

Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
  hw/s390x/s390-pci-bus.c  | 42 ++++++++++++++++++++++++++++++++++++++++++
  hw/s390x/s390-pci-bus.h  | 10 ++++++++++
  hw/s390x/s390-pci-inst.c | 22 +++++++++++++---------
  3 files changed, 65 insertions(+), 9 deletions(-)

diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 92146a2..3015d86 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -737,6 +737,46 @@ static void s390_pci_iommu_free(S390pciState *s, PCIBus 
*bus, int32_t devfn)
+static S390PCIGroup *s390_grp_create(int ug)

I think you made the identifiers a bit too compact :)
s390_group_create() is not that long, and I have no idea what the 'ug'
(ugh :) parameter is supposed to mean.

Ha :) Message received, something like s390_group_create(int id) is probably more appropriate.

+    S390PCIGroup *grp;


+    S390pciState *s = s390_get_phb();
+    grp = g_new0(S390PCIGroup, 1);
+    grp->ug = ug;
+    QTAILQ_INSERT_TAIL(&s->zpci_grps, grp, link);

zpci_groups? I think you get the idea :)

Yep, thanks!

+    return grp;


No objection to the patch in general.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]