Re: [PATCH-for-8.0 03/10] hw/virtio: Constify qmp_virtio_feature_map_t[]

2022-12-12 Thread Philippe Mathieu-Daudé
On 13/12/22 01:02, Richard Henderson wrote: On 12/12/22 17:05, Philippe Mathieu-Daudé wrote: @@ -161,7 +161,7 @@ static qmp_virtio_feature_map_t vhost_user_protocol_map[] = {   };   /* virtio device configuration statuses */ -static qmp_virtio_feature_map_t virtio_config_status_map[] = { +stati

Re: [RFC PATCH-for-8.0 06/10] hw/virtio: Cache access_is_big_endian value in VirtIODevice state

2022-12-12 Thread Philippe Mathieu-Daudé
On 13/12/22 01:14, Richard Henderson wrote: On 12/12/22 17:05, Philippe Mathieu-Daudé wrote: The device endianness doesn't change during runtime. What are you talking about?  Of course it does. The host CPU certainly does, but the virtio device doesn't... Does it? This check only consider t

Re: [PATCH v2] target/sh4: Fix TB_FLAG_UNALIGN

2022-12-12 Thread Guenter Roeck
On Mon, Dec 12, 2022 at 08:30:42AM -0600, Richard Henderson wrote: > On 12/11/22 19:13, Guenter Roeck wrote: > > On Sat, Dec 10, 2022 at 07:27:46AM -0800, Guenter Roeck wrote: > > > Hi, > > > > > > On Thu, Sep 01, 2022 at 11:15:09AM +0100, Richard Henderson wrote: > > > > The value previously chos

Re: [RFC PATCH v2 02/22] xen: add CONFIG_XENFV_MACHINE and CONFIG_XEN_EMU options for Xen emulation

2022-12-12 Thread David Woodhouse
On Tue, 2022-12-13 at 01:39 +0100, Paolo Bonzini wrote: > > > Il lun 12 dic 2022, 23:23 David Woodhouse ha > scritto: > > On Mon, 2022-12-12 at 18:07 +0100, Paolo Bonzini wrote: > > > On 12/9/22 10:55, David Woodhouse wrote: > > > > config KVM > > > > bool > > > > +imply XEN_EMU if (

Re: [RFC PATCH v2 02/22] xen: add CONFIG_XENFV_MACHINE and CONFIG_XEN_EMU options for Xen emulation

2022-12-12 Thread Paolo Bonzini
Il lun 12 dic 2022, 23:23 David Woodhouse ha scritto: > On Mon, 2022-12-12 at 18:07 +0100, Paolo Bonzini wrote: > > On 12/9/22 10:55, David Woodhouse wrote: > > > config KVM > > > bool > > > +imply XEN_EMU if (I386 || X86_64) > > > > No need for the "imply", just make it "default y" b

Re: [PATCH 4/4] coroutine: Break inclusion loop

2022-12-12 Thread Paolo Bonzini
dropped qemu-devel by mistake. Paolo Il lun 12 dic 2022, 23:16 Paolo Bonzini ha scritto: > On 12/8/22 15:23, Markus Armbruster wrote: > > qemu/coroutine.h and qemu/lockable.h include each other. Neither > > header actually needs the other one. > > qemu/lockable.h wants qemu/coroutine.h becaus

Re: [RFC PATCH-for-8.0 06/10] hw/virtio: Cache access_is_big_endian value in VirtIODevice state

2022-12-12 Thread Richard Henderson
On 12/12/22 17:05, Philippe Mathieu-Daudé wrote: The device endianness doesn't change during runtime. What are you talking about? Of course it does. I mean, it doesn't often in practice, because the Linux kernel is compiled for one endianness and doesn't keep toggling state, but the hooks th

Re: [RFC PATCH v2 03/22] i386/xen: Add xen-version machine property and init KVM Xen support

2022-12-12 Thread David Woodhouse
On Mon, 2022-12-12 at 18:30 +0100, Paolo Bonzini wrote: > On 12/9/22 10:55, David Woodhouse wrote: > > -m->default_machine_opts = "accel=xen,suppress-vmdesc=on"; > > +if (xen_enabled()) > > +m->default_machine_opts = "accel=xen,suppress-vmdesc=on"; > > +else > > +

Re: [RFC PATCH v2 16/22] i386/xen: handle VCPUOP_register_vcpu_info

2022-12-12 Thread David Woodhouse
On Mon, 2022-12-12 at 14:58 +, Paul Durrant wrote: > On 09/12/2022 09:56, David Woodhouse wrote: > > From: Joao Martins < > > joao.m.mart...@oracle.com > > > > > > > Handle the hypercall to set a per vcpu info, and also wire up the > > default > > vcpu_info in the shared_info page for the firs

Re: [RFC PATCH v2 15/22] i386/xen: implement HYPERVISOR_vcpu_op

2022-12-12 Thread David Woodhouse
On Mon, 2022-12-12 at 14:51 +, Paul Durrant wrote: > Again, should this patch be deferred until we actually implement > something useful here? I.e. folding it into the subsequent patch? It's > not like the boilerplate is massive. That's how Joao did it; it seems sane enough to do bite-sized

Re: [RFC PATCH v2 13/22] i386/xen: implement HYPERVISOR_memory_op

2022-12-12 Thread David Woodhouse
On Mon, 2022-12-12 at 14:38 +, Paul Durrant wrote: > > > +switch (xatp.space) { > > +case XENMAPSPACE_shared_info: > > +break; > > +default: > > +err = -ENOSYS; > > +break; > > Don't you want to return false h

Re: [RFC PATCH v2 11/22] i386/xen: implement HYPERCALL_xen_version

2022-12-12 Thread David Woodhouse
On Mon, 2022-12-12 at 14:17 +, Paul Durrant wrote: > Shouldn't this be (sz - i)? Turns out I hate that loop. Have refactored it to be while (sz) { ... sz -= len; ... }. Thanks. smime.p7s Description: S/MIME cryptographic signature

Re: [PATCH-for-8.0 03/10] hw/virtio: Constify qmp_virtio_feature_map_t[]

2022-12-12 Thread Richard Henderson
On 12/12/22 17:05, Philippe Mathieu-Daudé wrote: @@ -161,7 +161,7 @@ static qmp_virtio_feature_map_t vhost_user_protocol_map[] = { }; /* virtio device configuration statuses */ -static qmp_virtio_feature_map_t virtio_config_status_map[] = { +static const qmp_virtio_feature_map_t virtio_c

[PATCH-for-8.0 01/10] hw/virtio: Add missing "hw/core/cpu.h" include

2022-12-12 Thread Philippe Mathieu-Daudé
virtio.c uses target_words_bigendian() which is declared in "hw/core/cpu.h". Add the missing header to avoid when refactoring: hw/virtio/virtio.c:2451:9: error: implicit declaration of function 'target_words_bigendian' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (target_

[RFC PATCH-for-8.0 09/10] hw/virtio: Extract vhost_user_ram_slots_max() to vhost-user-target.c

2022-12-12 Thread Philippe Mathieu-Daudé
The current definition of VHOST_USER_MAX_RAM_SLOTS is target specific. By converting this definition to a runtime vhost_user_ram_slots_max() helper declared in a target specific unit, we can have the rest of vhost-user.c target independent. To avoid variable length array or using the heap to store

[RFC PATCH-for-8.0 10/10] hw/virtio: Make most of virtio devices target-independent

2022-12-12 Thread Philippe Mathieu-Daudé
Except the following files: - virtio-config.c - virtio-qmp.c - virtio-iommu.c - virtio-mem.c - vhost-user-target.c - vhost-vdpa.c all other virtio related files are target independent and can be compiled only once for a system emulation build, avoiding compiling hundreds of objects. Signed-off-by:

[PATCH-for-8.0 08/10] hw/virtio: Un-inline virtio_access_is_big_endian()

2022-12-12 Thread Philippe Mathieu-Daudé
In order to avoid target-specific code in VirtIO headers, move this particular function -- which is only called once in virtio_init() -- in its own unit. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/virtio-config.c | 20 include/hw/virtio/virtio-access.h | 19

[RFC PATCH-for-8.0 06/10] hw/virtio: Cache access_is_big_endian value in VirtIODevice state

2022-12-12 Thread Philippe Mathieu-Daudé
The device endianness doesn't change during runtime. Cache it in the VirtIODevice state. Signed-off-by: Philippe Mathieu-Daudé --- RFC: I'm not sure virtio_init() is the correct place to add this check. We want to initialize this field once the features are negociated. --- hw/virtio/vi

[RFC PATCH-for-8.0 07/10] hw/virtio: Directly access cached VirtIODevice::access_is_big_endian

2022-12-12 Thread Philippe Mathieu-Daudé
Since the device endianness doesn't change at runtime, use the cached value instead of evaluating it on each call. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/virtio/virtio-access.h | 44 +++ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/inc

[PATCH-for-8.0 05/10] hw/virtio: Extract QMP related code virtio-qmp.c

2022-12-12 Thread Philippe Mathieu-Daudé
The monitor decoders are the only functions using the CONFIG_xxx definitions declared in the target specific CONFIG_DEVICES header. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/meson.build | 2 +- hw/virtio/virtio-qmp.c | 631 + hw/virtio/virtio-

[PATCH-for-8.0 02/10] hw/virtio: Rename virtio_ss[] -> specific_virtio_ss[]

2022-12-12 Thread Philippe Mathieu-Daudé
Since virtio_ss[] is added to specific_ss[], rename it as specific_virtio_ss[] to make it clearer. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/meson.build | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/hw/virtio/meson.build

[PATCH-for-8.0 03/10] hw/virtio: Constify qmp_virtio_feature_map_t[]

2022-12-12 Thread Philippe Mathieu-Daudé
These arrays are only accessed read-only, move them to .rodata. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/virtio.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 5817f4cbc9..f54cc233

[PATCH-for-8.0 04/10] hw/virtio: Extract config read/write accessors to virtio-config.c

2022-12-12 Thread Philippe Mathieu-Daudé
These config helpers use the target-dependent LD/ST API. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/meson.build | 1 + hw/virtio/virtio-config.c | 204 ++ hw/virtio/virtio.c| 190 --- 3 files changed, 205

[RFC PATCH-for-8.0 00/10] hw/virtio: Build most objects as target independent units

2022-12-12 Thread Philippe Mathieu-Daudé
Currently the inlined virtio_access_is_big_endian() function "hw/virtio/virtio-access.h" which is used by all I/O accesses force any virtio device to be built as target-dependent object. This series isolates the few VirtIO target specific bits, trying to not impact the performance (a function is u

Re: [PATCH v4 18/27] tcg/s390x: Tighten constraints for and_i64

2022-12-12 Thread Ilya Leoshkevich
On Thu, Dec 08, 2022 at 08:05:21PM -0600, Richard Henderson wrote: > Let the register allocator handle such immediates by matching > only what one insn can achieve. > > Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread Stefan Berger
On 12/12/22 17:27, James Bottomley wrote: . Swtpm currently isn't building for Leap: https://build.opensuse.org/package/show/security/swtpm Someone could have notified me...

Re: [PATCH v4 17/27] tcg/s390x: Tighten constraints for or_i64 and xor_i64

2022-12-12 Thread Ilya Leoshkevich
On Thu, Dec 08, 2022 at 08:05:20PM -0600, Richard Henderson wrote: > Drop support for sequential OR and XOR, as the serial dependency is > slower than loading the constant first. Let the register allocator > handle such immediates by matching only what one insn can achieve. > > Signed-off-by: Ric

Re: [PATCH v4 16/27] tcg/s390x: Issue XILF directly for xor_i32

2022-12-12 Thread Ilya Leoshkevich
On Thu, Dec 08, 2022 at 08:05:19PM -0600, Richard Henderson wrote: > There is only one instruction that is applicable > to a 32-bit immediate xor. > > Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich

Re: [PATCH v4 10/27] tcg/s390x: Remove DISTINCT_OPERANDS facility check

2022-12-12 Thread Ilya Leoshkevich
On Thu, Dec 08, 2022 at 08:05:13PM -0600, Richard Henderson wrote: > The distinct-operands facility is bundled into facility 45, > along with load-on-condition. We are checking this at startup. > Remove the a0 == a1 checks for 64-bit sub, and, or, xor, as there > is no space savings for avoiding t

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 17:02 -0500, Stefan Berger wrote: > > > On 12/12/22 16:36, James Bottomley wrote: > > On Mon, 2022-12-12 at 14:32 -0500, Stefan Berger wrote: [...] > > >   Either way, what is the latency that this introduces because I > > > would expect that this slows down IMA since the PC

Re: [PATCH v4 08/27] tcg/s390x: Check for load-on-condition facility at startup

2022-12-12 Thread Ilya Leoshkevich
On Thu, Dec 08, 2022 at 08:05:11PM -0600, Richard Henderson wrote: > The general-instruction-extension facility was introduced in z196, > which itself was end-of-life in 2021. In addition, z196 is the > minimum CPU supported by our set of supported operating systems: > RHEL 7 (z196), SLES 12 (z196

Re: [RFC PATCH v2 02/22] xen: add CONFIG_XENFV_MACHINE and CONFIG_XEN_EMU options for Xen emulation

2022-12-12 Thread David Woodhouse
On Mon, 2022-12-12 at 18:07 +0100, Paolo Bonzini wrote: > On 12/9/22 10:55, David Woodhouse wrote: > > config KVM > > bool > > +imply XEN_EMU if (I386 || X86_64) > > No need for the "imply", just make it "default y" below and it will have > the same effect. > > > > > diff --git a/ta

Re: [PATCH v4 07/27] tcg/s390x: Check for general-instruction-extension facility at startup

2022-12-12 Thread Ilya Leoshkevich
On Thu, Dec 08, 2022 at 08:05:10PM -0600, Richard Henderson wrote: > The general-instruction-extension facility was introduced in z10, > which itself was end-of-life in 2019. > > Signed-off-by: Richard Henderson > --- > tcg/s390x/tcg-target.h | 10 ++-- > tcg/s390x/tcg-target.c.inc | 100 ++

Re: [PATCH 1/3] include/block: Untangle inclusion loops

2022-12-12 Thread Paolo Bonzini
On 12/8/22 15:39, Markus Armbruster wrote: * Global state (GS) API. These functions run under the BQL. * * See include/block/block-global-state.h for more information about - * the GS API. + * the GS API.b */ One-character typo. Paolo

Re: [PATCH v4 06/27] tcg/s390x: Check for extended-immediate facility at startup

2022-12-12 Thread Ilya Leoshkevich
On Thu, Dec 08, 2022 at 08:05:09PM -0600, Richard Henderson wrote: > The extended-immediate facility was introduced in z9-109, > which itself was end-of-life in 2017. > > Signed-off-by: Richard Henderson > --- > tcg/s390x/tcg-target.h | 4 +- > tcg/s390x/tcg-target.c.inc | 231 +++-

Re: [PATCH v3 0/2] hw/usb: add configuration flags for emulated and passthru usb smartcard

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 23:09, Jon Maloy wrote: We add three new configuration flags, LIBCACARD, USB_SMARTCARD_PASSTHRU and USB_SMARTCARD_EMULATED in order to improve configurability of these functionalities. Jon Maloy (2): hw/usb: add configuration flags for emulated and passthru usb smartcard

Re: [PATCH] linux-user: Add emulation for MADV_WIPEONFORK and MADV_KEEPONFORK in madvise()

2022-12-12 Thread Ilya Leoshkevich
On Mon, Dec 12, 2022 at 10:49:24PM +0100, Helge Deller wrote: > On 12/12/22 22:16, Ilya Leoshkevich wrote: > > On Mon, Dec 12, 2022 at 08:00:45AM +0100, Helge Deller wrote: > > > Both parameters have a different value on the parisc platform, so first > > > translate the target value into a host val

[PATCH v3 1/2] hw/usb: add configuration flags for emulated and passthru usb smartcard

2022-12-12 Thread Jon Maloy
We add two new configuration flags, USB_SMARTCARD_PASSTHRU and USB_SMARTCARD_EMULATED in order to improve configurability of these functionalities. Signed-off-by: Jon Maloy --- hw/usb/Kconfig | 12 hw/usb/meson.build | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-)

[PATCH v3 2/2] hw/usb: add configuration flag for Common Access Card library code

2022-12-12 Thread Jon Maloy
We add a new configuration flag, LIBCACARD, indicating availability of the libcacard code for building. This way, we can eliminate the explicit test for cacard.found() when configuring USB_SMARTCARD_EMULATED/USB_SMARTCARD_PASSTHRU in hw/usb/meson.build. Signed-off-by: Jon Maloy --- Kconfig.host

[PATCH v3 0/2] hw/usb: add configuration flags for emulated and passthru usb smartcard

2022-12-12 Thread Jon Maloy
We add three new configuration flags, LIBCACARD, USB_SMARTCARD_PASSTHRU and USB_SMARTCARD_EMULATED in order to improve configurability of these functionalities. Signed-off-by: Jon Maloy --- v2: Added a LIBACARD flag, plus reversed 'select' clauses, as suggested by Paolo Bonzini and Marc-Andr

Re: [PATCH v4 09/27] tcg/s390x: Remove FAST_BCR_SER facility check

2022-12-12 Thread Philippe Mathieu-Daudé
On 9/12/22 03:05, Richard Henderson wrote: The fast-bcr-serialization facility is bundled into facility 45, along with load-on-condition. We are checking this at startup. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.h | 1 - tcg/s390x/tcg-target.c.inc | 3 ++- 2 files chan

Re: [RFC PATCH v2 05/22] xen-platform-pci: allow its creation with XEN_EMULATE mode

2022-12-12 Thread David Woodhouse
On Mon, 2022-12-12 at 13:24 +, Paul Durrant wrote: > On 09/12/2022 09:55, David Woodhouse wrote: > > --- a/hw/i386/xen/xen_platform.c > > +++ b/hw/i386/xen/xen_platform.c > > @@ -271,7 +271,10 @@ static void platform_fixed_ioport_writeb(void *opaque, > > uint32_t addr, uint32_t v > >ca

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 15:47 +, Daniel P. Berrangé wrote: > Copy'ing Markus for QAPI design feedback. > > On Sat, Dec 10, 2022 at 12:10:18PM -0500, James Bottomley wrote: [...] > > +## > > +# @TPMmssimOptions: > > +# > > +# Information for the mssim emulator connection > > +# > > +# @host: host

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread Stefan Berger
On 12/12/22 16:36, James Bottomley wrote: On Mon, 2022-12-12 at 14:32 -0500, Stefan Berger wrote: On 12/12/22 14:12, James Bottomley wrote: On Mon, 2022-12-12 at 13:58 -0500, Stefan Berger wrote: On 12/12/22 13:48, James Bottomley wrote: On Mon, 2022-12-12 at 11:59 -0500, Stefan Berger w

Re: [PATCH] target/tricore: Fix gdbstub write to address registers

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 21:49, Richard Henderson wrote: Typo had double-writes to data registers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1363 Signed-off-by: Richard Henderson --- target/tricore/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathi

Re: [PATCH] include: Don't include qemu/osdep.h

2022-12-12 Thread Alistair Francis
On Mon, Dec 12, 2022 at 5:05 PM Markus Armbruster wrote: > > docs/devel/style.rst mandates: > > The "qemu/osdep.h" header contains preprocessor macros that affect > the behavior of core system headers like . It must be > the first include so that core system headers included by extern

Re: [PATCH v4 05/27] tcg/s390x: Check for long-displacement facility at startup

2022-12-12 Thread Ilya Leoshkevich
On Thu, Dec 08, 2022 at 08:05:08PM -0600, Richard Henderson wrote: > We are already assuming the existance of long-displacement, but were > not being explicit about it. This has been present since z990. > > Signed-off-by: Richard Henderson > --- > tcg/s390x/tcg-target.h | 6 -- > tcg/s

Re: [PATCH v4 04/27] tcg/s390x: Remove USE_LONG_BRANCHES

2022-12-12 Thread Ilya Leoshkevich
On Thu, Dec 08, 2022 at 08:05:07PM -0600, Richard Henderson wrote: > The size of a compiled TB is limited by the uint16_t used by > gen_insn_end_off[] -- there is no need for a 32-bit branch. > > Signed-off-by: Richard Henderson > --- > tcg/s390x/tcg-target.c.inc | 9 - > 1 file changed,

Re: [PATCH v4 03/27] tcg/s390x: Always set TCG_TARGET_HAS_direct_jump

2022-12-12 Thread Ilya Leoshkevich
On Thu, Dec 08, 2022 at 08:05:06PM -0600, Richard Henderson wrote: > Since USE_REG_TB is removed, there is no need to load the > target TB address into a register. > > Signed-off-by: Richard Henderson > --- > tcg/s390x/tcg-target.h | 2 +- > tcg/s390x/tcg-target.c.inc | 48 +++--

Re: [PATCH] linux-user: Add emulation for MADV_WIPEONFORK and MADV_KEEPONFORK in madvise()

2022-12-12 Thread Helge Deller
On 12/12/22 22:16, Ilya Leoshkevich wrote: On Mon, Dec 12, 2022 at 08:00:45AM +0100, Helge Deller wrote: Both parameters have a different value on the parisc platform, so first translate the target value into a host value for usage in the native madvise() syscall. Those parameters are often use

Re: [PATCH RESEND v3 07/10] migration: Refactor auto-converge capability logic

2022-12-12 Thread Peter Xu
On Sun, Dec 04, 2022 at 01:09:10AM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Check if block migration is running before throttling > guest down in auto-converge way. > > Note that this modification is kind of like code clean, > because block migration does not depend on

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 14:32 -0500, Stefan Berger wrote: > > > On 12/12/22 14:12, James Bottomley wrote: > > On Mon, 2022-12-12 at 13:58 -0500, Stefan Berger wrote: > > > On 12/12/22 13:48, James Bottomley wrote: > > > > On Mon, 2022-12-12 at 11:59 -0500, Stefan Berger wrote: > > > > > On 12/12/22

Re: [PATCH 30/30] meson: always log qemu-iotests verbosely

2022-12-12 Thread Paolo Bonzini
On 12/12/22 17:55, Peter Maydell wrote: On Fri, 9 Dec 2022 at 11:44, Paolo Bonzini wrote: --- tests/qemu-iotests/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index 583468c5b9b3..3d8637c8f2b6 100644 --- a/test

Re: [PATCH v1 06/24] vfio-user: Define type vfio_user_pci_dev_info

2022-12-12 Thread John Johnson
> On Dec 12, 2022, at 1:01 AM, Cédric Le Goater wrote: > > On 11/9/22 00:13, John Johnson wrote: >> >> + >> +static Property vfio_user_pci_dev_properties[] = { >> +DEFINE_PROP_STRING("socket", VFIOUserPCIDevice, sock_name), > > This looks like a good candidate for using a chardev. It coul

Re: [PATCH-for-8.0 1/7] hw/mips/Kconfig: Introduce CONFIG_GT64120 to select gt64xxx_pci.c

2022-12-12 Thread Bernhard Beschow
Am 12. Dezember 2022 08:02:26 UTC schrieb "Philippe Mathieu-Daudé" : >On 12/12/22 01:13, Bernhard Beschow wrote: >> >> >> Am 9. Dezember 2022 15:15:27 UTC schrieb "Philippe Mathieu-Daudé" >> : >>> From: Philippe Mathieu-Daudé >>> >>> Signed-off-by: Philippe Mathieu-Daudé >>> --- >>> hw/mi

Re: [PATCH] linux-user: Add emulation for MADV_WIPEONFORK and MADV_KEEPONFORK in madvise()

2022-12-12 Thread Ilya Leoshkevich
On Mon, Dec 12, 2022 at 08:00:45AM +0100, Helge Deller wrote: > Both parameters have a different value on the parisc platform, so first > translate the target value into a host value for usage in the native > madvise() syscall. > > Those parameters are often used by security sensitive applications

[PATCH] target/tricore: Fix gdbstub write to address registers

2022-12-12 Thread Richard Henderson
Typo had double-writes to data registers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1363 Signed-off-by: Richard Henderson --- target/tricore/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/tricore/gdbstub.c b/target/tricore/gdbstub.c index ebf32

Re: [PATCH v1 06/24] vfio-user: Define type vfio_user_pci_dev_info

2022-12-12 Thread John Johnson
> On Dec 12, 2022, at 3:46 AM, Philippe Mathieu-Daudé wrote: > > On 12/12/22 12:03, John Levon wrote: >> On Mon, Dec 12, 2022 at 10:01:33AM +0100, Cédric Le Goater wrote: diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 80b03a2..dc19869 100644 --- a/hw/vfio/pci.c +++ b/hw/vf

Re: [PATCH 21/30] build: move sanitizer tests to meson

2022-12-12 Thread Paolo Bonzini
Il lun 12 dic 2022, 13:16 Marc-André Lureau ha scritto: > +if get_option('sanitizers') > + if cc.has_argument('-fsanitize=address') > +qemu_cflags = ['-fsanitize=address'] + qemu_cflags > +qemu_ldflags = ['-fsanitize=address'] + qemu_ldflags why not the += syntax? same below Configure

Re: [PATCH v1 19/24] vfio-user: secure DMA support

2022-12-12 Thread John Johnson
> On Dec 9, 2022, at 10:01 AM, John Levon wrote: > > On Tue, Nov 08, 2022 at 03:13:41PM -0800, John Johnson wrote: > >> Secure DMA forces the remote process to use DMA r/w messages >> instead of directly mapping guest memeory. > > I don't really get why this is called "secure" - shouldn't ha

Re: [PATCH v1 02/24] vfio-user: add VFIO base abstract class

2022-12-12 Thread John Johnson
I can look into using orderfile JJ > On Dec 9, 2022, at 8:04 AM, Cédric Le Goater wrote: > > Hello John, > > On 11/9/22 00:13, John Johnson wrote: >> Add an abstract base class both the kernel driver >> and user socket implementations can use to share

Re: [PATCH v1 14/24] vfio-user: get and set IRQs

2022-12-12 Thread John Johnson
> On Dec 9, 2022, at 9:29 AM, John Levon wrote: > > On Tue, Nov 08, 2022 at 03:13:36PM -0800, John Johnson wrote: > >> +static int vfio_user_io_get_irq_info(VFIODevice *vbasedev, >> + struct vfio_irq_info *irq) >> +{ >> +int ret; >> + >> +ret = vfio

Re: [PATCH v1 10/24] vfio-user: get device info

2022-12-12 Thread John Johnson
> On Dec 9, 2022, at 7:57 AM, John Levon wrote: > > On Tue, Nov 08, 2022 at 03:13:32PM -0800, John Johnson wrote: > >> +/* >> + * VFIO_USER_DEVICE_GET_INFO >> + * imported from struct_device_info >> + */ >> +typedef struct { >> +VFIOUserHdr hdr; >> +uint32_t argsz; >> +uint32_t fl

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

2022-12-12 Thread Peter Xu
On Tue, Dec 13, 2022 at 12:49:39AM +0800, Chuang Xu wrote: > > Hi! Chuang, > > In this version: > > - rebase to latest upstream. > - add sanity check to address_space_to_flatview(). > - postpone the init of the vring cache until migration's loading completes. Since there'll be other changes

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread Stefan Berger
On 12/12/22 14:32, Stefan Berger wrote: On 12/12/22 14:12, James Bottomley wrote: On Mon, 2022-12-12 at 13:58 -0500, Stefan Berger wrote: On 12/12/22 13:48, James Bottomley wrote: On Mon, 2022-12-12 at 11:59 -0500, Stefan Berger wrote: On 12/12/22 11:38, James Bottomley wrote: [...] th

Re: [RFC v2 2/3] virtio: support delay of checks in virtio_load()

2022-12-12 Thread Peter Xu
On Tue, Dec 13, 2022 at 12:49:41AM +0800, Chuang Xu wrote: > +bool migration_enable_load_check_delay; I'm just afraid this is still too hacky. One thing is because this variable itself to be only set at specific phase during migration to cover that commit(). The other thing is I'm not sure we ca

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread Stefan Berger
On 12/12/22 14:12, James Bottomley wrote: On Mon, 2022-12-12 at 13:58 -0500, Stefan Berger wrote: On 12/12/22 13:48, James Bottomley wrote: On Mon, 2022-12-12 at 11:59 -0500, Stefan Berger wrote: On 12/12/22 11:38, James Bottomley wrote: [...] the kernel use of the TPM, but I'm trying to

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 13:58 -0500, Stefan Berger wrote: > On 12/12/22 13:48, James Bottomley wrote: > > On Mon, 2022-12-12 at 11:59 -0500, Stefan Berger wrote: > > > On 12/12/22 11:38, James Bottomley wrote: [...] > > > > the kernel use of the TPM, but I'm trying to fix that.  The > > > > standard

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread Stefan Berger
On 12/12/22 13:48, James Bottomley wrote: On Mon, 2022-12-12 at 11:59 -0500, Stefan Berger wrote: On 12/12/22 11:38, James Bottomley wrote: On Mon, 2022-12-12 at 15:47 +, Daniel P. Berrangé wrote: Copy'ing Markus for QAPI design feedback. On Sat, Dec 10, 2022 at 12:10:18PM -0500, Jam

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 11:59 -0500, Stefan Berger wrote: > > > On 12/12/22 11:38, James Bottomley wrote: > > On Mon, 2022-12-12 at 15:47 +, Daniel P. Berrangé wrote: > > > Copy'ing Markus for QAPI design feedback. > > > > > > On Sat, Dec 10, 2022 at 12:10:18PM -0500, James Bottomley wrote: >

Re: [PATCH v3 7/8] accel/tcg: Move PageDesc tree into tb-maint.c for system

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 16:28, Richard Henderson wrote: On 12/9/22 01:22, Philippe Mathieu-Daudé wrote: On 9/12/22 06:19, Richard Henderson wrote: Now that PageDesc is not used for user-only, and for system it is only used for tb maintenance, move the implementation into tb-main.c appropriately ifdefed. W

Re: [PATCH] MAINTAINERS: Add MIPS-related docs and configs to the MIPS architecture section

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 18:12, Thomas Huth wrote: docs/system/target-mips.rst and configs/targets/mips* are not covered in our MAINTAINERS file yet, so let's add them now. Signed-off-by: Thomas Huth --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) Thanks! Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] MAINTAINERS: Add documentation files to the corresponding sections

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 18:48, Thomas Huth wrote: A lot of files in the docs directory do not have a maintainer according to our MAINTAINERS file, though they can be clearly associated with one of the sections in there. Add the files now so that our scripts/get_maintainer.pl script can output the right maint

Re: [PATCH] include: Don't include qemu/osdep.h

2022-12-12 Thread Daniel P . Berrangé
On Mon, Dec 12, 2022 at 04:55:55PM +, Taylor Simpson wrote: > > > > -Original Message- > > From: Markus Armbruster > > Sent: Monday, December 12, 2022 1:05 AM > > To: qemu-devel@nongnu.org > > Cc: i...@bsdimp.com; kev...@freebsd.org; berra...@redhat.com; > > jonathan.came...@huawei.c

[PATCH v2] linux-user: Enhance strace output for various syscalls

2022-12-12 Thread Helge Deller
Add appropriate strace printf formats for various Linux syscalls. Signed-off-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé --- v2: Fixed a few entries based on review by Philippe Mathieu-Daudé diff --git a/linux-user/strace.list b/linux-user/strace.list index 3a898e2532..a75101fca1 1006

Re: [RFC PATCH v2 03/22] i386/xen: Add xen-version machine property and init KVM Xen support

2022-12-12 Thread Paul Durrant
On 12/12/2022 17:30, Paolo Bonzini wrote: [snip] The platform device can be created either in mc->kvm_type or manually (not sure if it makes sense to have a "XenVMMXenVMM" CPUID + emulated hypercalls but no platform device---would it still use pvclock for example?). Not sure it's wise but

[PATCH] MAINTAINERS: Add documentation files to the corresponding sections

2022-12-12 Thread Thomas Huth
A lot of files in the docs directory do not have a maintainer according to our MAINTAINERS file, though they can be clearly associated with one of the sections in there. Add the files now so that our scripts/get_maintainer.pl script can output the right maintainer for them. Signed-off-by: Thomas H

[PATCH 2/2] linux-user: Allow sendmsg() without IOV

2022-12-12 Thread Helge Deller
Applications do call sendmsg() without any IOV, e.g.: sendmsg(4, {msg_name=NULL, msg_namelen=0, msg_iov=NULL, msg_iovlen=0, msg_control=[{cmsg_len=36, cmsg_level=SOL_ALG, cmsg_type=0x2}], msg_controllen=40, msg_flags=0}, MSG_MORE) = 0 sendmsg(4, {msg_name=NULL, msg_namelen

[PATCH 1/2] linux-user: Implement SOL_ALG encryption support

2022-12-12 Thread Helge Deller
Add suport to handle SOL_ALG packets via sendmsg() and recvmsg(). This allows emulated userspace to use encryption functionality. Tested with the debian ell package with hppa guest on x86_64 host. Signed-off-by: Helge Deller --- linux-user/syscall.c | 8 1 file changed, 8 insertions(+)

Re: [PATCH v2 14/15] block: Don't poll in bdrv_replace_child_noperm()

2022-12-12 Thread Paolo Bonzini
On 12/12/22 16:57, Kevin Wolf wrote: I looks to me like this is a problem with the test case rather than the change per se. It seems to be fixed with this patch that is already posted as part of the next series: [PATCH 09/18] test-bdrv-drain: Fix incorrrect drain assumptions https://lists.gnu.or

Re: [PATCH 21/30] build: move sanitizer tests to meson

2022-12-12 Thread Paolo Bonzini
On 12/12/22 13:16, Marc-André Lureau wrote: No, it compiles successfully with clang (Fedora 15.0.4-1.fc37) and glibc-2.36-8.fc37.x86_64 at least. I guess we need someone to check on macos with glibc 2.35 (https://formulae.brew.sh/formula/glibc#default) That's a Linux-only formula, so no need t

Re: [RFC PATCH v2 03/22] i386/xen: Add xen-version machine property and init KVM Xen support

2022-12-12 Thread Paolo Bonzini
On 12/9/22 10:55, David Woodhouse wrote: -m->default_machine_opts = "accel=xen,suppress-vmdesc=on"; +if (xen_enabled()) +m->default_machine_opts = "accel=xen,suppress-vmdesc=on"; +else +m->default_machine_opts = "accel=kvm,xen-version=0x30001"; Please do not

Re: [PATCH 00/18] block: Introduce a block graph rwlock

2022-12-12 Thread Kevin Wolf
Am 07.12.2022 um 15:12 hat Emanuele Giuseppe Esposito geschrieben: > Am 07/12/2022 um 14:18 schrieb Kevin Wolf: > > This series supersedes the first half of Emanuele's "Protect the block > > layer with a rwlock: part 1". It introduces the basic infrastructure for > > protecting the block graph (spe

Re: [RFC PATCH v2 12/22] hw/xen: Add xen_overlay device for emulating shared xenheap pages

2022-12-12 Thread Paolo Bonzini
On 12/9/22 10:56, David Woodhouse wrote: Expecting some heckling at the use of xen_overlay_singleton. What is the best way to do that? Using qemu_find_recursive() every time seemed a bit wrong. But I suppose mapping it into the*guest* isn't a fast path, and if the actual grant table code is allo

[PATCH] MAINTAINERS: Add MIPS-related docs and configs to the MIPS architecture section

2022-12-12 Thread Thomas Huth
docs/system/target-mips.rst and configs/targets/mips* are not covered in our MAINTAINERS file yet, so let's add them now. Signed-off-by: Thomas Huth --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6966490c94..4e0e2ba36f 100644 --- a/MAINTAINE

Re: [RFC PATCH v2 02/22] xen: add CONFIG_XENFV_MACHINE and CONFIG_XEN_EMU options for Xen emulation

2022-12-12 Thread Paolo Bonzini
On 12/9/22 10:55, David Woodhouse wrote: config KVM bool +imply XEN_EMU if (I386 || X86_64) No need for the "imply", just make it "default y" below and it will have the same effect. diff --git a/target/Kconfig b/target/Kconfig index 83da0bd293..e19c9d77b5 100644 --- a/target/Kc

Re: [RFC PATCH v2 10/22] i386/xen: handle guest hypercalls

2022-12-12 Thread Paolo Bonzini
On 12/9/22 10:56, David Woodhouse wrote: +static bool __kvm_xen_handle_exit(X86CPU *cpu, struct kvm_xen_exit *exit) No double underscores in userspace. +{ +uint16_t code = exit->u.hcall.input; + +if (exit->u.hcall.cpl > 0) { +exit->u.hcall.result = -EPERM; +return true

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread Stefan Berger
On 12/12/22 11:38, James Bottomley wrote: On Mon, 2022-12-12 at 15:47 +, Daniel P. Berrangé wrote: Copy'ing Markus for QAPI design feedback. On Sat, Dec 10, 2022 at 12:10:18PM -0500, James Bottomley wrote: The Microsoft Simulator (mssim) is the reference emulation platform for the TCG T

RE: [PATCH] include: Don't include qemu/osdep.h

2022-12-12 Thread Taylor Simpson
> -Original Message- > From: Markus Armbruster > Sent: Monday, December 12, 2022 1:05 AM > To: qemu-devel@nongnu.org > Cc: i...@bsdimp.com; kev...@freebsd.org; berra...@redhat.com; > jonathan.came...@huawei.com; kbast...@mail.uni-paderborn.de; > jasow...@redhat.com; michael.r...@amd.com

Re: [PATCH 30/30] meson: always log qemu-iotests verbosely

2022-12-12 Thread Peter Maydell
On Fri, 9 Dec 2022 at 11:44, Paolo Bonzini wrote: > > --- > tests/qemu-iotests/meson.build | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build > index 583468c5b9b3..3d8637c8f2b6 100644 > --- a/tests/qemu-iotests/meson.build > ++

Re: [PATCH 2/3] qapi, audio: respect build time conditions in audio schema

2022-12-12 Thread Thomas Huth
On 02/03/2021 18.55, Daniel P. Berrangé wrote: Currently the -audiodev accepts any audiodev type regardless of what is built in to QEMU. An error only occurs later at runtime when a sound device tries to use the audio backend. With this change QEMU will immediately reject -audiodev args that are

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

2022-12-12 Thread Chuang Xu
Hi! In this version: - rebase to latest upstream. - add sanity check to address_space_to_flatview(). - postpone the init of the vring cache until migration's loading completes. Please review, Chuang. [v1] The duration of loading non-iterable vmstate accounts for a significant portion of dow

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

2022-12-12 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 v2 1/3] memory: add depth assert in address_space_to_flatview

2022-12-12 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 | 9 + softmmu/memory.c | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/exec/memory.h b/inc

[RFC v2 2/3] virtio: support delay of checks in virtio_load()

2022-12-12 Thread Chuang Xu
Delay checks in virtio_load() to avoid possible address_space_to_flatview() call during memory region's begin/commit. Signed-off-by: Chuang Xu --- hw/virtio/virtio.c | 33 ++--- include/sysemu/sysemu.h | 1 + softmmu/globals.c | 3 +++ 3 files changed, 26

Re: [PATCH 30/30] meson: always log qemu-iotests verbosely

2022-12-12 Thread Paolo Bonzini
On 12/12/22 15:02, Marc-André Lureau wrote: Sounds fine, but I like silence too. Could you give a bit of motivation details? thanks! One qemu-iotests TAP testcase is comparable to a test() invocation elsewhere (in terms of both runtime and kind of test). This makes it useful to see the last

Re: [RFC PATCH v2 20/22] i386/xen: HVMOP_set_param / HVM_PARAM_CALLBACK_IRQ

2022-12-12 Thread Paul Durrant
On 12/12/2022 16:26, David Woodhouse wrote: On Mon, 2022-12-12 at 16:16 +, Paul Durrant wrote: On 09/12/2022 09:56, David Woodhouse wrote: From: Ankur Arora The HVM_PARAM_CALLBACK_IRQ parameter controls the system-wide event channel upcall method. The vector support is handled by KVM inte

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 15:47 +, Daniel P. Berrangé wrote: > Copy'ing Markus for QAPI design feedback. > > On Sat, Dec 10, 2022 at 12:10:18PM -0500, James Bottomley wrote: > > The Microsoft Simulator (mssim) is the reference emulation platform > > for the TCG TPM 2.0 specification. > > > > http

Re: [RFC PATCH v2 22/22] i386/xen: implement HYPERVISOR_sched_op

2022-12-12 Thread Paul Durrant
On 09/12/2022 09:56, David Woodhouse wrote: From: Joao Martins It allows to shutdown itself via hypercall with any of the 3 reasons: 1) self-reboot 2) shutdown 3) crash Implementing SCHEDOP_shutdown sub op let us handle crashes gracefully rather than leading to triple faults if it rem

Re: [PATCH v3] hw/rtc/mc146818rtc: Make this rtc device target independent

2022-12-12 Thread Mark Cave-Ayland
On 12/12/2022 13:48, Thomas Huth wrote: On 12/12/2022 14.39, Mark Cave-Ayland wrote: On 12/12/2022 07:56, Thomas Huth wrote: The only reason for this code being target dependent is the apic-related code in rtc_policy_slew_deliver_irq(). Since these apic functions are rather simple, we can eas

  1   2   3   >