qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH/RFC 0/2] changes for s390-ccw.img
@ 2015-03-02 15:27 Christian Borntraeger
  2015-03-02 15:27 ` [Qemu-devel] [PATCH/RFC 1/2] s390-ccw.img: Allow bigger ramdisk sizes or offsets Christian Borntraeger
  2015-03-02 15:27 ` [Qemu-devel] [PATCH/RFC 2/2] s390-ccw.img: Reinitialize guessing on reboot Christian Borntraeger
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Borntraeger @ 2015-03-02 15:27 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Cornelia Huck, Christian Borntraeger, Jens Freimann, qemu-devel,
	Thomas Huth

Alex,
this is my current patch queue for the s390-ccw.img bios

Christian Borntraeger (2):
  s390-ccw.img: Allow bigger ramdisk sizes or offsets
  s390-ccw.img: Reinitialize guessing on reboot

 pc-bios/s390-ccw/virtio.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.3.0

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

* [Qemu-devel] [PATCH/RFC 1/2] s390-ccw.img: Allow bigger ramdisk sizes or offsets
  2015-03-02 15:27 [Qemu-devel] [PATCH/RFC 0/2] changes for s390-ccw.img Christian Borntraeger
@ 2015-03-02 15:27 ` Christian Borntraeger
  2015-03-02 15:27 ` [Qemu-devel] [PATCH/RFC 2/2] s390-ccw.img: Reinitialize guessing on reboot Christian Borntraeger
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Borntraeger @ 2015-03-02 15:27 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Cornelia Huck, Christian Borntraeger, Jens Freimann, qemu-devel,
	Thomas Huth

The s390-ccw bios creates the the virtqueue at 100MB. For
big ramdisks or offsets (via zipl) this gets overwritten.
As a quick band-aid, lets move the virtqueue into the bss
section, which is at 0x7f00000. As the bios code (text) is
at 0x7e00000 we can now handle ramdisk which are  ~27MB
bigger.

Long term we want to make the s390-ccw bios position
independent and load of at the end of memory.

Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 pc-bios/s390-ccw/main.c     | 1 +
 pc-bios/s390-ccw/s390-ccw.h | 1 +
 pc-bios/s390-ccw/virtio.c   | 4 ++--
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
index 6f707bb..584d4a2 100644
--- a/pc-bios/s390-ccw/main.c
+++ b/pc-bios/s390-ccw/main.c
@@ -12,6 +12,7 @@
 #include "virtio.h"
 
 char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
+char ring_area[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
 uint64_t boot_value;
 static struct subchannel_id blk_schid = { .one = 1 };
 
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
index ceb7418..9b3868b 100644
--- a/pc-bios/s390-ccw/s390-ccw.h
+++ b/pc-bios/s390-ccw/s390-ccw.h
@@ -52,6 +52,7 @@ void disabled_wait(void);
 void virtio_panic(const char *string);
 void write_subsystem_identification(void);
 extern char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
+extern char ring_area[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
 extern uint64_t boot_value;
 
 /* sclp-ascii.c */
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
index bdf5810..57ff1b0 100644
--- a/pc-bios/s390-ccw/virtio.c
+++ b/pc-bios/s390-ccw/virtio.c
@@ -379,10 +379,10 @@ void virtio_setup_block(struct subchannel_id schid)
     if (run_ccw(schid, CCW_CMD_READ_CONF, &blk_cfg, sizeof(blk_cfg))) {
         virtio_panic("Could not get block device configuration\n");
     }
-    vring_init(&block, config.num, (void *)(100 * 1024 * 1024),
+    vring_init(&block, config.num, ring_area,
                KVM_S390_VIRTIO_RING_ALIGN);
 
-    info.queue = (100ULL * 1024ULL* 1024ULL);
+    info.queue = (unsigned long long) ring_area;
     info.align = KVM_S390_VIRTIO_RING_ALIGN;
     info.index = 0;
     info.num = config.num;
-- 
2.3.0

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

* [Qemu-devel] [PATCH/RFC 2/2] s390-ccw.img: Reinitialize guessing on reboot
  2015-03-02 15:27 [Qemu-devel] [PATCH/RFC 0/2] changes for s390-ccw.img Christian Borntraeger
  2015-03-02 15:27 ` [Qemu-devel] [PATCH/RFC 1/2] s390-ccw.img: Allow bigger ramdisk sizes or offsets Christian Borntraeger
@ 2015-03-02 15:27 ` Christian Borntraeger
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Borntraeger @ 2015-03-02 15:27 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Cornelia Huck, Christian Borntraeger, Jens Freimann, qemu-devel,
	Thomas Huth

guessed_disk_nature is a static zero variable. As the QEMU ELF
loader does not zero the BSS section, lets do it explicitely here.

This fixes reboot for some corner cases (like FCP flash
devices with logical_block_size=512, physical_block_size=4096)

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 pc-bios/s390-ccw/virtio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
index 4dc91a7..bdf5810 100644
--- a/pc-bios/s390-ccw/virtio.c
+++ b/pc-bios/s390-ccw/virtio.c
@@ -362,6 +362,7 @@ void virtio_setup_block(struct subchannel_id schid)
     struct vq_config_block config = {};
 
     blk_cfg.blk_size = 0; /* mark "illegal" - setup started... */
+    guessed_disk_nature = false;
 
     virtio_reset(schid);
 
-- 
2.3.0

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

end of thread, other threads:[~2015-03-02 15:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-02 15:27 [Qemu-devel] [PATCH/RFC 0/2] changes for s390-ccw.img Christian Borntraeger
2015-03-02 15:27 ` [Qemu-devel] [PATCH/RFC 1/2] s390-ccw.img: Allow bigger ramdisk sizes or offsets Christian Borntraeger
2015-03-02 15:27 ` [Qemu-devel] [PATCH/RFC 2/2] s390-ccw.img: Reinitialize guessing on reboot Christian Borntraeger

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