Skip to contentSkip to conversation

pnv/xive: Allow mmio operations of any size on the ESB CI pages

PATCH Applied Frederic Barrat 3 participants 3 messages Jul 4, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pnv/xive: Allow mmio operations of any size on the ESB CI pages

We currently only allow 64-bit operations on the ESB CI pages. There's no real reason for that limitation, skiboot/linux didn't need more. However the hardware supports any size, so this patch relaxes that restriction. It impacts both the ESB pages for "normal" interrupts as well as the ESB pages for escalation interrupts defined for the ENDs.

---

This should wrap-up the cleanup about mmio size for the xive BARs. The NVPG and NVC BAR accesses should also be relaxed but we don't really implement them, any load/store currently fails. Something to address when/if we implement them.

 hw/intc/xive.c  | 8 ++++----
 hw/intc/xive2.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
hw/intc/xive.c +4 -4
index f60c878345..c014e961a4 100644
@@ -1175,11 +1175,11 @@ static const MemoryRegionOps xive_source_esb_ops = {
     .write = xive_source_esb_write,
     .endianness = DEVICE_BIG_ENDIAN,
     .valid = {
-        .min_access_size = 8,
+        .min_access_size = 1,
         .max_access_size = 8,
     },
     .impl = {
-        .min_access_size = 8,
+        .min_access_size = 1,
         .max_access_size = 8,
     },
 };
@@ -2006,11 +2006,11 @@ static const MemoryRegionOps xive_end_source_ops = {
     .write = xive_end_source_write,
     .endianness = DEVICE_BIG_ENDIAN,
     .valid = {
-        .min_access_size = 8,
+        .min_access_size = 1,
         .max_access_size = 8,
     },
     .impl = {
-        .min_access_size = 8,
+        .min_access_size = 1,
         .max_access_size = 8,
     },
 };
hw/intc/xive2.c +2 -2
index 4d9ff41956..c37ef25d44 100644
@@ -954,11 +954,11 @@ static const MemoryRegionOps xive2_end_source_ops = {
     .write = xive2_end_source_write,
     .endianness = DEVICE_BIG_ENDIAN,
     .valid = {
-        .min_access_size = 8,
+        .min_access_size = 1,
         .max_access_size = 8,
     },
     .impl = {
-        .min_access_size = 8,
+        .min_access_size = 1,
         .max_access_size = 8,
     },
 };
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Frederic Barrat

We currently only allow 64-bit operations on the ESB CI pages. There's no real reason for that limitation, skiboot/linux didn't need more. However the hardware supports any size, so this patch relaxes that restriction. It impacts both the ESB pages for "normal" interrupts as well as the ESB pages for escalation interrupts defined for the ENDs.

Thanks,

C.

Quoted 61 lines

---

This should wrap-up the cleanup about mmio size for the xive BARs. The NVPG and NVC BAR accesses should also be relaxed but we don't really implement them, any load/store currently fails. Something to address when/if we implement them.

  hw/intc/xive.c  | 8 ++++----
  hw/intc/xive2.c | 4 ++--
  2 files changed, 6 insertions(+), 6 deletions(-)
hw/intc/xive.c +4 -4
index f60c878345..c014e961a4 100644
@@ -1175,11 +1175,11 @@ static const MemoryRegionOps xive_source_esb_ops = {
      .write = xive_source_esb_write,
      .endianness = DEVICE_BIG_ENDIAN,
      .valid = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
      .impl = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
  };
@@ -2006,11 +2006,11 @@ static const MemoryRegionOps xive_end_source_ops = {
      .write = xive_end_source_write,
      .endianness = DEVICE_BIG_ENDIAN,
      .valid = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
      .impl = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
  };
hw/intc/xive2.c +2 -2
index 4d9ff41956..c37ef25d44 100644
@@ -954,11 +954,11 @@ static const MemoryRegionOps xive2_end_source_ops = {
      .write = xive2_end_source_write,
      .endianness = DEVICE_BIG_ENDIAN,
      .valid = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
      .impl = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
  };
#2 lore raw
In reply to Frederic Barrat

Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,

Daniel

Quoted 69 lines · Frederic Barrat

We currently only allow 64-bit operations on the ESB CI pages. There's no real reason for that limitation, skiboot/linux didn't need more. However the hardware supports any size, so this patch relaxes that restriction. It impacts both the ESB pages for "normal" interrupts as well as the ESB pages for escalation interrupts defined for the ENDs.

---

This should wrap-up the cleanup about mmio size for the xive BARs. The NVPG and NVC BAR accesses should also be relaxed but we don't really implement them, any load/store currently fails. Something to address when/if we implement them.

  hw/intc/xive.c  | 8 ++++----
  hw/intc/xive2.c | 4 ++--
  2 files changed, 6 insertions(+), 6 deletions(-)
hw/intc/xive.c +4 -4
index f60c878345..c014e961a4 100644
@@ -1175,11 +1175,11 @@ static const MemoryRegionOps xive_source_esb_ops = {
      .write = xive_source_esb_write,
      .endianness = DEVICE_BIG_ENDIAN,
      .valid = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
      .impl = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
  };
@@ -2006,11 +2006,11 @@ static const MemoryRegionOps xive_end_source_ops = {
      .write = xive_end_source_write,
      .endianness = DEVICE_BIG_ENDIAN,
      .valid = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
      .impl = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
  };
hw/intc/xive2.c +2 -2
index 4d9ff41956..c37ef25d44 100644
@@ -954,11 +954,11 @@ static const MemoryRegionOps xive2_end_source_ops = {
      .write = xive2_end_source_write,
      .endianness = DEVICE_BIG_ENDIAN,
      .valid = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
      .impl = {
-        .min_access_size = 8,
+        .min_access_size = 1,
          .max_access_size = 8,
      },
  };