[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v3 3/5] s390: vfio_pci: Use a PCI Group structur
From: |
Thomas Huth |
Subject: |
Re: [qemu-s390x] [PATCH v3 3/5] s390: vfio_pci: Use a PCI Group structure |
Date: |
Mon, 9 Sep 2019 07:18:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 07/09/2019 02.16, Matthew Rosato wrote:
> From: Pierre Morel <address@hidden>
>
> We use a S390PCIGroup structure to hold the information
> related to 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 <address@hidden>
> ---
> hw/s390x/s390-pci-bus.c | 42 ++++++++++++++++++++++++++++++++++++++++++
> hw/s390x/s390-pci-bus.h | 11 ++++++++++-
> hw/s390x/s390-pci-inst.c | 22 +++++++++++++---------
> 3 files changed, 65 insertions(+), 10 deletions(-)
>
> diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
> index 963a41c..e625217 100644
> --- a/hw/s390x/s390-pci-bus.c
> +++ b/hw/s390x/s390-pci-bus.c
> @@ -730,6 +730,46 @@ static void s390_pci_iommu_free(S390pciState *s, PCIBus
> *bus, int32_t devfn)
> object_unref(OBJECT(iommu));
> }
>
> +static S390PCIGroup *s390_grp_create(int ug)
> +{
> + S390PCIGroup *grp;
> + S390pciState *s = s390_get_phb();
> +
> + grp = g_new0(S390PCIGroup, 1);
> + grp->ug = ug;
> + QTAILQ_INSERT_TAIL(&s->zpci_grps, grp, link);
> + return grp;
> +}
Maybe an ignorant question, but shouldn't there also be some kind of
clean up function that also frees the memory again, e.g. during a
machine reset? Or are these groups supposed to survive a machine reset?
Thomas
- [qemu-s390x] [PATCH v3 0/5] Retrieving zPCI specific info from QEMU, Matthew Rosato, 2019/09/06
- [qemu-s390x] [PATCH v3 3/5] s390: vfio_pci: Use a PCI Group structure, Matthew Rosato, 2019/09/06
- Re: [qemu-s390x] [PATCH v3 3/5] s390: vfio_pci: Use a PCI Group structure,
Thomas Huth <=
- [qemu-s390x] [PATCH v3 5/5] s390: vfio_pci: Get zPCI function info from host, Matthew Rosato, 2019/09/06
- [qemu-s390x] [PATCH v3 2/5] s390: PCI: Creation a header dedicated to PCI CLP, Matthew Rosato, 2019/09/06
- [qemu-s390x] [PATCH v3 4/5] s390: vfio_pci: Use a PCI Function structure, Matthew Rosato, 2019/09/06
- [qemu-s390x] [PATCH v3 1/5] vfio: vfio_iommu_type1: linux header place holder, Matthew Rosato, 2019/09/06