qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0
@ 2011-11-11 17:49 Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 01/16] [S390] Add hotplug support Alexander Graf
                   ` (16 more replies)
  0 siblings, 17 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

Hi Blue,

This is my current patch queue for s390. Please pull.

It contains a few features, but only because I forgot to send out
a pull request for -rc1. These have been lying in my queue for a
while.

I also have two of Richard's TCG patches in, because without I
can't compile and they look perfectly sane to me.

Alex


The following changes since commit 0e3b800e71cb7759d099eabbd8ad4c4fe848e381:
  Peter Maydell (1):
        hw/lan9118.c: Add missing 'break' to fix buffer overrun

are available in the git repository at:

  git://repo.or.cz/qemu/agraf.git s390-next

Alexander Graf (11):
      [S390] Add hotplug support
      Compile device-hotplug on all targets
      Add generic drive hotplugging
      Expose drive_add on all architectures
      s390x: add ldeb instruction
      s390x: make ipte 31-bit aware
      s390x: update R and C bits in storage key
      s390x: implement rrbe instruction properly
      s390x: implement SIGP restart and shutdown
      s390x: Add shutdown for TCG s390-virtio machine
      s390x: initialize virtio dev region

Christian Borntraeger (3):
      s390: fix reset hypercall to reset the status
      s390: fix short kernel command lines
      s390: Fix cpu shutdown for KVM

Richard Henderson (2):
      tcg: Standardize on TCGReg as the enum for hard registers
      tcg: Use TCGReg for standard tcg-target entry points.

 Makefile.target          |    5 +++-
 hmp-commands.hx          |    2 -
 hw/device-hotplug.c      |   47 ++++++++++++++++++++++++++++++++++++++++++++++
 hw/pci-hotplug.c         |   24 +++-------------------
 hw/s390-virtio-bus.c     |   24 ++++++++++++++++++----
 hw/s390-virtio-bus.h     |    5 ++++
 hw/s390-virtio.c         |   47 +++++++++++++++++++++++++++++++++++++++++++--
 sysemu.h                 |    6 ++++-
 target-s390x/cpu.h       |   15 ++++++++++++++
 target-s390x/helper.c    |   27 +++++++++++++++++++++++--
 target-s390x/helpers.h   |    1 +
 target-s390x/kvm.c       |   19 ++++++-----------
 target-s390x/op_helper.c |   43 ++++++++++++++++++++++++++++++++++++-----
 target-s390x/translate.c |    4 +++
 tcg/arm/tcg-target.c     |   13 ++++++-----
 tcg/arm/tcg-target.h     |    4 +-
 tcg/hppa/tcg-target.c    |   12 +++++-----
 tcg/hppa/tcg-target.h    |    4 +-
 tcg/i386/tcg-target.c    |   13 ++++++-----
 tcg/i386/tcg-target.h    |    4 +-
 tcg/ia64/tcg-target.c    |   12 +++++-----
 tcg/ia64/tcg-target.h    |    4 +-
 tcg/mips/tcg-target.c    |   13 ++++++-----
 tcg/mips/tcg-target.h    |    4 +-
 tcg/ppc/tcg-target.c     |    8 +++---
 tcg/ppc/tcg-target.h     |    4 +-
 tcg/ppc64/tcg-target.c   |    8 +++---
 tcg/ppc64/tcg-target.h   |    4 +-
 tcg/sparc/tcg-target.c   |   13 ++++++-----
 tcg/sparc/tcg-target.h   |    4 +-
 tcg/tcg.c                |    8 +++---
 tcg/tci/tcg-target.c     |    8 +++---
 tcg/tci/tcg-target.h     |    2 +-
 tci.c                    |   38 ++++++++++++++++++------------------
 34 files changed, 308 insertions(+), 141 deletions(-)

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

* [Qemu-devel] [PATCH 01/16] [S390] Add hotplug support
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 02/16] Compile device-hotplug on all targets Alexander Graf
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

I just submitted a few patches that enable the s390 virtio bus to receive
a hotplug add event. This patch implements the qemu side of it, so that new
hotplug events can be submitted to the guest.

Signed-off-by: Alexander Graf <agraf@suse.de>

---

v1 -> v2:

  - make s390 virtio hoplug code emulate-capable
---
 hw/s390-virtio-bus.c |   24 +++++++++++++++++++-----
 hw/s390-virtio-bus.h |    5 +++++
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index 0ce6406..3760561 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -82,12 +82,24 @@ VirtIOS390Bus *s390_virtio_bus_init(ram_addr_t *ram_size)
     bus->dev_offs = bus->dev_page;
     bus->next_ring = bus->dev_page + TARGET_PAGE_SIZE;
 
+    /* Enable hotplugging */
+    _bus->allow_hotplug = 1;
+
     /* Allocate RAM for VirtIO device pages (descriptors, queues, rings) */
     *ram_size += S390_DEVICE_PAGES * TARGET_PAGE_SIZE;
 
     return bus;
 }
 
+static void s390_virtio_irq(CPUState *env, int config_change, uint64_t token)
+{
+    if (kvm_enabled()) {
+        kvm_s390_virtio_irq(env, config_change, token);
+    } else {
+        cpu_inject_ext(env, VIRTIO_EXT_CODE, config_change, token);
+    }
+}
+
 static int s390_virtio_device_init(VirtIOS390Device *dev, VirtIODevice *vdev)
 {
     VirtIOS390Bus *bus;
@@ -109,6 +121,11 @@ static int s390_virtio_device_init(VirtIOS390Device *dev, VirtIODevice *vdev)
     dev->host_features = vdev->get_features(vdev, dev->host_features);
     s390_virtio_device_sync(dev);
 
+    if (dev->qdev.hotplugged) {
+        CPUState *env = s390_cpu_addr2state(0);
+        s390_virtio_irq(env, VIRTIO_PARAM_DEV_ADD, dev->dev_offs);
+    }
+
     return 0;
 }
 
@@ -313,11 +330,7 @@ static void virtio_s390_notify(void *opaque, uint16_t vector)
     uint64_t token = s390_virtio_device_vq_token(dev, vector);
     CPUState *env = s390_cpu_addr2state(0);
 
-    if (kvm_enabled()) {
-        kvm_s390_virtio_irq(env, 0, token);
-    } else {
-        cpu_inject_ext(env, VIRTIO_EXT_CODE, 0, token);
-    }
+    s390_virtio_irq(env, 0, token);
 }
 
 static unsigned virtio_s390_get_features(void *opaque)
@@ -385,6 +398,7 @@ static void s390_virtio_bus_register_withprop(VirtIOS390DeviceInfo *info)
 {
     info->qdev.init = s390_virtio_busdev_init;
     info->qdev.bus_info = &s390_virtio_bus_info;
+    info->qdev.unplug = qdev_simple_unplug_cb;
 
     assert(info->qdev.size >= sizeof(VirtIOS390Device));
     qdev_register(&info->qdev);
diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h
index f1bece7..d02a907 100644
--- a/hw/s390-virtio-bus.h
+++ b/hw/s390-virtio-bus.h
@@ -35,6 +35,11 @@
 #define VIRTIO_RING_LEN			(TARGET_PAGE_SIZE * 3)
 #define S390_DEVICE_PAGES		512
 
+#define VIRTIO_PARAM_MASK               0xff
+#define VIRTIO_PARAM_VRING_INTERRUPT    0x0
+#define VIRTIO_PARAM_CONFIG_CHANGED     0x1
+#define VIRTIO_PARAM_DEV_ADD            0x2
+
 typedef struct VirtIOS390Device {
     DeviceState qdev;
     ram_addr_t dev_offs;
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 02/16] Compile device-hotplug on all targets
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 01/16] [S390] Add hotplug support Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 03/16] Add generic drive hotplugging Alexander Graf
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

All guest targets could potentially implement hotplugging. With the next
patches in this set I will also reflect this in the monitor interface.

So let's always compile it in. It shouldn't hurt.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 Makefile.target |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index a111521..21eec0a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -228,12 +228,15 @@ ifeq ($(CONFIG_KVM), y)
 endif
 obj-$(CONFIG_IVSHMEM) += ivshmem.o
 
+# Generic hotplugging
+obj-y += device-hotplug.o
+
 # Hardware support
 obj-i386-y += vga.o
 obj-i386-y += mc146818rtc.o pc.o
 obj-i386-y += cirrus_vga.o sga.o apic.o ioapic.o piix_pci.o
 obj-i386-y += vmport.o
-obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
+obj-i386-y += pci-hotplug.o smbios.o wdt_ib700.o
 obj-i386-y += debugcon.o multiboot.o
 obj-i386-y += pc_piix.o
 obj-i386-$(CONFIG_KVM) += kvmclock.o
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 03/16] Add generic drive hotplugging
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 01/16] [S390] Add hotplug support Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 02/16] Compile device-hotplug on all targets Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 04/16] Expose drive_add on all architectures Alexander Graf
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

The monitor command for hotplugging is in i386 specific code. This is just
plain wrong, as S390 just learned how to do hotplugging too and needs to
get drives for that.

So let's add a generic copy to generic code that handles drive_add in a
way that doesn't have pci dependencies. All pci specific code can then
be handled in a pci specific function.

Signed-off-by: Alexander Graf <agraf@suse.de>

---

v1 -> v2:

  - align generic drive_add to pci specific one
  - rework to split between generic and pci code

v2 -> v3:

  - remove comment
---
 hw/device-hotplug.c |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 hw/pci-hotplug.c    |   24 ++++--------------------
 sysemu.h            |    6 +++++-
 3 files changed, 56 insertions(+), 21 deletions(-)

diff --git a/hw/device-hotplug.c b/hw/device-hotplug.c
index 8b2ed7a..2bdc615 100644
--- a/hw/device-hotplug.c
+++ b/hw/device-hotplug.c
@@ -26,6 +26,9 @@
 #include "boards.h"
 #include "net.h"
 #include "blockdev.h"
+#include "qemu-config.h"
+#include "sysemu.h"
+#include "monitor.h"
 
 DriveInfo *add_init_drive(const char *optstr)
 {
@@ -44,3 +47,47 @@ DriveInfo *add_init_drive(const char *optstr)
 
     return dinfo;
 }
+
+#if !defined(TARGET_I386)
+int pci_drive_hot_add(Monitor *mon, const QDict *qdict,
+                      DriveInfo *dinfo, int type)
+{
+    /* On non-x86 we don't do PCI hotplug */
+    monitor_printf(mon, "Can't hot-add drive to type %d\n", type);
+    return -1;
+}
+#endif
+
+void drive_hot_add(Monitor *mon, const QDict *qdict)
+{
+    int type;
+    DriveInfo *dinfo = NULL;
+    const char *opts = qdict_get_str(qdict, "opts");
+
+    dinfo = add_init_drive(opts);
+    if (!dinfo) {
+        goto err;
+    }
+    if (dinfo->devaddr) {
+        monitor_printf(mon, "Parameter addr not supported\n");
+        goto err;
+    }
+    type = dinfo->type;
+
+    switch (type) {
+    case IF_NONE:
+        monitor_printf(mon, "OK\n");
+        break;
+    default:
+        if (pci_drive_hot_add(mon, qdict, dinfo, type)) {
+            goto err;
+        }
+    }
+    return;
+
+err:
+    if (dinfo) {
+        drive_put_ref(dinfo);
+    }
+    return;
+}
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index b59be2a..f08d367 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -103,24 +103,13 @@ static int scsi_hot_add(Monitor *mon, DeviceState *adapter,
     return 0;
 }
 
-void drive_hot_add(Monitor *mon, const QDict *qdict)
+int pci_drive_hot_add(Monitor *mon, const QDict *qdict,
+                      DriveInfo *dinfo, int type)
 {
     int dom, pci_bus;
     unsigned slot;
-    int type;
     PCIDevice *dev;
-    DriveInfo *dinfo = NULL;
     const char *pci_addr = qdict_get_str(qdict, "pci_addr");
-    const char *opts = qdict_get_str(qdict, "opts");
-
-    dinfo = add_init_drive(opts);
-    if (!dinfo)
-        goto err;
-    if (dinfo->devaddr) {
-        monitor_printf(mon, "Parameter addr not supported\n");
-        goto err;
-    }
-    type = dinfo->type;
 
     switch (type) {
     case IF_SCSI:
@@ -137,19 +126,14 @@ void drive_hot_add(Monitor *mon, const QDict *qdict)
             goto err;
         }
         break;
-    case IF_NONE:
-        monitor_printf(mon, "OK\n");
-        break;
     default:
         monitor_printf(mon, "Can't hot-add drive to type %d\n", type);
         goto err;
     }
-    return;
 
+    return 0;
 err:
-    if (dinfo)
-        drive_put_ref(dinfo);
-    return;
+    return -1;
 }
 
 static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
diff --git a/sysemu.h b/sysemu.h
index 22cd720..bfd9505 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -143,9 +143,13 @@ extern unsigned int nb_prom_envs;
 
 /* pci-hotplug */
 void pci_device_hot_add(Monitor *mon, const QDict *qdict);
-void drive_hot_add(Monitor *mon, const QDict *qdict);
+int pci_drive_hot_add(Monitor *mon, const QDict *qdict,
+                      DriveInfo *dinfo, int type);
 void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict);
 
+/* generic hotplug */
+void drive_hot_add(Monitor *mon, const QDict *qdict);
+
 /* pcie aer error injection */
 void pcie_aer_inject_error_print(Monitor *mon, const QObject *data);
 int do_pcie_aer_inejct_error(Monitor *mon,
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 04/16] Expose drive_add on all architectures
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (2 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 03/16] Add generic drive hotplugging Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 05/16] s390x: add ldeb instruction Alexander Graf
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

All architectures can now use drive_add on the monitor. This of course
does not mean that there is hotplug support for the specific platform,
so in order to actually make use of the new drives you still need to
have a hotplug capable device.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 hmp-commands.hx |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/hmp-commands.hx b/hmp-commands.hx
index 089c1ac..85e6085 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -854,7 +854,6 @@ STEXI
 Snapshot device, using snapshot file as target if provided
 ETEXI
 
-#if defined(TARGET_I386)
     {
         .name       = "drive_add",
         .args_type  = "pci_addr:s,opts:s",
@@ -866,7 +865,6 @@ ETEXI
         .help       = "add drive to PCI storage controller",
         .mhandler.cmd = drive_hot_add,
     },
-#endif
 
 STEXI
 @item drive_add
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 05/16] s390x: add ldeb instruction
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (3 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 04/16] Expose drive_add on all architectures Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 06/16] s390x: make ipte 31-bit aware Alexander Graf
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

While running perl, we encountered the ldeb instruction to be used,
so we implement it :).

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-s390x/helpers.h   |    1 +
 target-s390x/op_helper.c |    9 +++++++++
 target-s390x/translate.c |    4 ++++
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/target-s390x/helpers.h b/target-s390x/helpers.h
index 6ca48eb..01c8d0e 100644
--- a/target-s390x/helpers.h
+++ b/target-s390x/helpers.h
@@ -102,6 +102,7 @@ DEF_HELPER_3(madb, void, i32, i64, i32)
 DEF_HELPER_3(maebr, void, i32, i32, i32)
 DEF_HELPER_3(madbr, void, i32, i32, i32)
 DEF_HELPER_3(msdbr, void, i32, i32, i32)
+DEF_HELPER_2(ldeb, void, i32, i64)
 DEF_HELPER_2(lxdb, void, i32, i64)
 DEF_HELPER_FLAGS_2(tceb, TCG_CALL_PURE, i32, i32, i64)
 DEF_HELPER_FLAGS_2(tcdb, TCG_CALL_PURE, i32, i32, i64)
diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c
index cd57678..e594118 100644
--- a/target-s390x/op_helper.c
+++ b/target-s390x/op_helper.c
@@ -1631,6 +1631,15 @@ void HELPER(maebr)(uint32_t f1, uint32_t f3, uint32_t f2)
                                          &env->fpu_status);
 }
 
+/* convert 32-bit float to 64-bit float */
+void HELPER(ldeb)(uint32_t f1, uint64_t a2)
+{
+    uint32_t v2;
+    v2 = ldl(a2);
+    env->fregs[f1].d = float32_to_float64(v2,
+                                          &env->fpu_status);
+}
+
 /* convert 64-bit float to 128-bit float */
 void HELPER(lxdb)(uint32_t f1, uint64_t a2)
 {
diff --git a/target-s390x/translate.c b/target-s390x/translate.c
index 6a22fde..ee15672 100644
--- a/target-s390x/translate.c
+++ b/target-s390x/translate.c
@@ -2214,6 +2214,10 @@ static void disas_ed(DisasContext *s, int op, int r1, int x2, int b2, int d2,
     addr = get_address(s, x2, b2, d2);
     tmp_r1 = tcg_const_i32(r1);
     switch (op) {
+    case 0x4: /* LDEB R1,D2(X2,B2) [RXE] */
+        potential_page_fault(s);
+        gen_helper_ldeb(tmp_r1, addr);
+        break;
     case 0x5: /* LXDB R1,D2(X2,B2) [RXE] */
         potential_page_fault(s);
         gen_helper_lxdb(tmp_r1, addr);
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 06/16] s390x: make ipte 31-bit aware
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (4 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 05/16] s390x: add ldeb instruction Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 07/16] s390x: update R and C bits in storage key Alexander Graf
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

When running 31-bit code we can potentially map the same virtual
address twice - once as 0x0yyyyyyy and once as 0x8yyyyyyy, because
the upper bit gets ignored.

This also should be reflected in the tlb invalidation path, so we
really invalidate also the transparently created tlb entries.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-s390x/op_helper.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c
index e594118..2f46bdd 100644
--- a/target-s390x/op_helper.c
+++ b/target-s390x/op_helper.c
@@ -2950,6 +2950,13 @@ void HELPER(ipte)(uint64_t pte_addr, uint64_t vaddr)
     /* XXX we exploit the fact that Linux passes the exact virtual
            address here - it's not obliged to! */
     tlb_flush_page(env, page);
+
+    /* XXX 31-bit hack */
+    if (page & 0x80000000) {
+        tlb_flush_page(env, page & ~0x80000000);
+    } else {
+        tlb_flush_page(env, page | 0x80000000);
+    }
 }
 
 /* flush local tlb */
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 07/16] s390x: update R and C bits in storage key
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (5 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 06/16] s390x: make ipte 31-bit aware Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 08/16] s390x: implement rrbe instruction properly Alexander Graf
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

When the s390x maps a page or writes happen to a page, the R and C
bits get updated. The easiest way to implement this in qemu is to
simply update them whenever we map a TLB translation and act according
to the permissions.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-s390x/cpu.h       |    4 ++++
 target-s390x/helper.c    |   12 ++++++++++++
 target-s390x/op_helper.c |    1 -
 3 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index e192b50..95abe59 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -819,6 +819,10 @@ struct sysib_322 {
 #define _PAGE_RO        0x200            /* HW read-only bit  */
 #define _PAGE_INVALID   0x400            /* HW invalid bit    */
 
+#define SK_C                    (0x1 << 1)
+#define SK_R                    (0x1 << 2)
+#define SK_F                    (0x1 << 3)
+#define SK_ACC_MASK             (0xf << 4)
 
 
 /* EBCDIC handling */
diff --git a/target-s390x/helper.c b/target-s390x/helper.c
index 96dd867..4145104 100644
--- a/target-s390x/helper.c
+++ b/target-s390x/helper.c
@@ -348,6 +348,7 @@ int mmu_translate(CPUState *env, target_ulong vaddr, int rw, uint64_t asc,
                   target_ulong *raddr, int *flags)
 {
     int r = -1;
+    uint8_t *sk;
 
     *flags = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
     vaddr &= TARGET_PAGE_MASK;
@@ -390,6 +391,17 @@ out:
         *raddr = *raddr + env->psa;
     }
 
+    if (*raddr <= ram_size) {
+        sk = &env->storage_keys[*raddr / TARGET_PAGE_SIZE];
+        if (*flags & PAGE_READ) {
+            *sk |= SK_R;
+        }
+
+        if (*flags & PAGE_WRITE) {
+            *sk |= SK_C;
+        }
+    }
+
     return r;
 }
 
diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c
index 2f46bdd..440e871 100644
--- a/target-s390x/op_helper.c
+++ b/target-s390x/op_helper.c
@@ -2761,7 +2761,6 @@ uint64_t HELPER(iske)(uint64_t r2)
         return 0;
     }
 
-    /* XXX maybe use qemu's internal keys? */
     return env->storage_keys[addr / TARGET_PAGE_SIZE];
 }
 
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 08/16] s390x: implement rrbe instruction properly
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (6 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 07/16] s390x: update R and C bits in storage key Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 09/16] s390x: implement SIGP restart and shutdown Alexander Graf
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

The rrbe instruction resets the reference bit in the given storage key.
So far, we merely made it a nop and also returned an invalid CC value,
so that the kernel never knew if a page actually got accessed.

This patch implements it properly, flushing the R bit and returning the
correct CC value.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-s390x/op_helper.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c
index 440e871..364b100 100644
--- a/target-s390x/op_helper.c
+++ b/target-s390x/op_helper.c
@@ -2779,14 +2779,15 @@ void HELPER(sske)(uint32_t r1, uint64_t r2)
 /* reset reference bit extended */
 uint32_t HELPER(rrbe)(uint32_t r1, uint64_t r2)
 {
+    uint8_t re;
+    uint8_t key;
     if (r2 > ram_size) {
         return 0;
     }
 
-    /* XXX implement */
-#if 0
-    env->storage_keys[r2 / TARGET_PAGE_SIZE] &= ~SK_REFERENCED;
-#endif
+    key = env->storage_keys[r2 / TARGET_PAGE_SIZE];
+    re = key & (SK_R | SK_C);
+    env->storage_keys[r2 / TARGET_PAGE_SIZE] = (key & ~SK_R);
 
     /*
      * cc
@@ -2796,7 +2797,8 @@ uint32_t HELPER(rrbe)(uint32_t r1, uint64_t r2)
      * 2  Reference bit one; change bit zero
      * 3  Reference bit one; change bit one
      */
-    return 0;
+
+    return re >> 1;
 }
 
 /* compare and swap and purge */
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 09/16] s390x: implement SIGP restart and shutdown
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (7 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 08/16] s390x: implement rrbe instruction properly Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 10/16] s390: fix reset hypercall to reset the status Alexander Graf
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

An s390x OS does reboot and shutdown triggers through hypercalls that
we didn't implement on the TCG backend yet. That means that so far we
couldn't shut down virtual machines for example, having them hang on
shutdown when not using KVM.

With this patch, this restriction is gone. We can now shut down and
reboot s390x virtual machines even when using the TCG backend.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-s390x/op_helper.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c
index 364b100..137bae7 100644
--- a/target-s390x/op_helper.c
+++ b/target-s390x/op_helper.c
@@ -29,6 +29,10 @@
 #include <linux/kvm.h>
 #endif
 
+#if !defined (CONFIG_USER_ONLY)
+#include "sysemu.h"
+#endif
+
 /*****************************************************************************/
 /* Softmmu support */
 #if !defined (CONFIG_USER_ONLY)
@@ -2901,6 +2905,16 @@ uint32_t HELPER(sigp)(uint64_t order_code, uint32_t r1, uint64_t cpu_addr)
         env->regs[r1] &= 0xffffffff00000000ULL;
         cc = 1;
         break;
+#if !defined (CONFIG_USER_ONLY)
+    case SIGP_RESTART:
+        qemu_system_reset_request();
+        cpu_loop_exit(env);
+        break;
+    case SIGP_STOP:
+        qemu_system_shutdown_request();
+        cpu_loop_exit(env);
+        break;
+#endif
     default:
         /* unknown sigp */
         fprintf(stderr, "XXX unknown sigp: 0x%" PRIx64 "\n", order_code);
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 10/16] s390: fix reset hypercall to reset the status
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (8 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 09/16] s390x: implement SIGP restart and shutdown Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 11/16] s390: fix short kernel command lines Alexander Graf
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel, Christian Borntraeger

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

This patch fixes the reset hypercall which is supposed to also
reset the device status in device memory.
This fixes the following bug:

[root@localhost driver]# echo virtio0 > unbind
[   35.056966] ------------[ cut here ]------------
[   35.057054] kernel BUG at drivers/virtio/virtio.c:157!
[   35.057113] illegal operation: 0001 [#1] SMP
[   35.057181] Modules linked in:
[   35.057243] CPU: 0 Not tainted 3.0.0-rc1-00180-g0792644-dirty #51
[   35.057323] Process bash (pid: 497, task: 000000003e58c538, ksp: 000000003ef43978)
[   35.057409] Krnl PSW : 0704100180000000 00000000003d46f8 (virtio_check_driver_offered_feature+0x0/0x38)
[   35.057528]            R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0 EA:3
[   35.057616] Krnl GPRS: 0000000000000000 0000000040000000 0000000000000007 0000000000000000
[   35.057716]            00000000003b3be4 0000000000000001 000000003ef4d380 000000003f1cff00
[   35.057805]            000000003ef43f18 00000000005ca620 0000000000000008 0000000000838e88
[   35.057919]            000000000083c860 000000003f7c2e00 00000000003d46b0 000000003ef43d10
[   35.058027] Krnl Code: 00000000003d46e8: f0b00004ebcf	srp	4(12,%r0),3023(%r14),0
[   35.058115]            00000000003d46ee: f0a0000407f4	srp	4(11,%r0),2036,0
[   35.058207]            00000000003d46f4: a7f40001		brc	15,3d46f6
[   35.058295]           >00000000003d46f8: e31020900004	lg	%r1,144(%r2)
[   35.058383]            00000000003d46fe: bf2f1080		icm	%r2,15,128(%r1)
[   35.058470]            00000000003d4702: a784000d		brc	8,3d471c
[   35.058557]            00000000003d4706: e32010780004	lg	%r2,120(%r1)
[   35.058645]            00000000003d470c: 59302000		c	%r3,0(%r2)
[   35.058748] Call Trace:
[   35.058777] ([<00000000003d469e>] virtio_dev_remove+0x36/0x90)
[   35.058852]  [<00000000003f3a40>] __device_release_driver+0x7c/0xec
[   35.058936]  [<00000000003f3ae8>] device_release_driver+0x38/0x48
[   35.059023]  [<00000000003f2a98>] driver_unbind+0xa4/0xc4
[   35.059111]  [<00000000002acb70>] sysfs_write_file+0xe8/0x19c
[   35.059226]  [<000000000022e7a4>] vfs_write+0xb0/0x18c
[   35.059317]  [<000000000022eb18>] SyS_write+0x58/0xb4
[   35.059398]  [<000000000057e674>] sysc_noemu+0x16/0x1c
[   35.059475]  [<000003fffd44b6c0>] 0x3fffd44b6c0
[   35.059531] Last Breaking-Event-Address:
[   35.059576]  [<00000000003d46f4>] virtio_dev_remove+0x8c/0x90
[   35.059646]
[   35.059661] ---[ end trace 9b1959188f21ee11 ]---

Signed-off-by: Christian Borntraeger<borntraeger@de.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 hw/s390-virtio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index 60c66e9..003d5ab 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -97,6 +97,7 @@ int s390_virtio_hypercall(CPUState *env, uint64_t mem, uint64_t hypercall)
 
         dev = s390_virtio_bus_find_mem(s390_bus, mem);
         virtio_reset(dev->vdev);
+        stb_phys(dev->dev_offs + VIRTIO_DEV_OFFS_STATUS, 0);
         s390_virtio_device_sync(dev);
         break;
     }
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 11/16] s390: fix short kernel command lines
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (9 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 10/16] s390: fix reset hypercall to reset the status Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 12/16] s390: Fix cpu shutdown for KVM Alexander Graf
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel, Christian Borntraeger

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

The default kernel command line for s390 is
"root=/dev/ram0 ro"

When overriding this line, we have to ensure to also copy the \0 to
avoid false lines, for example, -append "root=/dev/vda" will result in
"root=/dev/vda0 ro" with the current code.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 hw/s390-virtio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index 003d5ab..ee850f0 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -230,7 +230,7 @@ static void s390_init(ram_addr_t my_ram_size,
 
     if (kernel_cmdline) {
         cpu_physical_memory_write(KERN_PARM_AREA, kernel_cmdline,
-                                  strlen(kernel_cmdline));
+                                  strlen(kernel_cmdline) + 1);
     }
 
     /* Create VirtIO network adapters */
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 12/16] s390: Fix cpu shutdown for KVM
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (10 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 11/16] s390: fix short kernel command lines Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 13/16] s390x: Add shutdown for TCG s390-virtio machine Alexander Graf
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel, Christian Borntraeger

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

On s390 a shutdown is the state of all CPUs being either stopped
or disabled (for interrupts) waiting. We have to track the overall
number of running CPUs to call the shutdown sequence accordingly.
This patch implements the counting and shutdown handling for the
kvm path in qemu.
Lets also wrap changes to env->halted and env->exception_index.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 hw/s390-virtio.c   |   32 ++++++++++++++++++++++++++++++--
 target-s390x/cpu.h |    2 ++
 target-s390x/kvm.c |   19 +++++++------------
 3 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index ee850f0..37945d5 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -121,6 +121,34 @@ int s390_virtio_hypercall(CPUState *env, uint64_t mem, uint64_t hypercall)
     return r;
 }
 
+/*
+ * The number of running CPUs. On s390 a shutdown is the state of all CPUs
+ * being either stopped or disabled (for interrupts) waiting. We have to
+ * track this number to call the shutdown sequence accordingly. This
+ * number is modified either on startup or while holding the big qemu lock.
+ */
+static unsigned s390_running_cpus;
+
+void s390_add_running_cpu(CPUState *env)
+{
+    if (env->halted) {
+        s390_running_cpus++;
+        env->halted = 0;
+        env->exception_index = -1;
+    }
+}
+
+unsigned s390_del_running_cpu(CPUState *env)
+{
+    if (env->halted == 0) {
+        assert(s390_running_cpus >= 1);
+        s390_running_cpus--;
+        env->halted = 1;
+        env->exception_index = EXCP_HLT;
+    }
+    return s390_running_cpus;
+}
+
 /* PC hardware initialisation */
 static void s390_init(ram_addr_t my_ram_size,
                       const char *boot_device,
@@ -179,8 +207,8 @@ static void s390_init(ram_addr_t my_ram_size,
         tmp_env->storage_keys = storage_keys;
     }
 
-    env->halted = 0;
-    env->exception_index = 0;
+    /* One CPU has to run */
+    s390_add_running_cpu(env);
 
     if (kernel_filename) {
         kernel_size = load_image(kernel_filename, qemu_get_ram_ptr(0));
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index 95abe59..a66aa01 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -309,6 +309,8 @@ static inline void kvm_s390_interrupt_internal(CPUState *env, int type,
 }
 #endif
 CPUState *s390_cpu_addr2state(uint16_t cpu_addr);
+void s390_add_running_cpu(CPUState *env);
+unsigned s390_del_running_cpu(CPUState *env);
 
 /* from s390-virtio-bus */
 extern const target_phys_addr_t virtio_size;
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 4beb794..40b0ab1 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -185,8 +185,7 @@ void kvm_s390_interrupt_internal(CPUState *env, int type, uint32_t parm,
         return;
     }
 
-    env->halted = 0;
-    env->exception_index = -1;
+    s390_add_running_cpu(env);
     qemu_cpu_kick(env);
 
     kvmint.type = type;
@@ -299,8 +298,7 @@ static int handle_diag(CPUState *env, struct kvm_run *run, int ipb_code)
 static int s390_cpu_restart(CPUState *env)
 {
     kvm_s390_interrupt(env, KVM_S390_RESTART, 0);
-    env->halted = 0;
-    env->exception_index = -1;
+    s390_add_running_cpu(env);
     qemu_cpu_kick(env);
     dprintf("DONE: SIGP cpu restart: %p\n", env);
     return 0;
@@ -425,17 +423,16 @@ static int handle_intercept(CPUState *env)
             r = handle_instruction(env, run);
             break;
         case ICPT_WAITPSW:
-            /* XXX What to do on system shutdown? */
-            env->halted = 1;
-            env->exception_index = EXCP_HLT;
+        case ICPT_CPU_STOP:
+            if (s390_del_running_cpu(env) == 0) {
+                qemu_system_shutdown_request();
+            }
+            r = EXCP_HALTED;
             break;
         case ICPT_SOFT_INTERCEPT:
             fprintf(stderr, "KVM unimplemented icpt SOFT\n");
             exit(1);
             break;
-        case ICPT_CPU_STOP:
-            qemu_system_shutdown_request();
-            break;
         case ICPT_IO:
             fprintf(stderr, "KVM unimplemented icpt IO\n");
             exit(1);
@@ -468,8 +465,6 @@ int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run)
 
     if (ret == 0) {
         ret = EXCP_INTERRUPT;
-    } else if (ret > 0) {
-        ret = 0;
     }
     return ret;
 }
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 13/16] s390x: Add shutdown for TCG s390-virtio machine
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (11 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 12/16] s390: Fix cpu shutdown for KVM Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 14/16] tcg: Standardize on TCGReg as the enum for hard registers Alexander Graf
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

Now that we have code in place to do refcounting of online CPUs, we
can drag the TCG code along and implement shutdown for that one too,
so it doesn't feel left out by its KVM counterpart.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-s390x/cpu.h    |    9 +++++++++
 target-s390x/helper.c |   15 ++++++++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index a66aa01..202c098 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -315,6 +315,15 @@ unsigned s390_del_running_cpu(CPUState *env);
 /* from s390-virtio-bus */
 extern const target_phys_addr_t virtio_size;
 
+#else
+static inline void s390_add_running_cpu(CPUState *env)
+{
+}
+
+static inline unsigned s390_del_running_cpu(CPUState *env)
+{
+    return 0;
+}
 #endif
 void cpu_lock(void);
 void cpu_unlock(void);
diff --git a/target-s390x/helper.c b/target-s390x/helper.c
index 4145104..10cc9dd 100644
--- a/target-s390x/helper.c
+++ b/target-s390x/helper.c
@@ -26,6 +26,9 @@
 #include "gdbstub.h"
 #include "qemu-common.h"
 #include "qemu-timer.h"
+#ifndef CONFIG_USER_ONLY
+#include "sysemu.h"
+#endif
 
 //#define DEBUG_S390
 //#define DEBUG_S390_PTE
@@ -131,6 +134,7 @@ void cpu_reset(CPUS390XState *env)
     memset(env, 0, offsetof(CPUS390XState, breakpoints));
     /* FIXME: reset vector? */
     tlb_flush(env, 1);
+    s390_add_running_cpu(env);
 }
 
 #ifndef CONFIG_USER_ONLY
@@ -466,11 +470,15 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong vaddr)
 void load_psw(CPUState *env, uint64_t mask, uint64_t addr)
 {
     if (mask & PSW_MASK_WAIT) {
-        env->halted = 1;
-        env->exception_index = EXCP_HLT;
         if (!(mask & (PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK))) {
-            /* XXX disabled wait state - CPU is dead */
+            if (s390_del_running_cpu(env) == 0) {
+#ifndef CONFIG_USER_ONLY
+                qemu_system_shutdown_request();
+#endif
+            }
         }
+        env->halted = 1;
+        env->exception_index = EXCP_HLT;
     }
 
     env->psw.addr = addr;
@@ -599,6 +607,7 @@ void do_interrupt (CPUState *env)
     qemu_log("%s: %d at pc=%" PRIx64 "\n", __FUNCTION__, env->exception_index,
              env->psw.addr);
 
+    s390_add_running_cpu(env);
     /* handle external interrupts */
     if ((env->psw.mask & PSW_MASK_EXT) &&
         env->exception_index == -1) {
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 14/16] tcg: Standardize on TCGReg as the enum for hard registers
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (12 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 13/16] s390x: Add shutdown for TCG s390-virtio machine Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 23:27   ` Andreas Färber
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 15/16] tcg: Use TCGReg for standard tcg-target entry points Alexander Graf
                   ` (2 subsequent siblings)
  16 siblings, 1 reply; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel, Richard Henderson

From: Richard Henderson <rth@twiddle.net>

Most targets did not name the enum; tci used TCGRegister.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 tcg/arm/tcg-target.h   |    4 ++--
 tcg/hppa/tcg-target.h  |    4 ++--
 tcg/i386/tcg-target.h  |    4 ++--
 tcg/ia64/tcg-target.h  |    4 ++--
 tcg/mips/tcg-target.h  |    4 ++--
 tcg/ppc/tcg-target.h   |    4 ++--
 tcg/ppc64/tcg-target.h |    4 ++--
 tcg/sparc/tcg-target.h |    4 ++--
 tcg/tci/tcg-target.h   |    2 +-
 tci.c                  |   38 +++++++++++++++++++-------------------
 10 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h
index 33afd97..48586c3 100644
--- a/tcg/arm/tcg-target.h
+++ b/tcg/arm/tcg-target.h
@@ -27,7 +27,7 @@
 #undef TCG_TARGET_WORDS_BIGENDIAN
 #undef TCG_TARGET_STACK_GROWSUP
 
-enum {
+typedef enum {
     TCG_REG_R0 = 0,
     TCG_REG_R1,
     TCG_REG_R2,
@@ -44,7 +44,7 @@ enum {
     TCG_REG_R13,
     TCG_REG_R14,
     TCG_REG_PC,
-};
+} TCGReg;
 
 #define TCG_TARGET_NB_REGS 16
 
diff --git a/tcg/hppa/tcg-target.h b/tcg/hppa/tcg-target.h
index ec9a7bf..7f3c4cc 100644
--- a/tcg/hppa/tcg-target.h
+++ b/tcg/hppa/tcg-target.h
@@ -32,7 +32,7 @@
 
 #define TCG_TARGET_NB_REGS 32
 
-enum {
+typedef enum {
     TCG_REG_R0 = 0,
     TCG_REG_R1,
     TCG_REG_RP,
@@ -65,7 +65,7 @@ enum {
     TCG_REG_RET1,
     TCG_REG_SP,
     TCG_REG_R31,
-};
+} TCGReg;
 
 #define TCG_CT_CONST_0    0x0100
 #define TCG_CT_CONST_S5   0x0200
diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
index b9c9d4e..7756e7b 100644
--- a/tcg/i386/tcg-target.h
+++ b/tcg/i386/tcg-target.h
@@ -36,7 +36,7 @@
 # define TCG_TARGET_NB_REGS 8
 #endif
 
-enum {
+typedef enum {
     TCG_REG_EAX = 0,
     TCG_REG_ECX,
     TCG_REG_EDX,
@@ -64,7 +64,7 @@ enum {
     TCG_REG_RBP = TCG_REG_EBP,
     TCG_REG_RSI = TCG_REG_ESI,
     TCG_REG_RDI = TCG_REG_EDI,
-};
+} TCGReg;
 
 #define TCG_CT_CONST_S32 0x100
 #define TCG_CT_CONST_U32 0x200
diff --git a/tcg/ia64/tcg-target.h b/tcg/ia64/tcg-target.h
index 578cf29..c388089 100644
--- a/tcg/ia64/tcg-target.h
+++ b/tcg/ia64/tcg-target.h
@@ -26,7 +26,7 @@
 
 /* We only map the first 64 registers */
 #define TCG_TARGET_NB_REGS 64
-enum {
+typedef enum {
     TCG_REG_R0 = 0,
     TCG_REG_R1,
     TCG_REG_R2,
@@ -91,7 +91,7 @@ enum {
     TCG_REG_R61,
     TCG_REG_R62,
     TCG_REG_R63,
-};
+} TCGReg;
 
 #define TCG_CT_CONST_ZERO 0x100
 #define TCG_CT_CONST_S22 0x200
diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h
index e2a2571..477bc38 100644
--- a/tcg/mips/tcg-target.h
+++ b/tcg/mips/tcg-target.h
@@ -31,7 +31,7 @@
 
 #define TCG_TARGET_NB_REGS 32
 
-enum {
+typedef enum {
     TCG_REG_ZERO = 0,
     TCG_REG_AT,
     TCG_REG_V0,
@@ -64,7 +64,7 @@ enum {
     TCG_REG_SP,
     TCG_REG_FP,
     TCG_REG_RA,
-};
+} TCGReg;
 
 #define TCG_CT_CONST_ZERO 0x100
 #define TCG_CT_CONST_U16  0x200
diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h
index 25a6ea4..3f22aaa 100644
--- a/tcg/ppc/tcg-target.h
+++ b/tcg/ppc/tcg-target.h
@@ -26,7 +26,7 @@
 #define TCG_TARGET_WORDS_BIGENDIAN
 #define TCG_TARGET_NB_REGS 32
 
-enum {
+typedef enum {
     TCG_REG_R0 = 0,
     TCG_REG_R1,
     TCG_REG_R2,
@@ -59,7 +59,7 @@ enum {
     TCG_REG_R29,
     TCG_REG_R30,
     TCG_REG_R31
-};
+} TCGReg;
 
 /* used for function call generation */
 #define TCG_REG_CALL_STACK TCG_REG_R1
diff --git a/tcg/ppc64/tcg-target.h b/tcg/ppc64/tcg-target.h
index 8d1fb73..97eec08 100644
--- a/tcg/ppc64/tcg-target.h
+++ b/tcg/ppc64/tcg-target.h
@@ -26,7 +26,7 @@
 #define TCG_TARGET_WORDS_BIGENDIAN
 #define TCG_TARGET_NB_REGS 32
 
-enum {
+typedef enum {
     TCG_REG_R0 = 0,
     TCG_REG_R1,
     TCG_REG_R2,
@@ -59,7 +59,7 @@ enum {
     TCG_REG_R29,
     TCG_REG_R30,
     TCG_REG_R31
-};
+} TCGReg;
 
 /* used for function call generation */
 #define TCG_REG_CALL_STACK TCG_REG_R1
diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h
index 1464ef4..c3fe131 100644
--- a/tcg/sparc/tcg-target.h
+++ b/tcg/sparc/tcg-target.h
@@ -27,7 +27,7 @@
 
 #define TCG_TARGET_NB_REGS 32
 
-enum {
+typedef enum {
     TCG_REG_G0 = 0,
     TCG_REG_G1,
     TCG_REG_G2,
@@ -60,7 +60,7 @@ enum {
     TCG_REG_I5,
     TCG_REG_I6,
     TCG_REG_I7,
-};
+} TCGReg;
 
 #define TCG_CT_CONST_S11 0x100
 #define TCG_CT_CONST_S13 0x200
diff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h
index 81ded86..cb5858c 100644
--- a/tcg/tci/tcg-target.h
+++ b/tcg/tci/tcg-target.h
@@ -150,7 +150,7 @@ typedef enum {
 #endif
     /* Special value UINT8_MAX is used by TCI to encode constant values. */
     TCG_CONST = UINT8_MAX
-} TCGRegister;
+} TCGReg;
 
 void tci_disas(uint8_t opc);
 
diff --git a/tci.c b/tci.c
index f17785d..a20a714 100644
--- a/tci.c
+++ b/tci.c
@@ -63,90 +63,90 @@ void *tci_tb_ptr;
 
 static tcg_target_ulong tci_reg[TCG_TARGET_NB_REGS];
 
-static tcg_target_ulong tci_read_reg(TCGRegister index)
+static tcg_target_ulong tci_read_reg(TCGReg index)
 {
     assert(index < ARRAY_SIZE(tci_reg));
     return tci_reg[index];
 }
 
 #if TCG_TARGET_HAS_ext8s_i32 || TCG_TARGET_HAS_ext8s_i64
-static int8_t tci_read_reg8s(TCGRegister index)
+static int8_t tci_read_reg8s(TCGReg index)
 {
     return (int8_t)tci_read_reg(index);
 }
 #endif
 
 #if TCG_TARGET_HAS_ext16s_i32 || TCG_TARGET_HAS_ext16s_i64
-static int16_t tci_read_reg16s(TCGRegister index)
+static int16_t tci_read_reg16s(TCGReg index)
 {
     return (int16_t)tci_read_reg(index);
 }
 #endif
 
 #if TCG_TARGET_REG_BITS == 64
-static int32_t tci_read_reg32s(TCGRegister index)
+static int32_t tci_read_reg32s(TCGReg index)
 {
     return (int32_t)tci_read_reg(index);
 }
 #endif
 
-static uint8_t tci_read_reg8(TCGRegister index)
+static uint8_t tci_read_reg8(TCGReg index)
 {
     return (uint8_t)tci_read_reg(index);
 }
 
-static uint16_t tci_read_reg16(TCGRegister index)
+static uint16_t tci_read_reg16(TCGReg index)
 {
     return (uint16_t)tci_read_reg(index);
 }
 
-static uint32_t tci_read_reg32(TCGRegister index)
+static uint32_t tci_read_reg32(TCGReg index)
 {
     return (uint32_t)tci_read_reg(index);
 }
 
 #if TCG_TARGET_REG_BITS == 64
-static uint64_t tci_read_reg64(TCGRegister index)
+static uint64_t tci_read_reg64(TCGReg index)
 {
     return tci_read_reg(index);
 }
 #endif
 
-static void tci_write_reg(TCGRegister index, tcg_target_ulong value)
+static void tci_write_reg(TCGReg index, tcg_target_ulong value)
 {
     assert(index < ARRAY_SIZE(tci_reg));
     assert(index != TCG_AREG0);
     tci_reg[index] = value;
 }
 
-static void tci_write_reg8s(TCGRegister index, int8_t value)
+static void tci_write_reg8s(TCGReg index, int8_t value)
 {
     tci_write_reg(index, value);
 }
 
-static void tci_write_reg16s(TCGRegister index, int16_t value)
+static void tci_write_reg16s(TCGReg index, int16_t value)
 {
     tci_write_reg(index, value);
 }
 
 #if TCG_TARGET_REG_BITS == 64
-static void tci_write_reg32s(TCGRegister index, int32_t value)
+static void tci_write_reg32s(TCGReg index, int32_t value)
 {
     tci_write_reg(index, value);
 }
 #endif
 
-static void tci_write_reg8(TCGRegister index, uint8_t value)
+static void tci_write_reg8(TCGReg index, uint8_t value)
 {
     tci_write_reg(index, value);
 }
 
-static void tci_write_reg16(TCGRegister index, uint16_t value)
+static void tci_write_reg16(TCGReg index, uint16_t value)
 {
     tci_write_reg(index, value);
 }
 
-static void tci_write_reg32(TCGRegister index, uint32_t value)
+static void tci_write_reg32(TCGReg index, uint32_t value)
 {
     tci_write_reg(index, value);
 }
@@ -159,7 +159,7 @@ static void tci_write_reg64(uint32_t high_index, uint32_t low_index,
     tci_write_reg(high_index, value >> 32);
 }
 #elif TCG_TARGET_REG_BITS == 64
-static void tci_write_reg64(TCGRegister index, uint64_t value)
+static void tci_write_reg64(TCGReg index, uint64_t value)
 {
     tci_write_reg(index, value);
 }
@@ -290,7 +290,7 @@ static target_ulong tci_read_ulong(uint8_t **tb_ptr)
 static tcg_target_ulong tci_read_ri(uint8_t **tb_ptr)
 {
     tcg_target_ulong value;
-    TCGRegister r = **tb_ptr;
+    TCGReg r = **tb_ptr;
     *tb_ptr += 1;
     if (r == TCG_CONST) {
         value = tci_read_i(tb_ptr);
@@ -304,7 +304,7 @@ static tcg_target_ulong tci_read_ri(uint8_t **tb_ptr)
 static uint32_t tci_read_ri32(uint8_t **tb_ptr)
 {
     uint32_t value;
-    TCGRegister r = **tb_ptr;
+    TCGReg r = **tb_ptr;
     *tb_ptr += 1;
     if (r == TCG_CONST) {
         value = tci_read_i32(tb_ptr);
@@ -326,7 +326,7 @@ static uint64_t tci_read_ri64(uint8_t **tb_ptr)
 static uint64_t tci_read_ri64(uint8_t **tb_ptr)
 {
     uint64_t value;
-    TCGRegister r = **tb_ptr;
+    TCGReg r = **tb_ptr;
     *tb_ptr += 1;
     if (r == TCG_CONST) {
         value = tci_read_i64(tb_ptr);
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 15/16] tcg: Use TCGReg for standard tcg-target entry points.
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (13 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 14/16] tcg: Standardize on TCGReg as the enum for hard registers Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 23:29   ` Andreas Färber
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 16/16] s390x: initialize virtio dev region Alexander Graf
  2011-11-13 10:09 ` [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Blue Swirl
  16 siblings, 1 reply; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel, Richard Henderson

From: Richard Henderson <rth@twiddle.net>

Including tcg_out_ld, tcg_out_st, tcg_out_mov, tcg_out_movi.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 tcg/arm/tcg-target.c   |   13 +++++++------
 tcg/hppa/tcg-target.c  |   12 ++++++------
 tcg/i386/tcg-target.c  |   13 +++++++------
 tcg/ia64/tcg-target.c  |   12 ++++++------
 tcg/mips/tcg-target.c  |   13 +++++++------
 tcg/ppc/tcg-target.c   |    8 ++++----
 tcg/ppc64/tcg-target.c |    8 ++++----
 tcg/sparc/tcg-target.c |   13 +++++++------
 tcg/tcg.c              |    8 ++++----
 tcg/tci/tcg-target.c   |    8 ++++----
 10 files changed, 56 insertions(+), 52 deletions(-)

diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c
index ce4760d..e05a64f 100644
--- a/tcg/arm/tcg-target.c
+++ b/tcg/arm/tcg-target.c
@@ -1808,25 +1808,26 @@ static void tcg_target_init(TCGContext *s)
                   CPU_TEMP_BUF_NLONGS * sizeof(long));
 }
 
-static inline void tcg_out_ld(TCGContext *s, TCGType type, int arg,
-                int arg1, tcg_target_long arg2)
+static inline void tcg_out_ld(TCGContext *s, TCGType type, TCGReg arg,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     tcg_out_ld32u(s, COND_AL, arg, arg1, arg2);
 }
 
-static inline void tcg_out_st(TCGContext *s, TCGType type, int arg,
-                int arg1, tcg_target_long arg2)
+static inline void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     tcg_out_st32(s, COND_AL, arg, arg1, arg2);
 }
 
-static inline void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
+static inline void tcg_out_mov(TCGContext *s, TCGType type,
+                               TCGReg ret, TCGReg arg)
 {
     tcg_out_dat_reg(s, COND_AL, ARITH_MOV, ret, 0, arg, SHIFT_IMM_LSL(0));
 }
 
 static inline void tcg_out_movi(TCGContext *s, TCGType type,
-                int ret, tcg_target_long arg)
+                                TCGReg ret, tcg_target_long arg)
 {
     tcg_out_movi32(s, COND_AL, ret, arg);
 }
diff --git a/tcg/hppa/tcg-target.c b/tcg/hppa/tcg-target.c
index 71d9677..59d4d12 100644
--- a/tcg/hppa/tcg-target.c
+++ b/tcg/hppa/tcg-target.c
@@ -338,7 +338,7 @@ static int tcg_target_const_match(tcg_target_long val,
 /* supplied by libgcc */
 extern void *__canonicalize_funcptr_for_compare(void *);
 
-static void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
+static void tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg)
 {
     /* PA1.1 defines COPY as OR r,0,t; PA2.0 defines COPY as LDO 0(r),t
        but hppa-dis.c is unaware of this definition */
@@ -349,7 +349,7 @@ static void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
 }
 
 static void tcg_out_movi(TCGContext *s, TCGType type,
-                         int ret, tcg_target_long arg)
+                         TCGReg ret, tcg_target_long arg)
 {
     if (check_fit_tl(arg, 14)) {
         tcg_out32(s, INSN_LDO | INSN_R1(ret)
@@ -393,15 +393,15 @@ static void tcg_out_ldst(TCGContext *s, int ret, int addr,
 }
 
 /* This function is required by tcg.c.  */
-static inline void tcg_out_ld(TCGContext *s, TCGType type, int ret,
-                              int arg1, tcg_target_long arg2)
+static inline void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     tcg_out_ldst(s, ret, arg1, arg2, INSN_LDW);
 }
 
 /* This function is required by tcg.c.  */
-static inline void tcg_out_st(TCGContext *s, TCGType type, int ret,
-                              int arg1, tcg_target_long arg2)
+static inline void tcg_out_st(TCGContext *s, TCGType type, TCGReg ret,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     tcg_out_ldst(s, ret, arg1, arg2, INSN_STW);
 }
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index 3069e53..dc81572 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -518,7 +518,8 @@ static inline void tgen_arithr(TCGContext *s, int subop, int dest, int src)
     tcg_out_modrm(s, OPC_ARITH_GvEv + (subop << 3) + ext, dest, src);
 }
 
-static inline void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
+static inline void tcg_out_mov(TCGContext *s, TCGType type,
+                               TCGReg ret, TCGReg arg)
 {
     if (arg != ret) {
         int opc = OPC_MOVL_GvEv + (type == TCG_TYPE_I64 ? P_REXW : 0);
@@ -527,7 +528,7 @@ static inline void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
 }
 
 static void tcg_out_movi(TCGContext *s, TCGType type,
-                         int ret, tcg_target_long arg)
+                         TCGReg ret, tcg_target_long arg)
 {
     if (arg == 0) {
         tgen_arithr(s, ARITH_XOR, ret, ret);
@@ -568,15 +569,15 @@ static inline void tcg_out_pop(TCGContext *s, int reg)
     tcg_out_opc(s, OPC_POP_r32 + LOWREGMASK(reg), 0, reg, 0);
 }
 
-static inline void tcg_out_ld(TCGContext *s, TCGType type, int ret,
-                              int arg1, tcg_target_long arg2)
+static inline void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     int opc = OPC_MOVL_GvEv + (type == TCG_TYPE_I64 ? P_REXW : 0);
     tcg_out_modrm_offset(s, opc, ret, arg1, arg2);
 }
 
-static inline void tcg_out_st(TCGContext *s, TCGType type, int arg,
-                              int arg1, tcg_target_long arg2)
+static inline void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     int opc = OPC_MOVL_EvGv + (type == TCG_TYPE_I64 ? P_REXW : 0);
     tcg_out_modrm_offset(s, opc, arg, arg1, arg2);
diff --git a/tcg/ia64/tcg-target.c b/tcg/ia64/tcg-target.c
index bb22b9a..e3de79f 100644
--- a/tcg/ia64/tcg-target.c
+++ b/tcg/ia64/tcg-target.c
@@ -830,7 +830,7 @@ static inline void tcg_out_bundle(TCGContext *s, int template,
 }
 
 static inline void tcg_out_mov(TCGContext *s, TCGType type,
-                               TCGArg ret, TCGArg arg)
+                               TCGReg ret, TCGReg arg)
 {
     tcg_out_bundle(s, mmI,
                    tcg_opc_m48(TCG_REG_P0, OPC_NOP_M48, 0),
@@ -839,7 +839,7 @@ static inline void tcg_out_mov(TCGContext *s, TCGType type,
 }
 
 static inline void tcg_out_movi(TCGContext *s, TCGType type,
-                                TCGArg reg, tcg_target_long arg)
+                                TCGReg reg, tcg_target_long arg)
 {
     tcg_out_bundle(s, mLX,
                    tcg_opc_m48(TCG_REG_P0, OPC_NOP_M48, 0),
@@ -972,8 +972,8 @@ static inline void tcg_out_st_rel(TCGContext *s, uint64_t opc_m4, TCGArg arg,
     }
 }
 
-static inline void tcg_out_ld(TCGContext *s, TCGType type, TCGArg arg,
-                              TCGArg arg1, tcg_target_long arg2)
+static inline void tcg_out_ld(TCGContext *s, TCGType type, TCGReg arg,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     if (type == TCG_TYPE_I32) {
         tcg_out_ld_rel(s, OPC_LD4_M1, arg, arg1, arg2);
@@ -982,8 +982,8 @@ static inline void tcg_out_ld(TCGContext *s, TCGType type, TCGArg arg,
     }
 }
 
-static inline void tcg_out_st(TCGContext *s, TCGType type, TCGArg arg,
-                              TCGArg arg1, tcg_target_long arg2)
+static inline void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     if (type == TCG_TYPE_I32) {
         tcg_out_st_rel(s, OPC_ST4_M4, arg, arg1, arg2);
diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c
index a33d21f..c5c3282 100644
--- a/tcg/mips/tcg-target.c
+++ b/tcg/mips/tcg-target.c
@@ -379,13 +379,14 @@ static inline void tcg_out_nop(TCGContext *s)
     tcg_out32(s, 0);
 }
 
-static inline void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
+static inline void tcg_out_mov(TCGContext *s, TCGType type,
+                               TCGReg ret, TCGReg arg)
 {
     tcg_out_opc_reg(s, OPC_ADDU, ret, arg, TCG_REG_ZERO);
 }
 
 static inline void tcg_out_movi(TCGContext *s, TCGType type,
-                                int reg, int32_t arg)
+                                TCGReg reg, tcg_target_long arg)
 {
     if (arg == (int16_t)arg) {
         tcg_out_opc_imm(s, OPC_ADDIU, reg, TCG_REG_ZERO, arg);
@@ -480,14 +481,14 @@ static inline void tcg_out_ldst(TCGContext *s, int opc, int arg,
     }
 }
 
-static inline void tcg_out_ld(TCGContext *s, TCGType type, int arg,
-                              int arg1, tcg_target_long arg2)
+static inline void tcg_out_ld(TCGContext *s, TCGType type, TCGReg arg,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     tcg_out_ldst(s, OPC_LW, arg, arg1, arg2);
 }
 
-static inline void tcg_out_st(TCGContext *s, TCGType type, int arg,
-                              int arg1, tcg_target_long arg2)
+static inline void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     tcg_out_ldst(s, OPC_SW, arg, arg1, arg2);
 }
diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c
index 87cc117..f5d9bf3 100644
--- a/tcg/ppc/tcg-target.c
+++ b/tcg/ppc/tcg-target.c
@@ -436,13 +436,13 @@ static const uint32_t tcg_to_bc[10] = {
     [TCG_COND_GTU] = BC | BI (7, CR_GT) | BO_COND_TRUE,
 };
 
-static void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
+static void tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg)
 {
     tcg_out32 (s, OR | SAB (arg, ret, arg));
 }
 
 static void tcg_out_movi(TCGContext *s, TCGType type,
-                         int ret, tcg_target_long arg)
+                         TCGReg ret, tcg_target_long arg)
 {
     if (arg == (int16_t) arg)
         tcg_out32 (s, ADDI | RT (ret) | RA (0) | (arg & 0xffff));
@@ -961,13 +961,13 @@ static void tcg_target_qemu_prologue (TCGContext *s)
     tcg_out32 (s, BCLR | BO_ALWAYS);
 }
 
-static void tcg_out_ld (TCGContext *s, TCGType type, int ret, int arg1,
+static void tcg_out_ld (TCGContext *s, TCGType type, TCGReg ret, TCGReg arg1,
                         tcg_target_long arg2)
 {
     tcg_out_ldst (s, ret, arg1, arg2, LWZ, LWZX);
 }
 
-static void tcg_out_st (TCGContext *s, TCGType type, int arg, int arg1,
+static void tcg_out_st (TCGContext *s, TCGType type, TCGReg arg, TCGReg arg1,
                         tcg_target_long arg2)
 {
     tcg_out_ldst (s, arg, arg1, arg2, STW, STWX);
diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index 3d24cd4..4800977 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -435,7 +435,7 @@ static const uint32_t tcg_to_bc[10] = {
     [TCG_COND_GTU] = BC | BI (7, CR_GT) | BO_COND_TRUE,
 };
 
-static void tcg_out_mov (TCGContext *s, TCGType type, int ret, int arg)
+static void tcg_out_mov (TCGContext *s, TCGType type, TCGReg ret, TCGReg arg)
 {
     tcg_out32 (s, OR | SAB (arg, ret, arg));
 }
@@ -459,7 +459,7 @@ static void tcg_out_movi32 (TCGContext *s, int ret, int32_t arg)
 }
 
 static void tcg_out_movi (TCGContext *s, TCGType type,
-                          int ret, tcg_target_long arg)
+                          TCGReg ret, tcg_target_long arg)
 {
     int32_t arg32 = arg;
     arg = type == TCG_TYPE_I32 ? arg & 0xffffffff : arg;
@@ -930,7 +930,7 @@ static void tcg_target_qemu_prologue (TCGContext *s)
     tcg_out32 (s, BCLR | BO_ALWAYS);
 }
 
-static void tcg_out_ld (TCGContext *s, TCGType type, int ret, int arg1,
+static void tcg_out_ld (TCGContext *s, TCGType type, TCGReg ret, TCGReg arg1,
                         tcg_target_long arg2)
 {
     if (type == TCG_TYPE_I32)
@@ -939,7 +939,7 @@ static void tcg_out_ld (TCGContext *s, TCGType type, int ret, int arg1,
         tcg_out_ldsta (s, ret, arg1, arg2, LD, LDX);
 }
 
-static void tcg_out_st (TCGContext *s, TCGType type, int arg, int arg1,
+static void tcg_out_st (TCGContext *s, TCGType type, TCGReg arg, TCGReg arg1,
                         tcg_target_long arg2)
 {
     if (type == TCG_TYPE_I32)
diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c
index fc3fd7f..b96312b 100644
--- a/tcg/sparc/tcg-target.c
+++ b/tcg/sparc/tcg-target.c
@@ -306,7 +306,8 @@ static void tcg_out_arithc(TCGContext *s, int rd, int rs1,
               | (val2const ? INSN_IMM13(val2) : INSN_RS2(val2)));
 }
 
-static inline void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
+static inline void tcg_out_mov(TCGContext *s, TCGType type,
+                               TCGReg ret, TCGReg arg)
 {
     tcg_out_arith(s, ret, arg, TCG_REG_G0, ARITH_OR);
 }
@@ -333,7 +334,7 @@ static inline void tcg_out_movi_imm32(TCGContext *s, int ret, uint32_t arg)
 }
 
 static inline void tcg_out_movi(TCGContext *s, TCGType type,
-                                int ret, tcg_target_long arg)
+                                TCGReg ret, tcg_target_long arg)
 {
     /* All 32-bit constants, as well as 64-bit constants with
        no high bits set go through movi_imm32.  */
@@ -398,8 +399,8 @@ static inline void tcg_out_ldst_asi(TCGContext *s, int ret, int addr,
               INSN_ASI(asi) | INSN_RS2(addr));
 }
 
-static inline void tcg_out_ld(TCGContext *s, TCGType type, int ret,
-                              int arg1, tcg_target_long arg2)
+static inline void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     if (type == TCG_TYPE_I32)
         tcg_out_ldst(s, ret, arg1, arg2, LDUW);
@@ -407,8 +408,8 @@ static inline void tcg_out_ld(TCGContext *s, TCGType type, int ret,
         tcg_out_ldst(s, ret, arg1, arg2, LDX);
 }
 
-static inline void tcg_out_st(TCGContext *s, TCGType type, int arg,
-                              int arg1, tcg_target_long arg2)
+static inline void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg,
+                              TCGReg arg1, tcg_target_long arg2)
 {
     if (type == TCG_TYPE_I32)
         tcg_out_ldst(s, arg, arg1, arg2, STW);
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 6b27d7b..77bd6ef 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -71,14 +71,14 @@ static void patch_reloc(uint8_t *code_ptr, int type,
 
 /* Forward declarations for functions declared and used in tcg-target.c. */
 static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str);
-static void tcg_out_ld(TCGContext *s, TCGType type, int ret, int arg1,
+static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg1,
                        tcg_target_long arg2);
-static void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg);
+static void tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg);
 static void tcg_out_movi(TCGContext *s, TCGType type,
-                         int ret, tcg_target_long arg);
+                         TCGReg ret, tcg_target_long arg);
 static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
                        const int *const_args);
-static void tcg_out_st(TCGContext *s, TCGType type, int arg, int arg1,
+static void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg, TCGReg arg1,
                        tcg_target_long arg2);
 static int tcg_target_const_match(tcg_target_long val,
                                   const TCGArgConstraint *arg_ct);
diff --git a/tcg/tci/tcg-target.c b/tcg/tci/tcg-target.c
index e373e2a..942910e 100644
--- a/tcg/tci/tcg-target.c
+++ b/tcg/tci/tcg-target.c
@@ -495,7 +495,7 @@ static void tci_out_label(TCGContext *s, TCGArg arg)
     }
 }
 
-static void tcg_out_ld(TCGContext *s, TCGType type, int ret, int arg1,
+static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg1,
                        tcg_target_long arg2)
 {
     uint8_t *old_code_ptr = s->code_ptr;
@@ -519,7 +519,7 @@ static void tcg_out_ld(TCGContext *s, TCGType type, int ret, int arg1,
     old_code_ptr[1] = s->code_ptr - old_code_ptr;
 }
 
-static void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
+static void tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg)
 {
     uint8_t *old_code_ptr = s->code_ptr;
     assert(ret != arg);
@@ -534,7 +534,7 @@ static void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
 }
 
 static void tcg_out_movi(TCGContext *s, TCGType type,
-                         int t0, tcg_target_long arg)
+                         TCGReg t0, tcg_target_long arg)
 {
     uint8_t *old_code_ptr = s->code_ptr;
     uint32_t arg32 = arg;
@@ -834,7 +834,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
     old_code_ptr[1] = s->code_ptr - old_code_ptr;
 }
 
-static void tcg_out_st(TCGContext *s, TCGType type, int arg, int arg1,
+static void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg, TCGReg arg1,
                        tcg_target_long arg2)
 {
     uint8_t *old_code_ptr = s->code_ptr;
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 16/16] s390x: initialize virtio dev region
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (14 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 15/16] tcg: Use TCGReg for standard tcg-target entry points Alexander Graf
@ 2011-11-11 17:49 ` Alexander Graf
  2011-11-11 18:08   ` Peter Maydell
  2011-11-13 10:09 ` [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Blue Swirl
  16 siblings, 1 reply; 22+ messages in thread
From: Alexander Graf @ 2011-11-11 17:49 UTC (permalink / raw)
  To: qemu-devel Developers; +Cc: blauwirbel

When running the s390x virtio machine we can potentially use uninitialized
memory for the virtio device backing ram. That can lead to weird breakge.

So let's better initialize it to 0 properly.

Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

---

v1 -> v2:

  - use target_phys_addr_t
---
 hw/s390-virtio.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index 37945d5..61b67e8 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -165,6 +165,9 @@ static void s390_init(ram_addr_t my_ram_size,
     ram_addr_t initrd_size = 0;
     int shift = 0;
     uint8_t *storage_keys;
+    void *virtio_region;
+    target_phys_addr_t virtio_region_len;
+    target_phys_addr_t virtio_region_start;
     int i;
 
     /* s390x ram size detection needs a 16bit multiplier + an increment. So
@@ -184,6 +187,15 @@ static void s390_init(ram_addr_t my_ram_size,
     memory_region_init_ram(ram, NULL, "s390.ram", my_ram_size);
     memory_region_add_subregion(sysmem, 0, ram);
 
+    /* clear virtio region */
+    virtio_region_len = my_ram_size - ram_size;
+    virtio_region_start = ram_size;
+    virtio_region = cpu_physical_memory_map(virtio_region_start,
+                                            &virtio_region_len, true);
+    memset(virtio_region, 0, virtio_region_len);
+    cpu_physical_memory_unmap(virtio_region, virtio_region_len, 1,
+                              virtio_region_len);
+
     /* allocate storage keys */
     storage_keys = g_malloc0(my_ram_size / TARGET_PAGE_SIZE);
 
-- 
1.6.0.2

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

* Re: [Qemu-devel] [PATCH 16/16] s390x: initialize virtio dev region
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 16/16] s390x: initialize virtio dev region Alexander Graf
@ 2011-11-11 18:08   ` Peter Maydell
  0 siblings, 0 replies; 22+ messages in thread
From: Peter Maydell @ 2011-11-11 18:08 UTC (permalink / raw)
  To: Alexander Graf; +Cc: blauwirbel, qemu-devel Developers

On 11 November 2011 17:49, Alexander Graf <agraf@suse.de> wrote:
> When running the s390x virtio machine we can potentially use uninitialized
> memory for the virtio device backing ram. That can lead to weird breakge.
>
> So let's better initialize it to 0 properly.
>
> Reported-by: Andreas Färber <afaerber@suse.de>
> Signed-off-by: Alexander Graf <agraf@suse.de>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

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

* Re: [Qemu-devel] [PATCH 14/16] tcg: Standardize on TCGReg as the enum for hard registers
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 14/16] tcg: Standardize on TCGReg as the enum for hard registers Alexander Graf
@ 2011-11-11 23:27   ` Andreas Färber
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Färber @ 2011-11-11 23:27 UTC (permalink / raw)
  To: Alexander Graf; +Cc: blauwirbel, qemu-devel Developers, Richard Henderson

Am 11.11.2011 18:49, schrieb Alexander Graf:
> From: Richard Henderson <rth@twiddle.net>
> 
> Most targets did not name the enum; tci used TCGRegister.
> 
> Signed-off-by: Richard Henderson <rth@twiddle.net>

Picking this into s390 was a bit unfortunate. It's missing

Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Stefan Weil <sw@weilnetz.de>

> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PATCH 15/16] tcg: Use TCGReg for standard tcg-target entry points.
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 15/16] tcg: Use TCGReg for standard tcg-target entry points Alexander Graf
@ 2011-11-11 23:29   ` Andreas Färber
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas Färber @ 2011-11-11 23:29 UTC (permalink / raw)
  To: Alexander Graf; +Cc: blauwirbel, qemu-devel Developers, Richard Henderson

Am 11.11.2011 18:49, schrieb Alexander Graf:
> From: Richard Henderson <rth@twiddle.net>
> 
> Including tcg_out_ld, tcg_out_st, tcg_out_mov, tcg_out_movi.
> 
> Signed-off-by: Richard Henderson <rth@twiddle.net>

Missing

Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Stefan Weil <sw@weilnetz.de>

> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0
  2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
                   ` (15 preceding siblings ...)
  2011-11-11 17:49 ` [Qemu-devel] [PATCH 16/16] s390x: initialize virtio dev region Alexander Graf
@ 2011-11-13 10:09 ` Blue Swirl
  2011-11-13 13:51   ` Anthony Liguori
  16 siblings, 1 reply; 22+ messages in thread
From: Blue Swirl @ 2011-11-13 10:09 UTC (permalink / raw)
  To: Alexander Graf, Anthony Liguori; +Cc: qemu-devel Developers

On Fri, Nov 11, 2011 at 17:49, Alexander Graf <agraf@suse.de> wrote:
> Hi Blue,
>
> This is my current patch queue for s390. Please pull.
>
> It contains a few features, but only because I forgot to send out
> a pull request for -rc1. These have been lying in my queue for a
> while.

These don't look much like 1.0 material to me except perhaps the
patches limited to s390 only. Anthony, what do you think?

> I also have two of Richard's TCG patches in, because without I
> can't compile and they look perfectly sane to me.

I think they are OK too.

> Alex
>
>
> The following changes since commit 0e3b800e71cb7759d099eabbd8ad4c4fe848e381:
>  Peter Maydell (1):
>        hw/lan9118.c: Add missing 'break' to fix buffer overrun
>
> are available in the git repository at:
>
>  git://repo.or.cz/qemu/agraf.git s390-next
>
> Alexander Graf (11):
>      [S390] Add hotplug support
>      Compile device-hotplug on all targets
>      Add generic drive hotplugging
>      Expose drive_add on all architectures
>      s390x: add ldeb instruction
>      s390x: make ipte 31-bit aware
>      s390x: update R and C bits in storage key
>      s390x: implement rrbe instruction properly
>      s390x: implement SIGP restart and shutdown
>      s390x: Add shutdown for TCG s390-virtio machine
>      s390x: initialize virtio dev region
>
> Christian Borntraeger (3):
>      s390: fix reset hypercall to reset the status
>      s390: fix short kernel command lines
>      s390: Fix cpu shutdown for KVM
>
> Richard Henderson (2):
>      tcg: Standardize on TCGReg as the enum for hard registers
>      tcg: Use TCGReg for standard tcg-target entry points.
>
>  Makefile.target          |    5 +++-
>  hmp-commands.hx          |    2 -
>  hw/device-hotplug.c      |   47 ++++++++++++++++++++++++++++++++++++++++++++++
>  hw/pci-hotplug.c         |   24 +++-------------------
>  hw/s390-virtio-bus.c     |   24 ++++++++++++++++++----
>  hw/s390-virtio-bus.h     |    5 ++++
>  hw/s390-virtio.c         |   47 +++++++++++++++++++++++++++++++++++++++++++--
>  sysemu.h                 |    6 ++++-
>  target-s390x/cpu.h       |   15 ++++++++++++++
>  target-s390x/helper.c    |   27 +++++++++++++++++++++++--
>  target-s390x/helpers.h   |    1 +
>  target-s390x/kvm.c       |   19 ++++++-----------
>  target-s390x/op_helper.c |   43 ++++++++++++++++++++++++++++++++++++-----
>  target-s390x/translate.c |    4 +++
>  tcg/arm/tcg-target.c     |   13 ++++++-----
>  tcg/arm/tcg-target.h     |    4 +-
>  tcg/hppa/tcg-target.c    |   12 +++++-----
>  tcg/hppa/tcg-target.h    |    4 +-
>  tcg/i386/tcg-target.c    |   13 ++++++-----
>  tcg/i386/tcg-target.h    |    4 +-
>  tcg/ia64/tcg-target.c    |   12 +++++-----
>  tcg/ia64/tcg-target.h    |    4 +-
>  tcg/mips/tcg-target.c    |   13 ++++++-----
>  tcg/mips/tcg-target.h    |    4 +-
>  tcg/ppc/tcg-target.c     |    8 +++---
>  tcg/ppc/tcg-target.h     |    4 +-
>  tcg/ppc64/tcg-target.c   |    8 +++---
>  tcg/ppc64/tcg-target.h   |    4 +-
>  tcg/sparc/tcg-target.c   |   13 ++++++-----
>  tcg/sparc/tcg-target.h   |    4 +-
>  tcg/tcg.c                |    8 +++---
>  tcg/tci/tcg-target.c     |    8 +++---
>  tcg/tci/tcg-target.h     |    2 +-
>  tci.c                    |   38 ++++++++++++++++++------------------
>  34 files changed, 308 insertions(+), 141 deletions(-)
>

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

* Re: [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0
  2011-11-13 10:09 ` [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Blue Swirl
@ 2011-11-13 13:51   ` Anthony Liguori
  0 siblings, 0 replies; 22+ messages in thread
From: Anthony Liguori @ 2011-11-13 13:51 UTC (permalink / raw)
  To: Blue Swirl; +Cc: Alexander Graf, qemu-devel Developers

On 11/13/2011 04:09 AM, Blue Swirl wrote:
> On Fri, Nov 11, 2011 at 17:49, Alexander Graf<agraf@suse.de>  wrote:
>> Hi Blue,
>>
>> This is my current patch queue for s390. Please pull.
>>
>> It contains a few features, but only because I forgot to send out
>> a pull request for -rc1. These have been lying in my queue for a
>> while.
>
> These don't look much like 1.0 material to me except perhaps the
> patches limited to s390 only. Anthony, what do you think?

Yeah, please don't push additional features at this point.  -rc goes out 
tomorrow and with the Thanksgiving holiday, there's not a tremendous amount of 
testing between now and the final release.

Regards,

Anthony Liguori

>
>> I also have two of Richard's TCG patches in, because without I
>> can't compile and they look perfectly sane to me.
>
> I think they are OK too.
>
>> Alex
>>
>>
>> The following changes since commit 0e3b800e71cb7759d099eabbd8ad4c4fe848e381:
>>   Peter Maydell (1):
>>         hw/lan9118.c: Add missing 'break' to fix buffer overrun
>>
>> are available in the git repository at:
>>
>>   git://repo.or.cz/qemu/agraf.git s390-next
>>
>> Alexander Graf (11):
>>       [S390] Add hotplug support
>>       Compile device-hotplug on all targets
>>       Add generic drive hotplugging
>>       Expose drive_add on all architectures
>>       s390x: add ldeb instruction
>>       s390x: make ipte 31-bit aware
>>       s390x: update R and C bits in storage key
>>       s390x: implement rrbe instruction properly
>>       s390x: implement SIGP restart and shutdown
>>       s390x: Add shutdown for TCG s390-virtio machine
>>       s390x: initialize virtio dev region
>>
>> Christian Borntraeger (3):
>>       s390: fix reset hypercall to reset the status
>>       s390: fix short kernel command lines
>>       s390: Fix cpu shutdown for KVM
>>
>> Richard Henderson (2):
>>       tcg: Standardize on TCGReg as the enum for hard registers
>>       tcg: Use TCGReg for standard tcg-target entry points.
>>
>>   Makefile.target          |    5 +++-
>>   hmp-commands.hx          |    2 -
>>   hw/device-hotplug.c      |   47 ++++++++++++++++++++++++++++++++++++++++++++++
>>   hw/pci-hotplug.c         |   24 +++-------------------
>>   hw/s390-virtio-bus.c     |   24 ++++++++++++++++++----
>>   hw/s390-virtio-bus.h     |    5 ++++
>>   hw/s390-virtio.c         |   47 +++++++++++++++++++++++++++++++++++++++++++--
>>   sysemu.h                 |    6 ++++-
>>   target-s390x/cpu.h       |   15 ++++++++++++++
>>   target-s390x/helper.c    |   27 +++++++++++++++++++++++--
>>   target-s390x/helpers.h   |    1 +
>>   target-s390x/kvm.c       |   19 ++++++-----------
>>   target-s390x/op_helper.c |   43 ++++++++++++++++++++++++++++++++++++-----
>>   target-s390x/translate.c |    4 +++
>>   tcg/arm/tcg-target.c     |   13 ++++++-----
>>   tcg/arm/tcg-target.h     |    4 +-
>>   tcg/hppa/tcg-target.c    |   12 +++++-----
>>   tcg/hppa/tcg-target.h    |    4 +-
>>   tcg/i386/tcg-target.c    |   13 ++++++-----
>>   tcg/i386/tcg-target.h    |    4 +-
>>   tcg/ia64/tcg-target.c    |   12 +++++-----
>>   tcg/ia64/tcg-target.h    |    4 +-
>>   tcg/mips/tcg-target.c    |   13 ++++++-----
>>   tcg/mips/tcg-target.h    |    4 +-
>>   tcg/ppc/tcg-target.c     |    8 +++---
>>   tcg/ppc/tcg-target.h     |    4 +-
>>   tcg/ppc64/tcg-target.c   |    8 +++---
>>   tcg/ppc64/tcg-target.h   |    4 +-
>>   tcg/sparc/tcg-target.c   |   13 ++++++-----
>>   tcg/sparc/tcg-target.h   |    4 +-
>>   tcg/tcg.c                |    8 +++---
>>   tcg/tci/tcg-target.c     |    8 +++---
>>   tcg/tci/tcg-target.h     |    2 +-
>>   tci.c                    |   38 ++++++++++++++++++------------------
>>   34 files changed, 308 insertions(+), 141 deletions(-)
>>
>

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

end of thread, other threads:[~2011-11-13 13:51 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-11 17:49 [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 01/16] [S390] Add hotplug support Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 02/16] Compile device-hotplug on all targets Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 03/16] Add generic drive hotplugging Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 04/16] Expose drive_add on all architectures Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 05/16] s390x: add ldeb instruction Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 06/16] s390x: make ipte 31-bit aware Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 07/16] s390x: update R and C bits in storage key Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 08/16] s390x: implement rrbe instruction properly Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 09/16] s390x: implement SIGP restart and shutdown Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 10/16] s390: fix reset hypercall to reset the status Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 11/16] s390: fix short kernel command lines Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 12/16] s390: Fix cpu shutdown for KVM Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 13/16] s390x: Add shutdown for TCG s390-virtio machine Alexander Graf
2011-11-11 17:49 ` [Qemu-devel] [PATCH 14/16] tcg: Standardize on TCGReg as the enum for hard registers Alexander Graf
2011-11-11 23:27   ` Andreas Färber
2011-11-11 17:49 ` [Qemu-devel] [PATCH 15/16] tcg: Use TCGReg for standard tcg-target entry points Alexander Graf
2011-11-11 23:29   ` Andreas Färber
2011-11-11 17:49 ` [Qemu-devel] [PATCH 16/16] s390x: initialize virtio dev region Alexander Graf
2011-11-11 18:08   ` Peter Maydell
2011-11-13 10:09 ` [Qemu-devel] [PULL 00/16] s390 patch queue 2011-11-11 for 1.0 Blue Swirl
2011-11-13 13:51   ` Anthony Liguori

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).