qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 03/10] pc-bios/s390-ccw: handle different sector


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH 03/10] pc-bios/s390-ccw: handle different sector sizes
Date: Thu, 26 Jun 2014 16:35:58 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0


On 26.06.14 16:30, Jens Freimann wrote:
From: "Eugene (jno) Dvurechenski" <address@hidden>

Use the virtio device's configuration to figure out the disk geometry
and use a sector size based upon the layout.

Signed-off-by: Eugene (jno) Dvurechenski <address@hidden>
Signed-off-by: Jens Freimann <address@hidden>
---
  pc-bios/s390-ccw/bootmap.c  |  3 +-
  pc-bios/s390-ccw/s390-ccw.h |  2 +-
  pc-bios/s390-ccw/virtio.c   | 96 ++++++++++++++++++++++++++++++++++++++++++---
  pc-bios/s390-ccw/virtio.h   | 48 +++++++++++++++++++++++
  4 files changed, 142 insertions(+), 7 deletions(-)

diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c
index c216030..79db3c3 100644
--- a/pc-bios/s390-ccw/bootmap.c
+++ b/pc-bios/s390-ccw/bootmap.c
@@ -10,6 +10,7 @@
#include "s390-ccw.h"
  #include "bootmap.h"
+#include "virtio.h"
/* #define DEBUG_FALLBACK */ @@ -238,7 +239,7 @@ int zipl_load(void)
          goto fail;
      }
- ns_end = sec + SECTOR_SIZE;
+    ns_end = sec + virtio_get_block_size();
      for (ns = (sec + pte_len); (ns + pte_len) < ns_end; ns++) {
          prog_table_entry = (ScsiBlockPtr *)ns;
          if (!prog_table_entry->blockno) {
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
index fe1dd22..a2bd042 100644
--- a/pc-bios/s390-ccw/s390-ccw.h
+++ b/pc-bios/s390-ccw/s390-ccw.h
@@ -130,6 +130,6 @@ static inline void yield(void)
                    : "memory", "cc");
  }
-#define SECTOR_SIZE 512
+#define SECTOR_SIZE 4096

Why keep the define at all?


Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]