From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0AmY-00062t-MS for qemu-devel@nongnu.org; Thu, 26 Jun 2014 10:36:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0AmO-00048o-TJ for qemu-devel@nongnu.org; Thu, 26 Jun 2014 10:36:10 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44704 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0AmO-00048I-LD for qemu-devel@nongnu.org; Thu, 26 Jun 2014 10:36:00 -0400 Message-ID: <53AC2FCE.4020404@suse.de> Date: Thu, 26 Jun 2014 16:35:58 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1403793009-54176-1-git-send-email-jfrei@linux.vnet.ibm.com> <1403793009-54176-4-git-send-email-jfrei@linux.vnet.ibm.com> In-Reply-To: <1403793009-54176-4-git-send-email-jfrei@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/10] pc-bios/s390-ccw: handle different sector sizes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jens Freimann , Christian Borntraeger , Cornelia Huck Cc: "Eugene (jno) Dvurechenski" , qemu-devel@nongnu.org On 26.06.14 16:30, Jens Freimann wrote: > From: "Eugene (jno) Dvurechenski" > > 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 > Signed-off-by: Jens Freimann > --- > 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