Re: [PATCH v3 2/3] s390x/pv: Introduce a s390_pv_check() helper for runtime

2023-01-17 Thread Thomas Huth
On 16/01/2023 18.46, Cédric Le Goater wrote: From: Cédric Le Goater If a secure kernel is started in a non-protected VM, the OS will hang during boot without giving a proper error message to the user. Perform the checks on Confidential Guest support at runtime with an helper called from the se

Re: [PATCH v2 1/5] hw/arm: Extract at24c_eeprom_init helper from Aspeed and Nuvoton boards

2023-01-17 Thread Philippe Mathieu-Daudé
On 17/1/23 00:56, Peter Delevoryas wrote: This helper is useful in board initialization because lets users initialize and realize an EEPROM on an I2C bus with a single function call. Signed-off-by: Peter Delevoryas --- hw/arm/aspeed.c | 10 +- hw/arm/npcm7xx_boards.c

[PATCH 2/4] libqtest: split qtest_spawn_qemu function

2023-01-17 Thread Paolo Bonzini
In order to create a function that allows testing of invalid command lines, extract the parts of qtest_init_without_qmp_handshake that do not require any successful set up of sockets. Signed-off-by: Paolo Bonzini --- tests/qtest/libqtest.c | 103 ++--- 1 file

[PATCH 0/4] vl: avoid SIGSEGV on invalid [accel] configuration

2023-01-17 Thread Paolo Bonzini
While QEMU catches invalid -accel command line options: $ qemu-system-x86_64 -accel foo=bar Accelerators supported in QEMU binary: tcg xen kvm the same is not true of configuration files, which instead crash. Patch 1 is the trivial fix, but writing a test is a bit more comple

[PATCH 3/4] libqtest: ensure waitpid() is only called once

2023-01-17 Thread Paolo Bonzini
If a test aborts after qtest_wait_qemu() is called, the SIGABRT hooks are still in place and waitpid() is called again. The second time it is called, the process does not exist anymore and the system call fails. Move the s->qemu_pid = -1 assignment to qtest_wait_qemu() to make it idempotent, and

Re: [PATCH v2 4/5] hw/arm/aspeed: Add aspeed_eeprom.c

2023-01-17 Thread Philippe Mathieu-Daudé
On 17/1/23 08:39, Cédric Le Goater wrote: On 1/17/23 00:56, Peter Delevoryas wrote: - Create aspeed_eeprom.c and aspeed_eeprom.h - Include aspeed_eeprom.c in CONFIG_ASPEED meson source files - Include aspeed_eeprom.h in aspeed.c - Add fby35_bmc_fruid data - Use new at24c_eeprom_init_rom helper t

[PATCH 4/4] readconfig-test: add test for accelerator configuration

2023-01-17 Thread Paolo Bonzini
Test that invalid configurations do not cause a SIGSEGV, and cover a valid configuration as well. Signed-off-by: Paolo Bonzini --- tests/qtest/libqtest.c| 28 +- tests/qtest/libqtest.h| 12 ++ tests/qtest/readconfig-test.c | 45

[PATCH 1/4] vl: catch [accel] entry without accelerator

2023-01-17 Thread Paolo Bonzini
While QEMU catches invalid -accel command line options: $ qemu-system-x86_64 -accel foo=bar Accelerators supported in QEMU binary: tcg xen kvm the same is not true of configuration files, which instead crash. Avoid a SIGSEGV and return an error instead. Reported-by: Thomas Hu

Re: [PATCH 0/2] target/i386: Fix BEXTR instruction [#1372]

2023-01-17 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH 1/4] vl: catch [accel] entry without accelerator

2023-01-17 Thread Philippe Mathieu-Daudé
On 17/1/23 09:07, Paolo Bonzini wrote: While QEMU catches invalid -accel command line options: $ qemu-system-x86_64 -accel foo=bar Accelerators supported in QEMU binary: tcg xen kvm the same is not true of configuration files, which instead crash. Avoid a SIGSEGV and re

Re: [PATCH] target/i386: Fix C flag for BLSI, BLSMSK, BLSR

2023-01-17 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2 01/21] hw/block: Rename TYPE_PFLASH_CFI02 'width' property as 'device-width'

2023-01-17 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 16/1/23 07:40, Markus Armbruster wrote: >> Peter Maydell writes: >> >>> On Mon, 9 Jan 2023 at 14:19, Philippe Mathieu-Daudé >>> wrote: On 9/1/23 14:33, BALATON Zoltan wrote: > On Mon, 9 Jan 2023, Philippe Mathieu-Daudé wrote: >> Use the sa

Re: [PATCH 2/4] libqtest: split qtest_spawn_qemu function

2023-01-17 Thread Philippe Mathieu-Daudé
On 17/1/23 09:07, Paolo Bonzini wrote: In order to create a function that allows testing of invalid command lines, extract the parts of qtest_init_without_qmp_handshake that do not require any successful set up of sockets. Signed-off-by: Paolo Bonzini --- tests/qtest/libqtest.c | 103

Re: [PATCH v3 0/6] qemu/bswap: Use compiler __builtin_bswap()

2023-01-17 Thread Philippe Mathieu-Daudé
On 13/1/23 08:05, Philippe Mathieu-Daudé wrote: On 13/1/23 02:05, Richard Henderson wrote: On 1/11/23 08:31, Philippe Mathieu-Daudé wrote: Implement Richard's suggestion to use __builtin_bswap(). Convert to __builtin_bswap() one patch per OS to simplify maintainers review. Since v2: - Rebased

Re: [PATCH v3 2/3] s390x/pv: Introduce a s390_pv_check() helper for runtime

2023-01-17 Thread Janosch Frank
On 1/16/23 18:46, Cédric Le Goater wrote: From: Cédric Le Goater If a secure kernel is started in a non-protected VM, the OS will hang during boot without giving a proper error message to the user. Didn't we establish that you were missing the IOMMU flag so this statement isn't correct anymo

Re: [PATCH v2 2/2] s390x/pv: Add support for asynchronous teardown for reboot

2023-01-17 Thread Thomas Huth
On 05/01/2023 16.50, Claudio Imbrenda wrote: This patch adds support for the asynchronous teardown for reboot for protected VMs. When attempting to tear down a protected VM, try to use the new asynchronous interface first. If that fails, fall back to the classic synchronous one. The asynchronou

Re: [PATCH v3 2/3] s390x/pv: Introduce a s390_pv_check() helper for runtime

2023-01-17 Thread Cédric Le Goater
On 1/17/23 09:40, Janosch Frank wrote: On 1/16/23 18:46, Cédric Le Goater wrote: From: Cédric Le Goater If a secure kernel is started in a non-protected VM, the OS will hang during boot without giving a proper error message to the user. Didn't we establish that you were missing the IOMMU fla

Re: [PATCH v3 2/3] s390x/pv: Introduce a s390_pv_check() helper for runtime

2023-01-17 Thread Thomas Huth
On 17/01/2023 09.40, Janosch Frank wrote: On 1/16/23 18:46, Cédric Le Goater wrote: From: Cédric Le Goater If a secure kernel is started in a non-protected VM, the OS will hang during boot without giving a proper error message to the user. Didn't we establish that you were missing the IOMMU

[RFC PATCH 1/4] lcitool: update submodule

2023-01-17 Thread Paolo Bonzini
Update lcitool to the latest submodule, which has improvements that allow usage as a library. Signed-off-by: Paolo Bonzini --- tests/lcitool/libvirt-ci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci index a29b1c9925ed..d145

[RFC PATCH 2/4] lcitool: use libvirt-ci as library

2023-01-17 Thread Paolo Bonzini
Using the lcitool package as a library will make it possible to customize more of the process, for example by introducing custom mappings. Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/cirrus/freebsd-12.vars | 6 +- .gitlab-ci.d/cirrus/freebsd-13.vars | 6 +- .gitlab-ci.d/c

[RFC PATCH 0/4] Update CentOS and OpenSUSE CI to Python >=3.7

2023-01-17 Thread Paolo Bonzini
QEMU build and test scripts would like to use some new features that were added to Python 3.7. Useful additions include removing the need for OrderedDict, improved handling of default text encoding, postponed evaluation of type annotations, and improvements to asyncio. Using new features that wer

[RFC PATCH 4/4] ci, docker: update CentOS and OpenSUSE Python to non-EOL versions

2023-01-17 Thread Paolo Bonzini
Python 3.6 is at end-of-life. Update the libvirt-ci module to a version that supports overrides for targets and package mappings; this way, QEMU can use the newer versions provided by CentOS 8 (Python 3.8) and OpenSUSE 15.3 (Python 3.9). One unexpected issue is that sphinx-rtd-theme does not want

[RFC PATCH 3/4] lcitool: allow overriding package mappings and target facts

2023-01-17 Thread Paolo Bonzini
lcitool has generally catered to the Libvirt's needs in terms of package versions, which are pretty conservative. For example, lcitool is hardcoding a version of Meson equal to 0.56. QEMU on the other hand has different needs since some features were added to Meson for the project's benefit in vers

Re: [PATCH v2 4/5] hw/arm/aspeed: Add aspeed_eeprom.c

2023-01-17 Thread Cédric Le Goater
+#ifndef ASPEED_EEPROM_H +#define ASPEED_EEPROM_H + +#include "qemu/osdep.h" + +extern const uint8_t fby35_bmc_fruid[]; may be define the array with an explicit size to avoid the size variable ? I don't see any good solution.  /* Return rom_size and set rombufptr, or return 0 */  size_t aspe

Re: [PATCH v3 2/3] s390x/pv: Introduce a s390_pv_check() helper for runtime

2023-01-17 Thread Janosch Frank
On 1/17/23 10:09, Thomas Huth wrote: On 17/01/2023 09.40, Janosch Frank wrote: On 1/16/23 18:46, Cédric Le Goater wrote: From: Cédric Le Goater If a secure kernel is started in a non-protected VM, the OS will hang during boot without giving a proper error message to the user. Didn't we esta

Re: [PATCH 1/3] tests/tcg: Use SIGKILL for timeout

2023-01-17 Thread Alex Bennée
Richard Henderson writes: > There are some tests for which SIGTERM appears insufficient. > > Signed-off-by: Richard Henderson > --- > tests/tcg/Makefile.target | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target >

Re: [PATCH v7 08/51] xen-platform: allow its creation with XEN_EMULATE mode

2023-01-17 Thread Paul Durrant
On 16/01/2023 21:57, David Woodhouse wrote: From: Joao Martins The only thing we need to handle on KVM side is to change the pfn from R/W to R/O. Signed-off-by: Joao Martins Signed-off-by: David Woodhouse --- hw/i386/xen/meson.build| 5 - hw/i386/xen/xen_platform.c | 39 +

Re: [PATCH v7 14/51] i386/xen: add pc_machine_kvm_type to initialize XEN_EMULATE mode

2023-01-17 Thread Paul Durrant
On 16/01/2023 21:57, David Woodhouse wrote: From: David Woodhouse The xen_overlay device (and later similar devices for event channels and grant tables) need to be instantiated. Do this from a kvm_type method on the PC machine derivatives, since KVM is only way to support Xen emulation for now.

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-17 Thread Maxime Coquelin
Hi Yajun, On 1/16/23 08:14, Yajun Wu wrote: Not quite sure about the whole picture. Seems while qemu waiting response of vhost_user_get_status, dpdk send out VHOST_USER_SLAVE_IOTLB_MSG and trigger qemu function vhost_backend_update_device_iotlb. Qemu wait on reply of VHOST_USER_IOTLB_MSG but

Re: [PATCH v14 01/11] s390x/cpu topology: adding s390 specificities to CPU topology

2023-01-17 Thread Pierre Morel
On 1/16/23 21:34, Nina Schoetterl-Glausch wrote: On Mon, 2023-01-16 at 18:28 +0100, Pierre Morel wrote: On 1/13/23 17:58, Nina Schoetterl-Glausch wrote: On Thu, 2023-01-05 at 15:53 +0100, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU

Re: [PATCH v7 23/51] i386/xen: implement HYPERVISOR_event_channel_op

2023-01-17 Thread Paul Durrant
On 16/01/2023 21:57, David Woodhouse wrote: From: Joao Martins Additionally set XEN_INTERFACE_VERSION to most recent in order to exercise the "new" event_channel_op. Signed-off-by: Joao Martins [dwmw2: Ditch event_channel_op_compat which was never available to HVM guests] Signed-off-by: David

Re: [RFC v2 11/13] vdpa: add vdpa net migration state notifier

2023-01-17 Thread Dr. David Alan Gilbert
* Eugenio Perez Martin (epere...@redhat.com) wrote: > On Fri, Jan 13, 2023 at 5:55 AM Jason Wang wrote: > > > > On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez wrote: > > > > > > This allows net to restart the device backend to configure SVQ on it. > > > > > > Ideally, these changes should not be n

Re: [PATCH v7 23/51] i386/xen: implement HYPERVISOR_event_channel_op

2023-01-17 Thread David Woodhouse
On 17 January 2023 09:53:00 GMT, Paul Durrant wrote: >On 16/01/2023 21:57, David Woodhouse wrote: >> From: Joao Martins >> >> Additionally set XEN_INTERFACE_VERSION to most recent in order to >> exercise the "new" event_channel_op. >> >> Signed-off-by: Joao Martins >> [dwmw2: Ditch event_ch

Re: [PATCH v5] tests/qtest: netdev: test stream and dgram backends

2023-01-17 Thread Thomas Huth
On 16/01/2023 09.40, Thomas Huth wrote: On 16/01/2023 09.29, Laurent Vivier wrote: ping On 1/5/23 10:37, Laurent Vivier wrote: Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- Notes: v5:    - disable test_stream_fd and  test_dgram_fd on windows as socketpair()  

Re: [PATCH v7 26/51] hw/xen: Add xen_evtchn device for event channel emulation

2023-01-17 Thread Paul Durrant
On 16/01/2023 21:57, David Woodhouse wrote: From: David Woodhouse Include basic support for setting HVM_PARAM_CALLBACK_IRQ to the global vector method HVM_PARAM_CALLBACK_TYPE_VECTOR, which is handled in-kernel by raising the vector whenever the vCPU's vcpu_info->evtchn_upcall_pending flag is se

Re: [PATCH v7 38/51] i386/xen: add monitor commands to test event injection

2023-01-17 Thread Markus Armbruster
David Woodhouse writes: > From: Joao Martins > > Specifically add listing, injection of event channels. > > Signed-off-by: Joao Martins > Signed-off-by: David Woodhouse > Acked-by: Dr. David Alan Gilbert > --- > hmp-commands.hx | 29 > hw/i386/kvm/meson.build | 4 ++ >

RE: [PATCH v2 00/13] Introduce igb

2023-01-17 Thread Sriram Yagnaraman
> -Original Message- > From: Jason Wang > Sent: Monday, 16 January 2023 09:01 > To: qemu-devel > Subject: Re: [PATCH v2 00/13] Introduce igb > > On Sat, Jan 14, 2023 at 12:10 PM Akihiko Odaki > wrote: > > > > Based-on: <20230114035919.35251-1-akihiko.od...@daynix.com> > > ([PATCH 00/19]

Re: [PATCH v2 2/2] s390x/pv: Add support for asynchronous teardown for reboot

2023-01-17 Thread Claudio Imbrenda
On Tue, 17 Jan 2023 09:53:46 +0100 Thomas Huth wrote: [...] > > +static void *s390_pv_do_unprot_async_fn(void *p) > > +{ > > + s390_pv_cmd_exit(KVM_PV_ASYNC_CLEANUP_PERFORM, NULL); > > + return NULL; > > +} > > + > > +bool s390_pv_vm_try_disable_async(void) > > +{ > > +QemuThread *t;

Re: [PATCH v7 26/51] hw/xen: Add xen_evtchn device for event channel emulation

2023-01-17 Thread David Woodhouse
On Tue, 2023-01-17 at 10:00 +, Paul Durrant wrote: > > > @@ -712,6 +717,11 @@ static int kvm_xen_soft_reset(void) > >    CPUState *cpu; > >    int err; > >    > > +    err = xen_evtchn_set_callback_param(0); > > Doesn't this always result in -ENOSYS? Hm? Even at this point in the s

Re: [PATCH v2] tests/qtest/qom-test: Do not print tested properties by default

2023-01-17 Thread Peter Maydell
On Mon, 16 Jan 2023 at 16:55, Peter Maydell wrote: > > On Thu, 15 Dec 2022 at 15:30, Thomas Huth wrote: > > > > We're still running into the problem that some logs are cut in the > > gitlab-CI since they got too big. The biggest part of the log is > > still the output of the qom-test. Let's stop

Re: [PULL 0/4] M68k next patches

2023-01-17 Thread Peter Maydell
On Mon, 16 Jan 2023 at 09:19, Laurent Vivier wrote: > > The following changes since commit 886fb67020e32ce6a2cf7049c6f017acf1f0d69a: > > Merge tag 'pull-target-arm-20230113' of > https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-01-13 > 14:12:43 +) > > are available in the

Re: [RFC v2 11/13] vdpa: add vdpa net migration state notifier

2023-01-17 Thread Eugenio Perez Martin
On Tue, Jan 17, 2023 at 10:58 AM Dr. David Alan Gilbert wrote: > > * Eugenio Perez Martin (epere...@redhat.com) wrote: > > On Fri, Jan 13, 2023 at 5:55 AM Jason Wang wrote: > > > > > > On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez wrote: > > > > > > > > This allows net to restart the device back

Re: [PATCH 0/2] target/arm: Look up ARMCPRegInfo at runtime

2023-01-17 Thread Peter Maydell
On Mon, 16 Jan 2023 at 20:16, Richard Henderson wrote: > > Ping. What did you think of my suggestion in the other thread of hashing the info we need to determine the cpreg set (ID regs, feature flags, etc) and using that to look up whether we've already created a cpreg hashtable for this config?

Re: [PATCH v2] tests/qtest/qom-test: Do not print tested properties by default

2023-01-17 Thread Thomas Huth
On 17/01/2023 11.23, Peter Maydell wrote: On Mon, 16 Jan 2023 at 16:55, Peter Maydell wrote: On Thu, 15 Dec 2022 at 15:30, Thomas Huth wrote: We're still running into the problem that some logs are cut in the gitlab-CI since they got too big. The biggest part of the log is still the output

Re: [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-17 Thread Igor Mammedov
On Mon, 16 Jan 2023 13:00:53 -0500 Chuck Zmudzinski wrote: > On 1/16/23 10:33, Igor Mammedov wrote: > > On Fri, 13 Jan 2023 16:31:26 -0500 > > Chuck Zmudzinski wrote: > > > >> On 1/13/23 4:33 AM, Igor Mammedov wrote: > >> > On Thu, 12 Jan 2023 23:14:26 -0500 > >> > Chuck Zmudzinski wrote:

Re: [PATCH v7 38/51] i386/xen: add monitor commands to test event injection

2023-01-17 Thread David Woodhouse
Hi Markus, thanks for the review. On Tue, 2023-01-17 at 11:08 +0100, Markus Armbrster wrote: > David Woodhouse writes: > > @@ -1059,3 +1063,137 @@ int xen_evtchn_send_op(struct evtchn_send *send) > > return ret; > >  } > >   > > +static const char *type_names[] = { > > +    "closed", > > +  

Re: [PATCH 1/5] migration: Updated QAPI format for 'migrate' qemu monitor command

2023-01-17 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Mon, Dec 26, 2022 at 05:33:25AM +, Het Gala wrote: > > From: Author Het Gala > > > > Existing 'migrate' QAPI design enforces transport mechanism, ip address > > of destination interface and corresponding port number in the form > > of a u

Re: [PATCH v2] tests/qtest/qom-test: Do not print tested properties by default

2023-01-17 Thread Daniel P . Berrangé
On Tue, Jan 17, 2023 at 11:32:42AM +0100, Thomas Huth wrote: > On 17/01/2023 11.23, Peter Maydell wrote: > > On Mon, 16 Jan 2023 at 16:55, Peter Maydell > > wrote: > > > > > > On Thu, 15 Dec 2022 at 15:30, Thomas Huth wrote: > > > > > > > > We're still running into the problem that some logs a

Re: [PATCH 1/5] migration: Updated QAPI format for 'migrate' qemu monitor command

2023-01-17 Thread Dr. David Alan Gilbert
* Het Gala (het.g...@nutanix.com) wrote: > From: Author Het Gala > > Existing 'migrate' QAPI design enforces transport mechanism, ip address > of destination interface and corresponding port number in the form > of a unified string 'uri' parameter. This scheme does seem to have an issue > in it,

Re: [PATCH 0/5] migration: Modified 'migrate' QAPI command for migration

2023-01-17 Thread Claudio Fontana
Hi, On 12/26/22 06:33, Het Gala wrote: > Current QAPI 'migrate' command design (for initiating a migration > stream) contains information regarding different migrate transport mechanism > (tcp / unix / exec), dest-host IP address, and binding port number in form of > a string. Thus the design does

[PATCH] vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check

2023-01-17 Thread Eugenio Pérez
VHOST_BACKEND_F_IOTLB_ASID is the feature bit, not the bitmask. Since the device under test also provided VHOST_BACKEND_F_IOTLB_MSG_V2 and VHOST_BACKEND_F_IOTLB_BATCH, this went unnoticed. Fixes: c1a1008685 ("vdpa: always start CVQ in SVQ mode if possible") Signed-off-by: Eugenio Pérez Acked-by:

Re: [PATCH v5] tests/qtest: netdev: test stream and dgram backends

2023-01-17 Thread Laurent Vivier
On 1/17/23 11:00, Thomas Huth wrote: On 16/01/2023 09.40, Thomas Huth wrote: On 16/01/2023 09.29, Laurent Vivier wrote: ping On 1/5/23 10:37, Laurent Vivier wrote: Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- Notes: v5:    - disable test_stream_fd and  test_dgram

Re: [PATCH v7 26/51] hw/xen: Add xen_evtchn device for event channel emulation

2023-01-17 Thread Paul Durrant
On 17/01/2023 10:23, David Woodhouse wrote: On Tue, 2023-01-17 at 10:00 +, Paul Durrant wrote: @@ -712,6 +717,11 @@ static int kvm_xen_soft_reset(void)    CPUState *cpu;    int err; +    err = xen_evtchn_set_callback_param(0); Doesn't this always result in -ENOSYS? Hm?

Re: [PATCH v7 26/51] hw/xen: Add xen_evtchn device for event channel emulation

2023-01-17 Thread David Woodhouse
On Tue, 2023-01-17 at 10:56 +, Paul Durrant wrote: > > I'm just having a hard time seeing why passing 0 to > xen_evtchn_set_callback_param() does anything useful... > > +    switch (param >> CALLBACK_VIA_TYPE_SHIFT) { > +    case HVM_PARAM_CALLBACK_TYPE_VECTOR: { > +    struct kvm_xen_hv

Re: [PATCH v5] tests/qtest: netdev: test stream and dgram backends

2023-01-17 Thread Laurent Vivier
On 1/17/23 11:00, Thomas Huth wrote: On 16/01/2023 09.40, Thomas Huth wrote: On 16/01/2023 09.29, Laurent Vivier wrote: ping On 1/5/23 10:37, Laurent Vivier wrote: Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- Notes: v5:    - disable test_stream_fd and  test_dgram

Re: [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-17 Thread Igor Mammedov
On Mon, 16 Jan 2023 13:00:53 -0500 Chuck Zmudzinski wrote: > On 1/16/23 10:33, Igor Mammedov wrote: > > On Fri, 13 Jan 2023 16:31:26 -0500 > > Chuck Zmudzinski wrote: > > > >> On 1/13/23 4:33 AM, Igor Mammedov wrote: > >> > On Thu, 12 Jan 2023 23:14:26 -0500 > >> > Chuck Zmudzinski wrote:

Re: [PATCH v7 26/51] hw/xen: Add xen_evtchn device for event channel emulation

2023-01-17 Thread Paul Durrant
On 17/01/2023 11:02, David Woodhouse wrote: On Tue, 2023-01-17 at 10:56 +, Paul Durrant wrote: I'm just having a hard time seeing why passing 0 to xen_evtchn_set_callback_param() does anything useful... +    switch (param >> CALLBACK_VIA_TYPE_SHIFT) { +    case HVM_PARAM_CALLBACK_TYPE_VECT

Re: [PATCH v7 27/51] i386/xen: Add support for Xen event channel delivery to vCPU

2023-01-17 Thread Paul Durrant
On 16/01/2023 21:57, David Woodhouse wrote: From: David Woodhouse The kvm_xen_inject_vcpu_callback_vector() function will either deliver the per-vCPU local APIC vector (as an MSI), or just kick the vCPU out of the kernel to trigger KVM's automatic delivery of the global vector. Support for asse

Re: [PATCH v2] tests/qtest/qom-test: Do not print tested properties by default

2023-01-17 Thread Peter Maydell
On Tue, 17 Jan 2023 at 10:44, Daniel P. Berrangé wrote: > Something random that looks like bad text data > > ▶ 166/619 /ptimer/oneshot > policy=no_immediate_...snip� I don't understand this one. The string comes from

Re: [PATCH v5] tests/qtest: netdev: test stream and dgram backends

2023-01-17 Thread Thomas Huth
On 17/01/2023 11.53, Laurent Vivier wrote: On 1/17/23 11:00, Thomas Huth wrote: On 16/01/2023 09.40, Thomas Huth wrote: On 16/01/2023 09.29, Laurent Vivier wrote: ping On 1/5/23 10:37, Laurent Vivier wrote: Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- Notes: v5:    

[PATCH v5 3/8] migration/savevm: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-17 Thread David Hildenbrand
For virtio-mem, we want to have the plugged/unplugged state of memory blocks available before migrating any actual RAM content, and perform sanity checks before touching anything on the destination. This information is immutable on the migration source while migration is active, We want to use thi

[PATCH v5 8/8] virtio-mem: Proper support for preallocation with migration

2023-01-17 Thread David Hildenbrand
Ordinary memory preallocation runs when QEMU starts up and creates the memory backends, before processing the incoming migration stream. With virtio-mem, we don't know which memory blocks to preallocate before migration started. Now that we migrate the virtio-mem bitmap early, before migrating any

[PATCH v5 1/8] migration/savevm: Move more savevm handling into vmstate_save()

2023-01-17 Thread David Hildenbrand
Let's move more code into vmstate_save(), reducing code duplication and preparing for reuse of vmstate_save() in qemu_savevm_state_setup(). We have to move vmstate_save() to make the compiler happy. We'll now also trace from qemu_save_device_state(), triggering the same tracepoints as previously c

[PATCH v5 0/8] virtio-mem: Handle preallocation with migration

2023-01-17 Thread David Hildenbrand
While playing with migration of virtio-mem with an ordinary file backing, I realized that migration and prealloc doesn't currently work as expected for virtio-mem. Further, Jing Qi reported that setup issues (insufficient huge pages on the destination) result in QEMU getting killed with SIGBUS inst

[PATCH v5 4/8] migration/vmstate: Introduce VMSTATE_WITH_TMP_TEST() and VMSTATE_BITMAP_TEST()

2023-01-17 Thread David Hildenbrand
We'll make use of both next in the context of virtio-mem. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: David Hildenbrand --- include/migration/vmstate.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstat

[PATCH v5 7/8] virtio-mem: Migrate immutable properties early

2023-01-17 Thread David Hildenbrand
The bitmap and the size are immutable while migration is active: see virtio_mem_is_busy(). We can migrate this information early, before migrating any actual RAM content. Further, all information we need for sanity checks is immutable as well. Having this information in place early will, for examp

[PATCH v5 2/8] migration/savevm: Prepare vmdesc json writer in qemu_savevm_state_setup()

2023-01-17 Thread David Hildenbrand
... and store it in the migration state. This is a preparation for storing selected vmds's already in qemu_savevm_state_setup(). Reviewed-by: Dr. David Alan Gilbert Signed-off-by: David Hildenbrand --- migration/migration.c | 2 ++ migration/migration.h | 4 migration/savevm.c| 18 ++

[PATCH v5 5/8] migration/ram: Factor out check for advised postcopy

2023-01-17 Thread David Hildenbrand
Let's factor out this check, to be used in virtio-mem context next. While at it, fix a spelling error in a related comment. Signed-off-by: David Hildenbrand --- include/migration/misc.h | 4 +++- migration/migration.c| 7 +++ migration/ram.c | 8 +--- 3 files changed, 11 in

Re: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image

2023-01-17 Thread Hanna Czenczek
On 12.01.23 20:14, Kevin Wolf wrote: This series addresses the problem described in these bug reports: https://gitlab.com/qemu-project/qemu/-/issues/1330 https://bugzilla.redhat.com/show_bug.cgi?id=2147617 qcow2 can fail when writing back dirty bitmaps in qcow2_inactivate(). However, when the fu

[PATCH v5 6/8] virtio-mem: Fail if a memory backend with "prealloc=on" is specified

2023-01-17 Thread David Hildenbrand
"prealloc=on" for the memory backend does not work as expected, as virtio-mem will simply discard all preallocated memory immediately again. In the best case, it's an expensive NOP. In the worst case, it's an unexpected allocation error. Instead, "prealloc=on" should be specified for the virtio-me

Re: [PATCH v7 26/51] hw/xen: Add xen_evtchn device for event channel emulation

2023-01-17 Thread David Woodhouse
On Tue, 2023-01-17 at 11:06 +, Paul Durrant wrote: > On 17/01/2023 11:02, David Woodhouse wrote: > > On Tue, 2023-01-17 at 10:56 +, Paul Durrant wrote: > > > > > > I'm just having a hard time seeing why passing 0 to > > > xen_evtchn_set_callback_param() does anything useful... > > > > > >

Re: [PATCH v7 38/51] i386/xen: add monitor commands to test event injection

2023-01-17 Thread David Woodhouse
Incremental patch, which I think addresses everything major? Would still be nice to make the remote-domain field optional. I *still* assume p->type is in the valid range, but at least if that's wrong now it'll just put a bad value in the enum instead of crashing ;) (In fact as I squash this I'll

Re: [PATCH v5] tests/qtest: netdev: test stream and dgram backends

2023-01-17 Thread Philippe Mathieu-Daudé
On 17/1/23 12:03, Laurent Vivier wrote: On 1/17/23 11:00, Thomas Huth wrote: On 16/01/2023 09.40, Thomas Huth wrote: On 16/01/2023 09.29, Laurent Vivier wrote: ping On 1/5/23 10:37, Laurent Vivier wrote: Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin Acked-by: Thomas Huth

Re: [PATCH qemu 1/3] target/arm: Unify checking for M Main Extension in MRS/MSR

2023-01-17 Thread Peter Maydell
On Mon, 9 Jan 2023 at 23:18, ~dreiss-meta wrote: > > From: David Reiss > > BASEPRI, FAULTMASK, and their _NS equivalents only exist on devices with > the Main Extension. However, the MRS instruction did not check this, > and the MSR instruction handled it inconsistently (warning BASEPRI, but > s

Re: [PATCH v5] tests/qtest: netdev: test stream and dgram backends

2023-01-17 Thread Laurent Vivier
On 1/17/23 12:32, Philippe Mathieu-Daudé wrote: On 17/1/23 12:03, Laurent Vivier wrote: On 1/17/23 11:00, Thomas Huth wrote: On 16/01/2023 09.40, Thomas Huth wrote: On 16/01/2023 09.29, Laurent Vivier wrote: ping On 1/5/23 10:37, Laurent Vivier wrote: Signed-off-by: Laurent Vivier Acked-by

Re: [PATCH v7 26/51] hw/xen: Add xen_evtchn device for event channel emulation

2023-01-17 Thread Paul Durrant
On 17/01/2023 11:24, David Woodhouse wrote: On Tue, 2023-01-17 at 11:06 +, Paul Durrant wrote: On 17/01/2023 11:02, David Woodhouse wrote: On Tue, 2023-01-17 at 10:56 +, Paul Durrant wrote: I'm just having a hard time seeing why passing 0 to xen_evtchn_set_callback_param() does anythi

[RFC v5 2/3] memory: add depth assert in address_space_to_flatview

2023-01-17 Thread Chuang Xu
Before using any flatview, sanity check we're not during a memory region transaction or the map can be invalid. Signed-off-by: Chuang Xu --- include/exec/memory.h | 15 +++ softmmu/memory.c | 5 + 2 files changed, 20 insertions(+) diff --git a/include/exec/memory.h b/inclu

[RFC v5 1/3] rcu: introduce rcu_read_is_locked()

2023-01-17 Thread Chuang Xu
add rcu_read_is_locked() to detect holding of rcu lock. Signed-off-by: Chuang Xu --- include/qemu/rcu.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index b063c6fde8..719916d9d3 100644 --- a/include/qemu/rcu.h +++ b/include/qemu/rcu.h @@ -119

[RFC v5 3/3] migration: reduce time of loading non-iterable vmstate

2023-01-17 Thread Chuang Xu
The duration of loading non-iterable vmstate accounts for a significant portion of downtime (starting with the timestamp of source qemu stop and ending with the timestamp of target qemu start). Most of the time is spent committing memory region changes repeatedly. This patch packs all the changes

[RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-01-17 Thread Chuang Xu
In this version: - rename rcu_read_locked() to rcu_read_is_locked(). - adjust the sanity check in address_space_to_flatview(). - improve some comments. The duration of loading non-iterable vmstate accounts for a significant portion of downtime (starting with the timestamp of source qemu stop and

Re: [PATCH v7 27/51] i386/xen: Add support for Xen event channel delivery to vCPU

2023-01-17 Thread Paul Durrant
On 16/01/2023 21:57, David Woodhouse wrote: From: David Woodhouse The kvm_xen_inject_vcpu_callback_vector() function will either deliver the per-vCPU local APIC vector (as an MSI), or just kick the vCPU out of the kernel to trigger KVM's automatic delivery of the global vector. Support for asse

Re: [PATCH v2] tests/qtest/qom-test: Do not print tested properties by default

2023-01-17 Thread Daniel P . Berrangé
On Tue, Jan 17, 2023 at 11:16:32AM +, Peter Maydell wrote: > On Tue, 17 Jan 2023 at 10:44, Daniel P. Berrangé wrote: > > Something random that looks like bad text data > > > > ▶ 166/619 /ptimer/oneshot > > policy=no_immediate_...

Re: [PATCH v2] tests/qtest/qom-test: Do not print tested properties by default

2023-01-17 Thread Daniel P . Berrangé
On Tue, Jan 17, 2023 at 12:22:35PM +, Peter Maydell wrote: > On Tue, 17 Jan 2023 at 12:02, Daniel P. Berrangé wrote: > > > > On Tue, Jan 17, 2023 at 11:16:32AM +, Peter Maydell wrote: > > > On Tue, 17 Jan 2023 at 10:44, Daniel P. Berrangé > > > wrote: > > > > Something random that looks

mips, nvme/pci boot regression (commit 145e2198d749)

2023-01-17 Thread Klaus Jensen
Hi Philippe, Commit 145e2198d749 ("hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps") broke my mips64 nvme boot test (little-endian host, mips64 and nvme boot device). The pci device doesn't show up and the kernel panics. qemu-system-mips64 \ -nodefaults -nographic -s

Re: [PATCH v7 27/51] i386/xen: Add support for Xen event channel delivery to vCPU

2023-01-17 Thread David Woodhouse
On Tue, 2023-01-17 at 11:11 +, Paul Durrant wrote: > > Ick. Do we really want cross-block gotos? For me it would look a lot > nicer if you did a forward jump here and later and put the label+code > after the `return 0`. How's this? static int set_vcpu_info(CPUState *cs, uint64_t gpa) {

[PULL v1 2/2] tests/qtest/tpm-emu: Avoid hangs using abort handlers closing channels

2023-01-17 Thread Stefan Berger
Install abort handlers that close the TPM control and data channels in case an abort occurs. The purpose of this is to have QEMU terminate under abnormal test case failures to resolve intermittent hangs on s390x hosts running TPM tests for QEMU/x86_64. Signed-off-by: Stefan Berger Reviewed-by: Da

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-17 Thread Greg Kurz
On Tue, 17 Jan 2023 13:12:57 +0100 Greg Kurz wrote: > Hi Maxime, > > On Tue, 17 Jan 2023 10:49:37 +0100 > Maxime Coquelin wrote: > > > Hi Yajun, > > > > On 1/16/23 08:14, Yajun Wu wrote: > > > Not quite sure about the whole picture. > > > > > > Seems while qemu waiting response of vhost_user

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-17 Thread Greg Kurz
Hi Maxime, On Tue, 17 Jan 2023 10:49:37 +0100 Maxime Coquelin wrote: > Hi Yajun, > > On 1/16/23 08:14, Yajun Wu wrote: > > Not quite sure about the whole picture. > > > > Seems while qemu waiting response of vhost_user_get_status, dpdk send out > > VHOST_USER_SLAVE_IOTLB_MSG and trigger qemu

Re: [PATCH] ui/vnc.c: Allow websocket connections over AF_UNIX sockets

2023-01-17 Thread Gerd Hoffmann
On Mon, Jan 16, 2023 at 07:15:08PM +0100, Laurent Vivier wrote: > Hi Gerd, > > If this patch is correct I can queue it via trivial branch. proxying tcp websocket connections to a unix socket looks like a reasonable use case to me. Acked-by: Gerd Hoffmann

Re: [PATCH v7 26/51] hw/xen: Add xen_evtchn device for event channel emulation

2023-01-17 Thread David Woodhouse
On Tue, 2023-01-17 at 11:53 +, Paul Durrant wrote: > On 17/01/2023 11:24, David Woodhouse wrote: > > On Tue, 2023-01-17 at 11:06 +, Paul Durrant wrote: > > > On 17/01/2023 11:02, David Woodhouse wrote: > > > > On Tue, 2023-01-17 at 10:56 +, Paul Durrant wrote: > > > > > > > > > > I'm j

[PULL v1 0/2] Merge tpm 2023/01/17 v1

2023-01-17 Thread Stefan Berger
Hello, this PR addresses issues where QEMU may hang during test runs. Regards, Stefan The following changes since commit fb7e7990342e59cf67dbd895c1a1e3fb1741df7a: tests/qtest/qom-test: Do not print tested properties by default (2023-01-16 15:00:57 +) are available in the Git reposit

[PULL v1 1/2] tests/qtest: Poll on waitpid() for a while before sending SIGKILL

2023-01-17 Thread Stefan Berger
To prevent getting stuck on waitpid() in case the target process does not terminate on SIGTERM, poll on waitpid() for 30s and if the target process has not changed state until then send a SIGKILL to it. Signed-off-by: Stefan Berger Reviewed-by: Daniel P. Berrangé Message-id: 20230112143413.39790

Re: [PATCH v2] tests/qtest/qom-test: Do not print tested properties by default

2023-01-17 Thread Peter Maydell
On Tue, 17 Jan 2023 at 12:02, Daniel P. Berrangé wrote: > > On Tue, Jan 17, 2023 at 11:16:32AM +, Peter Maydell wrote: > > On Tue, 17 Jan 2023 at 10:44, Daniel P. Berrangé > > wrote: > > > Something random that looks like bad text data > > > > > > ▶ 166/619 /ptimer/oneshot > > > policy=no_i

Re: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory

2023-01-17 Thread Chao Peng
On Fri, Jan 13, 2023 at 09:54:41PM +, Sean Christopherson wrote: > On Fri, Dec 02, 2022, Chao Peng wrote: > > The system call is currently wired up for x86 arch. > > Building on other architectures (except for arm64 for some reason) yields: > > CALL/.../scripts/checksyscalls.sh > :156

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-17 Thread Chao Peng
On Fri, Jan 13, 2023 at 10:37:39PM +, Sean Christopherson wrote: > On Tue, Jan 10, 2023, Chao Peng wrote: > > On Mon, Jan 09, 2023 at 07:32:05PM +, Sean Christopherson wrote: > > > On Fri, Jan 06, 2023, Chao Peng wrote: > > > > On Thu, Jan 05, 2023 at 11:23:01AM +, Jarkko Sakkinen wrote

Re: [PATCH] ui/vnc.c: Allow websocket connections over AF_UNIX sockets

2023-01-17 Thread Daniel P . Berrangé
On Tue, Jan 17, 2023 at 01:43:12PM +0100, Gerd Hoffmann wrote: > On Mon, Jan 16, 2023 at 07:15:08PM +0100, Laurent Vivier wrote: > > Hi Gerd, > > > > If this patch is correct I can queue it via trivial branch. > > proxying tcp websocket connections to a unix socket looks like > a reasonable use c

Re: [RFC v2 11/13] vdpa: add vdpa net migration state notifier

2023-01-17 Thread Dr. David Alan Gilbert
* Eugenio Perez Martin (epere...@redhat.com) wrote: > On Tue, Jan 17, 2023 at 10:58 AM Dr. David Alan Gilbert > wrote: > > > > * Eugenio Perez Martin (epere...@redhat.com) wrote: > > > On Fri, Jan 13, 2023 at 5:55 AM Jason Wang wrote: > > > > > > > > On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez

Re: [PATCH] ui/vnc.c: Allow websocket connections over AF_UNIX sockets

2023-01-17 Thread Laurent Vivier
Le 17/01/2023 à 13:53, Daniel P. Berrangé a écrit : On Tue, Jan 17, 2023 at 01:43:12PM +0100, Gerd Hoffmann wrote: On Mon, Jan 16, 2023 at 07:15:08PM +0100, Laurent Vivier wrote: Hi Gerd, If this patch is correct I can queue it via trivial branch. proxying tcp websocket connections to a unix

Re: [PATCH] ui/vnc.c: Allow websocket connections over AF_UNIX sockets

2023-01-17 Thread Pierre-Yves Ritschard
> Please don't queue, this patch is not correct becasue it is failing > to validate the 'websocket' parameter at all. > > Hi, Thanks for the review! I'm happy to adapt the patch to add validation, though I am not quite sure what additional validation you would like to see occur here. Cheers, Pier

[PATCH v7.1 26/51] hw/xen: Add xen_evtchn device for event channel emulation

2023-01-17 Thread David Woodhouse
From: David Woodhouse Include basic support for setting HVM_PARAM_CALLBACK_IRQ to the global vector method HVM_PARAM_CALLBACK_TYPE_VECTOR, which is handled in-kernel by raising the vector whenever the vCPU's vcpu_info->evtchn_upcall_pending flag is set. Signed-off-by: David Woodhouse --- hw/i3

  1   2   3   4   >