qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] (0.12) S390 patches
@ 2009-12-17 12:06 Alexander Graf
  2009-12-17 12:06 ` [Qemu-devel] [PATCH 1/3] S390: Loop through virtio console devices Alexander Graf
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexander Graf @ 2009-12-17 12:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: aurelien

While trying out 0.12-rc2 on my S390x, I stumbled over several issues.

This set fixes them, making KVM on S390x work great again.

Alexander Graf (3):
  S390: Loop through virtio console devices
  add default virtcon initialization
  S390: Don't tell guest we're updating config space

 hw/s390-virtio-bus.c |    2 +-
 hw/s390-virtio.c     |    6 +++++-
 vl.c                 |    2 ++
 3 files changed, 8 insertions(+), 2 deletions(-)

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

* [Qemu-devel] [PATCH 1/3] S390: Loop through virtio console devices
  2009-12-17 12:06 [Qemu-devel] [PATCH 0/3] (0.12) S390 patches Alexander Graf
@ 2009-12-17 12:06 ` Alexander Graf
  2009-12-17 12:06 ` [Qemu-devel] [PATCH 2/3] add default virtcon initialization Alexander Graf
  2009-12-17 12:06 ` [Qemu-devel] [PATCH 3/3] S390: Don't tell guest we're updating config space Alexander Graf
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2009-12-17 12:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: aurelien

We used to always create one single virtio console device. This breaks when
either zero of multiple virtio console devices are requested, so let's use
the same code as on x86.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 hw/s390-virtio.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index b57fa9c..e54ef0e 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -201,7 +201,11 @@ static void s390_init(ram_addr_t ram_size,
     }
 
     /* Create VirtIO console */
-    qdev_init_nofail(qdev_create((BusState *)s390_bus, "virtio-console-s390"));
+    for(i = 0; i < MAX_VIRTIO_CONSOLES; i++) {
+        if (virtcon_hds[i]) {
+            qdev_init_nofail(qdev_create((BusState *)s390_bus, "virtio-console-s390"));
+        }
+    }
 
     /* Create VirtIO network adapters */
     for(i = 0; i < nb_nics; i++) {
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 2/3] add default virtcon initialization
  2009-12-17 12:06 [Qemu-devel] [PATCH 0/3] (0.12) S390 patches Alexander Graf
  2009-12-17 12:06 ` [Qemu-devel] [PATCH 1/3] S390: Loop through virtio console devices Alexander Graf
@ 2009-12-17 12:06 ` Alexander Graf
  2009-12-17 12:06 ` [Qemu-devel] [PATCH 3/3] S390: Don't tell guest we're updating config space Alexander Graf
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2009-12-17 12:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: aurelien

When going through the default devices, we don't initialize the virtio
console, unless we're doing -nographic.

I suppose that's just a leftover from the recent code restructuring, so
let's put it in.

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

diff --git a/vl.c b/vl.c
index c0d98f5..4973512 100644
--- a/vl.c
+++ b/vl.c
@@ -5712,6 +5712,8 @@ int main(int argc, char **argv, char **envp)
             add_device_config(DEV_PARALLEL, "vc:80Cx24C");
         if (default_monitor)
             monitor_parse("vc:80Cx24C", "readline");
+        if (default_virtcon)
+            add_device_config(DEV_VIRTCON, "vc:80Cx24C");
     }
     if (default_vga)
         vga_interface_type = VGA_CIRRUS;
-- 
1.6.0.2

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

* [Qemu-devel] [PATCH 3/3] S390: Don't tell guest we're updating config space
  2009-12-17 12:06 [Qemu-devel] [PATCH 0/3] (0.12) S390 patches Alexander Graf
  2009-12-17 12:06 ` [Qemu-devel] [PATCH 1/3] S390: Loop through virtio console devices Alexander Graf
  2009-12-17 12:06 ` [Qemu-devel] [PATCH 2/3] add default virtcon initialization Alexander Graf
@ 2009-12-17 12:06 ` Alexander Graf
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2009-12-17 12:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: aurelien

Currently we always set the "config space changed" bit to 1 when triggering
any virtio interrupt. While that worked in 2.6.27, newer kernels interpret
that value as "only the config space changed and nothing else happened".

Since we usually trigger interrupts to tell the guest that something did
happen, we just not tell it the config space changed for now until we
implement the correct callback for that.

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

diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index 493e4da..dc154ed 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -307,7 +307,7 @@ static void virtio_s390_notify(void *opaque, uint16_t vector)
     uint64_t token = s390_virtio_device_vq_token(dev, vector);
 
     /* XXX kvm dependency! */
-    kvm_s390_virtio_irq(s390_cpu_addr2state(0), 1, token);
+    kvm_s390_virtio_irq(s390_cpu_addr2state(0), 0, token);
 }
 
 /**************** S390 Virtio Bus Device Descriptions *******************/
-- 
1.6.0.2

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

end of thread, other threads:[~2009-12-17 12:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-17 12:06 [Qemu-devel] [PATCH 0/3] (0.12) S390 patches Alexander Graf
2009-12-17 12:06 ` [Qemu-devel] [PATCH 1/3] S390: Loop through virtio console devices Alexander Graf
2009-12-17 12:06 ` [Qemu-devel] [PATCH 2/3] add default virtcon initialization Alexander Graf
2009-12-17 12:06 ` [Qemu-devel] [PATCH 3/3] S390: Don't tell guest we're updating config space Alexander Graf

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