qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/8] s390x patches (and one gitlab-CI fix)
@ 2021-12-16  9:44 Thomas Huth
  2021-12-16  9:44 ` [PULL 1/8] s390: kvm: adjust diag318 resets to retain data Thomas Huth
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Thomas Huth @ 2021-12-16  9:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

 Hi!

The following changes since commit e630bc7ec9dda656a452ed28cac4d1e9ed605d71:

  Merge tag 'pull-block-2021-12-15' of git://repo.or.cz/qemu/armbru into staging (2021-12-15 12:14:44 -0800)

are available in the Git repository at:

  https://gitlab.com/thuth/qemu.git tags/s390x-2021-12-16

for you to fetch changes up to 79e42726050b7be6c2104a9af678ce911897dfaa:

  gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices (2021-12-16 10:22:39 +0100)

----------------------------------------------------------------
* Small fixes for the s390x PCI code
* Fix reset handling of the diag318 data
* Add compat machines for 7.0 (all architectures)
* Ease timeout problem of the new msys2-64bit job

----------------------------------------------------------------
Christian Borntraeger (1):
      MAINTAINERS: update email address of Christian Borntraeger

Collin L. Walling (1):
      s390: kvm: adjust diag318 resets to retain data

Cornelia Huck (1):
      hw: Add compat machines for 7.0

Matthew Rosato (4):
      s390x/pci: use a reserved ID for the default PCI group
      s390x/pci: don't use hard-coded dma range in reg_ioat
      s390x/pci: use the passthrough measurement update interval
      s390x/pci: add supported DT information to clp response

Thomas Huth (1):
      gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices

 .gitlab-ci.d/windows.yml        |  2 +-
 .mailmap                        |  1 +
 MAINTAINERS                     |  6 +++---
 hw/arm/virt.c                   |  9 ++++++++-
 hw/core/machine.c               |  3 +++
 hw/i386/pc.c                    |  3 +++
 hw/i386/pc_piix.c               | 14 +++++++++++++-
 hw/i386/pc_q35.c                | 13 ++++++++++++-
 hw/ppc/spapr.c                  | 15 +++++++++++++--
 hw/s390x/s390-pci-bus.c         |  1 +
 hw/s390x/s390-pci-inst.c        | 15 +++++++++------
 hw/s390x/s390-pci-vfio.c        |  1 +
 hw/s390x/s390-virtio-ccw.c      | 14 +++++++++++++-
 include/hw/boards.h             |  3 +++
 include/hw/i386/pc.h            |  3 +++
 include/hw/s390x/s390-pci-bus.h |  3 ++-
 include/hw/s390x/s390-pci-clp.h |  3 ++-
 target/s390x/cpu.h              |  4 ++--
 target/s390x/kvm/kvm.c          |  4 ++++
 19 files changed, 97 insertions(+), 20 deletions(-)



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PULL 1/8] s390: kvm: adjust diag318 resets to retain data
  2021-12-16  9:44 [PULL 0/8] s390x patches (and one gitlab-CI fix) Thomas Huth
@ 2021-12-16  9:44 ` Thomas Huth
  2021-12-16  9:44 ` [PULL 2/8] MAINTAINERS: update email address of Christian Borntraeger Thomas Huth
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2021-12-16  9:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: Christian Borntraeger, Collin Walling, Christian Borntraeger,
	Richard Henderson, Janosch Frank

From: Collin Walling <walling@linux.ibm.com>

The CPNC portion of the diag318 data is erroneously reset during an
initial CPU reset caused by SIGP. Let's go ahead and relocate the
diag318_info field within the CPUS390XState struct such that it is
only zeroed during a clear reset. This way, the CPNC will be retained
for each VCPU in the configuration after the diag318 instruction
has been invoked.

The s390_machine_reset code already takes care of zeroing the diag318
data on VM resets, which also cover resets caused by diag308.

Fixes: fabdada9357b ("s390: guest support for diagnose 0x318")
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Message-Id: <20211117152303.627969-1-walling@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 target/s390x/cpu.h     | 4 ++--
 target/s390x/kvm/kvm.c | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index ca3845d023..a75e559134 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -63,6 +63,8 @@ struct CPUS390XState {
     uint64_t etoken;       /* etoken */
     uint64_t etoken_extension; /* etoken extension */
 
+    uint64_t diag318_info;
+
     /* Fields up to this point are not cleared by initial CPU reset */
     struct {} start_initial_reset_fields;
 
@@ -118,8 +120,6 @@ struct CPUS390XState {
     uint16_t external_call_addr;
     DECLARE_BITMAP(emergency_signals, S390_MAX_CPUS);
 
-    uint64_t diag318_info;
-
 #if !defined(CONFIG_USER_ONLY)
     uint64_t tlb_fill_tec;   /* translation exception code during tlb_fill */
     int tlb_fill_exc;        /* exception number seen during tlb_fill */
diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c
index 5b1fdb55c4..6acf14d5ec 100644
--- a/target/s390x/kvm/kvm.c
+++ b/target/s390x/kvm/kvm.c
@@ -1585,6 +1585,10 @@ void kvm_s390_set_diag318(CPUState *cs, uint64_t diag318_info)
         env->diag318_info = diag318_info;
         cs->kvm_run->s.regs.diag318 = diag318_info;
         cs->kvm_run->kvm_dirty_regs |= KVM_SYNC_DIAG318;
+        /*
+         * diag 318 info is zeroed during a clear reset and
+         * diag 308 IPL subcodes.
+         */
     }
 }
 
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PULL 2/8] MAINTAINERS: update email address of Christian Borntraeger
  2021-12-16  9:44 [PULL 0/8] s390x patches (and one gitlab-CI fix) Thomas Huth
  2021-12-16  9:44 ` [PULL 1/8] s390: kvm: adjust diag318 resets to retain data Thomas Huth
@ 2021-12-16  9:44 ` Thomas Huth
  2021-12-16  9:44 ` [PULL 3/8] s390x/pci: use a reserved ID for the default PCI group Thomas Huth
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2021-12-16  9:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Christian Borntraeger, Richard Henderson

From: Christian Borntraeger <borntraeger@linux.ibm.com>

My borntraeger@de.ibm.com email is just a forwarder to the
linux.ibm.com address. Let us remove the extra hop to avoid
a potential source of errors.

While at it, add the relevant email addresses to mailmap.

Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Message-Id: <20211126102449.287524-1-borntraeger@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .mailmap    | 1 +
 MAINTAINERS | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.mailmap b/.mailmap
index 8beb2f95ae..c45d1c5301 100644
--- a/.mailmap
+++ b/.mailmap
@@ -50,6 +50,7 @@ Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> <arikalo@wavecomp.com>
 Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> <aleksandar.rikalo@rt-rk.com>
 Alexander Graf <agraf@csgraf.de> <agraf@suse.de>
 Anthony Liguori <anthony@codemonkey.ws> Anthony Liguori <aliguori@us.ibm.com>
+Christian Borntraeger <borntraeger@linux.ibm.com> <borntraeger@de.ibm.com>
 Filip Bozuta <filip.bozuta@syrmia.com> <filip.bozuta@rt-rk.com.com>
 Frederic Konrad <konrad@adacore.com> <fred.konrad@greensocs.com>
 Greg Kurz <groug@kaod.org> <gkurz@linux.vnet.ibm.com>
diff --git a/MAINTAINERS b/MAINTAINERS
index 7543eb4d59..0644ba2b4a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -393,7 +393,7 @@ F: target/ppc/kvm.c
 
 S390 KVM CPUs
 M: Halil Pasic <pasic@linux.ibm.com>
-M: Christian Borntraeger <borntraeger@de.ibm.com>
+M: Christian Borntraeger <borntraeger@linux.ibm.com>
 S: Supported
 F: target/s390x/kvm/
 F: target/s390x/ioinst.[ch]
@@ -1527,7 +1527,7 @@ S390 Machines
 -------------
 S390 Virtio-ccw
 M: Halil Pasic <pasic@linux.ibm.com>
-M: Christian Borntraeger <borntraeger@de.ibm.com>
+M: Christian Borntraeger <borntraeger@linux.ibm.com>
 S: Supported
 F: hw/char/sclp*.[hc]
 F: hw/char/terminal3270.c
@@ -1541,7 +1541,7 @@ T: git https://github.com/borntraeger/qemu.git s390-next
 L: qemu-s390x@nongnu.org
 
 S390-ccw boot
-M: Christian Borntraeger <borntraeger@de.ibm.com>
+M: Christian Borntraeger <borntraeger@linux.ibm.com>
 M: Thomas Huth <thuth@redhat.com>
 S: Supported
 F: hw/s390x/ipl.*
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PULL 3/8] s390x/pci: use a reserved ID for the default PCI group
  2021-12-16  9:44 [PULL 0/8] s390x patches (and one gitlab-CI fix) Thomas Huth
  2021-12-16  9:44 ` [PULL 1/8] s390: kvm: adjust diag318 resets to retain data Thomas Huth
  2021-12-16  9:44 ` [PULL 2/8] MAINTAINERS: update email address of Christian Borntraeger Thomas Huth
@ 2021-12-16  9:44 ` Thomas Huth
  2021-12-16  9:44 ` [PULL 4/8] s390x/pci: don't use hard-coded dma range in reg_ioat Thomas Huth
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2021-12-16  9:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eric Farman, Richard Henderson, Pierre Morel, Matthew Rosato

From: Matthew Rosato <mjrosato@linux.ibm.com>

The current default PCI group being used can technically collide with a
real group ID passed from a hostdev.  Let's instead use a group ID that
comes from a special pool (0xF0-0xFF) that is architected to be reserved
for simulated devices.

Fixes: 28dc86a072 ("s390x/pci: use a PCI Group structure")
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Message-Id: <20211203142706.427279-2-mjrosato@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 include/hw/s390x/s390-pci-bus.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/hw/s390x/s390-pci-bus.h b/include/hw/s390x/s390-pci-bus.h
index aa891c178d..2727e7bdef 100644
--- a/include/hw/s390x/s390-pci-bus.h
+++ b/include/hw/s390x/s390-pci-bus.h
@@ -313,7 +313,7 @@ typedef struct ZpciFmb {
 } ZpciFmb;
 QEMU_BUILD_BUG_MSG(offsetof(ZpciFmb, fmt0) != 48, "padding in ZpciFmb");
 
-#define ZPCI_DEFAULT_FN_GRP 0x20
+#define ZPCI_DEFAULT_FN_GRP 0xFF
 typedef struct S390PCIGroup {
     ClpRspQueryPciGrp zpci_group;
     int id;
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PULL 4/8] s390x/pci: don't use hard-coded dma range in reg_ioat
  2021-12-16  9:44 [PULL 0/8] s390x patches (and one gitlab-CI fix) Thomas Huth
                   ` (2 preceding siblings ...)
  2021-12-16  9:44 ` [PULL 3/8] s390x/pci: use a reserved ID for the default PCI group Thomas Huth
@ 2021-12-16  9:44 ` Thomas Huth
  2021-12-16  9:44 ` [PULL 5/8] s390x/pci: use the passthrough measurement update interval Thomas Huth
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2021-12-16  9:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eric Farman, Richard Henderson, Pierre Morel, Matthew Rosato

From: Matthew Rosato <mjrosato@linux.ibm.com>

Instead use the values from clp info, they will either be the hard-coded
values or what came from the host driver via vfio.

Fixes: 9670ee752727 ("s390x/pci: use a PCI Function structure")
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Message-Id: <20211203142706.427279-3-mjrosato@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/s390x/s390-pci-inst.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index 1c8ad91175..11b7f6bfa1 100644
--- a/hw/s390x/s390-pci-inst.c
+++ b/hw/s390x/s390-pci-inst.c
@@ -916,9 +916,10 @@ int pci_dereg_irqs(S390PCIBusDevice *pbdev)
     return 0;
 }
 
-static int reg_ioat(CPUS390XState *env, S390PCIIOMMU *iommu, ZpciFib fib,
+static int reg_ioat(CPUS390XState *env, S390PCIBusDevice *pbdev, ZpciFib fib,
                     uintptr_t ra)
 {
+    S390PCIIOMMU *iommu = pbdev->iommu;
     uint64_t pba = ldq_p(&fib.pba);
     uint64_t pal = ldq_p(&fib.pal);
     uint64_t g_iota = ldq_p(&fib.iota);
@@ -927,7 +928,7 @@ static int reg_ioat(CPUS390XState *env, S390PCIIOMMU *iommu, ZpciFib fib,
 
     pba &= ~0xfff;
     pal |= 0xfff;
-    if (pba > pal || pba < ZPCI_SDMA_ADDR || pal > ZPCI_EDMA_ADDR) {
+    if (pba > pal || pba < pbdev->zpci_fn.sdma || pal > pbdev->zpci_fn.edma) {
         s390_program_interrupt(env, PGM_OPERAND, ra);
         return -EINVAL;
     }
@@ -1125,7 +1126,7 @@ int mpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar,
         } else if (pbdev->iommu->enabled) {
             cc = ZPCI_PCI_LS_ERR;
             s390_set_status_code(env, r1, ZPCI_MOD_ST_SEQUENCE);
-        } else if (reg_ioat(env, pbdev->iommu, fib, ra)) {
+        } else if (reg_ioat(env, pbdev, fib, ra)) {
             cc = ZPCI_PCI_LS_ERR;
             s390_set_status_code(env, r1, ZPCI_MOD_ST_INSUF_RES);
         }
@@ -1150,7 +1151,7 @@ int mpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar,
             s390_set_status_code(env, r1, ZPCI_MOD_ST_SEQUENCE);
         } else {
             pci_dereg_ioat(pbdev->iommu);
-            if (reg_ioat(env, pbdev->iommu, fib, ra)) {
+            if (reg_ioat(env, pbdev, fib, ra)) {
                 cc = ZPCI_PCI_LS_ERR;
                 s390_set_status_code(env, r1, ZPCI_MOD_ST_INSUF_RES);
             }
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PULL 5/8] s390x/pci: use the passthrough measurement update interval
  2021-12-16  9:44 [PULL 0/8] s390x patches (and one gitlab-CI fix) Thomas Huth
                   ` (3 preceding siblings ...)
  2021-12-16  9:44 ` [PULL 4/8] s390x/pci: don't use hard-coded dma range in reg_ioat Thomas Huth
@ 2021-12-16  9:44 ` Thomas Huth
  2021-12-16  9:44 ` [PULL 6/8] s390x/pci: add supported DT information to clp response Thomas Huth
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2021-12-16  9:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eric Farman, Richard Henderson, Pierre Morel, Matthew Rosato

From: Matthew Rosato <mjrosato@linux.ibm.com>

We may have gotten a measurement update interval from the underlying host
via vfio -- Use it to set the interval via which we update the function
measurement block.

Fixes: 28dc86a072 ("s390x/pci: use a PCI Group structure")
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Message-Id: <20211203142706.427279-4-mjrosato@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/s390x/s390-pci-inst.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index 11b7f6bfa1..07bab85ce5 100644
--- a/hw/s390x/s390-pci-inst.c
+++ b/hw/s390x/s390-pci-inst.c
@@ -1046,7 +1046,7 @@ static void fmb_update(void *opaque)
                       sizeof(pbdev->fmb.last_update))) {
         return;
     }
-    timer_mod(pbdev->fmb_timer, t + DEFAULT_MUI);
+    timer_mod(pbdev->fmb_timer, t + pbdev->pci_group->zpci_group.mui);
 }
 
 int mpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar,
@@ -1204,7 +1204,8 @@ int mpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar,
         }
         pbdev->fmb_addr = fmb_addr;
         timer_mod(pbdev->fmb_timer,
-                  qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + DEFAULT_MUI);
+                  qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) +
+                                    pbdev->pci_group->zpci_group.mui);
         break;
     }
     default:
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PULL 6/8] s390x/pci: add supported DT information to clp response
  2021-12-16  9:44 [PULL 0/8] s390x patches (and one gitlab-CI fix) Thomas Huth
                   ` (4 preceding siblings ...)
  2021-12-16  9:44 ` [PULL 5/8] s390x/pci: use the passthrough measurement update interval Thomas Huth
@ 2021-12-16  9:44 ` Thomas Huth
  2021-12-16  9:44 ` [PULL 7/8] hw: Add compat machines for 7.0 Thomas Huth
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2021-12-16  9:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eric Farman, Richard Henderson, Pierre Morel, Matthew Rosato

From: Matthew Rosato <mjrosato@linux.ibm.com>

The DTSM is a mask that specifies which I/O Address Translation designation
types are supported.  Today QEMU only supports DT=1.

Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Message-Id: <20211203142706.427279-5-mjrosato@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/s390x/s390-pci-bus.c         | 1 +
 hw/s390x/s390-pci-inst.c        | 1 +
 hw/s390x/s390-pci-vfio.c        | 1 +
 include/hw/s390x/s390-pci-bus.h | 1 +
 include/hw/s390x/s390-pci-clp.h | 3 ++-
 5 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 1b51a72838..01b58ebc70 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -782,6 +782,7 @@ static void s390_pci_init_default_group(void)
     resgrp->i = 128;
     resgrp->maxstbl = 128;
     resgrp->version = 0;
+    resgrp->dtsm = ZPCI_DTSM;
 }
 
 static void set_pbdev_info(S390PCIBusDevice *pbdev)
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index 07bab85ce5..6d400d4147 100644
--- a/hw/s390x/s390-pci-inst.c
+++ b/hw/s390x/s390-pci-inst.c
@@ -329,6 +329,7 @@ int clp_service_call(S390CPU *cpu, uint8_t r2, uintptr_t ra)
         stw_p(&resgrp->i, group->zpci_group.i);
         stw_p(&resgrp->maxstbl, group->zpci_group.maxstbl);
         resgrp->version = group->zpci_group.version;
+        resgrp->dtsm = group->zpci_group.dtsm;
         stw_p(&resgrp->hdr.rsp, CLP_RC_OK);
         break;
     }
diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c
index 2a153fa8c9..6f80a47e29 100644
--- a/hw/s390x/s390-pci-vfio.c
+++ b/hw/s390x/s390-pci-vfio.c
@@ -160,6 +160,7 @@ static void s390_pci_read_group(S390PCIBusDevice *pbdev,
         resgrp->i = cap->noi;
         resgrp->maxstbl = cap->maxstbl;
         resgrp->version = cap->version;
+        resgrp->dtsm = ZPCI_DTSM;
     }
 }
 
diff --git a/include/hw/s390x/s390-pci-bus.h b/include/hw/s390x/s390-pci-bus.h
index 2727e7bdef..da3cde2bb4 100644
--- a/include/hw/s390x/s390-pci-bus.h
+++ b/include/hw/s390x/s390-pci-bus.h
@@ -37,6 +37,7 @@
 #define ZPCI_MAX_UID 0xffff
 #define UID_UNDEFINED 0
 #define UID_CHECKING_ENABLED 0x01
+#define ZPCI_DTSM 0x40
 
 OBJECT_DECLARE_SIMPLE_TYPE(S390pciState, S390_PCI_HOST_BRIDGE)
 OBJECT_DECLARE_SIMPLE_TYPE(S390PCIBus, S390_PCI_BUS)
diff --git a/include/hw/s390x/s390-pci-clp.h b/include/hw/s390x/s390-pci-clp.h
index 96b8e3f133..cc8c8662b8 100644
--- a/include/hw/s390x/s390-pci-clp.h
+++ b/include/hw/s390x/s390-pci-clp.h
@@ -163,7 +163,8 @@ typedef struct ClpRspQueryPciGrp {
     uint8_t fr;
     uint16_t maxstbl;
     uint16_t mui;
-    uint64_t reserved3;
+    uint8_t dtsm;
+    uint8_t reserved3[7];
     uint64_t dasm; /* dma address space mask */
     uint64_t msia; /* MSI address */
     uint64_t reserved4;
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PULL 7/8] hw: Add compat machines for 7.0
  2021-12-16  9:44 [PULL 0/8] s390x patches (and one gitlab-CI fix) Thomas Huth
                   ` (5 preceding siblings ...)
  2021-12-16  9:44 ` [PULL 6/8] s390x/pci: add supported DT information to clp response Thomas Huth
@ 2021-12-16  9:44 ` Thomas Huth
  2021-12-16  9:44 ` [PULL 8/8] gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices Thomas Huth
  2021-12-16 16:38 ` [PULL 0/8] s390x patches (and one gitlab-CI fix) Richard Henderson
  8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2021-12-16  9:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cornelia Huck, Richard Henderson, Cédric Le Goater, Juan Quintela

From: Cornelia Huck <cohuck@redhat.com>

Add 7.0 machine types for arm/i440fx/q35/s390x/spapr.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20211208170241.110551-1-cohuck@redhat.com>
Acked-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/arm/virt.c              |  9 ++++++++-
 hw/core/machine.c          |  3 +++
 hw/i386/pc.c               |  3 +++
 hw/i386/pc_piix.c          | 14 +++++++++++++-
 hw/i386/pc_q35.c           | 13 ++++++++++++-
 hw/ppc/spapr.c             | 15 +++++++++++++--
 hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++-
 include/hw/boards.h        |  3 +++
 include/hw/i386/pc.h       |  3 +++
 9 files changed, 71 insertions(+), 6 deletions(-)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 6bce595aba..4593fea1ce 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2856,10 +2856,17 @@ static void machvirt_machine_init(void)
 }
 type_init(machvirt_machine_init);
 
+static void virt_machine_7_0_options(MachineClass *mc)
+{
+}
+DEFINE_VIRT_MACHINE_AS_LATEST(7, 0)
+
 static void virt_machine_6_2_options(MachineClass *mc)
 {
+    virt_machine_7_0_options(mc);
+    compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
 }
-DEFINE_VIRT_MACHINE_AS_LATEST(6, 2)
+DEFINE_VIRT_MACHINE(6, 2)
 
 static void virt_machine_6_1_options(MachineClass *mc)
 {
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 53a99abc56..a9c15479fe 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -37,6 +37,9 @@
 #include "hw/virtio/virtio.h"
 #include "hw/virtio/virtio-pci.h"
 
+GlobalProperty hw_compat_6_2[] = {};
+const size_t hw_compat_6_2_len = G_N_ELEMENTS(hw_compat_6_2);
+
 GlobalProperty hw_compat_6_1[] = {
     { "vhost-user-vsock-device", "seqpacket", "off" },
     { "nvme-ns", "shared", "off" },
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a2ef40ecbc..fccde2ef39 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -94,6 +94,9 @@
 #include "trace.h"
 #include CONFIG_DEVICES
 
+GlobalProperty pc_compat_6_2[] = {};
+const size_t pc_compat_6_2_len = G_N_ELEMENTS(pc_compat_6_2);
+
 GlobalProperty pc_compat_6_1[] = {
     { TYPE_X86_CPU, "hv-version-id-build", "0x1bbc" },
     { TYPE_X86_CPU, "hv-version-id-major", "0x0006" },
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 223dd3e05d..b03026bf06 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -413,7 +413,7 @@ static void pc_i440fx_machine_options(MachineClass *m)
     machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE);
 }
 
-static void pc_i440fx_6_2_machine_options(MachineClass *m)
+static void pc_i440fx_7_0_machine_options(MachineClass *m)
 {
     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_i440fx_machine_options(m);
@@ -422,6 +422,18 @@ static void pc_i440fx_6_2_machine_options(MachineClass *m)
     pcmc->default_cpu_version = 1;
 }
 
+DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0", NULL,
+                      pc_i440fx_7_0_machine_options);
+
+static void pc_i440fx_6_2_machine_options(MachineClass *m)
+{
+    pc_i440fx_machine_options(m);
+    m->alias = NULL;
+    m->is_default = false;
+    compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len);
+    compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len);
+}
+
 DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2", NULL,
                       pc_i440fx_6_2_machine_options);
 
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index e1e100316d..6b66eb16bb 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -360,7 +360,7 @@ static void pc_q35_machine_options(MachineClass *m)
     m->max_cpus = 288;
 }
 
-static void pc_q35_6_2_machine_options(MachineClass *m)
+static void pc_q35_7_0_machine_options(MachineClass *m)
 {
     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_q35_machine_options(m);
@@ -368,6 +368,17 @@ static void pc_q35_6_2_machine_options(MachineClass *m)
     pcmc->default_cpu_version = 1;
 }
 
+DEFINE_Q35_MACHINE(v7_0, "pc-q35-7.0", NULL,
+                   pc_q35_7_0_machine_options);
+
+static void pc_q35_6_2_machine_options(MachineClass *m)
+{
+    pc_q35_machine_options(m);
+    m->alias = NULL;
+    compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len);
+    compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len);
+}
+
 DEFINE_Q35_MACHINE(v6_2, "pc-q35-6.2", NULL,
                    pc_q35_6_2_machine_options);
 
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 3b5fd749be..8373429325 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4665,15 +4665,26 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
     }                                                                \
     type_init(spapr_machine_register_##suffix)
 
+/*
+ * pseries-7.0
+ */
+static void spapr_machine_7_0_class_options(MachineClass *mc)
+{
+    /* Defaults for the latest behaviour inherited from the base class */
+}
+
+DEFINE_SPAPR_MACHINE(7_0, "7.0", true);
+
 /*
  * pseries-6.2
  */
 static void spapr_machine_6_2_class_options(MachineClass *mc)
 {
-    /* Defaults for the latest behaviour inherited from the base class */
+    spapr_machine_7_0_class_options(mc);
+    compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
 }
 
-DEFINE_SPAPR_MACHINE(6_2, "6.2", true);
+DEFINE_SPAPR_MACHINE(6_2, "6.2", false);
 
 /*
  * pseries-6.1
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 653587ea62..84e3e63c43 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -791,14 +791,26 @@ bool css_migration_enabled(void)
     }                                                                         \
     type_init(ccw_machine_register_##suffix)
 
+static void ccw_machine_7_0_instance_options(MachineState *machine)
+{
+}
+
+static void ccw_machine_7_0_class_options(MachineClass *mc)
+{
+}
+DEFINE_CCW_MACHINE(7_0, "7.0", true);
+
 static void ccw_machine_6_2_instance_options(MachineState *machine)
 {
+    ccw_machine_7_0_instance_options(machine);
 }
 
 static void ccw_machine_6_2_class_options(MachineClass *mc)
 {
+    ccw_machine_7_0_class_options(mc);
+    compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
 }
-DEFINE_CCW_MACHINE(6_2, "6.2", true);
+DEFINE_CCW_MACHINE(6_2, "6.2", false);
 
 static void ccw_machine_6_1_instance_options(MachineState *machine)
 {
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 9c1c190104..b7b68471ff 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -375,6 +375,9 @@ struct MachineState {
     } \
     type_init(machine_initfn##_register_types)
 
+extern GlobalProperty hw_compat_6_2[];
+extern const size_t hw_compat_6_2_len;
+
 extern GlobalProperty hw_compat_6_1[];
 extern const size_t hw_compat_6_1_len;
 
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 9ab39e428f..b38947c224 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -196,6 +196,9 @@ void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid,
 /* sgx.c */
 void pc_machine_init_sgx_epc(PCMachineState *pcms);
 
+extern GlobalProperty pc_compat_6_2[];
+extern const size_t pc_compat_6_2_len;
+
 extern GlobalProperty pc_compat_6_1[];
 extern const size_t pc_compat_6_1_len;
 
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PULL 8/8] gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices
  2021-12-16  9:44 [PULL 0/8] s390x patches (and one gitlab-CI fix) Thomas Huth
                   ` (6 preceding siblings ...)
  2021-12-16  9:44 ` [PULL 7/8] hw: Add compat machines for 7.0 Thomas Huth
@ 2021-12-16  9:44 ` Thomas Huth
  2021-12-16 16:38 ` [PULL 0/8] s390x patches (and one gitlab-CI fix) Richard Henderson
  8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2021-12-16  9:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Richard Henderson

The new msys2-64bit job is often running for more than 50 minutes - and
if the CI is currently loaded, it times out after 60 minutes. The job
has been declared with a bigger timeout, but seems like this is getting
ignored on the shared Gitlab-CI Windows runners, so we're currently
seeing a lot of failures with this job. Thus we have to reduce the time
it takes to finish this job. Since we want to test compiling the WHPX
and HAX accelerator code with this job, switching to another target CPU
is not really a good option, so let's reduce the amount of code that we
have to compile with the --without-default-devices switch instead.

Message-Id: <20211216082253.43899-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .gitlab-ci.d/windows.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml
index 309f7e7fb8..62dd9ed832 100644
--- a/.gitlab-ci.d/windows.yml
+++ b/.gitlab-ci.d/windows.yml
@@ -58,7 +58,7 @@ msys2-64bit:
   - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
   - $env:MSYSTEM = 'MINGW64'     # Start a 64 bit Mingw environment
   - .\msys64\usr\bin\bash -lc './configure --target-list=x86_64-softmmu
-      --enable-capstone=system'
+      --enable-capstone=system --without-default-devices'
   - .\msys64\usr\bin\bash -lc "sed -i '/^ROMS=/d' build/config-host.mak"
   - .\msys64\usr\bin\bash -lc 'make -j2'
   - .\msys64\usr\bin\bash -lc 'make check'
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PULL 0/8] s390x patches (and one gitlab-CI fix)
  2021-12-16  9:44 [PULL 0/8] s390x patches (and one gitlab-CI fix) Thomas Huth
                   ` (7 preceding siblings ...)
  2021-12-16  9:44 ` [PULL 8/8] gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices Thomas Huth
@ 2021-12-16 16:38 ` Richard Henderson
  2021-12-17  7:57   ` Thomas Huth
  8 siblings, 1 reply; 11+ messages in thread
From: Richard Henderson @ 2021-12-16 16:38 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel

On 12/16/21 1:44 AM, Thomas Huth wrote:
>   Hi!
> 
> The following changes since commit e630bc7ec9dda656a452ed28cac4d1e9ed605d71:
> 
>    Merge tag 'pull-block-2021-12-15' of git://repo.or.cz/qemu/armbru into staging (2021-12-15 12:14:44 -0800)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/thuth/qemu.git tags/s390x-2021-12-16
> 
> for you to fetch changes up to 79e42726050b7be6c2104a9af678ce911897dfaa:
> 
>    gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices (2021-12-16 10:22:39 +0100)
> 
> ----------------------------------------------------------------
> * Small fixes for the s390x PCI code
> * Fix reset handling of the diag318 data
> * Add compat machines for 7.0 (all architectures)
> * Ease timeout problem of the new msys2-64bit job
> 
> ----------------------------------------------------------------
> Christian Borntraeger (1):
>        MAINTAINERS: update email address of Christian Borntraeger
> 
> Collin L. Walling (1):
>        s390: kvm: adjust diag318 resets to retain data
> 
> Cornelia Huck (1):
>        hw: Add compat machines for 7.0
> 
> Matthew Rosato (4):
>        s390x/pci: use a reserved ID for the default PCI group
>        s390x/pci: don't use hard-coded dma range in reg_ioat
>        s390x/pci: use the passthrough measurement update interval
>        s390x/pci: add supported DT information to clp response
> 
> Thomas Huth (1):
>        gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices
> 
>   .gitlab-ci.d/windows.yml        |  2 +-
>   .mailmap                        |  1 +
>   MAINTAINERS                     |  6 +++---
>   hw/arm/virt.c                   |  9 ++++++++-
>   hw/core/machine.c               |  3 +++
>   hw/i386/pc.c                    |  3 +++
>   hw/i386/pc_piix.c               | 14 +++++++++++++-
>   hw/i386/pc_q35.c                | 13 ++++++++++++-
>   hw/ppc/spapr.c                  | 15 +++++++++++++--
>   hw/s390x/s390-pci-bus.c         |  1 +
>   hw/s390x/s390-pci-inst.c        | 15 +++++++++------
>   hw/s390x/s390-pci-vfio.c        |  1 +
>   hw/s390x/s390-virtio-ccw.c      | 14 +++++++++++++-
>   include/hw/boards.h             |  3 +++
>   include/hw/i386/pc.h            |  3 +++
>   include/hw/s390x/s390-pci-bus.h |  3 ++-
>   include/hw/s390x/s390-pci-clp.h |  3 ++-
>   target/s390x/cpu.h              |  4 ++--
>   target/s390x/kvm/kvm.c          |  4 ++++
>   19 files changed, 97 insertions(+), 20 deletions(-)

Fails like so:

  (162/171) tests/avocado/x86_cpu_model_versions.py:X86CPUModelAliases.test_4_1_alias: 
FAIL: None != 'Cascadelake-Server-v1' : Cascadelake-Server must be an alias of 
Cascadelake-Server-v1 (0.14 s)

https://gitlab.com/qemu-project/qemu/-/jobs/1893456217

Which is presumably the compat machines in patch 7.


r~


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PULL 0/8] s390x patches (and one gitlab-CI fix)
  2021-12-16 16:38 ` [PULL 0/8] s390x patches (and one gitlab-CI fix) Richard Henderson
@ 2021-12-17  7:57   ` Thomas Huth
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2021-12-17  7:57 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel

On 16/12/2021 17.38, Richard Henderson wrote:
> On 12/16/21 1:44 AM, Thomas Huth wrote:
>>   Hi!
>>
>> The following changes since commit e630bc7ec9dda656a452ed28cac4d1e9ed605d71:
>>
>>    Merge tag 'pull-block-2021-12-15' of git://repo.or.cz/qemu/armbru into 
>> staging (2021-12-15 12:14:44 -0800)
>>
>> are available in the Git repository at:
>>
>>    https://gitlab.com/thuth/qemu.git tags/s390x-2021-12-16
>>
>> for you to fetch changes up to 79e42726050b7be6c2104a9af678ce911897dfaa:
>>
>>    gitlab-ci: Speed up the msys2-64bit job by using 
>> --without-default-devices (2021-12-16 10:22:39 +0100)
>>
>> ----------------------------------------------------------------
>> * Small fixes for the s390x PCI code
>> * Fix reset handling of the diag318 data
>> * Add compat machines for 7.0 (all architectures)
>> * Ease timeout problem of the new msys2-64bit job
>>
>> ----------------------------------------------------------------
>> Christian Borntraeger (1):
>>        MAINTAINERS: update email address of Christian Borntraeger
>>
>> Collin L. Walling (1):
>>        s390: kvm: adjust diag318 resets to retain data
>>
>> Cornelia Huck (1):
>>        hw: Add compat machines for 7.0
>>
>> Matthew Rosato (4):
>>        s390x/pci: use a reserved ID for the default PCI group
>>        s390x/pci: don't use hard-coded dma range in reg_ioat
>>        s390x/pci: use the passthrough measurement update interval
>>        s390x/pci: add supported DT information to clp response
>>
>> Thomas Huth (1):
>>        gitlab-ci: Speed up the msys2-64bit job by using 
>> --without-default-devices
>>
>>   .gitlab-ci.d/windows.yml        |  2 +-
>>   .mailmap                        |  1 +
>>   MAINTAINERS                     |  6 +++---
>>   hw/arm/virt.c                   |  9 ++++++++-
>>   hw/core/machine.c               |  3 +++
>>   hw/i386/pc.c                    |  3 +++
>>   hw/i386/pc_piix.c               | 14 +++++++++++++-
>>   hw/i386/pc_q35.c                | 13 ++++++++++++-
>>   hw/ppc/spapr.c                  | 15 +++++++++++++--
>>   hw/s390x/s390-pci-bus.c         |  1 +
>>   hw/s390x/s390-pci-inst.c        | 15 +++++++++------
>>   hw/s390x/s390-pci-vfio.c        |  1 +
>>   hw/s390x/s390-virtio-ccw.c      | 14 +++++++++++++-
>>   include/hw/boards.h             |  3 +++
>>   include/hw/i386/pc.h            |  3 +++
>>   include/hw/s390x/s390-pci-bus.h |  3 ++-
>>   include/hw/s390x/s390-pci-clp.h |  3 ++-
>>   target/s390x/cpu.h              |  4 ++--
>>   target/s390x/kvm/kvm.c          |  4 ++++
>>   19 files changed, 97 insertions(+), 20 deletions(-)
> 
> Fails like so:
> 
>   (162/171) 
> tests/avocado/x86_cpu_model_versions.py:X86CPUModelAliases.test_4_1_alias: 
> FAIL: None != 'Cascadelake-Server-v1' : Cascadelake-Server must be an alias 
> of Cascadelake-Server-v1 (0.14 s)
> 
> https://gitlab.com/qemu-project/qemu/-/jobs/1893456217
> 
> Which is presumably the compat machines in patch 7.

Drat ... that's what you get if some jobs are not run by default on private 
repos :-/

Ok, I'll unqueue that patch for now. Cornelia, could you please have a look?

  Thomas



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-12-17  7:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16  9:44 [PULL 0/8] s390x patches (and one gitlab-CI fix) Thomas Huth
2021-12-16  9:44 ` [PULL 1/8] s390: kvm: adjust diag318 resets to retain data Thomas Huth
2021-12-16  9:44 ` [PULL 2/8] MAINTAINERS: update email address of Christian Borntraeger Thomas Huth
2021-12-16  9:44 ` [PULL 3/8] s390x/pci: use a reserved ID for the default PCI group Thomas Huth
2021-12-16  9:44 ` [PULL 4/8] s390x/pci: don't use hard-coded dma range in reg_ioat Thomas Huth
2021-12-16  9:44 ` [PULL 5/8] s390x/pci: use the passthrough measurement update interval Thomas Huth
2021-12-16  9:44 ` [PULL 6/8] s390x/pci: add supported DT information to clp response Thomas Huth
2021-12-16  9:44 ` [PULL 7/8] hw: Add compat machines for 7.0 Thomas Huth
2021-12-16  9:44 ` [PULL 8/8] gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices Thomas Huth
2021-12-16 16:38 ` [PULL 0/8] s390x patches (and one gitlab-CI fix) Richard Henderson
2021-12-17  7:57   ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).