[PATCH] optionrom: pass -Wl,--no-error-rwx-segments

2025-02-20 Thread Sam James
If GNU Binutils is configured with --enable-error-rwx-segments=yes, one gets the following for optionrom: ``` .../bin/ld: error: pvh.img has a LOAD segment with RWX permissions .../bin/ld: final link faile ``` Pass -Wl,--no-error-rwx-segments to suppress that. Signed-off-by: Sam James --- pc

Re: Subject: [PATCH] loader: Add register setting support via cli

2025-01-09 Thread Sam Price
e the git email. I also need to set up a docker container to build /test latest. I have been building / testing on an old ubuntu machine. (To test this I need to run it on qemu-xilinx). My workplace has us on ubuntu 20. So it might be a while before I have another version up. Thanks, Sam On Thu,

Re: Subject: [PATCH] loader: Add register setting support via cli

2025-01-07 Thread Sam Price
I made the changes, and added documentation. https://gitlab.com/thesamprice/qemu/-/compare/master...loader?from_project_id=11167699 I left it as [PREFIX] I can switch this to just RegNumber if desired. I am still struggling with the email format sorry. --- docs/system/generic-loader.rst | 98 +++

Re: Subject: [PATCH] loader: Add register setting support via cli

2025-01-05 Thread Sam Price
b.com/thesamprice/qemu/-/blob/master/include/qemu/queue.h If there is a better datastructure I should use for implementation let me know. Ill also update docs/system/generic-loader.rst Are unit tests needed? Any guidance on what you would want done for this would be appreciated. Thanks, Sam On Sun

Re: Subject: [PATCH] loader: Add register setting support via cli

2025-01-05 Thread Sam Price
Bump / Ping On Thu, Dec 19, 2024 at 6:11 PM Sam Price wrote: > > Bump / ping > > Sincerely, > > Sam Price > > > > On Thu, Dec 5, 2024 at 10:29 PM Sam Price wrote: >> >> I needed to set the registers prior to boot up to mimic what uboot >> would do

Re: Subject: [PATCH] loader: Add register setting support via cli

2024-12-19 Thread Sam Price
Bump / ping Sincerely, Sam Price On Thu, Dec 5, 2024 at 10:29 PM Sam Price wrote: > I needed to set the registers prior to boot up to mimic what uboot > would do prior to loading a binary. This adds a generic option of reg > to the loader command, it uses the existing gcc com

Subject: [PATCH] loader: Add register setting support via cli

2024-12-05 Thread Sam Price
s off with instructions from others if it is desired for the main line. Signed-off-by: Sam Price --- --- hw/core/generic-loader.c | 28 include/hw/core/generic-loader.h | 6 +- roms/SLOF| 2 +- roms/edk2|

is there a guide on how to add command line options?

2024-10-22 Thread Sam Price
I would like a command line option to set register R5 for the microblaze on boot. -- Sincerely, Sam Price

Re: [PATCH v2] block/file-posix: optimize append write

2024-10-21 Thread Sam Li
Kevin Wolf 于2024年10月18日周五 16:37写道: > > Am 04.10.2024 um 12:41 hat Sam Li geschrieben: > > When the file-posix driver emulates append write, it holds the lock > > whenever accessing wp, which limits the IO queue depth to one. > > > > The write IO flow can be optimi

[PATCH v2] block/file-posix: optimize append write

2024-10-04 Thread Sam Li
write. 2. If the write IO fails, report that zone and use the reported value as the current wp. Signed-off-by: Sam Li --- block/file-posix.c | 57 ++ 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c

[PATCH] block/file-posix: optimize append write

2024-09-29 Thread Sam Li
write. 2. If the write IO fails, report that zone and use the reported value as the current wp. Signed-off-by: Sam Li --- block/file-posix.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index

[PATCH v9 0/4] Add full zoned storage emulation to qcow2 driver

2024-09-29 Thread Sam Li
eanups: comments, naming Sam Li (4): docs/qcow2: add the zoned format feature qcow2: add configurations for zoned format extension qcow2: add zoned emulation capability iotests: test the zoned format feature for qcow2 file block/file-posix.c

[PATCH v9 2/4] qcow2: add configurations for zoned format extension

2024-09-29 Thread Sam Li
feature, use command like this: qemu-img create -f qcow2 zbc.qcow2 -o size=768M \ -o zone.size=64M -o zone.capacity=64M -o zone.conventional_zones=0 \ -o zone.max_append_bytes=4096 -o zone.max_open_zones=6 \ -o zone.max_active_zones=8 -o zone.mode=host-managed Signed-off-by: Sam Li --- block/file

[PATCH v9 3/4] qcow2: add zoned emulation capability

2024-09-29 Thread Sam Li
corresponding state changing. Zoned devices have limits on zone resources, which put constraints on write operations on zones. It is managed by active zone queues following LRU policy. Signed-off-by: Sam Li --- block/qcow2.c| 850 ++- block/qcow2.h

[PATCH v9 1/4] docs/qcow2: add the zoned format feature

2024-09-29 Thread Sam Li
Add the specs for the zoned format feature of the qcow2 driver. The qcow2 file then can emulate real zoned devices, either passed through by virtio-blk device or NVMe ZNS drive to the guest given zoned information. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- docs/system/qemu-block

[PATCH v9 4/4] iotests: test the zoned format feature for qcow2 file

2024-09-29 Thread Sam Li
The zoned format feature can be tested by: $ tests/qemu-iotests/check -qcow2 zoned-qcow2 Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned-qcow2 | 148 +++ tests/qemu-iotests/tests/zoned-qcow2.out | 173 +++ 2 files

[PATCH v8 3/4] qcow2: add zoned emulation capability

2024-09-29 Thread Sam Li
From: Sam Li By adding zone operations and zoned metadata, the zoned emulation capability enables full emulation support of zoned device using a qcow2 file. The zoned device metadata includes zone type, zoned device state and write pointer of each zone, which is stored to an array of unsigned

[PATCH v8 2/4] qcow2: add configurations for zoned format extension

2024-09-29 Thread Sam Li
From: Sam Li To configure the zoned format feature on the qcow2 driver, it requires settings as: the device size, zone model, zone size, zone capacity, number of conventional zones, limits on zone resources (max append bytes, max open zones, and max_active_zones). To create a qcow2 image with

[PATCH v8 0/4] Add full zoned storage emulation to qcow2 driver

2024-09-29 Thread Sam Li
change state to full when wp reaches end - add documentation to qcow2 zoned extension header - address review comments (Stefan): * fix zoned_mata allocation size * use bitwise or than addition * fix wp index overflow and locking * cleanups: comments, naming Sam Li (4): docs/qcow2: add the

[PATCH v8 1/4] docs/qcow2: add the zoned format feature

2024-09-29 Thread Sam Li
From: Sam Li Add the specs for the zoned format feature of the qcow2 driver. The qcow2 file then can emulate real zoned devices, either passed through by virtio-blk device or NVMe ZNS drive to the guest given zoned information. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- docs

[PATCH v8 4/4] iotests: test the zoned format feature for qcow2 file

2024-09-29 Thread Sam Li
From: Sam Li The zoned format feature can be tested by: $ tests/qemu-iotests/check -qcow2 zoned-qcow2 Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned-qcow2 | 148 +++ tests/qemu-iotests/tests/zoned-qcow2.out | 173

Re: [PATCH v7 3/4] qcow2: add zoned emulation capability

2024-09-23 Thread Sam Li
On Mon, Sep 23, 2024 at 15:48 Damien Le Moal wrote: > On 2024/09/23 15:40, Sam Li wrote: > > Hi Damien, > > > > Damien Le Moal 于2024年9月23日周一 15:22写道: > >> > >> On 2024/09/23 13:06, Sam Li wrote: > >> > >> [...] > >> > &g

Re: [PATCH v7 3/4] qcow2: add zoned emulation capability

2024-09-23 Thread Sam Li
Hi Damien, Damien Le Moal 于2024年9月23日周一 15:22写道: > > On 2024/09/23 13:06, Sam Li wrote: > > [...] > > >>> @@ -2837,6 +3180,19 @@ qcow2_co_pwritev_part(BlockDriverState *bs, > >>> int64_t offset, int64_t bytes, > >>> qiov_offset += cur

Re: [PATCH v7 3/4] qcow2: add zoned emulation capability

2024-09-23 Thread Sam Li
Hi Stefan, I apologized for the late reply. Stefan Hajnoczi 于2024年3月12日周二 20:02写道: > > On Mon, Jan 22, 2024 at 07:48:29PM +0100, Sam Li wrote: > > By adding zone operations and zoned metadata, the zoned emulation > > capability enables full emulation support of zoned device

Re: [PATCH] hw/display/bcm2835_fb: fix fb_use_offsets condition

2024-07-16 Thread Sam M.
Thank you! My apologies for the duplicates and alignment - it’s my first time using a mailing list! > On Jul 16, 2024, at 3:44 PM, Peter Maydell wrote: > > On Tue, 16 Jul 2024 at 15:37, Philippe Mathieu-Daudé > wrote: >> >>> On 16/7/24 12:35, Peter Maydell wrote: >>> On Sat, 13 Jul 2024 at

Re: [PATCH] qemu-io: add cvtnum() error handling for zone commands

2024-05-07 Thread Sam Li
y cannot be represented. > > Reported-by: Peter Maydell > Cc: Sam Li > Signed-off-by: Stefan Hajnoczi > --- > qemu-io-cmds.c | 48 +++- > 1 file changed, 47 insertions(+), 1 deletion(-) Reviewed-by: Sam Li Hi Stefan, Thank you for fixi

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Sam Li
Markus Armbruster 于2024年2月19日周一 21:42写道: > > Sam Li writes: > > > Markus Armbruster 于2024年2月19日周一 16:56写道: > >> > >> Sam Li writes: > >> > >> > Markus Armbruster 于2024年2月19日周一 15:40写道: > >> >> > >>

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Sam Li
Markus Armbruster 于2024年2月19日周一 16:56写道: > > Sam Li writes: > > > Markus Armbruster 于2024年2月19日周一 15:40写道: > >> > >> Sam Li writes: > >> > >> > Markus Armbruster 于2024年2月19日周一 13:05写道: > >> >> > >> >> One mo

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Sam Li
Markus Armbruster 于2024年2月19日周一 15:40写道: > > Sam Li writes: > > > Markus Armbruster 于2024年2月19日周一 13:05写道: > >> > >> One more thing... > >> > >> Markus Armbruster writes: > >> > >> > I apologize for the delayed review. >

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Sam Li
Markus Armbruster 于2024年2月19日周一 13:05写道: > > One more thing... > > Markus Armbruster writes: > > > I apologize for the delayed review. No problems. Thanks for reviewing! > > > > Sam Li writes: > > > >> To configure the zoned format feature o

[RFC v3 7/7] hw/nvme: make ZDED persistent

2024-01-22 Thread Sam Li
attributes at the following eight bit of zone type bit of write pointers for each zone. The ZDED is stored as part of zoned metadata as write pointers. Signed-off-by: Sam Li --- block/qcow2.c| 45 hw/nvme/ctrl.c | 1 + include/block

[RFC v3 5/7] hw/nvme: make the metadata of ZNS emulation persistent

2024-01-22 Thread Sam Li
zone state transition and manage zone resources. Signed-off-by: Sam Li --- block/qcow2.c|3 + hw/nvme/ctrl.c | 1115 +++--- hw/nvme/ns.c | 77 +-- hw/nvme/nvme.h | 85 +-- include/block

[RFC v3 2/7] qcow2: add zd_extension configurations to zoned metadata

2024-01-22 Thread Sam Li
Zone descriptor extension data is host definied data that is associated with each zone. Add zone descriptor extensions to zonedmeta struct. Signed-off-by: Sam Li --- block/qcow2.c| 70 +--- block/qcow2.h| 2 + include/block

[RFC v3 3/7] hw/nvme: use blk_get_*() to access zone info in the block layer

2024-01-22 Thread Sam Li
The zone information is contained in the BlockLimits fileds. Add blk_get_*() functions to access the block layer and update zone info accessing in the NVMe device emulation. Signed-off-by: Sam Li --- block/block-backend.c | 72 +++ hw/nvme/ctrl.c

[RFC v3 0/7] Add persistence to NVMe ZNS emulation

2024-01-22 Thread Sam Li
ies [Markus] - address review comments [Markus] v1->v2: - split [v1 2/5] patch to three (doc, config, block layer API) - adapt qcow2 v6 Sam Li (7): docs/qcow2: add zd_extension_size option to the zoned format feature qcow2: add zd_extension configurations to zoned metadata hw/nvme: use bl

[RFC v3 1/7] docs/qcow2: add zd_extension_size option to the zoned format feature

2024-01-22 Thread Sam Li
The NVMe ZNS command set has the zone descriptor extension feature for associating the data to a zone. Devices that supports ZAC/ZBC have zero zone descriptor extension size. Signed-off-by: Sam Li --- docs/interop/qcow2.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/docs

[RFC v3 6/7] hw/nvme: refactor zone append write using block layer APIs

2024-01-22 Thread Sam Li
Signed-off-by: Sam Li --- block/qcow2.c| 2 +- hw/nvme/ctrl.c | 190 --- include/sysemu/dma.h | 3 + system/dma-helpers.c | 17 4 files changed, 162 insertions(+), 50 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index

[RFC v3 4/7] hw/nvme: add blk_get_zone_extension to access zd_extensions

2024-01-22 Thread Sam Li
Signed-off-by: Sam Li --- block/block-backend.c | 16 hw/nvme/ctrl.c| 20 ++-- hw/nvme/ns.c | 24 hw/nvme/nvme.h| 7 --- include/sysemu/block-backend-io.h | 2

[PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-01-22 Thread Sam Li
feature, use command like this: qemu-img create -f qcow2 zbc.qcow2 -o size=768M \ -o zone.size=64M -o zone.capacity=64M -o zone.conventional_zones=0 \ -o zone.max_append_bytes=4096 -o zone.max_open_zones=6 \ -o zone.max_active_zones=8 -o zone.mode=host-managed Signed-off-by: Sam Li --- block/qcow2.c

[PATCH v7 1/4] docs/qcow2: add the zoned format feature

2024-01-22 Thread Sam Li
Add the specs for the zoned format feature of the qcow2 driver. The qcow2 file then can emulate real zoned devices, either passed through by virtio-blk device or NVMe ZNS drive to the guest given zoned information. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- docs/system/qemu-block

[PATCH v7 3/4] qcow2: add zoned emulation capability

2024-01-22 Thread Sam Li
corresponding state changing. Zoned devices have a limit on zone resources, which puts constraints on write operations into zones. It is managed by active zone lists following LRU policy. Signed-off-by: Sam Li --- block/qcow2.c| 791 ++- block

[PATCH v7 4/4] iotests: test the zoned format feature for qcow2 file

2024-01-22 Thread Sam Li
The zoned format feature can be tested by: $ tests/qemu-iotests/check -qcow2 zoned-qcow2 Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned-qcow2 | 147 +++ tests/qemu-iotests/tests/zoned-qcow2.out | 172 +++ 2 files

[PATCH v7 0/4] Add full zoned storage emulation to qcow2 driver

2024-01-22 Thread Sam Li
w2 zoned extension header - address review comments (Stefan): * fix zoned_mata allocation size * use bitwise or than addition * fix wp index overflow and locking * cleanups: comments, naming Sam Li (4): docs/qcow2: add the zoned format feature qcow2: add configurations for zoned format

Re: [RFC v2 0/7] Add persistence to NVMe ZNS emulation

2024-01-22 Thread Sam Li
Klaus Jensen 于2024年1月10日周三 07:52写道: > > Hi Sam, > > This is awesome. For the hw/nvme parts, > > Acked-by: Klaus Jensen > > I'll give it a proper R-b when you drop the RFC status. Hi Klaus, Sorry for the late response. I will submit a new RFC patch series very soon

Re: [PATCH v6 0/4] Add full zoned storage emulation to qcow2 driver

2023-12-16 Thread Sam Li
d here > bdrv_graph_co_rdlock(); > ^ > 2 errors generated. > Turns out that my gcc 12.0 does not support -Wthread-safety-analysis flag. Need to use --cc=clang to reproduce it. Thanks! Sam

Re: [PATCH v6 2/4] qcow2: add configurations for zoned format extension

2023-12-16 Thread Sam Li
Markus Armbruster 于2023年11月30日周四 09:40写道: > > Sam Li writes: > > > To configure the zoned format feature on the qcow2 driver, it > > requires settings as: the device size, zone model, zone size, > > zone capacity, number of conventional zones, limits on zone > >

Re: [RFC v2 0/7] Add persistence to NVMe ZNS emulation

2023-11-30 Thread Sam Li
Markus Armbruster 于2023年11月30日周四 18:11写道: > > Sam Li writes: > > > ZNS emulation follows NVMe ZNS spec but the state of namespace > > zones does not persist accross restarts of QEMU. This patch makes the > > metadata of ZNS emulation persistent by using new block layer

[RFC v2 6/7] hw/nvme: refactor zone append write using block layer APIs

2023-11-27 Thread Sam Li
Signed-off-by: Sam Li --- block/qcow2.c| 2 +- hw/nvme/ctrl.c | 190 --- include/sysemu/dma.h | 3 + system/dma-helpers.c | 17 4 files changed, 162 insertions(+), 50 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index

[RFC v2 4/7] hw/nvme: add blk_get_zone_extension to access zd_extensions

2023-11-27 Thread Sam Li
Signed-off-by: Sam Li --- block/block-backend.c | 16 hw/nvme/ctrl.c| 20 ++-- hw/nvme/ns.c | 24 hw/nvme/nvme.h| 7 --- include/sysemu/block-backend-io.h | 2

[RFC v2 7/7] hw/nvme: make ZDED persistent

2023-11-27 Thread Sam Li
attributes at the following eight bit of zone type bit of write pointers for each zone. The ZDED is stored as part of zoned metadata as write pointers. Signed-off-by: Sam Li --- block/qcow2.c| 45 hw/nvme/ctrl.c | 1 + include/block

[RFC v2 5/7] hw/nvme: make the metadata of ZNS emulation persistent

2023-11-27 Thread Sam Li
zone state transition and manage zone resources. Signed-off-by: Sam Li --- block/qcow2.c|3 + hw/nvme/ctrl.c | 1106 +++--- hw/nvme/ns.c | 77 +-- hw/nvme/nvme.h | 85 +-- include/block

[RFC v2 3/7] hw/nvme: use blk_get_*() to access zone info in the block layer

2023-11-27 Thread Sam Li
The zone information is contained in the BlockLimits fileds. Add blk_get_*() functions to access the block layer and update zone info accessing in the NVMe device emulation. Signed-off-by: Sam Li --- block/block-backend.c | 72 +++ hw/nvme/ctrl.c

[RFC v2 1/7] docs/qcow2: add zd_extension_size option to the zoned format feature

2023-11-27 Thread Sam Li
Signed-off-by: Sam Li --- docs/interop/qcow2.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/interop/qcow2.txt b/docs/interop/qcow2.txt index 0f1938f056..458d05371a 100644 --- a/docs/interop/qcow2.txt +++ b/docs/interop/qcow2.txt @@ -428,6 +428,9 @@ The fields of the zoned

[RFC v2 0/7] Add persistence to NVMe ZNS emulation

2023-11-27 Thread Sam Li
=${znsimg},id=nvmezns0,format=qcow2,if=none \ -device nvme-ns,drive=nvmezns0,bus=nvme0,nsid=1,uuid=xxx \ Sorry, send this one more time due to network problems. v1->v2: - split [v1 2/5] patch to three (doc, config, block layer API) - adapt qcow2 v6 Sam Li (7): docs/qcow2: add zd_extension_s

[RFC v2 2/7] qcow2: add zd_extension configurations to zoned metadata

2023-11-27 Thread Sam Li
Zone descriptor data is host definied data that is associated with each zone. Add zone descriptor extensions to zonedmeta struct. Signed-off-by: Sam Li --- block/qcow2.c| 69 +--- block/qcow2.h| 2 + include/block/block_int

[RFC v2 0/7] Add persistence to NVMe ZNS emulation

2023-11-27 Thread Sam Li
=${znsimg},id=nvmezns0,format=qcow2,if=none \ -device nvme-ns,drive=nvmezns0,bus=nvme0,nsid=1,uuid=xxx \ v1->v2: - split [v1 2/5] patch to three (doc, config, block layer API) - adapt qcow2 v6 Sam Li (7): docs/qcow2: add zd_extension_size option to the zoned format feature qcow2: add zd_extens

[PATCH v6 0/4] Add full zoned storage emulation to qcow2 driver

2023-11-26 Thread Sam Li
tefan): * fix zoned_mata allocation size * use bitwise or than addition * fix wp index overflow and locking * cleanups: comments, naming Sam Li (4): docs/qcow2: add the zoned format feature qcow2: add configurations for zoned format extension qcow2: add zoned emulation capability iotests:

[PATCH v6 4/4] iotests: test the zoned format feature for qcow2 file

2023-11-26 Thread Sam Li
The zoned format feature can be tested by: $ tests/qemu-iotests/check -qcow2 zoned-qcow2 Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned-qcow2 | 126 +++ tests/qemu-iotests/tests/zoned-qcow2.out | 118 + 2 files

[PATCH v6 2/4] qcow2: add configurations for zoned format extension

2023-11-26 Thread Sam Li
feature, use command like this: $path/to/qemu-img create -f qcow2 zbc.qcow2 -o size=768M -o zone.size=64M -o zone.capacity=64M -o zone.conventional_zones=0 -o zone.max_append_bytes=4096 -o zone.max_open_zones=10 -o zone.max_active_zones=12 -o zone.mode=host-managed Signed-off-by: Sam Li --- block

[PATCH v6 3/4] qcow2: add zoned emulation capability

2023-11-26 Thread Sam Li
corresponding state changing. Zoned devices have a limit on zone resources, which puts constraints on write operations into zones. It is managed by active zone lists following LRU policy. Signed-off-by: Sam Li --- block/qcow2.c| 741 ++- block

[PATCH v6 1/4] docs/qcow2: add the zoned format feature

2023-11-26 Thread Sam Li
Add the specs for the zoned format feature of the qcow2 driver. The qcow2 file then can emulate real zoned devices, either passed through by virtio-blk device or NVMe ZNS drive to the guest given zoned information. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- docs/system/qemu-block

Re: [PATCH v5 2/4] qcow2: add configurations for zoned format extension

2023-11-16 Thread Sam Li
Hi Eric, Eric Blake 于2023年10月30日周一 22:53写道: > > On Mon, Oct 30, 2023 at 08:18:45PM +0800, Sam Li wrote: > > To configure the zoned format feature on the qcow2 driver, it > > requires settings as: the device size, zone model, zone size, > > zone capacity, number of conve

Re: [PATCH v5 2/4] qcow2: add configurations for zoned format extension

2023-11-16 Thread Sam Li
Markus Armbruster 于2023年11月3日周五 17:08写道: > > Eric Blake writes: > > > On Mon, Oct 30, 2023 at 08:18:45PM +0800, Sam Li wrote: > >> To configure the zoned format feature on the qcow2 driver, it > >> requires settings as: the device size, zone model, zone si

Re: [PATCH v5 2/4] qcow2: add configurations for zoned format extension

2023-11-16 Thread Sam Li
Stefan Hajnoczi 于2023年11月3日周五 11:24写道: > > On Mon, Oct 30, 2023 at 08:18:45PM +0800, Sam Li wrote: > > +typedef struct Qcow2ZoneListEntry { > > +QLIST_ENTRY(Qcow2ZoneListEntry) exp_open_zone_entry; > > +QLIST_ENTRY(Qcow2ZoneListEntry) imp_open_zone_ent

Re: [PATCH v2] block/file-posix: fix update_zones_wp() caller

2023-10-31 Thread Sam Li
Looks good, thanks! Hanna Czenczek 于2023年10月31日 周二17:24写道: > On 25.08.23 06:05, Sam Li wrote: > > When the zoned request fail, it needs to update only the wp of > the target zones for not disrupting the in-flight writes on > these other zones. The wp is updated successfully afte

Re: [PATCH v5 2/4] qcow2: add configurations for zoned format extension

2023-10-30 Thread Sam Li
Hi Eric, Eric Blake 于2023年10月30日周一 22:53写道: > > On Mon, Oct 30, 2023 at 08:18:45PM +0800, Sam Li wrote: > > To configure the zoned format feature on the qcow2 driver, it > > requires settings as: the device size, zone model, zone size, > > zone capacity, number of conve

Re: [PATCH v5 1/4] docs/qcow2: add the zoned format feature

2023-10-30 Thread Sam Li
Eric Blake 于2023年10月30日周一 22:05写道: > > On Mon, Oct 30, 2023 at 08:18:44PM +0800, Sam Li wrote: > > Add the specs for the zoned format feature of the qcow2 driver. > > The qcow2 file can be taken as zoned device and passed through by > > virtio-blk device or NVMe ZNS d

[PATCH v5 3/4] qcow2: add zoned emulation capability

2023-10-30 Thread Sam Li
corresponding state changing. Zoned devices have a limit on zone resources, which puts constraints on write operations into zones. It is managed by active zone lists following LRU policy. Signed-off-by: Sam Li --- block/qcow2.c| 731 ++- block

[PATCH v5 4/4] iotests: test the zoned format feature for qcow2 file

2023-10-30 Thread Sam Li
The zoned format feature can be tested by: $ tests/qemu-iotests/check -qcow2 zoned-qcow2 Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned-qcow2 | 126 +++ tests/qemu-iotests/tests/zoned-qcow2.out | 118 + 2 files

[PATCH v5 2/4] qcow2: add configurations for zoned format extension

2023-10-30 Thread Sam Li
command like this: $ qemu-img create -f qcow2 test.qcow2 -o size=768M -o zone_size=64M -o zone_capacity=64M -o conventional_zones=0 -o max_append_bytes=4096 -o max_open_zones=0 -o max_active_zones=0 -o zone_model=host-managed Signed-off-by: Sam Li fix config? --- block/qcow2.c

[PATCH v5 1/4] docs/qcow2: add the zoned format feature

2023-10-30 Thread Sam Li
Add the specs for the zoned format feature of the qcow2 driver. The qcow2 file can be taken as zoned device and passed through by virtio-blk device or NVMe ZNS device to the guest given zoned information. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- docs/system/qemu-block

[PATCH v5 0/4] Add full zoned storage emulation to qcow2 driver

2023-10-30 Thread Sam Li
ned commands - make zone append change state to full when wp reaches end - add documentation to qcow2 zoned extension header - address review comments (Stefan): * fix zoned_mata allocation size * use bitwise or than addition * fix wp index overflow and locking * cleanups: comments, namin

Re: [PATCH] file-posix: fix over-writing of returning zone_append offset

2023-10-30 Thread Sam Li
f-by: Naohiro Aota > --- > block/file-posix.c | 16 +++- > 1 file changed, 7 insertions(+), 9 deletions(-) Thanks! Reviewed-by: Sam Li > > diff --git a/block/file-posix.c b/block/file-posix.c > index 50e2b20d5c45..c39209358909 100644 > --- a/block/file-po

Re: [PATCH v2] block/file-posix: fix update_zones_wp() caller

2023-10-16 Thread Sam Li
Sam Li 于2023年8月25日周五 12:06写道: > > When the zoned request fail, it needs to update only the wp of > the target zones for not disrupting the in-flight writes on > these other zones. The wp is updated successfully after the > request completes. > > Fixed the callers with righ

Re: [PATCH 2/2] linux-user: Replace use of lfs64 related functions and macros

2023-10-15 Thread Sam James
Did anything happen with this, or did it get stuck? We just had another user hit it in Gentoo at https://bugs.gentoo.org/915809. It looks like openembedded (obviously given the author) and Alpine have been using this for nearly a year. thanks, sam

Re: [PATCH v4 2/4] qcow2: add configurations for zoned format extension

2023-10-09 Thread Sam Li
Hello Eric, Eric Blake 于2023年9月28日周四 23:15写道: > > On Mon, Sep 18, 2023 at 05:53:11PM +0800, Sam Li wrote: > > To configure the zoned format feature on the qcow2 driver, it > > requires settings as: the device size, zone model, zone size, > > zone capacity, number of conve

Re: [PATCH v4 3/4] qcow2: add zoned emulation capability

2023-10-09 Thread Sam Li
Eric Blake 于2023年9月29日周五 03:17写道: > > On Mon, Sep 18, 2023 at 05:53:12PM +0800, Sam Li wrote: > > By adding zone operations and zoned metadata, the zoned emulation > > capability enables full emulation support of zoned device using > > a qcow2 file. The zoned device met

Re: [PATCH v4 2/4] qcow2: add configurations for zoned format extension

2023-09-25 Thread Sam Li
Markus Armbruster 于2023年9月25日周一 21:05写道: > > Sam Li writes: > > > To configure the zoned format feature on the qcow2 driver, it > > requires settings as: the device size, zone model, zone size, > > zone capacity, number of conventional zones, limits on zone > > r

Re: [PATCH v3 2/4] qcow2: add configurations for zoned format extension

2023-09-18 Thread Sam Li
Markus Armbruster 于2023年9月18日周一 22:46写道: > > Sam Li writes: > > > Markus Armbruster 于2023年9月1日周五 19:08写道: > >> > >> Sam Li writes: > >> > >> > To configure the zoned format feature on the qcow2 driver, it > >> > requires fol

[PATCH v4 4/4] iotests: test the zoned format feature for qcow2 file

2023-09-18 Thread Sam Li
The zoned format feature can be tested by: $ tests/qemu-iotests/check -qcow2 zoned-qcow2 Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned-qcow2 | 129 ++ tests/qemu-iotests/tests/zoned-qcow2.out | 133 +++ 2 files

[PATCH v4 3/4] qcow2: add zoned emulation capability

2023-09-18 Thread Sam Li
corresponding state changing. Zoned devices have a limit on zone resources, which puts constraints on write operations into zones. Signed-off-by: Sam Li --- block/qcow2.c | 709 - block/qcow2.h | 2 + block/trace-events | 2

[PATCH v4 2/4] qcow2: add configurations for zoned format extension

2023-09-18 Thread Sam Li
, use command like this: $ qemu-img create -f qcow2 test.qcow2 -o size=768M -o zone_size=64M -o zone_capacity=64M -o nr_conv_zones=0 -o max_append_sectors=512 -o max_open_zones=0 -o max_active_zones=0 -o zone_model=1 Signed-off-by: Sam Li --- block/qcow2.c| 186

[PATCH v4 1/4] docs/qcow2: add the zoned format feature

2023-09-18 Thread Sam Li
Add the specs for the zoned format feature of the qcow2 driver. The qcow2 file can be taken as zoned device and passed through by virtio-blk device or NVMe ZNS device to the guest given zoned information. Signed-off-by: Sam Li --- docs/system/qemu-block-drivers.rst.inc | 33

[PATCH v4 0/4] Add full zoned storage emulation to qcow2 driver

2023-09-18 Thread Sam Li
rflow and locking * cleanups: comments, naming Sam Li (4): docs/qcow2: add the zoned format feature qcow2: add configurations for zoned format extension qcow2: add zoned emulation capability iotests: test the zoned format feature for qcow2 file block/qcow2.c

Re: [PATCH v3 2/4] qcow2: add configurations for zoned format extension

2023-09-18 Thread Sam Li
Stefan Hajnoczi 于2023年9月14日周四 04:12写道: > > On Mon, Aug 28, 2023 at 11:09:53PM +0800, Sam Li wrote: > > To configure the zoned format feature on the qcow2 driver, it > > requires following arguments: the device size, zoned profile, > > zone model, zone size, zone capacity

Re: [PATCH v3 2/4] qcow2: add configurations for zoned format extension

2023-09-18 Thread Sam Li
Markus Armbruster 于2023年9月1日周五 19:08写道: > > Sam Li writes: > > > To configure the zoned format feature on the qcow2 driver, it > > requires following arguments: the device size, zoned profile, > > "Zoned profile" is gone in v3. > > > zone model, zo

Re: [PATCH v2 3/4] qcow2: add zoned emulation capability

2023-08-29 Thread Sam Li
Damien Le Moal 于2023年8月29日周二 15:14写道: > > On 8/29/23 15:27, Sam Li wrote: > > Damien Le Moal 于2023年8月29日周二 14:06写道: > >> > >> On 8/28/23 20:55, Sam Li wrote: > >>>>> +/* close one implicitly open zones to make it

Re: [PATCH v2 3/4] qcow2: add zoned emulation capability

2023-08-28 Thread Sam Li
Damien Le Moal 于2023年8月29日周二 14:06写道: > > On 8/28/23 20:55, Sam Li wrote: > >>> +/* close one implicitly open zones to make it available */ > >>> +for (int i = s->zoned_header.zone_nr_conv; > >>> +i < bs->bl.n

[PATCH v3 4/4] iotests: test the zoned format feature for qcow2 file

2023-08-28 Thread Sam Li
The zoned format feature can be tested by: $ tests/qemu-iotests/check -qcow2 zoned-qcow2 Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned-qcow2 | 135 ++ tests/qemu-iotests/tests/zoned-qcow2.out | 140 +++ 2 files

[PATCH v3 3/4] qcow2: add zoned emulation capability

2023-08-28 Thread Sam Li
corresponding state changing. Zoned devices have a limit on zone resources, which puts constraints on write operations into zones. Signed-off-by: Sam Li --- block/qcow2.c | 657 - block/qcow2.h | 2 + block/trace-events | 1

[PATCH v3 2/4] qcow2: add configurations for zoned format extension

2023-08-28 Thread Sam Li
file with zoned format, use command like this: $ qemu-img create -f qcow2 test.qcow2 -o size=768M -o zone_size=64M -o zone_capacity=64M -o nr_conv_zones=0 -o max_append_sectors=512 -o max_open_zones=0 -o max_active_zones=0 -o zone_model=1 Signed-off-by: Sam Li --- block/qcow2.c

[PATCH v3 0/4] Add full zoned storage emulation to qcow2 driver

2023-08-28 Thread Sam Li
cation size * use bitwise or than addition * fix wp index overflow and locking * cleanups: comments, naming Sam Li (4): docs/qcow2: add the zoned format feature qcow2: add configurations for zoned format extension qcow2: add zoned emulation capability iotests: test the zoned format featu

[PATCH v3 1/4] docs/qcow2: add the zoned format feature

2023-08-28 Thread Sam Li
Add the specs for the zoned format feature of the qcow2 driver. The qcow2 file can be taken as zoned device and passed through by virtio-blk device or NVMe ZNS device to the guest given zoned information. Signed-off-by: Sam Li --- docs/system/qemu-block-drivers.rst.inc | 39

Re: [PATCH v2 2/4] qcow2: add configurations for zoned format extension

2023-08-28 Thread Sam Li
Stefan Hajnoczi 于2023年8月21日周一 21:31写道: > > On Mon, Aug 14, 2023 at 04:58:00PM +0800, Sam Li wrote: > > diff --git a/block/qcow2.h b/block/qcow2.h > > index f789ce3ae0..3694c8d217 100644 > > --- a/block/qcow2.h > > +++ b/block/qcow2.h > >

Re: [PATCH v2 3/4] qcow2: add zoned emulation capability

2023-08-28 Thread Sam Li
Stefan Hajnoczi 于2023年8月23日周三 03:48写道: > > On Mon, Aug 14, 2023 at 04:58:01PM +0800, Sam Li wrote: > > By adding zone operations and zoned metadata, the zoned emulation > > capability enables full emulation support of zoned device using > > a qcow2 file. The zoned devic

Re: [PATCH v2 2/4] qcow2: add configurations for zoned format extension

2023-08-28 Thread Sam Li
Damien Le Moal 于2023年8月28日周一 18:22写道: > > On 8/28/23 19:18, Sam Li wrote: > > Damien Le Moal 于2023年8月28日周一 18:13写道: > >> > >> On 8/28/23 18:22, Sam Li wrote: > >>> Stefan Hajnoczi 于2023年8月21日周一 21:31写道: > >>>> > >>>> On M

Re: [PATCH v2 2/4] qcow2: add configurations for zoned format extension

2023-08-28 Thread Sam Li
Damien Le Moal 于2023年8月28日周一 18:13写道: > > On 8/28/23 18:22, Sam Li wrote: > > Stefan Hajnoczi 于2023年8月21日周一 21:31写道: > >> > >> On Mon, Aug 14, 2023 at 04:58:00PM +0800, Sam Li wrote: > >>> diff --git a/block/qcow2.h b/block/qcow2.h > >>>

Re: [PATCH v2 2/4] qcow2: add configurations for zoned format extension

2023-08-28 Thread Sam Li
Stefan Hajnoczi 于2023年8月21日周一 21:31写道: > > On Mon, Aug 14, 2023 at 04:58:00PM +0800, Sam Li wrote: > > diff --git a/block/qcow2.h b/block/qcow2.h > > index f789ce3ae0..3694c8d217 100644 > > --- a/block/qcow2.h > > +++ b/block/qcow2.h > >

Re: [PATCH v2 2/4] qcow2: add configurations for zoned format extension

2023-08-28 Thread Sam Li
Markus Armbruster 于2023年8月21日周一 21:13写道: > > Sam Li writes: > > > To configure the zoned format feature on the qcow2 driver, it > > requires following arguments: the device size, zoned profile, > > zoned model, zone size, zone capacity, number of conventional > >

[PATCH v2] block/file-posix: fix update_zones_wp() caller

2023-08-24 Thread Sam Li
When the zoned request fail, it needs to update only the wp of the target zones for not disrupting the in-flight writes on these other zones. The wp is updated successfully after the request completes. Fixed the callers with right offset and nr_zones. Signed-off-by: Sam Li --- block/file

  1   2   3   4   5   6   7   8   9   10   >