qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: qemu-devel@nongnu.org
Cc: borntraeger@de.ibm.com, agraf@suse.de, jfrei@linux.vnet.ibm.com,
	Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: [Qemu-devel] [PATCH 6/7] s390x: Limit s390-ccw machines to 248 CPUs
Date: Wed,  8 Jun 2016 13:02:44 +0200	[thread overview]
Message-ID: <1465383765-18754-7-git-send-email-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1465383765-18754-1-git-send-email-cornelia.huck@de.ibm.com>

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

The sclp scp read info call fills in a buffer with information about the
system. With more than 248 CPUs we overflow the 4k buffer of the SCCB,
leading to random data corruption. Basically ALL guest operating systems
call scp read info, so let's limit the machines to 248 CPUs to make it
obvious that >=249 does not work.

As KVM also limits itself to 248 and TCG on s390 does not support
SMP, this should cause no regression for any user as no VMs with more
than 248 VCPUs were ever possible.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 hw/s390x/s390-virtio-ccw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 95ff5e3..e257ca5 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -204,7 +204,7 @@ static void ccw_machine_class_init(ObjectClass *oc, void *data)
     mc->no_parallel = 1;
     mc->no_sdcard = 1;
     mc->use_sclp = 1;
-    mc->max_cpus = 255;
+    mc->max_cpus = 248;
     mc->get_hotplug_handler = s390_get_hotplug_handler;
     hc->plug = s390_machine_device_plug;
     nc->nmi_monitor_handler = s390_nmi;
-- 
2.6.6

  parent reply	other threads:[~2016-06-08 11:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08 11:02 [Qemu-devel] [PATCH 0/7] s390x: next batch of patches Cornelia Huck
2016-06-08 11:02 ` [Qemu-devel] [PATCH 1/7] linux-headers: update Cornelia Huck
2016-06-08 11:02 ` [Qemu-devel] [PATCH 2/7] s390x/kvm: add interface for clearing IO irqs Cornelia Huck
2016-06-08 11:02 ` [Qemu-devel] [PATCH 3/7] s390x/css: clear IO irqs when generating IPI CRW Cornelia Huck
2016-06-08 11:02 ` [Qemu-devel] [PATCH 4/7] s390x/css: introduce property type for device ids Cornelia Huck
2016-06-08 11:02 ` [Qemu-devel] [PATCH 5/7] virtio-ccw: Provide traces for indicator changes Cornelia Huck
2016-06-14 11:56   ` Cornelia Huck
2016-06-08 11:02 ` Cornelia Huck [this message]
2016-06-08 11:02 ` [Qemu-devel] [PATCH 7/7] s390x/kvm: Fixup interrupt type for non-adapter I/O interrupts Cornelia Huck
2016-06-13  8:19 ` [Qemu-devel] [PATCH 0/7] s390x: next batch of patches Christian Borntraeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465383765-18754-7-git-send-email-cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).