pkgsrc-Changes archive

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

CVS commit: pkgsrc/emulators/qemu



Module Name:    pkgsrc
Committed By:   jakllsch
Date:           Sun Sep 27 21:29:58 UTC 2020

Modified Files:
        pkgsrc/emulators/qemu: Makefile distinfo
Added Files:
        pkgsrc/emulators/qemu/patches: patch-hw_scsi_scsi-disk.c

Log Message:
fix SCSI disk block sizes outside range of 256 to 32768 in qemu


To generate a diff of this commit:
cvs rdiff -u -r1.251 -r1.252 pkgsrc/emulators/qemu/Makefile
cvs rdiff -u -r1.162 -r1.163 pkgsrc/emulators/qemu/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/emulators/qemu/patches/patch-hw_scsi_scsi-disk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/emulators/qemu/Makefile
diff -u pkgsrc/emulators/qemu/Makefile:1.251 pkgsrc/emulators/qemu/Makefile:1.252
--- pkgsrc/emulators/qemu/Makefile:1.251        Sun Sep 27 21:27:27 2020
+++ pkgsrc/emulators/qemu/Makefile      Sun Sep 27 21:29:57 2020
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.251 2020/09/27 21:27:27 jakllsch Exp $
+# $NetBSD: Makefile,v 1.252 2020/09/27 21:29:57 jakllsch Exp $
 
 DISTNAME=      qemu-5.1.0
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    emulators
 MASTER_SITES=  https://download.qemu.org/
 EXTRACT_SUFX=  .tar.xz

Index: pkgsrc/emulators/qemu/distinfo
diff -u pkgsrc/emulators/qemu/distinfo:1.162 pkgsrc/emulators/qemu/distinfo:1.163
--- pkgsrc/emulators/qemu/distinfo:1.162        Wed Aug 12 18:31:27 2020
+++ pkgsrc/emulators/qemu/distinfo      Sun Sep 27 21:29:57 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.162 2020/08/12 18:31:27 ryoon Exp $
+$NetBSD: distinfo,v 1.163 2020/09/27 21:29:57 jakllsch Exp $
 
 SHA1 (qemu-5.1.0.tar.xz) = 8c70ce2b65349e9b42bd20c9dec2c90f8e7b960a
 RMD160 (qemu-5.1.0.tar.xz) = f5e4a20c481d7e2bf822bf6bf41667b810c3cecd
@@ -16,6 +16,7 @@ SHA1 (patch-hw_core_uboot__image.h) = 17
 SHA1 (patch-hw_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420
 SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc
 SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7
+SHA1 (patch-hw_scsi_scsi-disk.c) = fdbf2f962a6dcb1a115a7f8a5b8790ff9295fb33
 SHA1 (patch-hw_usb_dev-mtp.c) = 0f9034fb3904e5d5e3b98d24b94e054181687d95
 SHA1 (patch-include_sysemu_hw__accel.h) = 852bc031a1e065f614c5c913351f3e13183e00b7
 SHA1 (patch-include_sysemu_kvm.h) = 9847abe3be70bd708a521310f5d5515e45a1a5a0

Added files:

Index: pkgsrc/emulators/qemu/patches/patch-hw_scsi_scsi-disk.c
diff -u /dev/null pkgsrc/emulators/qemu/patches/patch-hw_scsi_scsi-disk.c:1.1
--- /dev/null   Sun Sep 27 21:29:58 2020
+++ pkgsrc/emulators/qemu/patches/patch-hw_scsi_scsi-disk.c     Sun Sep 27 21:29:57 2020
@@ -0,0 +1,50 @@
+$NetBSD: patch-hw_scsi_scsi-disk.c,v 1.1 2020/09/27 21:29:57 jakllsch Exp $
+
+Fill in more of SCSI disk block size reports to guest. Allows use of
+sector sizes outside range of 256 to 32768.
+
+--- hw/scsi/scsi-disk.c.orig   2020-08-11 19:17:15.000000000 +0000
++++ hw/scsi/scsi-disk.c
+@@ -1293,9 +1293,9 @@ static int scsi_disk_emulate_mode_sense(
+         p[2] = (nb_sectors >> 8) & 0xff;
+         p[3] = nb_sectors & 0xff;
+         p[4] = 0; /* reserved */
+-        p[5] = 0; /* bytes 5-7 are the sector size in bytes */
+-        p[6] = s->qdev.blocksize >> 8;
+-        p[7] = 0;
++        p[5] = (s->qdev.blocksize >> 16) & 0xff; /* bytes 5-7 are the sector size in bytes */
++        p[6] = (s->qdev.blocksize >> 8) & 0xff;
++        p[7] = s->qdev.blocksize & 0xff;
+         p += 8;
+     }
+ 
+@@ -1993,10 +1993,10 @@ static int32_t scsi_disk_emulate_command
+         outbuf[1] = (nb_sectors >> 16) & 0xff;
+         outbuf[2] = (nb_sectors >> 8) & 0xff;
+         outbuf[3] = nb_sectors & 0xff;
+-        outbuf[4] = 0;
+-        outbuf[5] = 0;
+-        outbuf[6] = s->qdev.blocksize >> 8;
+-        outbuf[7] = 0;
++        outbuf[4] = (s->qdev.blocksize >> 24) & 0xff;;
++        outbuf[5] = (s->qdev.blocksize >> 16) & 0xff;
++        outbuf[6] = (s->qdev.blocksize >> 8) & 0xff;
++        outbuf[7] = s->qdev.blocksize & 0xff;;
+         break;
+     case REQUEST_SENSE:
+         /* Just return "NO SENSE".  */
+@@ -2062,10 +2062,10 @@ static int32_t scsi_disk_emulate_command
+             outbuf[5] = (nb_sectors >> 16) & 0xff;
+             outbuf[6] = (nb_sectors >> 8) & 0xff;
+             outbuf[7] = nb_sectors & 0xff;
+-            outbuf[8] = 0;
+-            outbuf[9] = 0;
+-            outbuf[10] = s->qdev.blocksize >> 8;
+-            outbuf[11] = 0;
++            outbuf[8] = (s->qdev.blocksize >> 24) & 0xff;
++            outbuf[9] = (s->qdev.blocksize >> 16) & 0xff;
++            outbuf[10] = (s->qdev.blocksize >> 8) & 0xff;
++            outbuf[11] = s->qdev.blocksize & 0xff;
+             outbuf[12] = 0;
+             outbuf[13] = get_physical_block_exp(&s->qdev.conf);
+ 



Home | Main Index | Thread Index | Old Index