Re: [PATCH for-7.2] target/i386: Always completely initialize TranslateFault

2022-11-30 Thread Richard Henderson
On 11/30/22 23:45, Richard Henderson wrote: In get_physical_address, the canonical address check failed to set TranslateFault.stage2, which resulted in an uninitialized read from the struct when reporting the fault in x86_cpu_tlb_fill. Adjust all error paths to use structure assignment so that t

[PATCH for-7.2] target/i386: Always completely initialize TranslateFault

2022-11-30 Thread Richard Henderson
In get_physical_address, the canonical address check failed to set TranslateFault.stage2, which resulted in an uninitialized read from the struct when reporting the fault in x86_cpu_tlb_fill. Adjust all error paths to use structure assignment so that the entire struct is always initialized. Repor

Re: [PATCH] accel/tcg: Fix undefined jump with x86_cpu_tlb_fill

2022-11-30 Thread Richard Henderson
On 11/30/22 22:48, Daniel Hoffman wrote: Signed-off-by: Daniel Hoffman --- target/i386/tcg/sysemu/excp_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c index 405a5d414a..6a93e96eb7 10064

[PULL 5/5] include/hw: VM state takes precedence in virtio_device_should_start

2022-11-30 Thread Michael S. Tsirkin
From: Alex Bennée The VM status should always preempt the device status for these checks. This ensures the device is in the correct state when we suspend the VM prior to migrations. This restores the checks to the order they where in before the refactoring moved things around. While we are at it

[PULL 2/5] vhost: enable vrings in vhost_dev_start() for vhost-user devices

2022-11-30 Thread Michael S. Tsirkin
From: Stefano Garzarella Commit 02b61f38d3 ("hw/virtio: incorporate backend features in features") properly negotiates VHOST_USER_F_PROTOCOL_FEATURES with the vhost-user backend, but we forgot to enable vrings as specified in docs/interop/vhost-user.rst: If ``VHOST_USER_F_PROTOCOL_FEATURES``

[PULL 1/5] tests/qtests: override "force-legacy" for gpio virtio-mmio tests

2022-11-30 Thread Michael S. Tsirkin
From: Alex Bennée The GPIO device is a VIRTIO_F_VERSION_1 devices but running with a legacy MMIO interface we miss out that feature bit causing confusion. For the GPIO test force the mmio bus to support non-legacy so we can properly test it. Signed-off-by: Alex Bennée Reviewed-by: Michael S. Ts

[PULL 4/5] hw/virtio: generalise CHR_EVENT_CLOSED handling

2022-11-30 Thread Michael S. Tsirkin
From: Alex Bennée ..and use for both virtio-user-blk and virtio-user-gpio. This avoids the circular close by deferring shutdown due to disconnection until a later point. virtio-user-blk already had this mechanism in place so generalise it as a vhost-user helper function and use for both blk and g

[PULL 0/5] virtio: regression fix

2022-11-30 Thread Michael S. Tsirkin
The following changes since commit b7c61789e653086618d1825858a97b3d9891e822: virtio: disable error for out of spec queue-enable (2022-11-22 05:19:00 -0500) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes

[PULL 3/5] hw/virtio: add started_vu status field to vhost-user-gpio

2022-11-30 Thread Michael S. Tsirkin
From: Alex Bennée As per the fix to vhost-user-blk in f5b22d06fb (vhost: recheck dev state in the vhost_migration_log routine) we really should track the connection and starting separately. Signed-off-by: Alex Bennée Reviewed-by: Michael S. Tsirkin Message-Id: <20221130112439.2527228-4-alex.be

Re: [PATCH] target/i386: allow MMX instructions with CR4.OSFXSR=0

2022-11-30 Thread Richard Henderson
On 11/30/22 22:43, Thomas Huth wrote: On 30/11/2022 15.19, Paolo Bonzini wrote: MMX state is saved/restored by FSAVE/FRSTOR so the instructions are not illegal opcodes even if CR4.OSFXSR=0.  Make sure that validate_vex takes into account the prefix and only checks HF_OSFXSR_MASK in the presence

Re: [PATCH 9/9] ui: Reduce nesting in hmp_change_vnc() slightly

2022-11-30 Thread Philippe Mathieu-Daudé
On 1/12/22 07:13, Markus Armbruster wrote: Transform if (good) { do stuff } else { handle error } to if (!good) { handle error return; } do stuff Signed-off-by: Markus Armbruster --- ui/ui-hmp-cmds.c | 17 +++--

Re: [PATCH 6/9] ui: Move HMP commands from monitor to new ui/ui-hmp-cmds.c

2022-11-30 Thread Philippe Mathieu-Daudé
On 1/12/22 07:13, Markus Armbruster wrote: This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "Graphics". Signed-off-by: Markus Armbruster --- monitor/hmp-cmds.c | 342 -- ui/ui-hmp-cmds.c | 360 ++

Re: regression: insmod module failed in VM with nvdimm on

2022-11-30 Thread chenxiang (M)
Hi Ard, 在 2022/11/30 16:18, Ard Biesheuvel 写道: On Wed, 30 Nov 2022 at 08:53, Marc Zyngier wrote: On Wed, 30 Nov 2022 02:52:35 +, "chenxiang (M)" wrote: Hi, We boot the VM using following commands (with nvdimm on) (qemu version 6.1.50, kernel 6.0-r4): How relevant is the presence of t

Re: [PATCH for-7.2] vhost: enable vrings in vhost_dev_start() for vhost-user devices

2022-11-30 Thread Michael S. Tsirkin
On Wed, Nov 30, 2022 at 04:03:28PM -0500, Stefan Hajnoczi wrote: > On Fri, Nov 25, 2022 at 09:12:43AM +0100, Stefano Garzarella wrote: > > On Thu, Nov 24, 2022 at 01:36:29PM -0500, Stefan Hajnoczi wrote: > > > On Wed, Nov 23, 2022 at 02:16:30PM +0100, Stefano Garzarella wrote: > > > > Commit 02b61f

Re: 回复: Re: [RESEND PATCH] virtio-pci: fix vector_irqfd leak in virtio_pci_set_guest_notifiers

2022-11-30 Thread Michael S. Tsirkin
On Thu, Dec 01, 2022 at 09:40:42AM +0800, 雷翔 wrote: > As we found, it will cause guest os crash when reboot guest os. because in > 'virtio_pci_set_guest_notifiers' function, if it failed to set guest notifier, > the error handler did not release the 'proxy->vector_irqfd' which already > alloced. wh

Re: regression: insmod module failed in VM with nvdimm on

2022-11-30 Thread chenxiang (M)
Hi Marc, 在 2022/11/30 15:53, Marc Zyngier 写道: On Wed, 30 Nov 2022 02:52:35 +, "chenxiang (M)" wrote: Hi, We boot the VM using following commands (with nvdimm on) (qemu version 6.1.50, kernel 6.0-r4): How relevant is the presence of the nvdimm? Do you observe the failure without this?

Re: [PATCH] linux-user,bsd-user: re-exec with G_SLICE=always-malloc

2022-11-30 Thread Emilio Cota
On Tue, Oct 04, 2022 at 13:00:47 +0100, Daniel P. Berrangé wrote: (snip) > Can't say I especially like this but I'm out of other ideas for how > to guarantee a solution. Users can't set env vars prior to launching > QEMU user emulators when using binfmt. An alternative is to not use GSlice between

Re: [PATCH v4 4/5] hw/virtio: generalise CHR_EVENT_CLOSED handling

2022-11-30 Thread Michael S. Tsirkin
On Wed, Nov 30, 2022 at 11:24:38AM +, Alex Bennée wrote: > ..and use for both virtio-user-blk and virtio-user-gpio. This avoids > the circular close by deferring shutdown due to disconnection until a > later point. virtio-user-blk already had this mechanism in place so > generalise it as a vhos

[PATCH] accel/tcg: Fix undefined jump with x86_cpu_tlb_fill

2022-11-30 Thread Daniel Hoffman
Signed-off-by: Daniel Hoffman --- target/i386/tcg/sysemu/excp_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c index 405a5d414a..6a93e96eb7 100644 --- a/target/i386/tcg/sysemu/excp_helper.c

Re: Monitor commands related to display server passwords

2022-11-30 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Wed, Nov 30, 2022 at 02:25:53PM +0100, Markus Armbruster wrote: >> Daniel P. Berrangé writes: > >> > In 6.0 I introduced support for 'password-secret' to SPICE and VNC >> > command line. >> > >> > I don't know why, but I only deprecated 'password' in SPICE and >>

Re: [PATCH] target/i386: allow MMX instructions with CR4.OSFXSR=0

2022-11-30 Thread Thomas Huth
On 30/11/2022 15.19, Paolo Bonzini wrote: MMX state is saved/restored by FSAVE/FRSTOR so the instructions are not illegal opcodes even if CR4.OSFXSR=0. Make sure that validate_vex takes into account the prefix and only checks HF_OSFXSR_MASK in the presence of an SSE instruction. Fixes: 20581aad

Re: [PATCH 5/9] ui: Move QMP commands from monitor to new ui/ui-qmp-cmds.c

2022-11-30 Thread Markus Armbruster
Markus Armbruster writes: > This moves these commands from MAINTAINERS section "Human > Monitor (HMP)" to "Graphics". > > Command add-client applies to socket character devices in addition to > display devices. Move it anyway. Aside: the way @protocol character > device IDs and display types is

Re: [PATCH-for-8.0 1/3] tcg/s390x: Fix coding style

2022-11-30 Thread Richard Henderson
On 11/30/22 05:26, Philippe Mathieu-Daudé wrote: We are going to modify this code, so fix its style first to avoid: ERROR: spaces required around that '*' (ctx:VxV) #281: FILE: tcg/s390x/tcg-target.c.inc:1224: +uintptr_t mask = ~(0xull << i*16);

[PATCH 4/9] ui: Clean up a few things checkpatch.pl would flag later on

2022-11-30 Thread Markus Armbruster
Fix a few style violations so that checkpatch.pl won't complain when I move this code. Signed-off-by: Markus Armbruster --- monitor/hmp-cmds.c | 7 --- monitor/qmp-cmds.c | 21 +++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/monitor/hmp-cmds.c b/monito

[PATCH 5/9] ui: Move QMP commands from monitor to new ui/ui-qmp-cmds.c

2022-11-30 Thread Markus Armbruster
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "Graphics". Command add-client applies to socket character devices in addition to display devices. Move it anyway. Aside: the way @protocol character device IDs and display types is bad design. Signed-off-by: Markus Arm

[PATCH 7/9] ui: Improve "change vnc" error reporting

2022-11-30 Thread Markus Armbruster
Switch from monitor_printf() to error_setg() and hmp_handle_error(). This makes "this is an error" more obvious both in the source and in the monitor, where hmp_handle_error() prefixes the message with "Error: ". Signed-off-by: Markus Armbruster --- monitor/hmp-cmds.c | 8 ui/ui-hmp-cm

[PATCH 8/9] ui: Factor out hmp_change_vnc(), and move to ui/ui-hmp-cmds.c

2022-11-30 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/monitor/hmp.h | 5 + monitor/hmp-cmds.c| 28 +--- ui/ui-hmp-cmds.c | 19 +++ 3 files changed, 21 insertions(+), 31 deletions(-) diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index dfbc

[PATCH 0/9] ui: Move and clean up monitor command code

2022-11-30 Thread Markus Armbruster
This is mainly about splitting off monitor-related code. There's also a few UI fixes to HMP commands sendkey and change vnc. PATCH 3 drops long-disabled code. We could bump the required version of Spice instead. Opinions? Markus Armbruster (9): ui: Check numeric part of expire_password argum

[PATCH 6/9] ui: Move HMP commands from monitor to new ui/ui-hmp-cmds.c

2022-11-30 Thread Markus Armbruster
This moves these commands from MAINTAINERS section "Human Monitor (HMP)" to "Graphics". Signed-off-by: Markus Armbruster --- monitor/hmp-cmds.c | 342 -- ui/ui-hmp-cmds.c | 360 + ui/meson.build | 1 + 3

[PATCH 9/9] ui: Reduce nesting in hmp_change_vnc() slightly

2022-11-30 Thread Markus Armbruster
Transform if (good) { do stuff } else { handle error } to if (!good) { handle error return; } do stuff Signed-off-by: Markus Armbruster --- ui/ui-hmp-cmds.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff -

[PATCH 1/9] ui: Check numeric part of expire_password argument @time properly

2022-11-30 Thread Markus Armbruster
When argument @time isn't 'now' or 'never', we parse it as an integer, optionally prefixed with '+'. If parsing fails, we silently assume zero. Report an error and fail instead. While there, use qemu_strtou64() instead of strtoull() so checkpatch.pl won't complain. Aside: encoding numbers in st

[PATCH 2/9] ui: Fix silent truncation of numeric keys in HMP sendkey

2022-11-30 Thread Markus Armbruster
Keys are int. HMP sendkey assigns them from the value strtoul(), silently truncating values greater than INT_MAX. Fix to reject them. While there, use qemu_strtoul() instead of strtoul() so checkpatch.pl won't complain. Signed-off-by: Markus Armbruster --- monitor/hmp-cmds.c | 9 +++-- 1

[PATCH 3/9] ui: Drop disabled code for SPICE_CHANNEL_WEBDAV

2022-11-30 Thread Markus Armbruster
HMP "info spice" has a bit of code to show channel type SPICE_CHANNEL_WEBDAV as "webdav", disabled since commit 7c6044a94e "hmp: info spice: take out webdav" (v2.3.0), because it compiles only with Spice versions 0.12.7 and later. Our minimum version is 0.12.5. Looks like nobody minded in more th

Re: [PATCH-for-8.0 1/3] tcg/s390x: Fix coding style

2022-11-30 Thread Wilfred Mallawa
On Wed, 2022-11-30 at 14:26 +0100, Philippe Mathieu-Daudé wrote: > We are going to modify this code, so fix its style first to avoid: > >   ERROR: spaces required around that '*' (ctx:VxV) >   #281: FILE: tcg/s390x/tcg-target.c.inc:1224: >   +    uintptr_t mask = ~(0xull << i*16); >   

Re: [PATCH v2 08/11] migration: Export dirty-limit time info

2022-11-30 Thread Hyman
在 2022/11/30 8:09, Peter Xu 写道: On Mon, Nov 21, 2022 at 11:26:40AM -0500, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Export dirty limit throttle time and estimated ring full time, through which we can observe the process of dirty limit during live migration. Signed-off-by: Hyman

回复: Re: [RESEND PATCH] virtio-pci: fix vector_irqfd leak in virtio_pci_set_guest_notifiers

2022-11-30 Thread 雷翔
As we found, it will cause guest os crash when reboot guest os. because in 'virtio_pci_set_guest_notifiers' function, if it failed to set guest notifier, the error handler did not release the 'proxy->vector_irqfd' which already alloced. when reboot guest os, into 'virtio_pci_set_guest_notifiers' fu

Re: [PATCH v2 07/11] migration: Implement dirty-limit convergence algo

2022-11-30 Thread Hyman
在 2022/11/30 7:17, Peter Xu 写道: On Mon, Nov 21, 2022 at 11:26:39AM -0500, huang...@chinatelecom.cn wrote: diff --git a/migration/migration.c b/migration/migration.c index 86950a1..096b61a 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -240,6 +240,7 @@ void migration_cancel(

Re: [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion

2022-11-30 Thread Wilfred Mallawa
On Wed, 2022-11-30 at 14:56 +0100, Philippe Mathieu-Daudé wrote: > Move "qemu/accel.h" include from the heavily included > "hw/boards.h" to hw/core/machine.c, the single file using > the AccelState definition. > > Signed-off-by: Philippe Mathieu-Daudé > --- >  hw/core/machine.c   | 1 + >  include

Re: Question about CPUTLBEntry

2022-11-30 Thread Richard Henderson
On 11/30/22 14:50, Nada Lachtar wrote: Hello, I’m trying to understand the structure of TLB in QEMU/tcg, in order to extract the physical address from the CPUTLBEntry. Would this be possible without having the virtual address and use tlb_lookup? For example, I would like to read all the phys

Question about CPUTLBEntry

2022-11-30 Thread Nada Lachtar
Hello, I’m trying to understand the structure of TLB in QEMU/tcg, in order to extract the physical address from the CPUTLBEntry. Would this be possible without having the virtual address and use tlb_lookup? For example, I would like to read all the physical addresses that are recorded in the

Re: [PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState

2022-11-30 Thread Richard Henderson
On 11/30/22 05:56, Philippe Mathieu-Daudé wrote: Forward-declare AccelState in "qemu/typedefs.h" so structures using a reference of it (like MachineState in "hw/boards.h") don't have to include "qemu/accel.h". Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h| 4 ++-- include

Re: [PATCH-for-8.0 5/5] cpu: Remove unused includes

2022-11-30 Thread Richard Henderson
On 11/30/22 05:52, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/cpu.c b/cpu.c index d6936a536b..d512b24c0a 100644 --- a/cpu.c +++ b/cpu.c @@ -31,10 +31,7 @@ #endif #include "sysemu/tcg.h" #include "sy

Re: [PATCH-for-8.0 0/5] cpu: Move target-independent code to common code

2022-11-30 Thread Richard Henderson
On 11/30/22 07:35, Paolo Bonzini wrote: Queued, thanks. I think at least two patches are broken. r~

Re: [PATCH-for-8.0 3/5] cpu: Move breakpoint helpers to common code

2022-11-30 Thread Richard Henderson
On 11/30/22 05:52, Philippe Mathieu-Daudé wrote: This code is not target-specific. Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 71 -- cpus-common.c | 72 +++ 2 files changed, 72 inse

Re: [PATCH-for-8.0 4/5] cpu: Move cpu_abort() to common code

2022-11-30 Thread Richard Henderson
On 11/30/22 05:52, Philippe Mathieu-Daudé wrote: This code is not target-specific. Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 38 -- cpus-common.c | 38 ++ 2 files changed, 38 insertions(+), 38 deletions(

Re: [PATCH-for-8.0 2/5] cpu: Move cpu_class_init_props() to common code

2022-11-30 Thread Richard Henderson
On 11/30/22 05:52, Philippe Mathieu-Daudé wrote: This code is not target-specific. Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 53 --- cpus-common.c | 53 +++ 2 files changed, 53 in

Re: [PATCH v2 1/1] tcg: convert tcg/README to rst

2022-11-30 Thread Richard Henderson
On 11/30/22 02:04, Mark Cave-Ayland wrote: + * - eqv_i32/i64 *t0*, *t1*, *t2* + + - | *t0* = ~(*t1* ^ *t2*), or equivalently, *t0* = *t1* & ~\ *t2* t1 ^ ~t2 The only typo I saw, fixed while queuing. r~

[ANNOUNCE] QEMU 7.2.0-rc3 is now available

2022-11-30 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the fourth release candidate for the QEMU 7.2 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-7.2.0-rc3.tar.xz http://downl

Re: [PATCH v4 4/5] hw/virtio: generalise CHR_EVENT_CLOSED handling

2022-11-30 Thread Stefan Hajnoczi
On Wed, Nov 30, 2022 at 11:24:38AM +, Alex Bennée wrote: > ..and use for both virtio-user-blk and virtio-user-gpio. This avoids > the circular close by deferring shutdown due to disconnection until a > later point. I thought re-entrancy was already avoided by Patch 3? > virtio-user-blk alread

Re: [PATCH] target/i386: allow MMX instructions with CR4.OSFXSR=0

2022-11-30 Thread Richard Henderson
On 11/30/22 06:19, Paolo Bonzini wrote: MMX state is saved/restored by FSAVE/FRSTOR so the instructions are not illegal opcodes even if CR4.OSFXSR=0. Make sure that validate_vex takes into account the prefix and only checks HF_OSFXSR_MASK in the presence of an SSE instruction. Fixes: 20581aadec

Re: [PATCH 24/26] tcg: Introduce tcg_temp_ebb_new_*

2022-11-30 Thread Richard Henderson
On 11/30/22 10:07, Ilya Leoshkevich wrote: Reviewed-by: Ilya Leoshkevich While not directly related to this patch, it would be good to update tcg/README with all the new kinds of temporaries. E.g. the EBB ones are not mentioned there: TCG instructions operate on variables which are tempor

Re: [PATCH for-7.2] vhost: enable vrings in vhost_dev_start() for vhost-user devices

2022-11-30 Thread Stefan Hajnoczi
On Fri, Nov 25, 2022 at 09:12:43AM +0100, Stefano Garzarella wrote: > On Thu, Nov 24, 2022 at 01:36:29PM -0500, Stefan Hajnoczi wrote: > > On Wed, Nov 23, 2022 at 02:16:30PM +0100, Stefano Garzarella wrote: > > > Commit 02b61f38d3 ("hw/virtio: incorporate backend features in features") > > > proper

Re: [PATCH-for-8.0 0/2] target/tcg: Use TCGv_i64 with tcg_temp_new_i64()

2022-11-30 Thread Richard Henderson
On 11/30/22 08:34, Philippe Mathieu-Daudé wrote: Although on 64-bit targets TCGv is defined as TCGv_i64, clarify using the correct type for tcg_temp_new_i64(). Philippe Mathieu-Daudé (2): target/s390x: Replace TCGv by TCGv_i64 in op_mov2e() target/sparc64: Replace TCGv by TCGv_i64 in gen_o

Re: [PATCH-for-8.0 0/3] tcg: Replace tcg_target_[u]long -> [u]intptr_t

2022-11-30 Thread Richard Henderson
On 11/30/22 05:26, Philippe Mathieu-Daudé wrote: Trivial cleanup (99% mechanical) suggested by rth: the tcg_target_[u]long type is redundant with [u]intptr_t. Ah, no, what I said was that much of the usage in tcg-op.h should be either ptrdiff_t or intptr_t. In particular, e.g. static inline

Re: [PATCH for-7.2] block-backend: avoid bdrv_unregister_buf() NULL pointer deref

2022-11-30 Thread Stefan Hajnoczi
Merged. I will work on supporting graph changes. Stefan

Re: [PATCH for-7.2] target/arm: Set TCGCPUOps.restore_state_to_opc for v7m

2022-11-30 Thread Stefan Hajnoczi
Merged, thanks! Stefan

Re: [RFC PATCH-for-7.2 v3 0/5] hw/display/qxl: Avoid buffer overrun in qxl_phys2virt()

2022-11-30 Thread Stefan Hajnoczi
On Mon, 28 Nov 2022 at 15:30, Philippe Mathieu-Daudé wrote: > > Since v2: > - Do not abort checking guest-provided addresses (Stefan) > - Handle chunked QEMUCursor (Gerd) > > Since v1: > - Moved overrun check in qxl_get_check_slot_offset (Marc-André) > > memory_region_get_ram_ptr() returns a host

Re: [PATCH qemu.git 0/1] hw/arm/virt: make second UART available

2022-11-30 Thread Axel Heider
Alex, It would also be worth updating ./docs/system/arm/virt.rst to document this feature. Good point. I will add this in the next iteration of the patch. Until then, the proposed doc changes can be found here: https://gitlab.com/axel-h/qemu/-/merge_requests/1/diffs Axel

Re: [PATCH qemu.git 0/1] hw/arm/virt: make second UART available

2022-11-30 Thread Alex Bennée
~axelheider writes: > This is a follow-up on older attempts to make a second UART > available for the arm-virt machine in normal world. The use case > is, that this give a simple I/O channel in addition to stdout, as this > simplifies various test scenarios. Especially for non-Linux operating >

[PATCH qemu.git 1/1] hw/arm/virt: add 2x sp804 timer

2022-11-30 Thread ~axelheider
From: Axel Heider Add 2x sp804 timer devices. Co-Authored-by: Florian Hauschild Signed-off-by: Axel Heider --- docs/system/arm/virt.rst | 1 + hw/arm/Kconfig | 1 + hw/arm/virt.c| 47 include/hw/arm/virt.h| 2 ++ 4 files ch

[PATCH qemu.git 0/1] hw/arm/virt: add 2x sp804 timer

2022-11-30 Thread ~axelheider
This patch adds timer peripherals to the arm-virt machine. The use case is, that this machine is quite useful for testing purposes when it comes to non-Linux operating system (seL4 in our case). However, is currently lacks a dedicates timer peripheral, so some scenarios cannot be tested easily with

Re: [PATCH v2 1/1] tcg: convert tcg/README to rst

2022-11-30 Thread Fabiano Rosas
Mark Cave-Ayland writes: > Convert tcg/README to rst and move it to docs/devel as a new "TCG Intermediate > Representation" page. There are a few minor changes to improve the aesthetic > of the final output which are as follows: > > - Rename the title from "Tiny Code Generator - Fabrice Bellard

Re: [PATCH qemu.git 1/1] hw/arm/virt: make second UART available

2022-11-30 Thread Axel Heider
Hi, +    switch(uart) { +    case VIRT_UART0: +    break; +    case VIRT_UART1: Maybe pass a 'is_secure' boolean? I don't think this would really make things easier. I wanted to avoid too many changes in this patch. The price is, that there are two places where decisions about the conf

Re: [PATCH 08/12] pci: Fix silent truncation of pcie_aer_inject_error argument

2022-11-30 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> PCI AER error status is 32 bit. When the HMP command's second >> argument parses as a number, values greater than ULONG_MAX get >> rejected, but values between UINT32_MAX+1 and ULONG_MAX get silently >> truncate

Re: [PATCH qemu.git 1/1] hw/arm/virt: make second UART available

2022-11-30 Thread Philippe Mathieu-Daudé
Hi Axel, On 14/11/22 13:06, ~axelheider wrote: From: Axel Heider The first UART always always exists. If the security extensions are enabled, the second UART also always exists. Otherwise, it only exists if a backend is configured explicitly via '-serial ', where 'null' creates a dummy backend

Re: [PATCH] MAINTAINERS: Add 9p test client to section "virtio-9p"

2022-11-30 Thread Christian Schoenebeck
On Monday, November 28, 2022 6:12:04 PM CET Christian Schoenebeck wrote: > The 9p test cases use a dedicated, lite-weight 9p client implementation > (using virtio transport) under tests/qtest/libqos/ to communicate with > QEMU's 9p server. > > It's already there for a long time. Let's officially a

Re: [PATCH 25/26] tcg: Introduce tcg_temp_is_normal_*

2022-11-30 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:20PM -0700, Richard Henderson wrote: > Allow targets to determine if a given temp will die across a branch. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- > include/tcg/tcg-op.h | 2 ++ > include/tcg/tcg.h| 15 +++

Re: [PATCH 24/26] tcg: Introduce tcg_temp_ebb_new_*

2022-11-30 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:19PM -0700, Richard Henderson wrote: > Allow targets to allocate extended-basic-block temps. > > Signed-off-by: Richard Henderson > --- > include/tcg/tcg-op.h | 2 ++ > include/tcg/tcg.h| 20 +++- > tcg/tcg.c| 16 >

Re: [PATCH 23/26] tcg: Pass TCGTempKind to tcg_temp_new_internal

2022-11-30 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:18PM -0700, Richard Henderson wrote: > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- > include/tcg/tcg.h | 14 +++--- > tcg/tcg.c | 20 +++- > 2 files changed, 22 insertions(+), 12 deletions(-) Reviewed

Re: [PATCH 22/26] target/s390x: Pass original r2 register to BCR

2022-11-30 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:17PM -0700, Richard Henderson wrote: > We do not modify any general-purpose registers in BCR, > which means that we may be able to avoid saving the > value across a branch. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 10 ++ >

[PATCH 2/2] tests/tcg/s390x: Add per.S

2022-11-30 Thread Ilya Leoshkevich
Add a small test to avoid regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/per.S | 55 + 2 files changed, 56 insertions(+) create mode 100644 tests/tcg/s390x/per.S diff --git a/tests/tcg/s

[PATCH 1/2] target/s390x: Fix successful-branch PER events

2022-11-30 Thread Ilya Leoshkevich
The branching code sets per_perc_atmid, but afterwards it does goto_tb/exit_tb, so per_check_exception() added by translate_one() is not reached. Fix by raising PER exception in per_branch(). Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/misc_helper.c | 1 + 1 file changed, 1 insertion(+

Re: [PATCH 21/26] target/s390x: Remove PER check from use_goto_tb

2022-11-30 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:16PM -0700, Richard Henderson wrote: > While it is common for the PC update to happen in the > shadow of a goto_tb, it is not required to be there. > By moving it before the goto_tb, we can also place the > call to helper_per_branch there, and then afterward > chain to

[PATCH qemu.git 0/1] hw/arm/virt: make second UART available

2022-11-30 Thread ~axelheider
This is a follow-up on older attempts to make a second UART available for the arm-virt machine in normal world. The use case is, that this give a simple I/O channel in addition to stdout, as this simplifies various test scenarios. Especially for non-Linux operating system,s (e.g. seL4) where arm-vi

[PATCH qemu.git 1/1] hw/arm/virt: make second UART available

2022-11-30 Thread ~axelheider
From: Axel Heider The first UART always always exists. If the security extensions are enabled, the second UART also always exists. Otherwise, it only exists if a backend is configured explicitly via '-serial ', where 'null' creates a dummy backend. This allows enabling the second UART explicitly

Re: [PATCH 0/3] Fix UNMAP notifier for intel-iommu

2022-11-30 Thread Michael S. Tsirkin
On Tue, Nov 29, 2022 at 04:10:34PM +0800, Jason Wang wrote: > Hi All: > > According to ATS, device should work if ATS is disabled. This is not > correctly implemented in the current intel-iommu since it doesn't > handle the UNMAP notifier correctly. This breaks the vhost-net + > vIOMMU without dt.

[PATCH-for-8.0 0/2] target/tcg: Use TCGv_i64 with tcg_temp_new_i64()

2022-11-30 Thread Philippe Mathieu-Daudé
Although on 64-bit targets TCGv is defined as TCGv_i64, clarify using the correct type for tcg_temp_new_i64(). Philippe Mathieu-Daudé (2): target/s390x: Replace TCGv by TCGv_i64 in op_mov2e() target/sparc64: Replace TCGv by TCGv_i64 in gen_op_multiply() target/s390x/tcg/translate.c | 2 +- t

[PATCH-for-8.0 1/2] target/s390x: Replace TCGv by TCGv_i64 in op_mov2e()

2022-11-30 Thread Philippe Mathieu-Daudé
Although TCGv is defined as TCGv_i64 on s390x, make it clear tcg_temp_new_i64() returns a TCGv_i64. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/tcg/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate

[PATCH-for-8.0 2/2] target/sparc64: Replace TCGv by TCGv_i64 in gen_op_multiply()

2022-11-30 Thread Philippe Mathieu-Daudé
Although TCGv is defined as TCGv_i64 on sparc64, make it clear tcg_temp_new_i64() returns a TCGv_i64. Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c ind

Exposing Mac Host Internal Microphone to Guests

2022-11-30 Thread DUO Labs
Is there any documentation on creating a new microphone/camera that can be exposed to the guest? I'm thinking of writing one to support MacOS hosts, but I don't know where to start. I see that there's something called QOM, but I'm not sure how to use it.

Re: [PATCH v15 1/6] qmp: add QMP command x-query-virtio

2022-11-30 Thread Philippe Mathieu-Daudé
Hi, On 11/8/22 14:24, Jonah Palmer wrote: From: Laurent Vivier This new command lists all the instances of VirtIODevices with their canonical QOM path and name. [Jonah: @virtio_list duplicates information that already exists in the QOM composition tree. However, extracting necessary informa

Re: [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion

2022-11-30 Thread Paolo Bonzini
On Wed, Nov 30, 2022 at 4:43 PM Philippe Mathieu-Daudé wrote: > > On 30/11/22 16:17, Fabiano Rosas wrote: > > Philippe Mathieu-Daudé writes: > > > >> Move "qemu/accel.h" include from the heavily included > >> "hw/boards.h" to hw/core/machine.c, the single file using > >> the AccelState definition

Re: [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion

2022-11-30 Thread Philippe Mathieu-Daudé
On 30/11/22 16:17, Fabiano Rosas wrote: Philippe Mathieu-Daudé writes: Move "qemu/accel.h" include from the heavily included "hw/boards.h" to hw/core/machine.c, the single file using the AccelState definition. Do you mean accel_init_interfaces() and ACCEL_GET_CLASS? I don't see AccelState ex

Re: [PATCH-for-8.0 0/5] cpu: Move target-independent code to common code

2022-11-30 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH-for-8.0 0/2] hw: Reduce "qemu/accel.h" inclusion

2022-11-30 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH 3/3] intel-iommu: build iova tree during IOMMU translation

2022-11-30 Thread Peter Xu
On Wed, Nov 30, 2022 at 02:33:51PM +0800, Jason Wang wrote: > On Tue, Nov 29, 2022 at 11:57 PM Peter Xu wrote: > > > > On Tue, Nov 29, 2022 at 04:10:37PM +0800, Jason Wang wrote: > > > The IOVA tree is only built during page walk this breaks the device > > > that tries to use UNMAP notifier only.

Re: [PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion

2022-11-30 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > Move "qemu/accel.h" include from the heavily included > "hw/boards.h" to hw/core/machine.c, the single file using > the AccelState definition. Do you mean accel_init_interfaces() and ACCEL_GET_CLASS? I don't see AccelState explicitly. Anyway, Reviewed-by: Fabia

Re: [PATCH 1/3] intel-iommu: fail MAP notifier without caching mode

2022-11-30 Thread Peter Xu
On Wed, Nov 30, 2022 at 02:23:06PM +0800, Jason Wang wrote: > On Tue, Nov 29, 2022 at 11:35 PM Peter Xu wrote: > > > > On Tue, Nov 29, 2022 at 04:10:35PM +0800, Jason Wang wrote: > > > Without caching mode, MAP notifier won't work correctly since guest > > > won't send IOTLB update event when it e

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

2022-11-30 Thread Michael Roth
On Wed, Nov 30, 2022 at 05:39:31PM +0800, Chao Peng wrote: > On Tue, Nov 29, 2022 at 01:18:15PM -0600, Michael Roth wrote: > > On Tue, Nov 29, 2022 at 01:06:58PM -0600, Michael Roth wrote: > > > On Tue, Nov 29, 2022 at 10:06:15PM +0800, Chao Peng wrote: > > > > On Mon, Nov 28, 2022 at 06:37:25PM -0

Re: [PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState

2022-11-30 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > Forward-declare AccelState in "qemu/typedefs.h" so structures > using a reference of it (like MachineState in "hw/boards.h") > don't have to include "qemu/accel.h". > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas

[PATCH] target/i386: allow MMX instructions with CR4.OSFXSR=0

2022-11-30 Thread Paolo Bonzini
MMX state is saved/restored by FSAVE/FRSTOR so the instructions are not illegal opcodes even if CR4.OSFXSR=0. Make sure that validate_vex takes into account the prefix and only checks HF_OSFXSR_MASK in the presence of an SSE instruction. Fixes: 20581aadec5e ("target/i386: validate VEX prefixes vi

[PATCH-for-8.0 2/2] hw: Reduce "qemu/accel.h" inclusion

2022-11-30 Thread Philippe Mathieu-Daudé
Move "qemu/accel.h" include from the heavily included "hw/boards.h" to hw/core/machine.c, the single file using the AccelState definition. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/machine.c | 1 + include/hw/boards.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH-for-8.0 0/2] hw: Reduce "qemu/accel.h" inclusion

2022-11-30 Thread Philippe Mathieu-Daudé
Another trivial series, restricting "qemu/accel.h". Philippe Mathieu-Daudé (2): typedefs: Forward-declare AccelState hw: Reduce "qemu/accel.h" inclusion hw/core/machine.c | 1 + include/hw/boards.h | 1 - include/qemu/accel.h| 4 ++-- include/qemu/typedefs.h | 1 + 4 files chan

[PATCH-for-8.0 1/2] typedefs: Forward-declare AccelState

2022-11-30 Thread Philippe Mathieu-Daudé
Forward-declare AccelState in "qemu/typedefs.h" so structures using a reference of it (like MachineState in "hw/boards.h") don't have to include "qemu/accel.h". Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h| 4 ++-- include/qemu/typedefs.h | 1 + 2 files changed, 3 insertion

[PATCH-for-8.0 1/5] cpu: Remove capstone meson dependency

2022-11-30 Thread Philippe Mathieu-Daudé
Only disas.c requires capstone CFLAGS, not cpu.c. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 5c6b5a1c75..92d449f854 100644 --- a/meson.build +++ b/meson.build @@ -3097,11 +3097,12 @@

[PATCH-for-8.0 2/5] cpu: Move cpu_class_init_props() to common code

2022-11-30 Thread Philippe Mathieu-Daudé
This code is not target-specific. Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 53 --- cpus-common.c | 53 +++ 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/cpu.c b/cpu

[PATCH-for-8.0 3/5] cpu: Move breakpoint helpers to common code

2022-11-30 Thread Philippe Mathieu-Daudé
This code is not target-specific. Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 71 -- cpus-common.c | 72 +++ 2 files changed, 72 insertions(+), 71 deletions(-) diff --git a/cpu.c b/cpu.

[PATCH-for-8.0 4/5] cpu: Move cpu_abort() to common code

2022-11-30 Thread Philippe Mathieu-Daudé
This code is not target-specific. Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 38 -- cpus-common.c | 38 ++ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/cpu.c b/cpu.c index 385e72e140..d6936

[PATCH-for-8.0 5/5] cpu: Remove unused includes

2022-11-30 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/cpu.c b/cpu.c index d6936a536b..d512b24c0a 100644 --- a/cpu.c +++ b/cpu.c @@ -31,10 +31,7 @@ #endif #include "sysemu/tcg.h" #include "sysemu/kvm.h" -#include "exec/cpu-common.h" -#include "exe

Re: [RESEND PATCH] ide: Add "ide-cf" driver, a CompactFlash card

2022-11-30 Thread Paolo Bonzini
Queued, thanks. Paolo

  1   2   >