Re: [PATCH 6/9] i386/pc: Skip initialization of system FW when using IGVM

2024-03-01 Thread Daniel P . Berrangé
On Tue, Feb 27, 2024 at 02:50:12PM +, Roy Hopkins wrote: > When using an IGVM file the configuration of the system firmware is > defined by IGVM directives contained in the file. Therefore the default > system firmware should not be initialized when an IGVM file has been > provided. > > This c

Re: [PATCH 1/7] qga/commands-posix: return fsinfo values directly as reported by statvfs

2024-03-01 Thread Andrey Drobyshev
On 2/28/24 09:55, Marc-André Lureau wrote: > [Вы нечасто получаете письма от marcandre.lur...@redhat.com. Узнайте, почему > это важно, по адресу https://aka.ms/LearnAboutSenderIdentification ] > > Hi > > On Tue, Feb 27, 2024 at 4:38 PM Andrey Drobyshev > wrote: >> >> >> >> On 2/26/24 20:50, Kon

Re: [PATCH 7/9] i386/sev: Refactor setting of reset vector and initial CPU state

2024-03-01 Thread Daniel P . Berrangé
On Tue, Feb 27, 2024 at 02:50:13PM +, Roy Hopkins wrote: > When an SEV guest is started, the reset vector and state are > extracted from metadata that is contained in the firmware volume. > > In preparation for using IGVM to setup the initial CPU state, > the code has been refactored to popula

Re: [QEMU][PATCH v3 3/7] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length()

2024-03-01 Thread Alex Bennée
Vikram Garhwal writes: > From: Juergen Gross > > qemu_map_ram_ptr() and qemu_ram_ptr_length() share quite some code, so > modify qemu_ram_ptr_length() a little bit and use it for > qemu_map_ram_ptr(), too. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal > Reviewed-by: Stefano

Re: [QEMU][PATCH v3 4/7] xen: let xen_ram_addr_from_mapcache() return -1 in case of not found entry

2024-03-01 Thread Alex Bennée
Vikram Garhwal writes: > From: Juergen Gross > > Today xen_ram_addr_from_mapcache() will either abort() or return 0 in > case it can't find a matching entry for a pointer value. Both cases > are bad, so change that to return an invalid address instead. > > Signed-off-by: Juergen Gross > Reviewe

Re: [PATCH 9/9] docs/system: Add documentation on support for IGVM

2024-03-01 Thread Daniel P . Berrangé
On Tue, Feb 27, 2024 at 02:50:15PM +, Roy Hopkins wrote: > IGVM support has been implemented for Confidential Guests that support > AMD SEV and AMD SEV-ES. Add some documentation that gives some > background on the IGVM format and how to use it to configure a > confidential guest. > > Signed-o

Re: [QEMU][PATCH v3 7/7] hw: arm: Add grant mapping.

2024-03-01 Thread Alex Bennée
Vikram Garhwal writes: > Enable grant ram mapping support for Xenpvh machine on ARM. > > Signed-off-by: Vikram Garhwal > Reviewed-by: Stefano Stabellini > --- > hw/arm/xen_arm.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c > index 32776d94df..

[PATCH v2 0/6] vhost-user-blk: live resize additional APIs

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
v2: - now based on master - drop x- prefixes, still keep new APIs "unstable" Also: 01: add a-b by Raphael add note about removed comment "valid for resize only" 02-03: new patches, following review of old "02", which is now 04 04: use GenericError wording keep short name device-sync-c

[PATCH v2 4/6] qapi: introduce device-sync-config

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
Add command to sync config from vhost-user backend to the device. It may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not triggered interrupt to the guest or just not available (not supported by vhost-user server). Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/block/vhost-us

[PATCH v2 6/6] qapi: introduce CONFIG_READ event

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
Send a new event when guest reads virtio-pci config after virtio_notify_config() call. That's useful to check that guest fetched modified config, for example after resizing disk backend. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/virtio/virtio-pci.c | 9 + include/monitor/qdev.

[PATCH v2 5/6] qapi: device-sync-config: check runstate

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
Command result is racy if allow it during migration. Let's allow the sync only in RUNNING state. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/runstate.h | 1 + system/qdev-monitor.c | 27 ++- system/runstate.c | 5 + 3 files changed, 32

[PATCH v2 3/6] qdev-monitor: add option to report GenericError from find_device_state

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- system/qdev-monitor.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c index 9febb743f1..cf7481e416 100644 --- a/system/qdev-monitor.c +++ b/system/qdev-monitor.c @@ -

[PATCH v2 2/6] qdev-monitor: fix error message in find_device_state()

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
This "hotpluggable" here is misleading. Actually we check is object a device or not. Let's drop the word. SUggested-by: Markus Armbruster Signed-off-by: Vladimir Sementsov-Ogievskiy --- system/qdev-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/qdev-monitor

[PATCH v2 1/6] vhost-user-blk: simplify and fix vhost_user_blk_handle_config_change

2024-03-01 Thread Vladimir Sementsov-Ogievskiy
Let's not care about what was changed and update the whole config, reasons: 1. config->geometry should be updated together with capacity, so we fix a bug. 2. Vhost-user protocol doesn't say anything about config change limitation. Silent ignore of changes doesn't seem to be correct. 3. vho

[PATCH v2 5/7] qga/commands-posix: execute_fsfreeze_hook: use ga_run_command helper

2024-03-01 Thread Andrey Drobyshev
There's no need to check for the existence of the hook executable, as the exec() call will do that for us. Signed-off-by: Andrey Drobyshev --- qga/commands-posix.c | 35 +++ 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/qga/commands-posix.c b/qga/

[PATCH v2 1/7] qga: guest-get-fsinfo: add optional 'total-bytes-root' field

2024-03-01 Thread Andrey Drobyshev
Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo: used = (f_blocks - f_bfree), total = (f_blocks - f_bfree + f_bavail) as returned by statvfs(3). While on Windows guests that's all we can get with GetDiskFreeSpaceEx

[PATCH v2 6/7] qga/commands-posix: use ga_run_command helper when suspending via sysfs

2024-03-01 Thread Andrey Drobyshev
We replace the direct call to open() with a "sh -c 'echo ...'" call, so that it becomes an executable command. Signed-off-by: Andrey Drobyshev --- qga/commands-posix.c | 36 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/qga/commands-posix.c b

[PATCH v2 7/7] qga/commands-posix: qmp_guest_set_user_password: use ga_run_command helper

2024-03-01 Thread Andrey Drobyshev
There's no need to check for the existence of the "chpasswd", "pw" executables, as the exec() call will do that for us. Signed-off-by: Andrey Drobyshev --- qga/commands-posix.c | 96 ++-- 1 file changed, 13 insertions(+), 83 deletions(-) diff --git a/qga/

[PATCH v2 2/7] qga: introduce ga_run_command() helper for guest cmd execution

2024-03-01 Thread Andrey Drobyshev
When executing guest commands in *nix environment, we repeat the same fork/exec pattern multiple times. Let's just separate it into a single helper which would also be able to feed input data into the launched process' stdin. This way we can avoid code duplication. To keep the history more bisec

[PATCH v2 0/7] qga/commands-posix: replace code duplicating commands with a helper

2024-03-01 Thread Andrey Drobyshev
v1 --> v2: * Replace commit for guest-get-fsinfo: instead of reporting statvfs(3) values directly, keep the old ones but add an additional optional field 'total-bytes-root', only reported in POSIX. Also tweak the fields description in qga/qapi-schema.json to document where the values

[PATCH v2 4/7] qga/commands-posix: qmp_guest_set_time: use ga_run_command helper

2024-03-01 Thread Andrey Drobyshev
There's no need to check for the existence of "/sbin/hwclock", the exec() call will do that for us. Signed-off-by: Andrey Drobyshev --- qga/commands-posix.c | 43 +++ 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/qga/commands-posix.c b/qga

[PATCH v2 3/7] qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper

2024-03-01 Thread Andrey Drobyshev
Also remove the G_GNUC_UNUSED attribute added in the previous commit from the helper. Signed-off-by: Andrey Drobyshev --- qga/commands-posix.c | 39 ++- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c

Re: [RFC PATCH v5 12/22] target/arm: Handle NMI in arm_cpu_do_interrupt_aarch64()

2024-03-01 Thread Richard Henderson
On 2/29/24 17:42, Jinjie Ruan wrote: On 2024/3/1 7:09, Richard Henderson wrote: On 2/29/24 03:10, Jinjie Ruan via wrote: According to Arm GIC section 4.6.3 Interrupt superpriority, the interrupt with superpriority is always IRQ, never FIQ, so the NMI exception trap entry behave like IRQ. Howe

[PATCH v3 07/12] util/range: make range_list_from_string() accept a single number

2024-03-01 Thread Sven Schnelle
To use range_list_from_string() as a replacement in the execlog plugin, make it accept single numbers instead of a range. This might also be useful for the already present debug_ranges filtering. Signed-off-by: Sven Schnelle --- util/range.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH v3 01/12] util/log: convert debug_regions to GList

2024-03-01 Thread Sven Schnelle
In preparation of making the parsing part of qemu_set_dfilter_ranges() available to other users, convert it to return a GList, so the result can be used with other functions taking a GList of struct Range. Signed-off-by: Sven Schnelle --- util/log.c | 36 ++-- 1 f

[PATCH v3 00/12] plugins/execlog: add data address match and address range support

2024-03-01 Thread Sven Schnelle
Hi List, this patchset adds a new -dfilter option and address range matching. With this execlog can match only a certain range of address for both instruction and data adresses. Example usage: qemu-system-xxx -d plugin -plugin libexeclog.so,afilter=0x1000-0x2000,dfilter=0x388 This would only

[PATCH v3 05/12] util/range: use append_new_range() in range_list_from_string()

2024-03-01 Thread Sven Schnelle
Use append_new_ranges() instead of manually allocating and filling the new range member. Signed-off-by: Sven Schnelle --- util/range.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/util/range.c b/util/range.c index 7234ab7a53..db535de9a7 100644 --- a/util/range.c +++

[PATCH v3 12/12] plugins/execlog: add data address match

2024-03-01 Thread Sven Schnelle
Add a match similar to the afilter address match, but for data addresses. When an address is specified with '-dfilter=0x12345' only load/stores to/from address 0x12345 are printed. All other instructions are hidden. Signed-off-by: Sven Schnelle --- contrib/plugins/execlog.c | 28

[PATCH v3 08/12] qemu/range: add range_list_contains() function

2024-03-01 Thread Sven Schnelle
Add a small inline function to match an address against a list of ranges. Signed-off-by: Sven Schnelle --- include/qemu/range.h | 12 util/log.c | 10 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/qemu/range.h b/include/qemu/range.h ind

[PATCH v3 04/12] util/range: add range_list_free()

2024-03-01 Thread Sven Schnelle
Introduce range_list_free(), which takes a GList of ranges and frees the list and each range. Signed-off-by: Sven Schnelle --- include/qemu/range.h | 5 + util/range.c | 5 + 2 files changed, 10 insertions(+) diff --git a/include/qemu/range.h b/include/qemu/range.h index 530b0c7

[PATCH v3 09/12] plugins: add API to print errors

2024-03-01 Thread Sven Schnelle
add qemu_plugin_error_print() which is a wrapper around error_report_err(). This will be used by qemu_plugin_parse_filter_ranges() to report parse failures. Signed-off-by: Sven Schnelle --- include/qemu/qemu-plugin.h | 12 plugins/api.c| 7 +++ plugins/qemu-pl

[PATCH v3 10/12] plugins: add range list API

2024-03-01 Thread Sven Schnelle
Export range_list_from_string(), range_contains() and range_list_free() to allow plugins to parse filter ranges and match them to avoid reimplementing this functionality. Signed-off-by: Sven Schnelle --- include/qemu/qemu-plugin.h | 41 plugins/api.c

[PATCH v3 02/12] util/log: make qemu_set_dfilter_ranges() take a GList

2024-03-01 Thread Sven Schnelle
In preparation of making qemu_set_dfilter_ranges() available to other users, move the code to a new function range_list_from_string() which takes an additional GList argument. Signed-off-by: Sven Schnelle --- util/log.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) dif

[PATCH v3 06/12] util/range: split up range_list_from_string()

2024-03-01 Thread Sven Schnelle
Makes the code a bit easier to read and maintain. Signed-off-by: Sven Schnelle --- util/range.c | 119 ++- 1 file changed, 70 insertions(+), 49 deletions(-) diff --git a/util/range.c b/util/range.c index db535de9a7..8c463995e7 100644 --- a/util/ra

[PATCH v3 11/12] plugins/execlog: use range list api

2024-03-01 Thread Sven Schnelle
Instead of doing its own implementation, use the new range list API to parse and match address lists. Signed-off-by: Sven Schnelle --- contrib/plugins/execlog.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/contrib/plugins/execlog.c b/contrib/pl

Re: QNX VM hang on Qemu

2024-03-01 Thread Faiq Ali Sayed
Hi Clément, So the output of the command | $ qemu-system-aarch64 -M xlnx-zcu102 -m 4G -no-reboot -nographic -kernel qnx.img is $ pulseaudio: set_sink_input_volume() failed $ pulseaudio: Reason: Invalid argument $ pulseaudio: set_sink_input_mute() failed $ pulseaudio: Reason: Invalid argument I

[PATCH v3 03/12] util/range: move range_list_from_string() to range.c

2024-03-01 Thread Sven Schnelle
Signed-off-by: Sven Schnelle --- include/qemu/range.h | 7 util/log.c | 74 -- util/range.c | 76 3 files changed, 83 insertions(+), 74 deletions(-) diff --git a/include/qemu/range.h b/in

Re: [PATCH] migration/multifd: Document two places for mapped-ram

2024-03-01 Thread Prasad Pandit
Hello Petr, On Fri, 1 Mar 2024 at 14:46, wrote: > + * An explicitly close() on the channel here is normally not explicitly -> explicit > + * required, but can be helpful for "file:" iochannels, where it > + * will include an fdatasync() to make sure the data is flushed t

Re: [PATCH] migration/multifd: Document two places for mapped-ram

2024-03-01 Thread Daniel P . Berrangé
On Fri, Mar 01, 2024 at 11:17:10PM +0530, Prasad Pandit wrote: > Hello Petr, > > On Fri, 1 Mar 2024 at 14:46, wrote: > > + * An explicitly close() on the channel here is normally not > > explicitly -> explicit > > > + * required, but can be helpful for "file:" iochannels, where

[PATCH] hmp: Add option to info qtree to omit details

2024-03-01 Thread BALATON Zoltan
The output of info qtree monitor command is very long. Add an option to print a brief overview omitting all the details. Signed-off-by: BALATON Zoltan --- hmp-commands-info.hx | 6 +++--- system/qdev-monitor.c | 24 +--- 2 files changed, 16 insertions(+), 14 deletions(-) d

Re: Intention to work on GSoC project

2024-03-01 Thread Sahil
Hi, On Friday, March 1, 2024 1:10:49 PM IST you wrote: > [...] > You can add the recently published > "virtio-live-migration-technical-deep-dive" :) [1]. > > [1] > https://developers.redhat.com/articles/2024/02/21/virtio-live-migration-technical-deep-dive Thank you. This resource will help me co

[PATCH 4/8] target/arm: Don't allow RES0 CNTHCTL_EL2 bits to be written

2024-03-01 Thread Peter Maydell
Don't allow the guest to write CNTHCTL_EL2 bits which don't exist. This is not strictly architecturally required, but it is how we've tended to implement registers more recently. In particular, bits [19:18] are only present with FEAT_RME, and bits [17:12] will only be present with FEAT_ECV. Signe

[PATCH 3/8] target/arm: use FIELD macro for CNTHCTL bit definitions

2024-03-01 Thread Peter Maydell
We prefer the FIELD macro over ad-hoc #defines for register bits; switch CNTHCTL to that style before we add any more bits. Signed-off-by: Peter Maydell --- target/arm/internals.h | 19 +-- target/arm/helper.c| 9 - 2 files changed, 21 insertions(+), 7 deletions(-)

[PATCH 5/8] target/arm: Implement new FEAT_ECV trap bits

2024-03-01 Thread Peter Maydell
The functionality defined by ID_AA64MMFR0_EL1.ECV == 1 is: * four new trap bits for various counter and timer registers * the CNTHCTL_EL2.EVNTIS and CNTKCTL_EL1.EVNTIS bits which control scaling of the event stream. This is a no-op for us, because we don't implement the event stream (our WF

[PATCH 7/8] target/arm: Implement FEAT_ECV CNTPOFF_EL2 handling

2024-03-01 Thread Peter Maydell
When ID_AA64MMFR0_EL1.ECV is 0b0010, a new register CNTPOFF_EL2 is implemented. This is similar to the existing CNTVOFF_EL2, except that it controls a hypervisor-adjustable offset made to the physical counter and timer. Implement the handling for this register, which includes control/trap bits in

[PATCH 0/8] target/arm: Implement FEAT_ECV (Enhanced Counter Virtualization)

2024-03-01 Thread Peter Maydell
This patchset implements the Arm FEAT_ECV architectural feature, which provides: * some new trap bits for hypervisors to trap accesses to various counter and timer registers * support for scaling of the event stream for the guest (which we don't need to implement because our events are alwa

[PATCH 6/8] target/arm: Define CNTPCTSS_EL0 and CNTVCTSS_EL0

2024-03-01 Thread Peter Maydell
For FEAT_ECV, new registers CNTPCTSS_EL0 and CNTVCTSS_EL0 are defined, which are "self-synchronized" views of the physical and virtual counts as seen in the CNTPCT_EL0 and CNTVCT_EL0 registers (meaning that no barriers are needed around accesses to them to ensure that reads of them do not occur spe

[PATCH 8/8] target/arm: Enable FEAT_ECV for 'max' CPU

2024-03-01 Thread Peter Maydell
Enable all FEAT_ECV features on the 'max' CPU. Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 1 + target/arm/tcg/cpu64.c| 1 + 2 files changed, 2 insertions(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index f67aea2d836..2a7bbb82dc4 10

Re: [PATCH v1 0/5] hw/ppc: SPI model

2024-03-01 Thread Chalapathi V
On 01-03-2024 22:06, Cédric Le Goater wrote: Chalapathi, On 3/1/24 17:17, Chalapathi V wrote: Hello, I would greatly appreciate the review comments/suggestions on PATCH V1. Thank You and Regards, I didn't forget but I lacked the time in this release cycle. Sorry about that. I have one qui

[PATCH 2/8] target/arm: Timer _EL02 registers UNDEF for E2H == 0

2024-03-01 Thread Peter Maydell
The timer _EL02 registers should UNDEF for invalid accesses from EL2 or EL3 when HCR_EL2.E2H == 0, not take a cp access trap. We were delivering the exception to EL2 with the wrong syndrome. Signed-off-by: Peter Maydell --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH 1/8] target/arm: Move some register related defines to internals.h

2024-03-01 Thread Peter Maydell
cpu.h has a lot of #defines relating to CPU register fields. Most of these aren't actually used outside target/arm code, so there's no point in cluttering up the cpu.h file with them. Move some easy ones to internals.h. Signed-off-by: Peter Maydell --- I want to add some more CNTHCTL_* values, an

Re: [PATCH v2 1/6] libqos/virtio.c: init all elems in qvring_indirect_desc_setup()

2024-03-01 Thread Thomas Huth
On 01/03/2024 16.57, Michael Tokarev wrote: 17.02.2024 22:26, Daniel Henrique Barboza: diff --git a/tests/qtest/libqos/virtio.c b/tests/qtest/libqos/virtio.c index 410513225f..4f39124eba 100644 --- a/tests/qtest/libqos/virtio.c +++ b/tests/qtest/libqos/virtio.c @@ -280,14 +280,27 @@ QVRingIndir

[PATCH] Fix typo in comment (uin32_t -> uint32_t)

2024-03-01 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- hw/vfio/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h index 6e64a2654e..4bb7d7d257 100644 --- a/hw/vfio/pci.h +++ b/hw/vfio/pci.h @@ -181,7 +181,7 @@ struct VFIOPCIDevice { Notifier irqchip_change_no

[PATCH] Make some structure static

2024-03-01 Thread Frediano Ziglio
Not used outside C module. Signed-off-by: Frediano Ziglio --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 4fa387f043..a1522a011a 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -2558,7 +2558,7 @@ static bool vfio_dis

[PATCH 1/4] hw/i386/pc: Remove pc_compat_1_4..1.7[] left over declarations

2024-03-01 Thread Philippe Mathieu-Daudé
These definitions were removed in commit ea985d235b ("pc_piix: remove pc-i440fx-1.4 up to pc-i440fx-1.7"). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 12 1 file changed, 12 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 5065590281.

[PATCH 2/4] hw/i386/pc: Use generated NotifyVmexitOption_str()

2024-03-01 Thread Philippe Mathieu-Daudé
NotifyVmexitOption_str() is QAPI-generated in "qapi/qapi-types-run-state.h", which "sysemu/runstate.h" already includes. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index

[PATCH 3/4] hw/i386/pc: Remove 'host_type' argument from pc_init1()

2024-03-01 Thread Philippe Mathieu-Daudé
All callers use host_type=TYPE_I440FX_PCI_HOST_BRIDGE. Directly use this definition within pc_init1(). Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 0e688e

[PATCH 0/4] hw/i386/pc: Trivial cleanups

2024-03-01 Thread Philippe Mathieu-Daudé
Trivial cleanups, mostly around the 'isapc' machine. Philippe Mathieu-Daudé (4): hw/i386/pc: Remove pc_compat_1_4..1.7[] left over declarations hw/i386/pc: Use generated NotifyVmexitOption_str() hw/i386/pc: Remove 'host_type' argument from pc_init1() hw/i386/pc: Have pc_init_isa() pass a N

[PATCH 4/4] hw/i386/pc: Have pc_init_isa() pass a NULL pci_type argument

2024-03-01 Thread Philippe Mathieu-Daudé
The "isapc" machine only provides an ISA bus, not a PCI one, and doesn't instanciate any i440FX south bridge. Its machine class defines PCMachineClass::pci_enabled = false, and pc_init1() only uses the pci_type argument when pci_enabled is true. Since for this machine the argument is not used, pass

Re: [PATCH] Make some structure static

2024-03-01 Thread Philippe Mathieu-Daudé
On 1/3/24 19:56, Frediano Ziglio wrote: Not used outside C module. Signed-off-by: Frediano Ziglio --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 1/8] target/arm: Move some register related defines to internals.h

2024-03-01 Thread Philippe Mathieu-Daudé
On 1/3/24 19:32, Peter Maydell wrote: cpu.h has a lot of #defines relating to CPU register fields. Most of these aren't actually used outside target/arm code, so there's no point in cluttering up the cpu.h file with them. Move some easy ones to internals.h. Signed-off-by: Peter Maydell --- I wa

Re: [Stable-7.2.10 v1 00/47] Patch Round-up for stable 7.2.10, freeze on 2024-03-02

2024-03-01 Thread Cole Robinson
On 2/28/24 3:35 PM, Michael Tokarev wrote: > The following patches are queued for QEMU stable v7.2.10: > > https://gitlab.com/qemu-project/qemu/-/commits/staging-7.2 > > Patch freeze is 2024-03-02, and the release is planned for > 2024-03-04: > > https://wiki.qemu.org/Planning/7.2 > > Please r

Re: [PATCH 3/8] target/arm: use FIELD macro for CNTHCTL bit definitions

2024-03-01 Thread Philippe Mathieu-Daudé
On 1/3/24 19:32, Peter Maydell wrote: We prefer the FIELD macro over ad-hoc #defines for register bits; switch CNTHCTL to that style before we add any more bits. Signed-off-by: Peter Maydell --- target/arm/internals.h | 19 +-- target/arm/helper.c| 9 - 2 files

Re: [PATCH 8/8] target/arm: Enable FEAT_ECV for 'max' CPU

2024-03-01 Thread Philippe Mathieu-Daudé
On 1/3/24 19:32, Peter Maydell wrote: Enable all FEAT_ECV features on the 'max' CPU. Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 1 + target/arm/tcg/cpu64.c| 1 + 2 files changed, 2 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 0/3] target/arm: Allow compilation without CONFIG_ARM_V7M

2024-03-01 Thread Thomas Huth
On 29/01/2024 09.18, Thomas Huth wrote: We've got a switch to disable v7m code since a long time - but it currently cannot be disabled since linking then fails due to missing functions. But thanks to the clean-ups that have been done during the past years, it's not that difficult anymore to final

Re: [Stable-7.2.10 v1 00/47] Patch Round-up for stable 7.2.10, freeze on 2024-03-02

2024-03-01 Thread Michael Tokarev
01.03.2024 22:04, Cole Robinson wrote: Patch freeze is 2024-03-02, and the release is planned for 2024-03-04: ... Response might be too late, But here's the patches we are still carrying in Fedora 38 7.2.X and the explanations Nah, we've whole day left before the freeze. * abe2c4bdb6 test

Re: [RFC 1/8] virtio/virtio-pci: Handle extra notification data

2024-03-01 Thread Eugenio Perez Martin
On Fri, Mar 1, 2024 at 2:44 PM Jonah Palmer wrote: > > Add support to virtio-pci devices for handling the extra data sent > from the driver to the device when the VIRTIO_F_NOTIFICATION_DATA > transport feature has been negotiated. > > The extra data that's passed to the virtio-pci device when this

Re: [RFC 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA

2024-03-01 Thread Eugenio Perez Martin
On Fri, Mar 1, 2024 at 2:44 PM Jonah Palmer wrote: > > Prevent ioeventfd from being enabled/disabled when a virtio-pci > device has negotiated the VIRTIO_F_NOTIFICATION_DATA transport > feature. > > Due to ioeventfd not being able to carry the extra data associated with > this feature, the ioevent

Re: [PATCH] Make some structure static

2024-03-01 Thread Richard Henderson
On 3/1/24 08:56, Frediano Ziglio wrote: Not used outside C module. Signed-off-by: Frediano Ziglio --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [RFC 1/8] virtio/virtio-pci: Handle extra notification data

2024-03-01 Thread Eugenio Perez Martin
On Fri, Mar 1, 2024 at 2:44 PM Jonah Palmer wrote: > > Add support to virtio-pci devices for handling the extra data sent > from the driver to the device when the VIRTIO_F_NOTIFICATION_DATA > transport feature has been negotiated. > > The extra data that's passed to the virtio-pci device when this

Re: [RFC 7/8] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits

2024-03-01 Thread Eugenio Perez Martin
On Fri, Mar 1, 2024 at 2:44 PM Jonah Palmer wrote: > > Add support for the VIRTIO_F_NOTIFICATION_DATA feature across a variety > of vhost devices. > > The inclusion of VIRTIO_F_NOTIFICATION_DATA in the feature bits arrays > for these devices ensures that the backend is capable of offering and > pr

Re: [RFC 8/8] virtio: Add VIRTIO_F_NOTIFICATION_DATA property definition

2024-03-01 Thread Eugenio Perez Martin
On Fri, Mar 1, 2024 at 2:44 PM Jonah Palmer wrote: > > Extend the virtio device property definitions to include the > VIRTIO_F_NOTIFICATION_DATA feature. > > The default state of this feature is disabled, allowing it to be > explicitly enabled where it's supported. > Reviewed-by: Eugenio Pérez

Re: [PATCH 1/4] hw/i386/pc: Remove pc_compat_1_4..1.7[] left over declarations

2024-03-01 Thread Richard Henderson
On 3/1/24 08:59, Philippe Mathieu-Daudé wrote: These definitions were removed in commit ea985d235b ("pc_piix: remove pc-i440fx-1.4 up to pc-i440fx-1.7"). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 12 1 file changed, 12 deletions(-) Reviewed-by: Richard He

Re: [PATCH 2/4] hw/i386/pc: Use generated NotifyVmexitOption_str()

2024-03-01 Thread Richard Henderson
On 3/1/24 08:59, Philippe Mathieu-Daudé wrote: NotifyVmexitOption_str() is QAPI-generated in "qapi/qapi-types-run-state.h", which "sysemu/runstate.h" already includes. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Review

Re: [RFC 0/8] virtio,vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-01 Thread Eugenio Perez Martin
Hi Wentao / Rick / Xinying Yu, Would it work for you to test this series on your use cases, so we make sure everything works as expected? Thanks! On Fri, Mar 1, 2024 at 2:44 PM Jonah Palmer wrote: > > The goal of these patches are to add support to a variety of virtio and > vhost devices for th

Re: [PATCH 3/4] hw/i386/pc: Remove 'host_type' argument from pc_init1()

2024-03-01 Thread Richard Henderson
On 3/1/24 08:59, Philippe Mathieu-Daudé wrote: All callers use host_type=TYPE_I440FX_PCI_HOST_BRIDGE. Directly use this definition within pc_init1(). Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) Reviewed-by:

[PATCH v3 6/6] target/arm: Do memory type alignment check when translation enabled

2024-03-01 Thread Richard Henderson
If translation is enabled, and the PTE memory type is Device, enable checking alignment via TLB_CHECK_ALIGNMENT. While the check is done later than it should be per the ARM, it's better than not performing the check at all. Signed-off-by: Richard Henderson --- target/arm/ptw.c | 32

[PATCH v3 0/6] target/arm: Do memory alignment check for device memory

2024-03-01 Thread Richard Henderson
v1: https://lore.kernel.org/qemu-devel/20230223204342.1093632-1-richard.hender...@linaro.org/ v2: https://lore.kernel.org/qemu-devel/20230621121902.1392277-1-richard.hender...@linaro.org/ Some of the v2 patch set was merged last June, but the rest languished. No substantive changes from v2; only

[PATCH v3 2/6] exec/memattrs: Remove target_tlb_bit*

2024-03-01 Thread Richard Henderson
These fields are no longer used since 937f224559. Target specific extensions to the page tables should be done with TARGET_PAGE_ENTRY_EXTRA. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/memattrs.h | 10 -- 1 file changed, 10 deletions(-) diff --

[PATCH v3 1/6] target/arm: Support 32-byte alignment in pow2_align

2024-03-01 Thread Richard Henderson
Now that we have removed TARGET_PAGE_BITS_MIN-6 from TLB_FLAGS_MASK, we can test for 32-byte alignment. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/translate.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) d

[PATCH v3 3/6] accel/tcg: Add tlb_fill_flags to CPUTLBEntryFull

2024-03-01 Thread Richard Henderson
Allow the target to set tlb flags to apply to all of the comparators. Remove MemTxAttrs.byte_swap, as the bit is not relevant to memory transactions, only the page mapping. Adjust target/sparc to set TLB_BSWAP directly. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- i

[PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-03-01 Thread Richard Henderson
If translation is disabled, the default memory type is Device, which requires alignment checking. This is more optimally done early via the MemOp given to the TCG memory operation. Reviewed-by: Philippe Mathieu-Daudé Reported-by: Idan Horowitz Resolves: https://gitlab.com/qemu-project/qemu/-/is

[PATCH v3 4/6] accel/tcg: Add TLB_CHECK_ALIGNED

2024-03-01 Thread Richard Henderson
This creates a per-page method for checking of alignment. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 4 +++- accel/tcg/cputlb.c | 30 +++--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/includ

Re: [PATCH] Make some structure static

2024-03-01 Thread Michael Tokarev
01.03.2024 21:56, Frediano Ziglio wrote: Not used outside C module. Please add a sensible subject prefix, like "hw/vfio/pci.c: ". With that, Revieved-by: Michael Tokarev This is a good candidate for trivial-patches@ too (Cc'd). /mjt Signed-off-by: Frediano Ziglio --- hw/vfio/pci.c | 4

Re: [PATCH 1/8] target/arm: Move some register related defines to internals.h

2024-03-01 Thread Richard Henderson
On 3/1/24 08:32, Peter Maydell wrote: cpu.h has a lot of #defines relating to CPU register fields. Most of these aren't actually used outside target/arm code, so there's no point in cluttering up the cpu.h file with them. Move some easy ones to internals.h. Signed-off-by: Peter Maydell --- I wan

Re: [PATCH 2/8] target/arm: Timer _EL02 registers UNDEF for E2H == 0

2024-03-01 Thread Richard Henderson
On 3/1/24 08:32, Peter Maydell wrote: The timer _EL02 registers should UNDEF for invalid accesses from EL2 or EL3 when HCR_EL2.E2H == 0, not take a cp access trap. We were delivering the exception to EL2 with the wrong syndrome. Signed-off-by: Peter Maydell --- target/arm/helper.c | 2 +- 1

Re: [PATCH 3/8] target/arm: use FIELD macro for CNTHCTL bit definitions

2024-03-01 Thread Richard Henderson
On 3/1/24 08:32, Peter Maydell wrote: We prefer the FIELD macro over ad-hoc #defines for register bits; switch CNTHCTL to that style before we add any more bits. Signed-off-by: Peter Maydell --- target/arm/internals.h | 19 +-- target/arm/helper.c| 9 - 2 files c

Re: [PATCH 4/8] target/arm: Don't allow RES0 CNTHCTL_EL2 bits to be written

2024-03-01 Thread Richard Henderson
On 3/1/24 08:32, Peter Maydell wrote: Don't allow the guest to write CNTHCTL_EL2 bits which don't exist. This is not strictly architecturally required, but it is how we've tended to implement registers more recently. In particular, bits [19:18] are only present with FEAT_RME, and bits [17:12] wi

Re: [PATCH 3/8] target/arm: use FIELD macro for CNTHCTL bit definitions

2024-03-01 Thread Richard Henderson
On 3/1/24 08:32, Peter Maydell wrote: We prefer the FIELD macro over ad-hoc #defines for register bits; switch CNTHCTL to that style before we add any more bits. Signed-off-by: Peter Maydell --- target/arm/internals.h | 19 +-- target/arm/helper.c| 9 - 2 files

Re: [PATCH 5/8] target/arm: Implement new FEAT_ECV trap bits

2024-03-01 Thread Richard Henderson
On 3/1/24 08:32, Peter Maydell wrote: The functionality defined by ID_AA64MMFR0_EL1.ECV == 1 is: * four new trap bits for various counter and timer registers * the CNTHCTL_EL2.EVNTIS and CNTKCTL_EL1.EVNTIS bits which control scaling of the event stream. This is a no-op for us, because we

Re: [PATCH 6/8] target/arm: Define CNTPCTSS_EL0 and CNTVCTSS_EL0

2024-03-01 Thread Richard Henderson
On 3/1/24 08:32, Peter Maydell wrote: For FEAT_ECV, new registers CNTPCTSS_EL0 and CNTVCTSS_EL0 are defined, which are "self-synchronized" views of the physical and virtual counts as seen in the CNTPCT_EL0 and CNTVCT_EL0 registers (meaning that no barriers are needed around accesses to them to en

Re: [PATCH 7/8] target/arm: Implement FEAT_ECV CNTPOFF_EL2 handling

2024-03-01 Thread Richard Henderson
On 3/1/24 08:32, Peter Maydell wrote: +static uint64_t gt_phys_raw_cnt_offset(CPUARMState *env) +{ +if ((env->cp15.scr_el3 & SCR_ECVEN) && +FIELD_EX64(env->cp15.cnthctl_el2, CNTHCTL, ECV) && +arm_is_el2_enabled(env) && +(arm_hcr_el2_eff(env) & (HCR_E2H | HCR_TGE)) != (

Re: [PATCH 8/8] target/arm: Enable FEAT_ECV for 'max' CPU

2024-03-01 Thread Richard Henderson
On 3/1/24 08:32, Peter Maydell wrote: Enable all FEAT_ECV features on the 'max' CPU. Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 1 + target/arm/tcg/cpu64.c| 1 + 2 files changed, 2 insertions(+) Reviewed-by: Richard Henderson r~

Re: [External] Re: [PATCH v4 2/7] migration/multifd: Implement zero page transmission on the multifd thread.

2024-03-01 Thread Hao Xiang
On Thu, Feb 29, 2024 at 11:28 PM Markus Armbruster wrote: > > Hao Xiang writes: > > > 1. Add zero_pages field in MultiFDPacket_t. > > 2. Implements the zero page detection and handling on the multifd > > threads for non-compression, zlib and zstd compression backends. > > 3. Added a new value 'mu

[PATCH 05/60] linux-user/elfload: Latch errno before cleanup in elf_core_dump

2024-03-01 Thread Richard Henderson
On the off-chance that one of the cleanup functions changes errno, latch the errno that we want to return beforehand. Flush errno to 0 upon success, rather than at the beginning. No need to avoid negation of 0. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 12 +--- 1 file

[PATCH 03/60] linux-user/elfload: Tidy fill_note_info and struct elf_note_info

2024-03-01 Thread Richard Henderson
In fill_note_info, there were unnecessary checks for success of g_new/g_malloc. But these structures do not need to be dyamically allocated at all, and can in fact be statically allocated within the parent structure. This removes all error paths from fill_note_info, so change the return type to v

[PATCH 14/60] linux-user/elfload: Unprotect regions before core dump

2024-03-01 Thread Richard Henderson
By unprotecting regions, we re-instate writability and unify regions that have been split, which may reduce the total number of regions. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/linux-user/elfload.c b/li

[PATCH 01/60] linux-user/elfload: Disable core dump if getrlimit fails

2024-03-01 Thread Richard Henderson
Do not dump core at all if getrlimit fails; this ensures that dumpsize is valid throughout the function, not just for the initial test vs rlim_cur. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- linux-user/elfload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH 15/60] tcg/aarch64: Apple does not align __int128_t in even registers

2024-03-01 Thread Richard Henderson
>From >https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms When passing an argument with 16-byte alignment in integer registers, Apple platforms allow the argument to start in an odd-numbered xN register. The standard ABI requires it to begin in an even-nu

[PATCH 25/60] linux-user: Remove qemu_host_page_size from elf_core_dump

2024-03-01 Thread Richard Henderson
Used only once in wmr_page_unprotect_regions. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index d2919a411d..cc2013c7b4 100644 --- a/linux-user/elfload.c +++ b/linux-user/

<    1   2   3   4   >