[PATCH 0/2] ui/gtk: Add keep-aspect-ratio and scale option

2025-05-31 Thread Weifeng Liu
Add these options to give users more control over behaviors in gtk display backend: - keep-aspect-ratio: when set to true, if the aspect ratio of host window differs from that of guest frame-buffer, padding will be added to the host window to preserve the aspect ratio of guest frame-buffer. -

[PATCH 2/2] ui/gtk: Add scale option

2025-05-31 Thread Weifeng Liu
Allow user to set a preferred scale (defaulting to 1) of the virtual display. Along with zoom-to-fix=false, this would be helpful for users running QEMU on hi-dpi host desktop to achieve pixel to pixel display -- e.g., if the scale factor of a user's host desktop is set to 200%, then they can set a

[PATCH 1/2] ui/gtk: Add keep-aspect-ratio option

2025-05-31 Thread Weifeng Liu
When aspect ratio of host window and that of guest display are not aligned, we can either zoom the guest content to fill the whole host window or add padding to respect aspect ratio of the guest. Add an option keep-aspect-ratio to allow users to select their preferred behavior in this case. Sugges

Re: [PATCH 3/4] hw/rx: Reset the CPU at qemu reset time

2025-05-31 Thread Keith Packard via
From: Peter Maydell Date: Fri, 07 Mar 2025 13:26:14 + > Unless there's a strong reason for doing something different, > I would favour following the same pattern arm does for this. Thanks for the suggested cleanup; this looks a lot nicer now. From 02d0f2b006500dec62e91bd571a8722c354133e5 Mo

Re: [PATCH 4/4] rx: Support loading of ELF files too

2025-05-31 Thread Keith Packard via
> Ths code does what it intends to, and I'm not saying we should > definitely *not* have it. I do think it's worth considering whether > we need it, given that you can already load an ELF image via the > generic loader (-device loader). Also sorry for not getting back to this; we've been busy wit

Re: [PATCH] pc-bios: ensure installed ROMs don't have execute permissions

2025-05-31 Thread Helge Deller
On 5/30/25 17:21, Daniel P. Berrangé wrote: We have been inconsistent about whether ROMS stored in git have execute permission set, and by default meson will preserve source file permissions when installing files. This has caused periodic problems in RPM packaging as executable binary files get a

[PATCH 04/27] qemu-img: pass current cmd info into command handlers

2025-05-31 Thread Michael Tokarev
This info will be used to generate --help output. Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé Reviewed-by: Kevin Wolf --- qemu-img.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 4ece594

[PATCH 20/27] qemu-img: resize: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output, reorder options for consistency. Signed-off-by: Michael Tokarev --- qemu-img.c | 52 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index f655c301af..3dbfce52

Re: [PATCH 0/9] qom: Consolidate OBJECT_{DEFINE|DECLARE}_SIMPLE_TYPE*

2025-05-31 Thread Michael Tokarev
On 14.05.2025 11:49, Zhao Liu wrote: Hi, When I read the qom doc (qom.rst) about OBJECT_DECLARE_SIMPLE_TYPE, I found there's the wrong example. So I tried to fix the doc and cleaned up the relevant code case to correctly show that for simple type, the class definition is not needed. This series

Re: [PATCH v3 0/4] qapi: add auto-generated return docs

2025-05-31 Thread Michael Tokarev
On 23.05.2025 21:24, John Snow wrote: v3: rebased on top of python-qapi-linting (v4) pull request; removed commits that are no longer needed. Markus: I forget where we left off... shall we refresh? v2: fix multi-return-sections bug :( John Snow (4): docs/qapi-domain: add return-nod

[PATCH 25/27] qemu-img: measure: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output, reorder options for consistency. Also add -s short option for --size (and remove OPTION_SIZE). Signed-off-by: Michael Tokarev --- qemu-img.c | 89 +- 1 file changed, 62 insertions(+), 27 deletions(-)

[PATCH 09/27] qemu-img: commit: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output, reorder options for consistency. Signed-off-by: Michael Tokarev --- qemu-img.c | 68 ++ 1 file changed, 48 insertions(+), 20 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index c8ce206b73..5e651e

[PATCH 03/27] qemu-img: global option processing and error printing

2025-05-31 Thread Michael Tokarev
In order to correctly print executable name in various error messages, pass argv[0] to error_exit() function. This way, error messages will refer to actual executable name, which may be different from 'qemu-img'. For subcommands, pass original command name from the qemu-img argv[0], plus the subco

[PATCH 17/27] qemu-img: snapshot: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output, reorder options for consistency. Signed-off-by: Michael Tokarev --- qemu-img.c | 60 +++--- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 8fbf0c67a7..077452

[PATCH 02/27] qemu-img: create: convert img_size to signed, simplify handling

2025-05-31 Thread Michael Tokarev
Initializing an unsigned as -1, or using temporary sval for conversion is awkward. Since we don't allow other "negative" values anyway, use signed value and pass it to bdrv_img_create() (where it is properly converted to unsigned), simplifying code. Signed-off-by: Michael Tokarev Reviewed-by: Da

[PATCH 06/27] qemu-img: factor out parse_output_format() and use it in the code

2025-05-31 Thread Michael Tokarev
Use common code and simplify error message Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé Reviewed-by: Kevin Wolf --- qemu-img.c | 63 -- 1 file changed, 18 insertions(+), 45 deletions(-) diff --git a/qemu-img.c b/qemu-img.c

[PATCH 08/27] qemu-img: simplify --repair error message

2025-05-31 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- qemu-img.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 2129158c13..c8ce206b73 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -864,8 +864,9 @@ static int img_check(const img_

[PATCH 26/27] qemu-img: implement short --help, remove global help() function

2025-05-31 Thread Michael Tokarev
now once all individual subcommands has --help support, remove the large unreadable help() thing and replace it with small global --help, which refers to individual command --help for more info. While at it, also line-wrap list of formats after 75 chars. Since missing_argument() and unrecognized_

[PATCH 24/27] qemu-img: dd: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output, reorder options for consistency. Signed-off-by: Michael Tokarev --- qemu-img.c | 50 -- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 97ce51a1c3..3220c95e3c

[PATCH 22/27] qemu-img: bench: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output, reorder options for consistency. Add missing --object option. Signed-off-by: Michael Tokarev --- qemu-img.c | 112 +++-- 1 file changed, 84 insertions(+), 28 deletions(-) diff --git a/qemu-img.c b/qemu-

[PATCH 18/27] qemu-img: rebase: refresh options/--help (short option change)

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output, reorder options for consistency. Use -B for --backing-format, keep -F for backwards compatibility. Options added: --format, --cache - for the image in question --backing, --backing-format, --backing-cache, --backing-unsafe - for the new backing fil

[PATCH 19/27] qemu-img: resize: do not always eat last argument

2025-05-31 Thread Michael Tokarev
'qemu-img resize --help' does not work, since it wants more arguments. Also -size is only recognized as a very last argument, but it is common for tools to handle other options after positional arguments too. Tell getopt_long() to return non-options together with options, and process filename and

[PATCH 10/27] qemu-img: compare: use helper function for --object

2025-05-31 Thread Michael Tokarev
Use the same function to parse --object as used by all other qemu-img subcommands. Signed-off-by: Michael Tokarev --- qemu-img.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 5e651e8089..c24e1fb455 100644 --- a/qemu-img.c +++

[PATCH 14/27] qemu-img: map: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output, reorder options for consistency. While at it, remove unused option_index variable. Signed-off-by: Michael Tokarev --- qemu-img.c | 57 ++ 1 file changed, 36 insertions(+), 21 deletions(-) diff --git

[PATCH 23/27] qemu-img: bitmap: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output, reorder options for consistency. Signed-off-by: Michael Tokarev --- qemu-img.c | 80 ++ 1 file changed, 56 insertions(+), 24 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 5011ec5fce..97ce51

[PATCH 27/27] qemu-img: extend cvtnum() and use it in more places

2025-05-31 Thread Michael Tokarev
cvtnum() expects input string to specify some sort of size (optionally with KMG... suffix). However, there are a lot of other number conversions in there (using qemu_strtol &Co), also, not all conversions which use cvtnum, actually expects size, - like dd count=nn. Add bool issize argument to cvt

[PATCH 07/27] qemu-img: check: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output, reorder options for consistency. Signed-off-by: Michael Tokarev --- qemu-img.c | 60 +- 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index a26498a4e8..212915

[PATCH 11/27] qemu-img: compare: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add long options, add help, reorder options for consistency. Signed-off-by: Michael Tokarev --- qemu-img.c | 64 +++--- 1 file changed, 46 insertions(+), 18 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index c24e1fb455..70573b79b5 100644 ---

[PATCH 01/27] qemu-img: measure: convert img_size to signed, simplify handling

2025-05-31 Thread Michael Tokarev
qemu_opt_set_number() expects signed int64_t. Use int64_t instead of uint64_t for img_size, use -1 as "unset" value instead of UINT64_MAX, and do not require temporary sval for conversion from string. Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé Reviewed-by: Kevin Wolf --- q

[PATCH 21/27] qemu-img: amend: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output, reorder options for consistency. Signed-off-by: Michael Tokarev --- qemu-img.c | 54 +++--- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 3dbfce527b..0d4bdc

[PATCH 13/27] qemu-img: info: refresh options/--help

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output. Also add -b short option for --backing-chain, and remove now-unused OPTION_BACKING_CHAIN. Reorder options for consistency. While at it, remove unused option_index variable. Signed-off-by: Michael Tokarev --- qemu-img.c | 54 ++

[PATCH 12/27] qemu-img: convert: refresh options/--help (short option change)

2025-05-31 Thread Michael Tokarev
Add missing long options and --help output. Reorder options for consistency. Use -b for --backing, and recognize -B for backwards compatibility. Unfortunately we can't use -B to specify backing format. Signed-off-by: Michael Tokarev --- docs/tools/qemu-img.rst | 2 +- qemu-img.c

[PATCH 16/27] qemu-img: snapshot: make -l (list) the default, simplify option handling

2025-05-31 Thread Michael Tokarev
When no -l/-a/-c/-d specified, assume -l (list). Use the same values for SNAPSHOT_LIST/etc constants as the option chars (lacd), this makes it possible to simplify option handling a lot, combining cases for 4 options into one. Also remove bdrv_oflags handling (only list can use RO mode). Signed-

[PATCH 15/27] qemu-img: snapshot: allow specifying -f fmt

2025-05-31 Thread Michael Tokarev
For consistency with other commands, and since it already accepts --image-opts, allow specifying -f fmt too. Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- docs/tools/qemu-img.rst | 2 +- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 9 ++--- 3 files change

[PATCH 05/27] qemu-img: create: refresh options/--help (short option change)

2025-05-31 Thread Michael Tokarev
Create helper function cmd_help() to display command-specific help text, and use it to print --help for 'create' subcommand. Add missing long options (eg --format) in img_create(). Recognize -B option for --backing-format, keep -F for backward compatibility, Reorder options for consistency. Rem

[PATCH v4 00/27] refresh qemu-img options handling

2025-05-31 Thread Michael Tokarev
This is another iteration of this patch series, which tries to add missing command-line options, --help output, make it all more or less consistent, etc. I addressed (hopefully) all comments so far, mostly by Kevin. I ended up (so far) with a bit different wording somewhere. The manpage (and the

Re: [PATCH 07/27] qemu-img: check: refresh options/--help

2025-05-31 Thread Michael Tokarev
On 13.05.2025 18:54, Kevin Wolf wrote: Am 27.09.2024 um 08:11 hat Michael Tokarev geschrieben: Add missing long options and --help output. ... +" --image-opts\n" +" indicates that FILENAME is a complete image specification\n" +" instead of a file name (incompatible with --format)\n"

[PATCH v2 1/2] ui/vnc: Introduce the VncWorker type

2025-05-31 Thread Akihiko Odaki
The worker thread copies data in VncState to avoid race, but some data are too big to copy. Such data are held with pointers to avoid the overhead to copy, but it requires tedious memory management and makes them vulnerable to race. Introduce the VncWorker type to contain all data shared without c

[PATCH v2 2/2] ui/vnc: Do not copy z_stream

2025-05-31 Thread Akihiko Odaki
vnc_worker_thread_loop() copies z_stream stored in its local VncState to the persistent VncState, and the copied one is freed with deflateEnd() later. However, deflateEnd() refuses to operate with a copied z_stream and returns Z_STREAM_ERROR, leaking the allocated memory. Avoid copying the zlib st

[PATCH v2 0/2] ui/vnc: Do not copy z_stream

2025-05-31 Thread Akihiko Odaki
vnc_worker_thread_loop() copies z_stream stored in its local VncState to the persistent VncState, and the copied one is freed with deflateEnd() later. However, deflateEnd() refuses to operate with a copied z_stream and returns Z_STREAM_ERROR, leaking the allocated memory. Avoid copying the zlib st

[PATCH v6] target/arm: Always add pmu property for host

2025-05-31 Thread Akihiko Odaki
kvm-steal-time and sve properties are added for KVM even if the corresponding features are not available. Always add pmu property for "host". Note that we still don't add the property for other CPUs that lack PMU. This is because we do not know what a PMU version should be enabled when the user se

[PATCH v3] target/arm: Define raw write for PMU CLR registers

2025-05-31 Thread Akihiko Odaki
Raw writes to PMCNTENCLR and PMCNTENCLR_EL0 incorrectly used their default write function, which clears written bits instead of writes the raw value. PMINTENCLR and PMINTENCLR_EL1 are similar registers, but they instead had ARM_CP_NO_RAW. Commit 7a0e58fa6487 ("target-arm: Split NO_MIGRATE into ALI

[PATCH] MAINTAINERS: Update Akihiko Odaki's affiliation

2025-05-31 Thread Akihiko Odaki
e any question. And just in case: I intend to focus on my research and am not interested in a job opportunity for now. --- Changes in v2: - EDITME: describe what is new in this series revision. - EDITME: use bulletpoints and terse descriptions. - Link to v1: https://lore.kernel.org/qemu-devel/2025053

Re: [PATCH v3] docs/interop: convert text files to restructuredText

2025-05-31 Thread souleymane conté
Thanks for applying the patch and your adjustments! I'll now continue with the conversion of docs/interop/qed_spec.txt. Best, Souleymane Le jeu. 29 mai 2025 à 17:12, Peter Maydell a écrit : > On Thu, 22 May 2025 at 10:27, wrote: > > > > From: Souleymane Conte > > > > buglink: https://gitlab.