All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/1] s390 patch queue 2012-07-10
@ 2012-07-10 16:33 Alexander Graf
  2012-07-10 16:33 ` [Qemu-devel] [PATCH 1/1] s390x: fix s390 virtio aliases Alexander Graf
  2012-07-12 20:03 ` [Qemu-devel] [PULL 0/1] s390 patch queue 2012-07-10 Michael Roth
  0 siblings, 2 replies; 5+ messages in thread
From: Alexander Graf @ 2012-07-10 16:33 UTC (permalink / raw)
  To: qemu-devel qemu-devel; +Cc: Michael Roth

Hi Mike,

This is my current patch queue for s390 for 1.1. It contains an important fix
to make virtio devices accessible via their aliases.

Please pull.

Alex


The following changes since commit b7093f294c330c4db789c077dac9d8611e4f8ee0:
  Jason Wang (1):
        rtl8139: validate rx ring before receiving packets

are available in the git repository at:

  git://repo.or.cz/qemu/agraf.git s390-for-upstream-1.1

Alexander Graf (1):
      s390x: fix s390 virtio aliases

 hw/qdev-monitor.c |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

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

* [Qemu-devel] [PATCH 1/1] s390x: fix s390 virtio aliases
  2012-07-10 16:33 [Qemu-devel] [PULL 0/1] s390 patch queue 2012-07-10 Alexander Graf
@ 2012-07-10 16:33 ` Alexander Graf
  2012-07-12 20:03 ` [Qemu-devel] [PULL 0/1] s390 patch queue 2012-07-10 Michael Roth
  1 sibling, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2012-07-10 16:33 UTC (permalink / raw)
  To: qemu-devel qemu-devel; +Cc: Anthony Liguori, Michael Roth

Some of the virtio devices have the same frontend name, but actually
implement different devices behind the scenes through aliases.

The indicator which device type to use is the architecture. On s390, we
want s390 virtio devices. On everything else, we want PCI devices.

Reflect this in the alias selection code. This way we fix commands like
-device virtio-blk on s390x which with this patch applied select the
correct virtio-blk-s390 device rather than virtio-blk-pci.

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 hw/qdev-monitor.c |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
index eed781d..405697e 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -20,6 +20,7 @@
 #include "qdev.h"
 #include "monitor.h"
 #include "qmp-commands.h"
+#include "arch_init.h"
 
 /*
  * Aliases were a bad idea from the start.  Let's keep them
@@ -29,16 +30,18 @@ typedef struct QDevAlias
 {
     const char *typename;
     const char *alias;
+    uint32_t arch_mask;
 } QDevAlias;
 
 static const QDevAlias qdev_alias_table[] = {
-    { "virtio-blk-pci", "virtio-blk" },
-    { "virtio-net-pci", "virtio-net" },
-    { "virtio-serial-pci", "virtio-serial" },
-    { "virtio-balloon-pci", "virtio-balloon" },
-    { "virtio-blk-s390", "virtio-blk" },
-    { "virtio-net-s390", "virtio-net" },
-    { "virtio-serial-s390", "virtio-serial" },
+    { "virtio-blk-pci", "virtio-blk", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+    { "virtio-net-pci", "virtio-net", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+    { "virtio-serial-pci", "virtio-serial", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+    { "virtio-balloon-pci", "virtio-balloon",
+            QEMU_ARCH_ALL & ~QEMU_ARCH_S390X },
+    { "virtio-blk-s390", "virtio-blk", QEMU_ARCH_S390X },
+    { "virtio-net-s390", "virtio-net", QEMU_ARCH_S390X },
+    { "virtio-serial-s390", "virtio-serial", QEMU_ARCH_S390X },
     { "lsi53c895a", "lsi" },
     { "ich9-ahci", "ahci" },
     { }
@@ -50,6 +53,11 @@ static const char *qdev_class_get_alias(DeviceClass *dc)
     int i;
 
     for (i = 0; qdev_alias_table[i].typename; i++) {
+        if (qdev_alias_table[i].arch_mask &&
+            !(qdev_alias_table[i].arch_mask & arch_type)) {
+            continue;
+        }
+
         if (strcmp(qdev_alias_table[i].typename, typename) == 0) {
             return qdev_alias_table[i].alias;
         }
@@ -110,6 +118,11 @@ static const char *find_typename_by_alias(const char *alias)
     int i;
 
     for (i = 0; qdev_alias_table[i].alias; i++) {
+        if (qdev_alias_table[i].arch_mask &&
+            !(qdev_alias_table[i].arch_mask & arch_type)) {
+            continue;
+        }
+
         if (strcmp(qdev_alias_table[i].alias, alias) == 0) {
             return qdev_alias_table[i].typename;
         }
-- 
1.6.0.2

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

* Re: [Qemu-devel] [PULL 0/1] s390 patch queue 2012-07-10
  2012-07-10 16:33 [Qemu-devel] [PULL 0/1] s390 patch queue 2012-07-10 Alexander Graf
  2012-07-10 16:33 ` [Qemu-devel] [PATCH 1/1] s390x: fix s390 virtio aliases Alexander Graf
@ 2012-07-12 20:03 ` Michael Roth
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Roth @ 2012-07-12 20:03 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-devel qemu-devel

On Tue, Jul 10, 2012 at 06:33:48PM +0200, Alexander Graf wrote:
> Hi Mike,
> 
> This is my current patch queue for s390 for 1.1. It contains an important fix
> to make virtio devices accessible via their aliases.
> 
> Please pull.

Pulled into stable-1.1 (now on git.qemu.org). Will be included
in the 1.1.1 release (ETA: today). Thanks!

> 
> Alex
> 
> 
> The following changes since commit b7093f294c330c4db789c077dac9d8611e4f8ee0:
>   Jason Wang (1):
>         rtl8139: validate rx ring before receiving packets
> 
> are available in the git repository at:
> 
>   git://repo.or.cz/qemu/agraf.git s390-for-upstream-1.1
> 
> Alexander Graf (1):
>       s390x: fix s390 virtio aliases
> 
>  hw/qdev-monitor.c |   27 ++++++++++++++++++++-------
>  1 files changed, 20 insertions(+), 7 deletions(-)
> 

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

* Re: [Qemu-devel] [PULL 0/1] s390 patch queue 2012-07-10
  2012-07-10 16:23 Alexander Graf
@ 2012-07-14 12:21 ` Blue Swirl
  0 siblings, 0 replies; 5+ messages in thread
From: Blue Swirl @ 2012-07-14 12:21 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-devel qemu-devel, Aurelien Jarno

On Tue, Jul 10, 2012 at 4:23 PM, Alexander Graf <agraf@suse.de> wrote:
> Hi Blue / Aurelien,
>
> This is my current patch queue for s390. It only includes a single patch
> that enables for better memory allocation with kvm on newer kernels.
>
> Please pull.

Thanks, pulled.

>
> Alex
>
>
> The following changes since commit 92336855975805d88c7979f53bc05c2d47abab04:
>   Anthony Liguori (1):
>         megasas: disable due to build breakage
>
> are available in the git repository at:
>
>   git://repo.or.cz/qemu/agraf.git s390-for-upstream
>
> Christian Borntraeger (1):
>       s390: autodetect map private
>
>  exec.c             |   18 +++---------------
>  kvm-all.c          |   13 +++++++++++++
>  kvm.h              |    2 ++
>  oslib-posix.c      |    3 +++
>  target-s390x/kvm.c |   35 +++++++++++++++++++++++++++++++++++
>  5 files changed, 56 insertions(+), 15 deletions(-)

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

* [Qemu-devel] [PULL 0/1] s390 patch queue 2012-07-10
@ 2012-07-10 16:23 Alexander Graf
  2012-07-14 12:21 ` Blue Swirl
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Graf @ 2012-07-10 16:23 UTC (permalink / raw)
  To: qemu-devel qemu-devel; +Cc: Blue Swirl, Aurelien Jarno

Hi Blue / Aurelien,

This is my current patch queue for s390. It only includes a single patch
that enables for better memory allocation with kvm on newer kernels.

Please pull.

Alex


The following changes since commit 92336855975805d88c7979f53bc05c2d47abab04:
  Anthony Liguori (1):
        megasas: disable due to build breakage

are available in the git repository at:

  git://repo.or.cz/qemu/agraf.git s390-for-upstream

Christian Borntraeger (1):
      s390: autodetect map private

 exec.c             |   18 +++---------------
 kvm-all.c          |   13 +++++++++++++
 kvm.h              |    2 ++
 oslib-posix.c      |    3 +++
 target-s390x/kvm.c |   35 +++++++++++++++++++++++++++++++++++
 5 files changed, 56 insertions(+), 15 deletions(-)

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

end of thread, other threads:[~2012-07-14 12:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10 16:33 [Qemu-devel] [PULL 0/1] s390 patch queue 2012-07-10 Alexander Graf
2012-07-10 16:33 ` [Qemu-devel] [PATCH 1/1] s390x: fix s390 virtio aliases Alexander Graf
2012-07-12 20:03 ` [Qemu-devel] [PULL 0/1] s390 patch queue 2012-07-10 Michael Roth
  -- strict thread matches above, loose matches on Subject: below --
2012-07-10 16:23 Alexander Graf
2012-07-14 12:21 ` Blue Swirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.