Re: [PATCH v6 13/15] hw/pci: Determine if rombar is explicitly enabled

2024-02-21 Thread Akihiko Odaki
On 2024/02/21 17:15, Markus Armbruster wrote: Akihiko Odaki writes: vfio determines if rombar is explicitly enabled by inspecting QDict. Inspecting QDict is not nice because QDict is untyped and depends on the details on the external interface. Add an infrastructure to determine if rombar is e

Re: [PATCH v6 12/15] hw/pci: Use -1 as a default value for rombar

2024-02-21 Thread Akihiko Odaki
On 2024/02/21 16:59, Markus Armbruster wrote: Akihiko Odaki writes: Currently there is no way to distinguish the case that rombar is explicitly specified as 1 and the case that rombar is not specified. Set rombar -1 by default to distinguish these cases just as it is done for addr and romsize

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

2024-02-21 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 03/28] qemu-img: create: convert img_size to signed, simplify handling

2024-02-21 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 --- qemu-img.c

[PULL 18/25] hw/ide: Add the possibility to disable the CompactFlash device in the build

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth For distros like downstream RHEL, it would be helpful to allow to disable the CompactFlash device. For making this possible, we need a separate Kconfig switch for this device, and the code should reside in a separate file. Let's also introduce a new header ide-dev.h which can be

[PULL 03/25] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header

2024-02-21 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan Reviewed-by: Thomas Huth Message-Id: <20240215105017.57748-2-phi...@linaro.org> --- hw/ppc/ppc440_pcix.c | 1 - hw/ppc/ppc4xx_pci.c | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c

[PULL 11/25] hw/i386/x86: Turn apic_xrupt_override into class attribute

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow The attribute isn't user-changeable and only true for pc-based machines. Turn it into a class attribute which allows for inlining pc_guest_info_init() into pc_machine_initfn(). Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <2024020822034

[PULL 20/25] hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth These definitions are required outside of the hw/ide/ code, too, so lets's move them from internal.h to a new header called ide-dma.h. Signed-off-by: Thomas Huth Acked-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240220085505.30255-4-th...@redhat.c

[PULL 01/25] hw/input/pckbd: Open-code i8042_setup_a20_line() wrapper

2024-02-21 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Since the named GPIO lines are a "public" interface to the device, we can directly call qdev_connect_gpio_out_named(), making it consistent with how the other A20 input source (port92) is wired. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Revi

[PULL 17/25] hw/isa/meson.build: Sort alphabetically

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Fixes: fbd758008f0f "hw/isa: extract FDC37M81X to a separate file" Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240218131701.91132-2-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa

[PULL 06/25] hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/

2024-02-21 Thread Philippe Mathieu-Daudé
ppc440_pcix.c is moved from the target specific ppc_ss[] meson source set to pci_ss[] which is common to all targets: the object is built once. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240215105017.57748-5-phi...@linaro.org> --- MAINTAINERS

[PULL 22/25] hw/ide: Move IDE bus related definitions to a new header ide-bus.h

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth Let's consolidate the public IDE bus related functions in a separate header. Signed-off-by: Thomas Huth Acked-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240220085505.30255-6-th...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw

[PULL 24/25] hw/ide: Stop exposing internal.h to non-IDE files

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth include/hw/ide/internal.h is currently included by include/hw/ide/pci.h and thus exposed to a lot of files that are not part of the IDE subsystem. Stop including internal.h there and use the appropriate new headers ide-bus.h and ide-dma.h instead. Reviewed-by: Philippe Mathieu-

[PULL 21/25] hw/ide: Move IDE device related definitions to ide-dev.h

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth Untangle internal.h by moving public IDE device related definitions to ide-dev.h. Signed-off-by: Thomas Huth Acked-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240220085505.30255-5-th...@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- inclu

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

2024-02-21 Thread Michael Tokarev
'qemu-img resize --help' does not work, since it wants more arguments. Also it -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

[PULL 23/25] hw/ide: Remove the include/hw/ide.h legacy file

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth There was only one prototype left in this legacy file. Move it to ide-dev.h to finally get rid of it. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth Acked-by: Mark Cave-Ayland Message-ID: <20240220085505.30255-7-th...@redhat.com> Signed-off-by: Philippe Mathi

[PULL 10/25] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done()

2024-02-21 Thread Philippe Mathieu-Daudé
From: Peter Maydell In the i386 PC machine, we want to run the pc_cmos_init_late() function only once the IDE and floppy drive devices have been set up. We currently do this using qemu_register_reset(), and then have the function call qemu_unregister_reset() on itself, so it runs exactly once. T

[PATCH 27/28] qemu-img: inline list of supported commands, remove qemu-img-cmds.h include

2024-02-21 Thread Michael Tokarev
also add short description to each command and use it in --help Signed-off-by: Michael Tokarev --- qemu-img.c | 41 ++--- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index ea284dca2d..299e34e470 100644 --- a/qemu-img.

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

2024-02-21 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 --- qemu-img.c | 19 +++ 1 file changed, 7 inse

[PULL 07/25] hw/i2c/smbus_slave: Add object path on error prints

2024-02-21 Thread Philippe Mathieu-Daudé
From: Joe Komlodi The current logging doesn't tell us which specific smbus device is an error state. Signed-off-by: Joe Komlodi Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240202204847.2062798-3-koml...@google.com> Signed-off-by: Philippe Mathieu-Daudé ---

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

2024-02-21 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 13/28] qemu-img: info: refresh options/--help

2024-02-21 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. While at it, remove unused option_index variable. Signed-off-by: Michael Tokarev --- qemu-img.c | 40 +++- 1 file changed, 27

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

2024-02-21 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 20/28] qemu-img: resize: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 37 - 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index c8b0b68d67..45fbef5d37 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4

[PATCH v2 00/28] qemu-img: refersh options and --help handling, cleanups

2024-02-21 Thread Michael Tokarev
Quite big patchset trying to implement normal, readable qemu-img --help (and qemu-img COMMAND --help) output with readable descriptions, and adding many long options in the process. In the end I stopped using qemu-img-opts.hx in qemu-img.c, perhaps this can be avoided, with only list of commands a

[PULL 15/25] hw/i386/pc_sysfw: Inline pc_system_flash_create() and remove it

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow pc_system_flash_create() checked for pcmc->pci_enabled which is redundant since its caller already checked it. The method can be turned into just two lines, so inline and remove it. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240208

[PATCH 12/28] qemu-img: convert: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. convert uses -B for --backing, - why not -b? Signed-off-by: Michael Tokarev --- qemu-img.c | 90 -- 1 file changed, 81 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index fd61b2

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

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. While at it, remove unused option_index variable. Signed-off-by: Michael Tokarev --- qemu-img.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index cc51da31cf..3f719bbe

[PULL 14/25] hw/i386/pc: Confine system flash handling to pc_sysfw

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Rather than distributing PC system flash handling across three files, let's confine it to one. Now, pc_system_firmware_init() creates, configures and cleans up the system flash which makes the code easier to understand. It also avoids the extra call to pc_system_flash_clean

[PULL 13/25] hw/i386/pc: Defer smbios_set_defaults() to machine_done

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Handling most of smbios data generation in the machine_done notifier is similar to how the ARM virt machine handles it which also calls smbios_set_defaults() there. The result is that all pc machines are freed from explicitly worrying about smbios setup. Signed-off-by: Ber

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

2024-02-21 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 18/28] qemu-img: rebase: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Options added: --format, --cache - for the image in question --backing, --backing-format, --backing-cache, --backing-unsafe - for the new backing file (was eg CACHE vs SRC_CACHE, which is unclear). Probably should rename local variables. Signed-of

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

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 39 +-- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index e4027ece20..af7841573c 100644 --- a/qemu-img.c +++ b/qemu-img.c @@

[PULL 25/25] hw/sparc/leon3: Fix wrong usage of DO_UPCAST macro

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth leon3.c currently fails to compile with some compilers when the -Wvla option has been enabled: ../hw/sparc/leon3.c: In function ‘leon3_cpu_reset’: ../hw/sparc/leon3.c:153:5: error: ISO C90 forbids variable length array ‘offset_must_be_zero’ [-Werror=vla] 153 | ResetD

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

2024-02-21 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- qemu-img.c | 45 + 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 1271217272..fd61b25ea7 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1487,25 +1487,52 @@ static int img_com

[PULL 19/25] hw/ide: Split qdev.c into ide-bus.c and ide-dev.c

2024-02-21 Thread Philippe Mathieu-Daudé
From: Thomas Huth qdev.c is a mixture between IDE bus specific functions and IDE device functions. Let's split it up to make it more obvious which part is related to bus handling and which part is related to device handling. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth Acked-

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

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 40 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 8455832d34..e4027ece20 100644 --- a/qemu-img.c +++ b/qemu-img.c @@

[PULL 04/25] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h

2024-02-21 Thread Philippe Mathieu-Daudé
Reviewed-by: BALATON Zoltan Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240215105017.57748-3-phi...@linaro.org> --- MAINTAINERS | 1 + include/hw/pci-host/ppc4xx.h | 17 + include/hw/ppc/ppc4xx.h | 5 - hw/ppc/ppc440_

[PATCH 08/28] qemu-img: check: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 38 ++ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 01894c097b..69fa9701e9 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -

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

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Also add -s short option for --size (and remove OPTION_SIZE). Signed-off-by: Michael Tokarev --- qemu-img.c | 53 - 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/qemu-img.c b/qemu-i

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

2024-02-21 Thread Michael Tokarev
Use common code and simplify error message Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- qemu-img.c | 63 -- 1 file changed, 18 insertions(+), 45 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 7e4c993b9c..01894c0

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

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 45fbef5d37..0d17738fb6 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4557

[PULL 08/25] hw/i386/pc_piix: Share pc_cmos_init() invocation between pc and isapc machines

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Both invocations are the same and either one is always executed. Avoid this redundancy. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240208220349.4948-3-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c

[PULL 16/25] hw/i386/pc_q35: Populate interrupt handlers before realizing LPC PCI function

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow The interrupt handlers need to be populated before the device is realized since internal devices such as the RTC are wired during realize(). If the interrupt handlers aren't populated, devices such as the RTC will be wired with a NULL interrupt handler, i.e. MC146818RtcStat

[PULL 12/25] hw/i386/pc: Merge pc_guest_info_init() into pc_machine_initfn()

2024-02-21 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Resolves redundant code in the piix and q35 machines. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240208220349.4948-5-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 2 -- hw/i386/pc.c |

[PATCH 04/28] qemu-img: global option processing and error printing

2024-02-21 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 whole argv[] array, so argv[0] is the executable name, not subc

[PULL 09/25] hw/i386/pc: Store pointers to IDE buses in PCMachineState

2024-02-21 Thread Philippe Mathieu-Daudé
From: Peter Maydell Add the two IDE bus BusState pointers to the set we keep in PCMachineState. This allows us to avoid passing them to pc_cmos_init(), and also will allow a refactoring of how we call pc_cmos_init_late(). Signed-off-by: Peter Maydell Acked-by: Richard Henderson Reviewed-by: Mi

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

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 45 - 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index ee35768af8..ce939708d4 100644 --- a/qemu-img.c +++ b/qemu-img

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

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 64 +- 1 file changed, 54 insertions(+), 10 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 0d17738fb6..8455832d34 100644 --- a/qemu-img.c +++

[PULL 02/25] hw/sysbus: Inline and remove sysbus_add_io()

2024-02-21 Thread Philippe Mathieu-Daudé
sysbus_add_io(...) is a simple wrapper to memory_region_add_subregion(get_system_io(), ...). It is used in 3 places; inline it directly. Rationale: we want to move to an explicit I/O bus, rather that an implicit one. Besides in heterogeneous setup we can have more than one I/O bus. Signed-off-by:

[PATCH 10/28] qemu-img: commit: refresh options/--help

2024-02-21 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 44 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index eba13724b0..1271217272 100644 --- a/qemu-img.c +++ b/qemu-img.

[PULL 05/25] hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/

2024-02-21 Thread Philippe Mathieu-Daudé
ppc4xx_pci.c is moved from the target specific ppc_ss[] meson source set to pci_ss[] which is common to all targets: the object is built once. Declare PPC4XX_PCI selector in pci-host/Kconfig. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20240215105017.57748-4-phi.

[PULL 00/25] Misc HW patches for 2024-02-21

2024-02-21 Thread Philippe Mathieu-Daudé
The following changes since commit 760b4dcdddba4a40b9fa0eb78fdfc7eda7cb83d0: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-02-20 10:11:08 +) are available in the Git repository at: https://github.com/philmd/qemu.git tags/hw-misc-20240221

[PATCH 05/28] qemu-img: pass current cmd info into command handlers

2024-02-21 Thread Michael Tokarev
This info will be used to generate --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 44dbf5be4f..38ac0f1845 100644 --- a/qemu-img.c +++ b/qemu-img.c @

[PATCH 06/28] qemu-img: create: refresh options/--help

2024-02-21 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(). Remove usage of missing_argument()/unrecognized_option() in img_create(). Signed-off-by: Michael Tokarev --- qemu

[PATCH 09/28] qemu-img: simplify --repair error message

2024-02-21 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 69fa9701e9..eba13724b0 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -858,8 +858,9 @@ static int img_check(const img_

[PATCH 01/28] qemu-img: stop printing error twice in a few places

2024-02-21 Thread Michael Tokarev
Currently we have: ./qemu-img resize none +10 qemu-img: Could not open 'none': Could not open 'none': No such file or directory stop printing the message twice, - local_err already has all the info, no need to prepend additional text there. There are a few other places like this, but I'm un

Re: [PATCH v2 4/7] hw/ide: Move IDE device related definitions to ide-dev.h

2024-02-21 Thread Philippe Mathieu-Daudé
On 21/2/24 20:13, Thomas Huth wrote: On 21/02/2024 19.43, Philippe Mathieu-Daudé wrote: On 20/2/24 09:55, Thomas Huth wrote: Unentangle internal.h by moving public IDE device related Disentangle ... from? Untangle? TIL Unentangle. You're right, "disentangle" seems to be the more appropriate

Re: [PATCH v2 4/7] hw/ide: Move IDE device related definitions to ide-dev.h

2024-02-21 Thread Thomas Huth
On 21/02/2024 19.43, Philippe Mathieu-Daudé wrote: On 20/2/24 09:55, Thomas Huth wrote: Unentangle internal.h by moving public IDE device related Disentangle ... from? Untangle? TIL Unentangle. You're right, "disentangle" seems to be the more appropriate word. I'll fix it up. Anyway I'm no

Re: [PATCH v2 5/7] hw/ide: Move IDE bus related definitions to a new header ide-bus.h

2024-02-21 Thread Philippe Mathieu-Daudé
On 20/2/24 09:55, Thomas Huth wrote: Let's consolidate the public IDE bus related functions in a separate header. Signed-off-by: Thomas Huth --- include/hw/ide/ide-bus.h | 42 +++ include/hw/ide/internal.h | 40 + 2 fi

Re: [PATCH v2 4/7] hw/ide: Move IDE device related definitions to ide-dev.h

2024-02-21 Thread Philippe Mathieu-Daudé
On 20/2/24 09:55, Thomas Huth wrote: Unentangle internal.h by moving public IDE device related Disentangle ... from? Untangle? TIL Unentangle. Anyway I'm not a native English speaker, so: Reviewed-by: Philippe Mathieu-Daudé definitions to ide-dev.h. Signed-off-by: Thomas Huth --- includ

Re: [PATCH v2 3/7] hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h

2024-02-21 Thread Philippe Mathieu-Daudé
On 20/2/24 09:55, Thomas Huth wrote: These definitions are required outside of the hw/ide/ code, too, so lets's move them from internal.h to a new header called ide-dma.h. Signed-off-by: Thomas Huth --- include/hw/ide/ide-dma.h | 37 + include/hw/ide/inte

[PATCH 2/2] Implement SMBIOS type 9 v2.6

2024-02-21 Thread Nabih Estefan
From: Felix Wu Signed-off-by: Felix Wu Signed-off-by: Nabih Estefan --- hw/smbios/smbios.c | 49 +--- include/hw/firmware/smbios.h | 4 +++ qemu-options.hx | 2 +- 3 files changed, 51 insertions(+), 4 deletions(-) diff --git a/hw/smbios

[PATCH] hw/nvme/ns: Add NVMe NGUID property

2024-02-21 Thread Nabih Estefan
From: Roque Arcudia Hernandez This patch adds a way to specify an NGUID for a given NVMe Namespace using a string of hexadecimal digits with an optional '-' separator to group bytes. For instance: -device nvme-ns,nguid="e9accd3b83904e13167cf0593437f57d" If provided, the NGUID will be part of th

[PATCH 0/2] ARM GICv3 ITS DeviceID modification implementation

2024-02-21 Thread Nabih Estefan
This patch series modifies the ARM GICv3 ITS to use the already existing send_msi virtual function when writing the GITS_TRANSLATER in order to be able to modify the final DeviceID to an implementation specific version that requires extra information besides the BDF that comes in the requester_id.

[PATCH 2/2] hw/arm/smmu-common: Create virtual function for implementation defined StreamID

2024-02-21 Thread Nabih Estefan
From: Roque Arcudia Hernandez According to the SMMU specification the StreamID construction and size is IMPLEMENTATION DEFINED, the size being between 0 and 32 bits. This patch creates virtual functions get_sid and get_iommu_mr to allow different implementations of how the StreamID is constructe

[PATCH 0/2] ARM SMMUv3 StreamID Implementation

2024-02-21 Thread Nabih Estefan
This patch series modifies the ARM SMMUv3 to be able to work with an implementation specific StreamID that does not match exactly the PCIe BDF. The way to achieve this is by converting the smmu_get_sid and smmu_iommu_mr functions to virtual functions that can be overridden by inheritance, making su

[PATCH 1/2] hw/arm/smmuv3: Check StreamIDs against SMMU_IDR1.SIDSIZE value

2024-02-21 Thread Nabih Estefan
From: Roque Arcudia Hernandez Current implementation checks the StreamIDs against STRTAB_BASE_CFG.LOG2SIZE register field value and a constant SMMU_IDR1_SIDSIZE which is also used as initial value for field SMMU_IDR1.SIDSIZE. This limits the possibility of extending the SMMUv3 by inheritance and

[PATCH 1/2] hw/intc/arm_gicv3_its_common: Increase DeviceID to 32 bits

2024-02-21 Thread Nabih Estefan
From: Roque Arcudia Hernandez According to the “GICv3 and GICv4 Software Overview” the DeviceID is IMPLEMENTATION DEFINED. This patch increases the DeviceID in send_msi virtual function to 32 bits to allow the possibility of a redefinition of it with a bigger DeviceID. Signed-off-by: Roque Arcud

[PATCH 2/2] hw/intc/arm_gicv3_its: Use send_msi in the GITS_TRANSLATER write

2024-02-21 Thread Nabih Estefan
From: Roque Arcudia Hernandez This is trying to achieve 2 things: To be able to redefine the send_msi in a derived class of arm_gicv3_its and/or to expose a method call interface to inject interrupts from another device. Signed-off-by: Roque Arcudia Hernandez Signed-off-by: Nabih Estefan ---

[PATCH 0/2] SMBIOS type 9 descriptor implementation

2024-02-21 Thread Nabih Estefan
This patch series implements SMBIOS type 9 descriptor, system slots. For each system slot, we can assign one descriptor for it if needed. In versions later than 2.6, a new PCI device field was added to make sure the descriptor is associated with a certain device, if provided. For ease of usage, qem

[PATCH 1/2] Implement base of SMBIOS type 9 descriptor.

2024-02-21 Thread Nabih Estefan
From: Felix Wu Version 2.1+. Signed-off-by: Felix Wu Signed-off-by: Nabih Estefan --- hw/smbios/smbios.c | 99 include/hw/firmware/smbios.h | 13 + qemu-options.hx | 3 ++ 3 files changed, 115 insertions(+) diff --git a/hw/smbi

Re: [PATCH 23/23] qemu-img: inline list of supported commands, remove qemu-img-cmds.h include

2024-02-21 Thread Daniel P . Berrangé
On Wed, Feb 21, 2024 at 07:31:42PM +0300, Michael Tokarev wrote: > 20.02.2024 21:48, Daniel P. Berrangé: > > > This ends up looking a bit muddled together. I don't think we > > need repeat 'qemu-img ' twice, and could add a little > > more whitespace > > > > eg instead of: > > > > $ ./build/qemu

Re: [PATCH 23/23] qemu-img: inline list of supported commands, remove qemu-img-cmds.h include

2024-02-21 Thread Michael Tokarev
20.02.2024 21:48, Daniel P. Berrangé: This ends up looking a bit muddled together. I don't think we need repeat 'qemu-img ' twice, and could add a little more whitespace eg instead of: $ ./build/qemu-img check --help qemu-img check: Check basic image integrity. Usage: qemu-img check [-f FMT |

Re: [PATCH 12/23] qemu-img: make -l (list) the default for "snapshot" subcommand

2024-02-21 Thread Michael Tokarev
20.02.2024 21:51, Michael Tokarev wrote: 20.02.2024 20:45, Daniel P. Berrangé wrote: On Sat, Feb 10, 2024 at 12:22:33AM +0300, Michael Tokarev wrote: also remove bdrv_oflags handling (only list can use RO mode) ---   qemu-img.c | 13 -   1 file changed, 8 insertions(+), 5 deletions(-

Re: [RFC 1/4] drive-mirror: add support for sync=bitmap mode=never

2024-02-21 Thread Fiona Ebner
Am 21.02.24 um 07:55 schrieb Markus Armbruster: >> diff --git a/qapi/block-core.json b/qapi/block-core.json >> index ab5a93a966..ac05483958 100644 >> --- a/qapi/block-core.json >> +++ b/qapi/block-core.json >> @@ -2181,6 +2181,15 @@ >> # destination (all the disk, only the sectors allocated in

Re: [PATCH v2 0/7] hw/ide: Clean up hw/ide/qdev.c and include/hw/ide/internal.h

2024-02-21 Thread Mark Cave-Ayland
On 20/02/2024 08:54, Thomas Huth wrote: While trying to make it possible to compile-out the CompactFlash IDE device in downstream distributions (first patch), we noticed that there are more things in the IDE code that could use a proper clean up: First, hw/ide/qdev.c is quite a mix between IDE

Re: [PATCH 15/23] qemu-img: resize: do not always eat last argument

2024-02-21 Thread Michael Tokarev
20.02.2024 20:57, Daniel P. Berrangé пишет: On Sat, Feb 10, 2024 at 12:22:36AM +0300, Michael Tokarev wrote: 'qemu-img resize --help' does not work, since it wants more arguments. Only eat last option at the beginning if it starts like -N.., and allow getopt() to do its work, and eat it up at th

Re: [PATCH v6 15/15] hw/qdev: Remove opts member

2024-02-21 Thread Markus Armbruster
Akihiko Odaki writes: > It is no longer used. > > Signed-off-by: Akihiko Odaki > Reviewed-by: Philippe Mathieu-Daudé > --- > include/hw/qdev-core.h | 4 > hw/core/qdev.c | 1 - > system/qdev-monitor.c | 12 +++- > 3 files changed, 7 insertions(+), 10 deletions(-) > > di

Re: [PATCH v6 14/15] vfio: Avoid inspecting option QDict for rombar

2024-02-21 Thread Markus Armbruster
Akihiko Odaki writes: > Use pci_rom_bar_explicitly_enabled() to determine if rombar is explicitly > enabled. > > Signed-off-by: Akihiko Odaki > --- > hw/vfio/pci.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c > index 4fa387f0430d..647f

Re: [PATCH v6 13/15] hw/pci: Determine if rombar is explicitly enabled

2024-02-21 Thread Markus Armbruster
Akihiko Odaki writes: > vfio determines if rombar is explicitly enabled by inspecting QDict. > Inspecting QDict is not nice because QDict is untyped and depends on the > details on the external interface. Add an infrastructure to determine if > rombar is explicitly enabled to hw/pci. > > Signed-o

Re: [PATCH v6 12/15] hw/pci: Use -1 as a default value for rombar

2024-02-21 Thread Markus Armbruster
Akihiko Odaki writes: > Currently there is no way to distinguish the case that rombar is > explicitly specified as 1 and the case that rombar is not specified. > > Set rombar -1 by default to distinguish these cases just as it is done > for addr and romsize. It was confirmed that changing the def