[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/8] s390: Fix the storage increment size calculatio
From: |
Jens Freimann |
Subject: |
[Qemu-devel] [PATCH 8/8] s390: Fix the storage increment size calculation |
Date: |
Wed, 6 Jun 2012 14:05:23 +0200 |
From: Nick Wang <address@hidden>
To comply with the SCLP architecture, the number of storage
increments should be 512 or fewer. The increment size is a
multiple of 1M and is a power of 2.
Signed-off-by: Nick Wang <address@hidden>
Signed-off-by: Jens Freimann <address@hidden>
---
hw/s390-sclp.c | 2 +-
hw/s390-virtio.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/s390-sclp.c b/hw/s390-sclp.c
index 8f45773..3e91f93 100644
--- a/hw/s390-sclp.c
+++ b/hw/s390-sclp.c
@@ -32,7 +32,7 @@ int sclp_read_info(CPUS390XState *env, struct sccb *sccb)
{
int shift = 0;
- while ((ram_size >> (20 + shift)) > 65535) {
+ while ((ram_size >> (20 + shift)) > 512) {
shift++;
}
sccb->c.read_info.rnmax = cpu_to_be16(ram_size >> (20 + shift));
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index 0babf27..9578d15 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -175,9 +175,9 @@ static void s390_init(ram_addr_t my_ram_size,
int i;
DeviceState *dev;
- /* s390x ram size detection needs a 16bit multiplier + an increment. So
- guests > 64GB can be specified in 2MB steps etc. */
- while ((my_ram_size >> (20 + shift)) > 65535) {
+ /* The storage increment size is a multiple of 1M and is a power of 2.
+ * The number of storage increments must be 512 or fewer. */
+ while ((my_ram_size >> (20 + shift)) > 512) {
shift++;
}
my_ram_size = my_ram_size >> (20 + shift) << (20 + shift);
--
1.7.10.4
- [Qemu-devel] Next version of memory allocation fixup, (continued)
- [Qemu-devel] Next version of memory allocation fixup, Christian Borntraeger, 2012/06/15
- [Qemu-devel] [PatchV2] s390: autodetect map private, Christian Borntraeger, 2012/06/15
- [Qemu-devel] One more fix, Christian Borntraeger, 2012/06/15
- [Qemu-devel] [PATCH v3] s390: autodetect map private, Christian Borntraeger, 2012/06/15
- Re: [Qemu-devel] [PATCH v3] s390: autodetect map private, Jan Kiszka, 2012/06/15
- Re: [Qemu-devel] [PATCH v3] s390: autodetect map private, Alexander Graf, 2012/06/18
[Qemu-devel] [PATCH 4/8] s390: stop target cpu on sigp initial reset, Jens Freimann, 2012/06/06
[Qemu-devel] [PATCH 1/8] s390: add new define for KVM_CAP_S390_COW, Jens Freimann, 2012/06/06
[Qemu-devel] [PATCH 8/8] s390: Fix the storage increment size calculation,
Jens Freimann <=
Re: [Qemu-devel] [PATCH 0/8] s390: SCLP console and misc, Christian Borntraeger, 2012/06/18