[Qemu-devel] [PATCH 0/3] qemu-img: rebase: Improve/optimize rebase operation

2019-05-02 Thread Sam Eiderman
This patch series aims to improve the speed of qemu-img rebase. 1. Mainly by removing unnecessary reads when rebasing on the same chain. 2. But also by minimizing the number of bdrv_open calls rebase requires.

[Qemu-devel] [PATCH 1/3] qemu-img: rebase: Reuse parent BlockDriverState

2019-05-02 Thread Sam Eiderman
new() were copied from blk_new_open() when flags = 0. Reviewed-by: Karl Heubaum Reviewed-by: Eyal Moscovici Signed-off-by: Sagi Amit Co-developed-by: Sagi Amit Signed-off-by: Sam Eiderman --- qemu-img.c | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --

[Qemu-devel] [PATCH 2/3] qemu-img: rebase: Reduce reads on in-chain rebase

2019-05-02 Thread Sam Eiderman
arl Heubaum Signed-off-by: Sam Eiderman Signed-off-by: Eyal Moscovici --- qemu-img.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index d9b609b3f0..7f20858cb9 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3152,7 +3152,7 @@

[Qemu-devel] [PATCH 3/3] qemu-img: rebase: Reuse in-chain BlockDriverState

2019-05-02 Thread Sam Eiderman
ed-by: Karl Heubaum Reviewed-by: Eyal Moscovici Signed-off-by: Sagi Amit Co-developed-by: Sagi Amit Signed-off-by: Sam Eiderman --- qemu-img.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 7f20858cb9..970cd

[Qemu-devel] [PATCH v2] vmdk: Set vmdk parent backing_format to vmdk

2019-05-02 Thread Sam Eiderman
Fixing broken iotests 110 and and 126 by filtering out "backing file format" as Max suggested.

[Qemu-devel] [PATCH v2] vmdk: Set vmdk parent backing_format to vmdk

2019-05-02 Thread Sam Eiderman
Commit b69864e ("vmdk: Support version=3 in VMDK descriptor files") fixed the probe function to correctly guess vmdk descriptors with version=3. This solves the issue where vmdk snapshot with parent vmdk descriptor containing "version=3" would be treated as raw instead vmdk. In the future case wh

[Qemu-devel] [PATCH v2 0/3] qemu-img: rebase: Improve/optimize rebase operation

2019-05-02 Thread Sam Eiderman
chain BlockDriverState"* Sam Eiderman (3): qemu-img: rebase: Reuse parent BlockDriverState qemu-img: rebase: Reduce reads on in-chain rebase qemu-img: rebase: Reuse in-chain BlockDriverState qemu-img.c | 85 ++ 1 file changed, 58 inserti

[Qemu-devel] [PATCH v2 2/3] qemu-img: rebase: Reduce reads on in-chain rebase

2019-05-02 Thread Sam Eiderman
arl Heubaum Signed-off-by: Sam Eiderman Signed-off-by: Eyal Moscovici --- qemu-img.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index d9b609b3f0..7f20858cb9 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -3152,7 +3152,7 @@

[Qemu-devel] [PATCH v2 3/3] qemu-img: rebase: Reuse in-chain BlockDriverState

2019-05-02 Thread Sam Eiderman
ed-by: Karl Heubaum Reviewed-by: Eyal Moscovici Signed-off-by: Sagi Amit Co-developed-by: Sagi Amit Signed-off-by: Sam Eiderman --- qemu-img.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 7f20858cb9..b3288

[Qemu-devel] [PATCH v2 1/3] qemu-img: rebase: Reuse parent BlockDriverState

2019-05-02 Thread Sam Eiderman
new() were copied from blk_new_open() when flags = 0. Reviewed-by: Karl Heubaum Reviewed-by: Eyal Moscovici Signed-off-by: Sagi Amit Co-developed-by: Sagi Amit Signed-off-by: Sam Eiderman --- qemu-img.c | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --

[Qemu-devel] [QEMU] [PATCH 1/8] block: Refactor macros - fix tabbing

2019-06-12 Thread Sam Eiderman
Fixing tabbing in block related macros. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/ide/qdev.c| 2 +- include/hw/block/block.h | 16 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide

[Qemu-devel] [QEMU] [PATCH 2/8] block: Support providing LCHS from user

2019-06-12 Thread Sam Eiderman
future commits we will use the provided LCHS and pass it to the BIOS through fw_cfg to be supplied using INT13 routines. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- include/hw/block/block.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[Qemu-devel] [QEMU] [PATCH 4/8] scsi: Propagate unrealize() callback to scsi-hd

2019-06-12 Thread Sam Eiderman
We will need to add LCHS removal logic to scsi-hd's unrealize() in the next commit. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/scsi/scsi-bus.c | 15 +++ include/hw/scsi/scsi.h | 1 + 2 files changed, 16 insertions(+) diff --git

[Qemu-devel] [QEMU] [PATCH 5/8] bootdevice: Gather LCHS from all relevant devices

2019-06-12 Thread Sam Eiderman
Arbel Moshe Signed-off-by: Sam Eiderman --- hw/block/virtio-blk.c | 6 ++ hw/ide/qdev.c | 5 + hw/scsi/scsi-disk.c | 14 ++ 3 files changed, 25 insertions(+) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 06e57a4d39..787bbd768a 100644 --- a/hw/

[Qemu-devel] [QEMU] [PATCH 3/8] bootdevice: Add interface to gather LCHS

2019-06-12 Thread Sam Eiderman
Add an interface to provide direct logical CHS values for boot devices. We will use this interface in the next commits. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c| 55 + include

[Qemu-devel] [QEMU] [PATCH 8/8] hd-geo-test: Add tests for lchs override

2019-06-12 Thread Sam Eiderman
g, so I had to read the new fw_cfg layout on my own. Creating qcow2 disks with specific size and MBR layout is currently unused - we only use a default empty MBR. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- tests/Makefile.include | 2 +- tests/hd-geo-t

[Qemu-devel] [QEMU] [PATCH 7/8] bootdevice: FW_CFG interface for LCHS values

2019-06-12 Thread Sam Eiderman
e/%s/logical_geometry" where %s is the device name QEMU produces - but this implementation would require much more code refactoring, both in QEMU and SeaBIOS, so the current implementation was chosen. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Si

[Qemu-devel] [QEMU] [PATCH 6/8] bootdevice: Refactor get_boot_devices_list

2019-06-12 Thread Sam Eiderman
Move device name construction to a separate function. We will reuse this function in the following commit to pass logical CHS parameters through fw_cfg much like we currently pass bootindex. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c | 61

[Qemu-devel] [QEMU] [PATCH 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-12 Thread Sam Eiderman
more than 16 physical heads when moved to an IDE controller, the ATA spec allows a maximum of 16 heads - this is an artifact of virtualization. By supplying the logical geometies directly we are able to support such "exotic" disks. We will use fw_cfg to do just that. Sam Eiderman (8

[Qemu-devel] [QEMU] [PATCH v2 7/8] bootdevice: FW_CFG interface for LCHS values

2019-06-12 Thread Sam Eiderman
e/%s/logical_geometry" where %s is the device name QEMU produces - but this implementation would require much more code refactoring, both in QEMU and SeaBIOS, so the current implementation was chosen. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Si

[Qemu-devel] [QEMU] [PATCH v2 3/8] bootdevice: Add interface to gather LCHS

2019-06-12 Thread Sam Eiderman
Add an interface to provide direct logical CHS values for boot devices. We will use this interface in the next commits. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c| 55 + include

[Qemu-devel] [QEMU] [PATCH v2 8/8] hd-geo-test: Add tests for lchs override

2019-06-12 Thread Sam Eiderman
g, so I had to read the new fw_cfg layout on my own. Creating qcow2 disks with specific size and MBR layout is currently unused - we only use a default empty MBR. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- tests/Makefile.include | 2 +- tests/hd-geo-t

[Qemu-devel] [QEMU] [PATCH v2 5/8] bootdevice: Gather LCHS from all relevant devices

2019-06-12 Thread Sam Eiderman
Arbel Moshe Signed-off-by: Sam Eiderman --- hw/block/virtio-blk.c | 6 ++ hw/ide/qdev.c | 5 + hw/scsi/scsi-disk.c | 14 ++ 3 files changed, 25 insertions(+) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 06e57a4d39..787bbd768a 100644 --- a/hw/

[Qemu-devel] [QEMU] [PATCH v2 4/8] scsi: Propagate unrealize() callback to scsi-hd

2019-06-12 Thread Sam Eiderman
We will need to add LCHS removal logic to scsi-hd's unrealize() in the next commit. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/scsi/scsi-bus.c | 15 +++ include/hw/scsi/scsi.h | 1 + 2 files changed, 16 insertions(+) diff --git

[Qemu-devel] [QEMU] [PATCH v2 2/8] block: Support providing LCHS from user

2019-06-12 Thread Sam Eiderman
future commits we will use the provided LCHS and pass it to the BIOS through fw_cfg to be supplied using INT13 routines. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- include/hw/block/block.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[Qemu-devel] [QEMU] [PATCH v2 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-12 Thread Sam Eiderman
ix missing parenthesis check in "hd-geo-test: Add tests for lchs override" Sam Eiderman (8): block: Refactor macros - fix tabbing block: Support providing LCHS from user bootdevice: Add interface to gather LCHS scsi: Propagate unrealize() callback to scsi-hd bootdevice: Gather LC

[Qemu-devel] [QEMU] [PATCH v2 6/8] bootdevice: Refactor get_boot_devices_list

2019-06-12 Thread Sam Eiderman
Move device name construction to a separate function. We will reuse this function in the following commit to pass logical CHS parameters through fw_cfg much like we currently pass bootindex. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c | 61

[Qemu-devel] [QEMU] [PATCH v2 1/8] block: Refactor macros - fix tabbing

2019-06-12 Thread Sam Eiderman
Fixing tabbing in block related macros. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/ide/qdev.c| 2 +- include/hw/block/block.h | 16 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide

Re: [Qemu-devel] [QEMU] [PATCH 7/8] bootdevice: FW_CFG interface for LCHS values

2019-06-12 Thread Sam Eiderman
> On 12 Jun 2019, at 15:27, Laszlo Ersek wrote: > > On 06/12/19 11:42, Sam Eiderman wrote: >> Using fw_cfg, supply logical CHS values directly from QEMU to the BIOS. >> >> Non-standard logical geometries break under QEMU. >> >> A virtual disk which con

Re: [Qemu-devel] [QEMU] [PATCH v2 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-12 Thread Sam Eiderman
> On 12 Jun 2019, at 16:06, Gerd Hoffmann wrote: > > On Wed, Jun 12, 2019 at 02:59:31PM +0300, Sam Eiderman wrote: >> v1: >> >> Non-standard logical geometries break under QEMU. >> >> A virtual disk which contains an operating system which depends on &

Re: [Qemu-devel] [QEMU] [PATCH v2 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-13 Thread Sam Eiderman
> On 12 Jun 2019, at 22:18, Gerd Hoffmann wrote: > > On Wed, Jun 12, 2019 at 04:30:03PM +0300, Sam Eiderman wrote: >> >> >>> On 12 Jun 2019, at 16:06, Gerd Hoffmann wrote: >>> >>> On Wed, Jun 12, 2019 at 02:59:31PM +0300, Sam Eiderman

Re: [Qemu-devel] [QEMU] [PATCH v2 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-13 Thread Sam Eiderman
typo: ddb.geometry.biosCylinders = “83257” * Sam > On 13 Jun 2019, at 10:41, Sam Eiderman wrote: > > > >> On 12 Jun 2019, at 22:18, Gerd Hoffmann > <mailto:kra...@redhat.com>> wrote: >> >> On Wed, Jun 12, 2019 at 04:30:03PM +0300, Sam Eiderman wrot

Re: [Qemu-devel] [QEMU] [PATCH v2 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-13 Thread Sam Eiderman
> On 13 Jun 2019, at 12:38, Gerd Hoffmann wrote: > > Hi, > >> Yes they are pretty rare. >> Windows 2000 and Windows XP guests migrated from VMware to Qemu/KVM >> would not boot due to incorrect disk geometries (some had 32/56 spt instead >> of >> 56. Also number of heads was not entirely co

Re: [Qemu-devel] [QEMU] [PATCH v2 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-14 Thread Sam Eiderman
> On 14 Jun 2019, at 7:43, Gerd Hoffmann wrote: > > Hi, > >> Can there be a guest that will fail the MBR in such a way? Yes. >> Look at the following MBR partition table of a Windows XP guest in our >> production >> environment: >> >> Disk size in sectors: 16777216 >> >> Binary (only one

[Qemu-devel] [PATCH] vmdk: Support version=3 in VMDK descriptor files

2019-03-14 Thread Sam Eiderman
Commit 509d39aa22909c0ed1aabf896865f19c81fb38a1 added support for read only VMDKs of version 3. This commit fixes the probe function to correctly handle descriptors of version 3. This commit has two effects: 1. We no longer need to supply '-f vmdk' when pointing to descriptor files of

Re: [SeaBIOS] [PATCH v7 7/8] bootdevice: FW_CFG interface for LCHS values

2019-10-16 Thread Sam Eiderman
Gentle Ping, Philippe, John? Just wondering if the series is okay, as Gerd pointed out this series is a blocker for the corresponding changes in SeaBIOS for v 1.13 Sam On Tue, Oct 8, 2019 at 2:51 PM Sam Eiderman wrote: > > > > On Tue, Oct 8, 2019, 13:34 Philippe Mathieu-

Re: [SeaBIOS] Re: [PATCH v7 7/8] bootdevice: FW_CFG interface for LCHS values

2019-10-16 Thread Sam Eiderman
> Hi Sam, > > > > On 10/16/19 13:02, Sam Eiderman wrote: > >> Gentle Ping, > >> > >> Philippe, John? > >> > >> Just wondering if the series is okay, as Gerd pointed out this series > >> is a blocker for the corresponding changes in S

Re: [SeaBIOS] Re: [PATCH v7 7/8] bootdevice: FW_CFG interface for LCHS values

2019-10-16 Thread Sam Eiderman
/16/19 10:55 AM, Sam Eiderman wrote: > > Thanks for the detailed comment Laszlo, > > > > Indeed my e-mail has changed and I only received replies to the > > commits where I added this new mail in the S-o-b section, should of > > added in all of them. > > > >

[PATCH v8 0/8] Add Qemu to SeaBIOS LCHS interface

2019-10-16 Thread Sam Eiderman
from everything other than scsi-hd * Add proper include to sysemu.h * scsi_device_unrealize() after scsi_device_purge_requests() v7: * Adapted last commit (tests) to changes in qtest v8: * Fixed BE issue with tests by using qfw_cfg_get_file() instead of read_fw_cfg_file(), thanks Laszlo. * Remo

[PATCH v8 2/8] block: Support providing LCHS from user

2019-10-16 Thread Sam Eiderman
From: Sam Eiderman Add logical geometry variables to BlockConf. A user can now supply "lcyls", "lheads" & "lsecs" for any HD device that supports CHS ("cyls", "heads", "secs"). These devices include: * ide-hd * scsi-hd

[PATCH v8 1/1] hd-geo-test: Add tests for lchs override

2019-10-16 Thread Sam Eiderman
From: Sam Eiderman Add QTest tests to check the logical geometry override option. The tests in hd-geo-test are out of date - they only test IDE and do not test interesting MBRs. Creating qcow2 disks with specific size and MBR layout is currently unused - we only use a default empty MBR

[PATCH v8 3/8] bootdevice: Add interface to gather LCHS

2019-10-16 Thread Sam Eiderman
From: Sam Eiderman Add an interface to provide direct logical CHS values for boot devices. We will use this interface in the next commits. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman Signed-off-by: Sam Eiderman --- bootdevice.c| 55

[PATCH v8 4/8] scsi: Propagate unrealize() callback to scsi-hd

2019-10-16 Thread Sam Eiderman
From: Sam Eiderman We will need to add LCHS removal logic to scsi-hd's unrealize() in the next commit. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Sam Eiderman Signed-off-by: Sam Eiderman --- hw/scsi/scsi-bus.c

[PATCH v8 1/8] block: Refactor macros - fix tabbing

2019-10-16 Thread Sam Eiderman
From: Sam Eiderman Fixing tabbing in block related macros. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Sam Eiderman Signed-off-by: Sam Eiderman --- hw/ide/qdev.c| 2 +- include/hw/block/block.h | 16 2

[PATCH v8 6/8] bootdevice: Refactor get_boot_devices_list

2019-10-16 Thread Sam Eiderman
From: Sam Eiderman Move device name construction to a separate function. We will reuse this function in the following commit to pass logical CHS parameters through fw_cfg much like we currently pass bootindex. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Reviewed-by: Philippe Mathieu

[PATCH v8 5/8] bootdevice: Gather LCHS from all relevant devices

2019-10-16 Thread Sam Eiderman
From: Sam Eiderman Relevant devices are: * ide-hd (and ide-cd, ide-drive) * scsi-hd (and scsi-cd, scsi-disk, scsi-block) * virtio-blk-pci We do not call del_boot_device_lchs() for ide-* since we don't need to - IDE block devices do not support unplugging. Reviewed-by: Karl He

[PATCH v8 7/8] bootdevice: FW_CFG interface for LCHS values

2019-10-16 Thread Sam Eiderman
From: Sam Eiderman Using fw_cfg, supply logical CHS values directly from QEMU to the BIOS. Non-standard logical geometries break under QEMU. A virtual disk which contains an operating system which depends on logical geometries (consistent values being reported from BIOS INT13 AH=08) will most

[PATCH v8 8/8] hd-geo-test: Add tests for lchs override

2019-10-16 Thread Sam Eiderman
From: Sam Eiderman Add QTest tests to check the logical geometry override option. The tests in hd-geo-test are out of date - they only test IDE and do not test interesting MBRs. Creating qcow2 disks with specific size and MBR layout is currently unused - we only use a default empty MBR

[PULL 2/2] seabios: update to pre-1.13 snapshot again

2019-12-03 Thread Sam Eiderman
Hi, Maybe we should add: CONFIG_HOST_BIOS_GEOMETRY=n to rom/config.seabios-128k and recreate the 128k image?

Re: Regarding SESparse support in QEMU

2020-03-09 Thread Sam Eiderman
Hi, This is regarding the new VMDK format of SESparse snapshots which is available since ESXi 6.5 (for disks > 2TB) and is default since ESXi 6.7 (for all disks). Unlike the previous format (VMFSSparse), SESparse's format is not disclosed by VMware. Even though, I believe that the format itself i

Re: [SeaBIOS] [PATCH v7 7/8] bootdevice: FW_CFG interface for LCHS values

2019-09-29 Thread Sam Eiderman
ippe Mathieu-Daudé wrote: > >>> Hi Sam, > >>> > >>> On 9/25/19 1:06 PM, Sam Eiderman wrote: > >>>> From: Sam Eiderman > >>>> > >>>> Using fw_cfg, supply logical CHS values directly from QEMU to the > BIOS. > >

Re: [Qemu-devel] [QEMU] [PATCH v2 7/8] bootdevice: FW_CFG interface for LCHS values

2019-06-17 Thread Sam Eiderman
> On 17 Jun 2019, at 10:20, Gerd Hoffmann wrote: > > Hi, > >> We serialize this information in a similar way to the "bootorder" >> interface. >> The fw_cfg entry is "bootdevices" and it serializes a struct. > > Why "bootdevices"? I'd suggest to use "geometry" or "lchs" instead. True, if w

Re: [Qemu-devel] [QEMU] [PATCH v2 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-17 Thread Sam Eiderman
> On 17 Jun 2019, at 9:50, Gerd Hoffmann wrote: > > Hi, > >>> Ok, given that seabios has no setup any manual configuration needs to be >>> done via qemu. >>> >>> But why do we need a new interface for that? IDE can pass the geometry >>> to the guest. virtio-blk has support too (VIRTIO_BL

Re: [Qemu-devel] [QEMU] [PATCH v2 7/8] bootdevice: FW_CFG interface for LCHS values

2019-06-17 Thread Sam Eiderman
Ok, I’ll resubmit this patch series in v3, as well as v2 for SeaBIOS soon enough. * Change “bootdevices” to “bios-geometry”, and remove the struct size * Add cpu_to_le32 fix as Laszlo suggested or big endian hosts * Fix last qtest commit - automatic docker tester for some reason does not have qe

[Qemu-devel] [QEMU] [PATCH v3 3/8] bootdevice: Add interface to gather LCHS

2019-06-17 Thread Sam Eiderman
Add an interface to provide direct logical CHS values for boot devices. We will use this interface in the next commits. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c| 55 + include

[Qemu-devel] [QEMU] [PATCH v3 6/8] bootdevice: Refactor get_boot_devices_list

2019-06-17 Thread Sam Eiderman
Move device name construction to a separate function. We will reuse this function in the following commit to pass logical CHS parameters through fw_cfg much like we currently pass bootindex. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c | 61

[Qemu-devel] [SeaBIOS] [PATCH v2 3/5] geometry: Add boot_lchs_find_*() utility functions

2019-06-17 Thread Sam Eiderman
Adding the following utility functions: * boot_lchs_find_pci_device * boot_lchs_find_scsi_device * boot_lchs_find_ata_device These will be used to apply LCHS values received through fw_cfg. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- src

[Qemu-devel] [SeaBIOS] [PATCH v2 2/5] boot: Reorder functions in boot.c

2019-06-17 Thread Sam Eiderman
Currently glob_prefix() and build_pci_path() are under the "Boot priority ordering" section. Move them to a new "Helper search functions" section since we will reuse them in the next commit. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman

[Qemu-devel] [SeaBIOS] [PATCH v2 4/5] config: Add toggle for bootdevice information

2019-06-17 Thread Sam Eiderman
Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- src/Kconfig | 7 +++ src/boot.c | 8 2 files changed, 15 insertions(+) diff --git a/src/Kconfig b/src/Kconfig index 55a87cb7..0b4c1c0d 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -72,6 +72,13 @@ endchoice

[Qemu-devel] [SeaBIOS] [PATCH v2 0/5] Add Qemu to SeaBIOS LCHS interface

2019-06-17 Thread Sam Eiderman
ootdevices fw_cfg key to bios-geoemtry Sam Eiderman (5): geometry: Read LCHS from fw_cfg boot: Reorder functions in boot.c geometry: Add boot_lchs_find_*() utility functions config: Add toggle for bootdevice information geometry: Apply LCHS values for boot devices src/Kconfig |

[Qemu-devel] [SeaBIOS] [PATCH v2 1/5] geometry: Read LCHS from fw_cfg

2019-06-17 Thread Sam Eiderman
* device path (sz string) * device lchs ... * device path (sz string) * device lchs Device path is a null terminated string in the "Open Firmware" device path format, the same path as used in bootorder. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by:

[Qemu-devel] [QEMU] [PATCH v3 8/8] hd-geo-test: Add tests for lchs override

2019-06-17 Thread Sam Eiderman
g, so I had to read the new fw_cfg layout on my own. Creating qcow2 disks with specific size and MBR layout is currently unused - we only use a default empty MBR. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- tests/Makefile.include | 2 +- tests/hd-geo-t

[Qemu-devel] [SeaBIOS] [PATCH v2 5/5] geometry: Apply LCHS values for boot devices

2019-06-17 Thread Sam Eiderman
: "TRANSLATION_MACHINE". We treat this translation as TRANSLATION_NONE in fill_ata_edd(), although this does not really matter since now the translation between physical and logical geometry does not exist. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman

[Qemu-devel] [QEMU] [PATCH v3 1/8] block: Refactor macros - fix tabbing

2019-06-17 Thread Sam Eiderman
Fixing tabbing in block related macros. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/ide/qdev.c| 2 +- include/hw/block/block.h | 16 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide

[Qemu-devel] [QEMU] [PATCH v3 2/8] block: Support providing LCHS from user

2019-06-17 Thread Sam Eiderman
future commits we will use the provided LCHS and pass it to the BIOS through fw_cfg to be supplied using INT13 routines. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- include/hw/block/block.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[Qemu-devel] [QEMU] [PATCH v3 5/8] bootdevice: Gather LCHS from all relevant devices

2019-06-17 Thread Sam Eiderman
Arbel Moshe Signed-off-by: Sam Eiderman --- hw/block/virtio-blk.c | 6 ++ hw/ide/qdev.c | 5 + hw/scsi/scsi-disk.c | 14 ++ 3 files changed, 25 insertions(+) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 06e57a4d39..787bbd768a 100644 --- a/hw/

[Qemu-devel] [QEMU] [PATCH v3 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-17 Thread Sam Eiderman
ix missing parenthesis check in "hd-geo-test: Add tests for lchs override" v3: * Rename fw_cfg key to "bios-geometry". * Remove "extendible" interface. * Add cpu_to_le32 fix as Laszlo suggested or big endian hosts * Fix last qtest commit - automatic docker tester for some

[Qemu-devel] [QEMU] [PATCH v3 4/8] scsi: Propagate unrealize() callback to scsi-hd

2019-06-17 Thread Sam Eiderman
We will need to add LCHS removal logic to scsi-hd's unrealize() in the next commit. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/scsi/scsi-bus.c | 15 +++ include/hw/scsi/scsi.h | 1 + 2 files changed, 16 insertions(+) diff --git

[Qemu-devel] [QEMU] [PATCH v3 7/8] bootdevice: FW_CFG interface for LCHS values

2019-06-17 Thread Sam Eiderman
xotic" disks. We serialize this information in a similar way to the "bootorder" interface. The new fw_cfg entry is "bios-geometry". Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c| 38 +++

Re: [Qemu-devel] [QEMU] [PATCH v2 7/8] bootdevice: FW_CFG interface for LCHS values

2019-06-17 Thread Sam Eiderman
> On 17 Jun 2019, at 17:48, Kevin O'Connor wrote: > > On Mon, Jun 17, 2019 at 10:36:54AM +0300, Sam Eiderman wrote: >> So overall, WDYT? >> Keep it extendible for a low price of ABI + “bootdevices” name. >> Or go strict and rename to “bios-geometries”? > &

[Qemu-devel] [SeaBIOS] [PATCH v3 1/4] geometry: Read LCHS from fw_cfg

2019-06-19 Thread Sam Eiderman
following way: * device_path lcyls lheads lsecs\n ... * device_path lcyls lheads lsecs\0 Device path is a null terminated string in the "Open Firmware" device path format, the same path as used in bootorder. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderma

[Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-19 Thread Sam Eiderman
Adding the following utility functions: * boot_lchs_find_pci_device * boot_lchs_find_scsi_device * boot_lchs_find_ata_device These will be used to apply LCHS values received through fw_cfg. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- src

[Qemu-devel] [SeaBIOS] [PATCH v3 0/4] Add Qemu to SeaBIOS LCHS interface

2019-06-19 Thread Sam Eiderman
ootdevices fw_cfg key to bios-geoemtry v3: Change fw_cfg interface from mixed binary/textual to textual only Squash commit "config: Add toggle for bootdevice information" Sam Eiderman (4): geometry: Read LCHS from fw_cfg boot: Reorder functions in boot.c geometry: Add boot_lchs_find_*

[Qemu-devel] [SeaBIOS] [PATCH v3 2/4] boot: Reorder functions in boot.c

2019-06-19 Thread Sam Eiderman
Currently glob_prefix() and build_pci_path() are under the "Boot priority ordering" section. Move them to a new "Helper search functions" section since we will reuse them in the next commit. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman

[Qemu-devel] [SeaBIOS] [PATCH v3 4/4] geometry: Apply LCHS values for boot devices

2019-06-19 Thread Sam Eiderman
: "TRANSLATION_MACHINE". We treat this translation as TRANSLATION_NONE in fill_ata_edd(), although this does not really matter since now the translation between physical and logical geometry does not exist. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman

[Qemu-devel] [QEMU] [PATCH v4 6/8] bootdevice: Refactor get_boot_devices_list

2019-06-19 Thread Sam Eiderman
Move device name construction to a separate function. We will reuse this function in the following commit to pass logical CHS parameters through fw_cfg much like we currently pass bootindex. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c | 61

[Qemu-devel] [QEMU] [PATCH v4 2/8] block: Support providing LCHS from user

2019-06-19 Thread Sam Eiderman
future commits we will use the provided LCHS and pass it to the BIOS through fw_cfg to be supplied using INT13 routines. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- include/hw/block/block.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[Qemu-devel] [QEMU] [PATCH v4 1/8] block: Refactor macros - fix tabbing

2019-06-19 Thread Sam Eiderman
Fixing tabbing in block related macros. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/ide/qdev.c| 2 +- include/hw/block/block.h | 16 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide

[Qemu-devel] [QEMU] [PATCH v4 3/8] bootdevice: Add interface to gather LCHS

2019-06-19 Thread Sam Eiderman
Add an interface to provide direct logical CHS values for boot devices. We will use this interface in the next commits. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c| 55 + include

[Qemu-devel] [QEMU] [PATCH v4 8/8] hd-geo-test: Add tests for lchs override

2019-06-19 Thread Sam Eiderman
g, so I had to read the new fw_cfg layout on my own. Creating qcow2 disks with specific size and MBR layout is currently unused - we only use a default empty MBR. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- tests/Makefile.include | 2 +- tests/hd-geo-t

Re: [Qemu-devel] [PATCH v2 0/3] vmdk: Add read-only support for the new seSparse format

2019-06-19 Thread Sam Eiderman
Gentle ping > On 5 Jun 2019, at 15:17, Sam Eiderman wrote: > > v1: > > VMware introduced a new snapshot format in VMFS6 - seSparse (Space > Efficient Sparse) which is the default format available in ESXi 6.7. > Add read-only support for the new snapshot format. > >

[Qemu-devel] [QEMU] [PATCH v4 5/8] bootdevice: Gather LCHS from all relevant devices

2019-06-19 Thread Sam Eiderman
Arbel Moshe Signed-off-by: Sam Eiderman --- hw/block/virtio-blk.c | 6 ++ hw/ide/qdev.c | 5 + hw/scsi/scsi-disk.c | 14 ++ 3 files changed, 25 insertions(+) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 06e57a4d39..787bbd768a 100644 --- a/hw/

[Qemu-devel] [QEMU] [PATCH v4 4/8] scsi: Propagate unrealize() callback to scsi-hd

2019-06-19 Thread Sam Eiderman
We will need to add LCHS removal logic to scsi-hd's unrealize() in the next commit. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/scsi/scsi-bus.c | 15 +++ include/hw/scsi/scsi.h | 1 + 2 files changed, 16 insertions(+) diff --git

[Qemu-devel] [QEMU] [PATCH v4 7/8] bootdevice: FW_CFG interface for LCHS values

2019-06-19 Thread Sam Eiderman
xotic" disks. We serialize this information in a similar way to the "bootorder" interface. The new fw_cfg entry is "bios-geometry". Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c| 32 +

[Qemu-devel] [QEMU] [PATCH v4 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-19 Thread Sam Eiderman
e reason does not have qemu-img set v4: * Change fw_cfg interface from mixed textual/binary to textual only Sam Eiderman (8): block: Refactor macros - fix tabbing block: Support providing LCHS from user bootdevice: Add interface to gather LCHS scsi: Propagate unrealize() callback to sc

[Qemu-devel] [PATCH v3 1/3] vmdk: Fix comment regarding max l1_size coverage

2019-06-20 Thread Sam Eiderman
eviewed-by: Karl Heubaum Reviewed-by: Eyal Moscovici Reviewed-by: Liran Alon Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- block/vmdk.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 51067c774f..0f2e453bf5 100644 -

[Qemu-devel] [PATCH v3 2/3] vmdk: Reduce the max bound for L1 table size

2019-06-20 Thread Sam Eiderman
: Arbel Moshe Signed-off-by: Sam Eiderman --- block/vmdk.c | 13 +++-- tests/qemu-iotests/059.out | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 0f2e453bf5..931eb2759c 100644 --- a/block/vmdk.c +++ b/block/vmdk.c

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 4/4] geometry: Apply LCHS values for boot devices

2019-06-20 Thread Sam Eiderman
> On 20 Jun 2019, at 8:42, Gerd Hoffmann wrote: > >> +static int >> +overriden_lchs_supplied(struct drive_s *drive) >> +{ >> +return drive->lchs.cylinder || drive->lchs.head || drive->lchs.sector; >> +} > >> +case TRANSLATION_MACHINE: > > Hmm, why this name? Doesn't look intuitive t

Re: [Qemu-devel] [PATCH v2 3/3] vmdk: Add read-only support for seSparse snapshots

2019-06-20 Thread Sam Eiderman
> On 19 Jun 2019, at 20:12, Max Reitz wrote: > > On 05.06.19 14:17, Sam Eiderman wrote: >> Until ESXi 6.5 VMware used the vmfsSparse format for snapshots (VMDK3 in >> QEMU). >> >> This format was lacking in the following: >> >>* Grain direct

[Qemu-devel] [PATCH v3 3/3] vmdk: Add read-only support for seSparse snapshots

2019-06-20 Thread Sam Eiderman
reclamation procedure should delete it. Unmapping a zero grain has no effect (0x2 will not change to 0x1) but unmapping an unallocated grain will (0x0 to 0x1) - naturally. In order to implement seSparse some fields had to be changed to support both 32-

Re: [Qemu-devel] [SeaBIOS] [QEMU] [PATCH v4 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-20 Thread Sam Eiderman
> On 20 Jun 2019, at 8:50, Gerd Hoffmann wrote: > >> === OUTPUT BEGIN === >> 1/8 Checking commit cf2168a66dbd (block: Refactor macros - fix tabbing) >> ERROR: Macros with complex values should be enclosed in parenthesis >> #55: FILE: include/hw/block/block.h:65: >> +#define DEFINE_BLOCK_CHS_PR

[Qemu-devel] [PATCH v3 0/3] vmdk: Add read-only support for the new seSparse format

2019-06-20 Thread Sam Eiderman
Added non-write mode check in vmdk_open() on sesparse v3: Change non-write mode check in vmdk_open() to bdrv_apply_auto_read_only(). Sam Eiderman (3): vmdk: Fix comment regarding max l1_size coverage vmdk: Reduce the max bound for L1 table size vmdk: Add read-only support for seSparse snap

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-21 Thread Sam Eiderman
O'Connor wrote: > > On Wed, Jun 19, 2019 at 12:23:51PM +0300, Sam Eiderman wrote: >> Adding the following utility functions: >> >>* boot_lchs_find_pci_device >>* boot_lchs_find_scsi_device >>* boot_lchs_find_ata_device > > FWIW, this l

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-22 Thread Sam Eiderman
Kconfig file. Sam > On 21 Jun 2019, at 21:59, Kevin O'Connor wrote: > > On Fri, Jun 21, 2019 at 08:42:28PM +0300, Sam Eiderman wrote: >> Sounds reasonable, how do purpose to deal with: >> >> config BIOS_GEOMETRY >> config BOOTORDER >> >> pr

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-22 Thread Sam Eiderman
> On 22 Jun 2019, at 18:27, Kevin O'Connor wrote: > > On Sat, Jun 22, 2019 at 11:51:48AM +0300, Sam Eiderman wrote: >> But maybe someone wants bootorder but doesn’t want to override legacy disk >> translations… >> >> I’m thinking of may

Re: [SeaBIOS] [PATCH v7 7/8] bootdevice: FW_CFG interface for LCHS values

2019-10-08 Thread Sam Eiderman
On Tue, Oct 8, 2019, 13:34 Philippe Mathieu-Daudé wrote: > Hi Sam, > > On 9/29/19 12:13 PM, Sam Eiderman wrote: > > Philippe, thanks for the fast review, > > Fast is not always the friend of careful. > > > > > John, thanks for picking up this hot potato :-

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 3/4] geometry: Add boot_lchs_find_*() utility functions

2019-06-26 Thread Sam Eiderman
() and boot_lchs_find_scsi_device() call the same build_scsi_path() function, resulting in less code duplication. Sam > On 22 Jun 2019, at 20:33, Sam Eiderman wrote: > > > >> On 22 Jun 2019, at 18:27, Kevin O'Connor wrote: >> >> On Sat, Jun 22, 2019 at 1

[Qemu-devel] [SeaBIOS] [PATCH v4 0/5] Add Qemu to SeaBIOS LCHS interface

2019-06-26 Thread Sam Eiderman
me to "host-supplied" * Rename overriden_lchs_supplied() to host_lchs_supplied() * Move sectors and heads check to host_lchs_supplied() * Reuse duplicate code in boot.c Sam Eiderman (5): geometry: Read LCHS from fw_cfg boot: Reorder functions in boot.c boot: Build ata and scsi paths in function

[Qemu-devel] [SeaBIOS] [PATCH v4 2/5] boot: Reorder functions in boot.c

2019-06-26 Thread Sam Eiderman
Currently glob_prefix() and build_pci_path() are under the "Boot priority ordering" section. Move them to a new "Helper search functions" section since we will reuse them in the next commits. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman

[Qemu-devel] [SeaBIOS] [PATCH v4 3/5] boot: Build ata and scsi paths in function

2019-06-26 Thread Sam Eiderman
Introduce build_scsi_path() and build_ata_path(). We will reuse these functions in the next commit. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- src/boot.c | 36 1 file changed, 28 insertions(+), 8 deletions(-) diff

  1   2   >