On 260619 17:16, Farhan Ali wrote:
<..snip..>

On 6/4/2026 7:17 PM, Konstantin Shkolnyy wrote:
diff --git a/include/hw/s390x/s390-pci-bus.h b/include/hw/s390x/s390- pci-bus.h
index eb15cb8b2d..a71f562dfc 100644
--- a/include/hw/s390x/s390-pci-bus.h
+++ b/include/hw/s390x/s390-pci-bus.h
@@ -276,7 +276,6 @@ struct S390PCIIOMMU {
      S390PCIBusDevice *pbdev;
      AddressSpace as;
      MemoryRegion mr;
-    IOMMUMemoryRegion iommu_mr;
      MemoryRegion *dm_mr;
      bool enabled;
      uint64_t g_iota;
@@ -354,6 +353,7 @@ struct S390PCIBusDevice {
      S390MsixInfo msix;
      AdapterRoutes routes;
      S390PCIIOMMU *iommu;
+    IOMMUMemoryRegion iommu_mr;
      MemoryRegion msix_notify_mr;
      IndAddr *summary_ind;
      IndAddr *indicator;

Maybe I am missing something, but why do we need to remove iommu_mr from S390PCIIOMMU? S390PCIBusDevice already has a reference to the S390PCIIOMMU in its definition. So is there something about iommu_mr defined in S390PCIIOMMU makes it difficult to migrate? Its hard to understand from the commit message.

For migration, indeed it's not necessary to move it. It'll function either way. It's purely a "cleanup" change - I want S390PCIIOMMU to only contain the fields that _can't_ live in S390PCIBusDevice (as described in the patch 13).

All the patches that move fields from S390PCIIOMMU to S390PCIBusDevice are aiming to simplify this code, so the reader isn't left to wonder, as he's today, (1) why a field is located in one of them rather than the other, and (2) whether S390PCIIOMMU can be deallocated somehow while a field is being referenced by pbdev->iommu->field.


Reply via email to