Re: [PATCH 5/7] target/hppa: copy new_spc to iasq_f on be,n instruction

2024-03-19 Thread Sven Schnelle
Richard Henderson writes: > On 3/17/24 12:14, Sven Schnelle wrote: >> Otherwise the first instruction at the new location gets executed from >> the old space. >> Signed-off-by: Sven Schnelle >> --- >> target/hppa/translate.c | 3 +++ >> 1 file changed, 3 insertions(+) >> diff --git a/target/h

Re: [PATCH 3/7] target/hppa: fix access_id check

2024-03-19 Thread Sven Schnelle
Richard Henderson writes: > On 3/17/24 12:14, Sven Schnelle wrote: >> /* If bits [31:1] match, and bit 0 is set, suppress write. */ >> -int match = ent->access_id * 2 + 1; >> - >> -if (match == env->cr[CR_PID1] || match == env->cr[CR_PID2] || >> -match == env

Re: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback

2024-03-19 Thread Eric Auger
Hi Zhenzhong, On 3/19/24 06:44, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: Re: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create >> callback >> >> >> >> On 2/28/24 04:58, Zhenzhong Duan wrote: >>> Introduce host_iommu_device_create callback and

Re: [PATCH v1 08/11] vfio/pci: Allocate and initialize HostIOMMUDevice after attachment

2024-03-19 Thread Eric Auger
On 3/19/24 04:46, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: Re: [PATCH v1 08/11] vfio/pci: Allocate and initialize >> HostIOMMUDevice after attachment >> >> >> >> On 2/28/24 04:58, Zhenzhong Duan wrote: >>> Signed-off-by: Zhenzhong Duan >>> --- >>>

[PATCH] aspeed/smc: Only wire flash devices at reset

2024-03-19 Thread Cédric Le Goater
The Aspeed machines have many Static Memory Controllers (SMC), up to 8, which can only drive flash memory devices. Commit 27a2c66c92ec ("aspeed/smc: Wire CS lines at reset") tried to ease the definitions of these devices by allowing flash devices from the command line to be attached to a SSI bus. F

Re: [PATCH for 9.0 v15 03/10] target/riscv/vector_helper.c: fix 'vmvr_v' memcpy endianess

2024-03-19 Thread LIU Zhiwei
On 2024/3/15 1:56, Daniel Henrique Barboza wrote: vmvr_v isn't handling the case where the host might be big endian and the bytes to be copied aren't sequential. Suggested-by: Richard Henderson Fixes: f714361ed7 ("target/riscv: rvv-1.0: implement vstart CSR") Signed-off-by: Daniel Henrique Ba

Re: [PATCH] aspeed/smc: Only wire flash devices at reset

2024-03-19 Thread Thomas Huth
On 19/03/2024 08.33, Cédric Le Goater wrote: The Aspeed machines have many Static Memory Controllers (SMC), up to 8, which can only drive flash memory devices. Commit 27a2c66c92ec ("aspeed/smc: Wire CS lines at reset") tried to ease the definitions of these devices by allowing flash devices from

Re: [PATCH 2/3 for 9.0] Revert "chardev/char-socket: Fix TLS io channels sending too much data to the backend"

2024-03-19 Thread Thomas Huth
On 18/03/2024 19.23, Daniel P. Berrangé wrote: This commit results in unexpected termination of the TLS connection. When 'fd_can_read' returns 0, the code goes on to pass a zero length buffer to qio_channel_read. The TLS impl calls into gnutls_recv() with this zero length buffer, at which point G

Re: [PATCH 1/3 for 9.0] chardev: lower priority of the HUP GSource in socket chardev

2024-03-19 Thread Thomas Huth
On 18/03/2024 19.23, Daniel P. Berrangé wrote: The socket chardev often has 2 GSource object registered against the same FD. One is registered all the time and is just intended to handle POLLHUP events, while the other gets registered & unregistered on the fly as the frontend is ready to receive

Re: [PATCH for 9.0 v15 04/10] target/riscv: always clear vstart in whole vec move insns

2024-03-19 Thread LIU Zhiwei
On 2024/3/15 1:56, Daniel Henrique Barboza wrote: These insns have 2 paths: we'll either have vstart already cleared if vstart_eq_zero or we'll do a brcond to check if vstart >= maxsz to call the 'vmvr_v' helper. The helper will clear vstart if it executes until the end, or if vstart >= vl. Fo

Re: [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice

2024-03-19 Thread Cédric Le Goater
Hello Zhenzhong, On 2/28/24 04:58, Zhenzhong Duan wrote: HostIOMMUDevice will be inherited by two sub classes, legacy and iommufd currently. Introduce a helper function host_iommu_base_device_init to initialize it. Suggested-by: Eric Auger Signed-off-by: Zhenzhong Duan --- include/sysemu/h

Re: [PATCH 3/3 for 9.0] Revert "chardev: use a child source for qio input source"

2024-03-19 Thread Thomas Huth
On 18/03/2024 19.23, Daniel P. Berrangé wrote: This reverts commit a7077b8e354d90fec26c2921aa2dea85b90dff90, and add comments to explain why child sources cannot be used. Reviewed-by: Thomas Huth

Re: [PATCH v2 0/4] ui/console: Remove console_select()

2024-03-19 Thread Marc-André Lureau
Hi Akihiko On Tue, Mar 19, 2024 at 7:09 AM Akihiko Odaki wrote: > > ui/console has a concept of "active" console; the active console is used > when NULL is set for DisplayListener::con, and console_select() updates > the active console state. However, the global nature of the state cause > odd be

[PATCH] block/io: accept NULL qiov in bdrv_pad_request

2024-03-19 Thread Fiona Ebner
From: Stefan Reiter Some operations, e.g. block-stream, perform reads while discarding the results (only copy-on-read matters). In this case, they will pass NULL as the target QEMUIOVector, which will however trip bdrv_pad_request, since it wants to extend its passed vector. In particular, this i

Re: 答复: [PATCH v1 1/2] system/cpus: Fix pause_all_vcpus() under concurrent environment

2024-03-19 Thread David Hildenbrand
On 19.03.24 06:06, zhukeqian wrote: Hi David, Thanks for reviewing. On 17.03.24 09:37, Keqian Zhu via wrote: Both main loop thread and vCPU thread are allowed to call pause_all_vcpus(), and in general resume_all_vcpus() is called after it. Two issues live in pause_all_vcpus(): In general, ca

Re: 答复: [PATCH v1 2/2] system/cpus: Fix resume_all_vcpus() under vCPU hotplug condition

2024-03-19 Thread David Hildenbrand
On 19.03.24 06:11, zhukeqian wrote: Hi David, On 17.03.24 09:37, Keqian Zhu via wrote: For vCPU being hotplugged, qemu_init_vcpu() is called. In this function, we set vcpu state as stopped, and then wait vcpu thread to be created. As the vcpu state is stopped, it will inform us it has been cre

[PATCH] ui: compile dbus-display1.c with -fPIC as necessary

2024-03-19 Thread marcandre . lureau
From: Marc-André Lureau Building dbus-display1.c explicitly as a static library drops -fPIC by default, which may not be correct if it ends up linked to a shared library. Let the target decide how to build the unit, with or without -fPIC. This makes commit 186acfbaf7 ("tests/qtest: Depend on dbu

Re: [PATCH 0/3 for 9.0] Fix TLS support for chardevs and incoming data loss on EOF

2024-03-19 Thread Thomas Huth
On 18/03/2024 19.23, Daniel P. Berrangé wrote: This fixes a problem with TLS support on chardevs that Thomas has previously attempted to deal with: https://lists.nongnu.org/archive/html/qemu-devel/2024-02/msg06915.html Unfortunately that fix caused unexpected side effects that resulted in pr

Re: [PATCH for-9.0 v3] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-19 Thread Kevin Wolf
Am 18.03.2024 um 20:27 hat Eugenio Perez Martin geschrieben: > On Mon, Mar 18, 2024 at 10:02 AM Michael S. Tsirkin wrote: > > > > On Mon, Mar 18, 2024 at 12:31:26PM +0800, Jason Wang wrote: > > > On Fri, Mar 15, 2024 at 11:59 PM Kevin Wolf wrote: > > > > > > > > VDUSE requires that virtqueues are

Re: [PULL 00/10] Migration 20240317 patches

2024-03-19 Thread Peter Maydell
On Sun, 17 Mar 2024 at 20:58, wrote: > > From: Peter Xu > > The following changes since commit 35ac6831d98e18e2c78c85c93e3a6ca1f1ae3e58: > > Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into > staging (2024-03-12 13:42:57 +) > > are available in the Git repository at: >

Re: [PULL 00/15] Block layer patches

2024-03-19 Thread Peter Maydell
On Mon, 18 Mar 2024 at 13:04, Kevin Wolf wrote: > > The following changes since commit ba49d760eb04630e7b15f423ebecf6c871b8f77b: > > Merge tag 'pull-maintainer-final-130324-1' of > https://gitlab.com/stsquad/qemu into staging (2024-03-13 15:12:14 +) > > are available in the Git repository a

Re: [PULL v2 0/4] machine development tool

2024-03-19 Thread Peter Maydell
On Mon, 18 Mar 2024 at 21:36, Maksim Davydov wrote: > > The following changes since commit ba49d760eb04630e7b15f423ebecf6c871b8f77b: > > Merge tag 'pull-maintainer-final-130324-1' of > https://gitlab.com/stsquad/qemu into staging (2024-03-13 15:12:14 +) > > are available in the Git reposito

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-19 Thread Cédric Le Goater
On 3/15/24 15:52, Peter Xu wrote: On Fri, Mar 15, 2024 at 03:21:27PM +0100, Cédric Le Goater wrote: On 3/15/24 13:20, Cédric Le Goater wrote: On 3/15/24 12:01, Peter Xu wrote: On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: migrate_set_state is also unintuitive because it ig

Re: [PATCH 01/22] tcg: Add TCGContext.emit_before_op

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:56, Richard Henderson wrote: Allow operations to be emitted via normal expanders into the middle of the opcode stream. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 + tcg/tcg.c | 14 -- 2 files changed, 13 insertions(+), 2 deletions(-) diff

Re: [PATCH 3/3 for 9.0] Revert "chardev: use a child source for qio input source"

2024-03-19 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 12:20:18AM +0400, Marc-André Lureau wrote: > Hi > > On Mon, Mar 18, 2024 at 10:25 PM Daniel P. Berrangé > wrote: > > > > This reverts commit a7077b8e354d90fec26c2921aa2dea85b90dff90, > > and add comments to explain why child sources cannot be used. > > > > When a GSource

Re: [PATCH] build: Re-introduce an 'info' target to build a Texinfo manual.

2024-03-19 Thread Peter Maydell
On Mon, 18 Mar 2024 at 03:05, Maxim Cournoyer wrote: > > This reinstates > , > which was committed at some point but reverted many years later in > cleanups that followed the migration from Texinfo sources to the > ReStructuredTe

RE: [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice

2024-03-19 Thread Duan, Zhenzhong
Hi Cédric, >-Original Message- >From: Cédric Le Goater >Sent: Tuesday, March 19, 2024 4:17 PM >To: Duan, Zhenzhong ; qemu- >de...@nongnu.org >Cc: alex.william...@redhat.com; eric.au...@redhat.com; >pet...@redhat.com; jasow...@redhat.com; m...@redhat.com; >j...@nvidia.com; nicol...@nvidia.

KVM/QEMU Community Call 5th March Agenda Items

2024-03-19 Thread Alex Bennée
The KVM/QEMU community call is at: https://meet.jit.si/kvmcallmeeting @ 19/3/2024 14:00 UTC Are there any agenda items for the sync-up? I maintain the invite on our Linaro project calendar here: https://calendar.google.com/calendar/event?action=TEMPLATE&tmeid=MWd2dWI5NDM1bzdocnJlbTBh

Re: [PATCH] build: Re-introduce an 'info' target to build a Texinfo manual.

2024-03-19 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 11:47:59AM +, Peter Maydell wrote: > On Mon, 18 Mar 2024 at 03:05, Maxim Cournoyer > wrote: > > > > This reinstates > > , > > which was committed at some point but reverted many years later in > > cle

Re: [PATCH 1/2] vl: convert qemu_machine_creation_done() to Error **

2024-03-19 Thread Philippe Mathieu-Daudé
On 18/3/24 22:56, Paolo Bonzini wrote: Allow using Error ** to pass an error string up to qmp_x_exit_preconfig() and possibly main(). Signed-off-by: Paolo Bonzini --- system/vl.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH-for-9.0] monitor/hmp-cmds-target.c: append a space in error message in gpa2hva()

2024-03-19 Thread Philippe Mathieu-Daudé
On 19/3/24 03:16, Shiyang Ruan via wrote: From: Yao Xingtao In qemu monitor mode, when we use gpa2hva command to print the host virtual address corresponding to a guest physical address, if the gpa is not in RAM, the error message is below: (qemu) gpa2hva 0x75000 Memory at address 0x75

Re: [PATCH 22/22] plugins: Update the documentation block for plugin-gen.c

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 31 --- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index fd52ea3987..c354825779 100644 --- a

Re: [PATCH 17/22] plugins: Replace pr_ops with a proper debug dump flag

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: The DEBUG_PLUGIN_GEN_OPS ifdef is replaced with "-d op_plugin". The second pr_ops call can be obtained with "-d op". Signed-off-by: Richard Henderson --- include/qemu/log.h | 1 + include/tcg/tcg.h | 1 + accel/tcg/plugin-gen.c | 68

Invitation: QEMU/KVM developers conference call @ Every 2 weeks from 13:00 to 14:00 on Tuesday (GMT) (qemu-devel@nongnu.org)

2024-03-19 Thread Alex Bennée
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:America/New_York X-LIC-LOCATION:America/New_York BEGIN:DAYLIGHT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 TZNAME:EDT DTSTART:19700308T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYD

Invitation: QEMU/KVM developers conference call @ Tue 16 Apr 2024 14:00 - 15:00 (BST) (qemu-devel@nongnu.org)

2024-03-19 Thread Alex Bennée
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:America/New_York X-LIC-LOCATION:America/New_York BEGIN:DAYLIGHT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 TZNAME:EDT DTSTART:19700308T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYD

Invitation: QEMU/KVM developers conference call @ Tue 2 Apr 2024 14:00 - 15:00 (BST) (qemu-devel@nongnu.org)

2024-03-19 Thread Alex Bennée
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:America/New_York X-LIC-LOCATION:America/New_York BEGIN:DAYLIGHT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 TZNAME:EDT DTSTART:19700308T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYD

Re: [PATCH 14/22] tcg: Remove INDEX_op_plugin_cb_{start,end}

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: These opcodes are no longer used. Signed-off-by: Richard Henderson --- include/tcg/tcg-op-common.h | 2 -- include/tcg/tcg-opc.h | 2 -- accel/tcg/plugin-gen.c | 18 -- tcg/tcg-op.c| 10 -- 4 f

Re: [PATCH 13/22] tcg: Remove TCG_CALL_PLUGIN

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: Since we no longer emit plugin helpers during the initial code translation phase, we don't need to specially mark plugin helpers. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 -- plugins/core.c| 10 -- tcg/tcg.c |

Re: [PATCH] configure: Fix error message when C compiler is not working

2024-03-19 Thread Peter Maydell
On Fri, 8 Mar 2024 at 06:01, Thomas Huth wrote: > > If you try to run the configure script on a system without a working > C compiler, you get a very misleading error message: > > ERROR: Unrecognized host OS (uname -s reports 'Linux') > > We should rather tell the user that we were not able to us

Re: [PATCH 06/22] plugins: Create TCGHelperInfo for all out-of-line callbacks

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: TCGHelperInfo includes the ABI for every function call. Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 1 + plugins/core.c| 51 ++- 2 files changed, 46 insertions(+), 6 deletions(-) di

Re: [PATCH 2/3 for 9.0] Revert "chardev/char-socket: Fix TLS io channels sending too much data to the backend"

2024-03-19 Thread Daniel P . Berrangé
On Mon, Mar 18, 2024 at 11:09:23PM +0400, Marc-André Lureau wrote: > Hi > > On Mon, Mar 18, 2024 at 10:23 PM Daniel P. Berrangé > wrote: > > > > This commit results in unexpected termination of the TLS connection. > > When 'fd_can_read' returns 0, the code goes on to pass a zero length > > buffe

Request for Support: QEMU IPv6 Port Forwarding Issue

2024-03-19 Thread Srinivasu Kandukuri (MS/ECP2-ETAS-VOS)
Dear QEMU Support Team, We are currently encountering difficulties in utilizing QEMU for starting a virtual machine image on Windows with IPv6 networking, specifically related to port forwarding. We are using QEMU emulator version 7.1.93 (v7.2.0-rc3-11946-gb68e69cdcc-dirty). Our objective is t

Re: [PATCH 05/22] plugins: Move function pointer in qemu_plugin_dyn_cb

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: The out-of-line function pointer is mutually exclusive with inline expansion, so move it into the union. Wrap the pointer in a structure named 'regular' to match PLUGIN_CB_REGULAR. Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 4 +++-

Re: [PATCH 08/22] plugins: Use emit_before_op for PLUGIN_GEN_FROM_TB

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: By having the qemu_plugin_cb_flags be recorded in the TCGHelperInfo, we no longer need to distinguish PLUGIN_CB_REGULAR from PLUGIN_CB_REGULAR_R, so place all TB callbacks in the same queue. Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c

Re: 答复: [PATCH v1 1/2] system/cpus: Fix pause_all_vcpus() under concurrent environment

2024-03-19 Thread David Hildenbrand
On 19.03.24 10:24, David Hildenbrand wrote: On 19.03.24 06:06, zhukeqian wrote: Hi David, Thanks for reviewing. On 17.03.24 09:37, Keqian Zhu via wrote: Both main loop thread and vCPU thread are allowed to call pause_all_vcpus(), and in general resume_all_vcpus() is called after it. Two issue

Re: [PATCH] ui: compile dbus-display1.c with -fPIC as necessary

2024-03-19 Thread Michael Tokarev
19.03.2024 12:29, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Building dbus-display1.c explicitly as a static library drops -fPIC by default, which may not be correct if it ends up linked to a shared library. Let the target decide how to build the unit, with or without -fPIC. Th

Re: [PATCH 15/22] plugins: Simplify callback queues

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: We have qemu_plugin_dyn_cb.type to differentiate the various callback types, so we do not need to keep them in separate queues. Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 35 ++-- accel/tcg/plugin-gen.c | 90 ++

Re: [PATCH 16/22] plugins: Introduce PLUGIN_CB_MEM_REGULAR

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: Use different enumerators for vcpu_udata and vcpu_mem callbacks. Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 1 + accel/tcg/plugin-gen.c | 2 +- plugins/core.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) d

Re: [PATCH 18/22] plugins: Split out common cb expanders

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 84 +- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 10d917abd3..28414c4ff1

Re: [PATCH 19/22] plugins: Merge qemu_plugin_tb_insn_get to plugin-gen.c

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: Merge qemu_plugin_insn_alloc and qemu_plugin_tb_insn_get into plugin_gen_insn_start, since it is used nowhere else. Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 39 --- accel/tcg/plugin-gen.c | 39

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Kevin Wolf
Am 18.03.2024 um 19:34 hat Stefan Hajnoczi geschrieben: > The coroutine pool implementation can hit the Linux vm.max_map_count > limit, causing QEMU to abort with "failed to allocate memory for stack" > or "failed to set up stack guard page" during coroutine creation. > > This happens because per-

Re: [PATCH 07/22] plugins: Use emit_before_op for PLUGIN_GEN_AFTER_INSN

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: Introduce a new plugin_cb op and migrate one operation. By using emit_before_op, we do not need to emit opcodes early and modify them later -- we can simply emit the final set of opcodes once. Signed-off-by: Richard Henderson --- include/tcg/tcg-op-c

Re: [PATCH 09/22] plugins: Add PLUGIN_GEN_AFTER_TB

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: Delay test of plugin_tb->mem_helper until the inject pass. Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/accel/tcg/plugin-gen.c

Re: [PATCH 10/22] plugins: Use emit_before_op for PLUGIN_GEN_FROM_INSN

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 1 - accel/tcg/plugin-gen.c | 286 ++--- plugins/api.c | 8 +- 3 files changed, 67 insertions(+), 228 deletions(-) diff --git a/inclu

Re: [PATCH 11/22] plugins: Use emit_before_op for PLUGIN_GEN_FROM_MEM

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:57, Richard Henderson wrote: Introduce a new plugin_mem_cb op to hold the address temp and meminfo computed by tcg-op-ldst.c. Because this now has its own opcode, we no longer need PLUGIN_GEN_FROM_MEM. Signed-off-by: Richard Henderson --- include/exec/plugin-gen.h | 4 - i

Re: [PATCH 00/22] plugins: Rewrite plugin code generation

2024-03-19 Thread Pierrick Bouvier
On 3/16/24 05:56, Richard Henderson wrote: As I mooted with Pierrick earlier this week: (1) Add a (trivial) mechanism for emitting code into the middle of the opcode sequence: tcg_ctx->emit_before_op. (2) Rip out all of the "empty" generation and "copy" to modify those sequences. Replace with

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Daniel P . Berrangé
On Mon, Mar 18, 2024 at 02:34:29PM -0400, Stefan Hajnoczi wrote: > The coroutine pool implementation can hit the Linux vm.max_map_count > limit, causing QEMU to abort with "failed to allocate memory for stack" > or "failed to set up stack guard page" during coroutine creation. > > This happens bec

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Stefan Hajnoczi
On Tue, Mar 19, 2024 at 02:32:06PM +0100, Kevin Wolf wrote: > Am 18.03.2024 um 19:34 hat Stefan Hajnoczi geschrieben: > > The coroutine pool implementation can hit the Linux vm.max_map_count > > limit, causing QEMU to abort with "failed to allocate memory for stack" > > or "failed to set up stack g

[PATCH 1/7] linux-headers hack

2024-03-19 Thread Paolo Bonzini
To be replaced by update to kvm/next branch from Linux 6.9, once the new API is committed. --- linux-headers/asm-x86/kvm.h | 8 linux-headers/linux/kvm.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h index 003fb745347..

[PATCH 6/7] target/i386: Implement mc->kvm_type() to get VM type

2024-03-19 Thread Paolo Bonzini
From: Xiaoyao Li KVM is introducing a new API to create confidential guests, which will be used by TDX and SEV-SNP but is also available for SEV and SEV-ES. The API uses the VM type argument to KVM_CREATE_VM to identify which confidential computing technology to use. Since there are no other ex

[PATCH 5/7] target/i386: introduce x86-confidential-guest

2024-03-19 Thread Paolo Bonzini
Introduce a common superclass for x86 confidential guest implementations. It will extend ConfidentialGuestSupportClass with a method that provides the VM type to be passed to KVM_CREATE_VM. Signed-off-by: Paolo Bonzini --- target/i386/confidential-guest.h | 40 t

[PATCH 0/7] target/i386: VM type infrastructure and KVM_SEV_INIT2 support

2024-03-19 Thread Paolo Bonzini
This series adds another vendor-neutral part of the SEV-SNP/TDX support patches, namely support for KVM_CAP_VM_TYPES. In Linux 6.10 this will also be available for SEV and SEV-ES, so introduce it now already. Also, Linux 6.10 will _not_ allow KVM_GET/SET_* ioctls for VMs with encrypted state and

[PATCH 7/7] target/i386: SEV: use KVM_SEV_INIT2 if possible

2024-03-19 Thread Paolo Bonzini
Implement support for the KVM_X86_SEV_VM and KVM_X86_SEV_ES_VM virtual machine types, and the KVM_SEV_INIT2 function of KVM_MEMORY_ENCRYPT_OP. These replace the KVM_SEV_INIT and KVM_SEV_ES_INIT functions, and have several advantages: - sharing the initialization sequence with SEV-SNP and TDX - a

[PATCH 3/7] KVM: track whether guest state is encrypted

2024-03-19 Thread Paolo Bonzini
So far, KVM has allowed KVM_GET/SET_* ioctls to execute even if the guest state is encrypted, in which case they do nothing. For the new API using VM types, instead, the ioctls will fail which is a safer and more robust approach. The new API will be the only one available for SEV-SNP and TDX, but

[PATCH 2/7] runstate: skip initial CPU reset if reset is not actually possible

2024-03-19 Thread Paolo Bonzini
Right now, the system reset is concluded by a call to cpu_synchronize_all_post_reset() in order to sync any changes that the machine reset callback applied to the CPU state. However, for VMs with encrypted state such as SEV-ES guests (currently the only case of guests with non-resettable CPUs) thi

[PULL 3/3] aspeed/smc: Only wire flash devices at reset

2024-03-19 Thread Cédric Le Goater
The Aspeed machines have many Static Memory Controllers (SMC), up to 8, which can only drive flash memory devices. Commit 27a2c66c92ec ("aspeed/smc: Wire CS lines at reset") tried to ease the definitions of these devices by allowing flash devices from the command line to be attached to a SSI bus. F

[PULL 1/3] vfio/iommufd: Fix memory leak

2024-03-19 Thread Cédric Le Goater
Coverity reported a memory leak on variable 'contents' in routine iommufd_cdev_getfd(). Use g_autofree variables to simplify the exit path and get rid of g_free() calls. Cc: Eric Auger Cc: Yi Liu Fixes: CID 1540007 Fixes: 5ee3dc7af785 ("vfio/iommufd: Implement the iommufd backend") Suggested-by:

Re: [PATCH 2/7] runstate: skip initial CPU reset if reset is not actually possible

2024-03-19 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 02:59:55PM +0100, Paolo Bonzini wrote: > Right now, the system reset is concluded by a call to > cpu_synchronize_all_post_reset() in order to sync any changes > that the machine reset callback applied to the CPU state. > > However, for VMs with encrypted state such as SEV-E

[PULL 0/3] for-9.0 queue

2024-03-19 Thread Cédric Le Goater
The following changes since commit 4511400fb78e72d4d9916ed60e04f4e99e594f65: Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging (2024-03-18 17:16:08 +) are available in the Git repository at: https://github.com/legoater/qemu/ tags/pull-for-9.0-20240319

Re: 答复: [PATCH v1 1/2] system/cpus: Fix pause_all_vcpus() under concurrent environment

2024-03-19 Thread Peter Maydell
On Tue, 19 Mar 2024 at 09:24, David Hildenbrand wrote: > I spotted new pause_all_vcpus() / resume_all_vcpus() calls in > hw/intc/arm_gicv3_kvm.c and > thought they would be the problematic bit. > > Yeah, that's going to be problematic. Further note that a lot of code does > not expect > that the

Re: [PULL 00/24] virtio,pc,pci: bugfixes

2024-03-19 Thread Peter Maydell
On Mon, 18 Mar 2024 at 16:15, Michael S. Tsirkin wrote: > > The following changes since commit ba49d760eb04630e7b15f423ebecf6c871b8f77b: > > Merge tag 'pull-maintainer-final-130324-1' of > https://gitlab.com/stsquad/qemu into staging (2024-03-13 15:12:14 +) > > are available in the Git repo

Re: [PULL 0/4] s390x and misc patches for 9.0-rc0

2024-03-19 Thread Peter Maydell
On Mon, 18 Mar 2024 at 17:57, Thomas Huth wrote: > > Hi Peter! > > The following changes since commit ba49d760eb04630e7b15f423ebecf6c871b8f77b: > > Merge tag 'pull-maintainer-final-130324-1' of > https://gitlab.com/stsquad/qemu into staging (2024-03-13 15:12:14 +) > > are available in the

Re: [PATCH 6/7] target/i386: Implement mc->kvm_type() to get VM type

2024-03-19 Thread Paolo Bonzini
On Tue, Mar 19, 2024 at 3:15 PM Daniel P. Berrangé wrote: > > +int kvm_get_vm_type(MachineState *ms, const char *vm_type) > > The 'vm_type' parameter is never used here. What value is it expected > to have, and should be diagnosing an error if some unexpected value > is provided. It's the value o

Re: [PATCH 6/7] target/i386: Implement mc->kvm_type() to get VM type

2024-03-19 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 02:59:59PM +0100, Paolo Bonzini wrote: > From: Xiaoyao Li > > KVM is introducing a new API to create confidential guests, which > will be used by TDX and SEV-SNP but is also available for SEV and > SEV-ES. The API uses the VM type argument to KVM_CREATE_VM to > identify w

Re: [PATCH 6/7] target/i386: Implement mc->kvm_type() to get VM type

2024-03-19 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 03:25:53PM +0100, Paolo Bonzini wrote: > On Tue, Mar 19, 2024 at 3:15 PM Daniel P. Berrangé > wrote: > > > +int kvm_get_vm_type(MachineState *ms, const char *vm_type) > > > > The 'vm_type' parameter is never used here. What value is it expected > > to have, and should be d

Re: [PATCH 01/22] tcg: Add TCGContext.emit_before_op

2024-03-19 Thread Alex Bennée
Richard Henderson writes: > Allow operations to be emitted via normal expanders > into the middle of the opcode stream. > > Signed-off-by: Richard Henderson > --- > include/tcg/tcg.h | 1 + > tcg/tcg.c | 14 -- > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --

Re: Request for Support: QEMU IPv6 Port Forwarding Issue

2024-03-19 Thread Thomas Huth
On 19/03/2024 06.53, Srinivasu Kandukuri (MS/ECP2-ETAS-VOS) wrote: Dear QEMU Support Team, We are currently encountering difficulties in utilizing QEMU for starting a virtual machine image on Windows with IPv6 networking, specifically related to port forwarding. We are using QEMU emulator vers

Re: [PATCH] tests: Raise timeouts for bufferiszero and crypto-tlscredsx509

2024-03-19 Thread Peter Maydell
On Tue, 12 Mar 2024 at 11:18, Daniel P. Berrangé wrote: > > On Tue, Mar 12, 2024 at 11:08:15AM +, Peter Maydell wrote: > > On our gcov CI job, the bufferiszero and crypto-tlscredsx509 > > tests time out occasionally, making the job flaky. Double the > > timeout on these two tests. > > > > Cc:

Re: [PATCH 6/7] target/i386: Implement mc->kvm_type() to get VM type

2024-03-19 Thread Paolo Bonzini
On Tue, Mar 19, 2024 at 3:27 PM Daniel P. Berrangé wrote: > > On Tue, Mar 19, 2024 at 03:25:53PM +0100, Paolo Bonzini wrote: > > On Tue, Mar 19, 2024 at 3:15 PM Daniel P. Berrangé > > wrote: > > > > +int kvm_get_vm_type(MachineState *ms, const char *vm_type) > > > > > > The 'vm_type' parameter i

[PATCH 4/7] KVM: remove kvm_arch_cpu_check_are_resettable

2024-03-19 Thread Paolo Bonzini
Board reset requires writing a fresh CPU state. As far as KVM is concerned, the only thing that blocks reset is that CPU state is encrypted; therefore, kvm_cpus_are_resettable() can simply check if that is the case. Signed-off-by: Paolo Bonzini --- include/sysemu/kvm.h | 10 -- ac

Re: [PATCH v2 1/2] system/memory.c: support unaligned access

2024-03-19 Thread Peter Maydell
On Thu, 1 Feb 2024 at 08:15, Tomoyuki HIROSE wrote: > > The previous code ignored 'impl.unaligned' and handled unaligned accesses > as is. But this implementation cannot emulate specific registers of some > devices that allow unaligned access such as xHCI Host Controller Capability > Registers. >

Re: [PULL v2 0/4] machine development tool

2024-03-19 Thread Philippe Mathieu-Daudé
Hi Maksim, On 19/3/24 11:24, Peter Maydell wrote: On Mon, 18 Mar 2024 at 21:36, Maksim Davydov wrote: The following changes since commit ba49d760eb04630e7b15f423ebecf6c871b8f77b: Merge tag 'pull-maintainer-final-130324-1' of https://gitlab.com/stsquad/qemu into staging (2024-03-13 15:12:

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Sanjay Rao
On Tue, Mar 19, 2024 at 9:32 AM Kevin Wolf wrote: > Am 18.03.2024 um 19:34 hat Stefan Hajnoczi geschrieben: > > The coroutine pool implementation can hit the Linux vm.max_map_count > > limit, causing QEMU to abort with "failed to allocate memory for stack" > > or "failed to set up stack guard pag

Re: [PATCH for-9.0 v3] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-19 Thread Eugenio Perez Martin
On Tue, Mar 19, 2024 at 11:00 AM Kevin Wolf wrote: > > Am 18.03.2024 um 20:27 hat Eugenio Perez Martin geschrieben: > > On Mon, Mar 18, 2024 at 10:02 AM Michael S. Tsirkin wrote: > > > > > > On Mon, Mar 18, 2024 at 12:31:26PM +0800, Jason Wang wrote: > > > > On Fri, Mar 15, 2024 at 11:59 PM Kevin

Re: [PATCH 6/7] target/i386: Implement mc->kvm_type() to get VM type

2024-03-19 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 03:29:14PM +0100, Paolo Bonzini wrote: > On Tue, Mar 19, 2024 at 3:27 PM Daniel P. Berrangé > wrote: > > > > On Tue, Mar 19, 2024 at 03:25:53PM +0100, Paolo Bonzini wrote: > > > On Tue, Mar 19, 2024 at 3:15 PM Daniel P. Berrangé > > > wrote: > > > > > +int kvm_get_vm_typ

[PULL 2/3] ppc/pnv: I2C controller is not user creatable

2024-03-19 Thread Cédric Le Goater
The I2C controller is a subunit of the processor. Make it so and avoid QEMU crashes. $ build/qemu-system-ppc64 -S -machine powernv9 -device pnv-i2c qemu-system-ppc64: ../hw/ppc/pnv_i2c.c:521: pnv_i2c_realize: Assertion `i2c->chip' failed. Aborted (core dumped) Fixes: 263b81ee15af ("ppc/pnv

Re: 答复: [PATCH v1 1/2] system/cpus: Fix pause_all_vcpus() under concurrent environment

2024-03-19 Thread David Hildenbrand
On 19.03.24 15:23, Peter Maydell wrote: On Tue, 19 Mar 2024 at 09:24, David Hildenbrand wrote: I spotted new pause_all_vcpus() / resume_all_vcpus() calls in hw/intc/arm_gicv3_kvm.c and thought they would be the problematic bit. Yeah, that's going to be problematic. Further note that a lot of

Re: 答复: [PATCH v1 1/2] system/cpus: Fix pause_all_vcpus() under concurrent environment

2024-03-19 Thread Peter Maydell
On Tue, 19 Mar 2024 at 14:46, David Hildenbrand wrote: > > On 19.03.24 15:23, Peter Maydell wrote: > > On Tue, 19 Mar 2024 at 09:24, David Hildenbrand wrote: > >> I spotted new pause_all_vcpus() / resume_all_vcpus() calls in > >> hw/intc/arm_gicv3_kvm.c and > >> thought they would be the problem

Re: [PATCH v7] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-03-19 Thread Eric Auger
Hi Peter, On 2/29/24 12:00, Peter Maydell wrote: > On Thu, 29 Feb 2024 at 02:32, Shaoqin Huang wrote: >> >> Hi Peter, >> >> On 2/22/24 22:28, Peter Maydell wrote: >>> On Wed, 21 Feb 2024 at 06:34, Shaoqin Huang wrote: The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM d

Re: [PATCH v7] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-03-19 Thread Peter Maydell
On Tue, 19 Mar 2024 at 14:57, Eric Auger wrote: > > Hi Peter, > > On 2/29/24 12:00, Peter Maydell wrote: > > On Thu, 29 Feb 2024 at 02:32, Shaoqin Huang wrote: > >> I was trying to add a test in tests/qtest/arm-cpu-features.c. But I > >> found all other cpu-feature is bool property. > >> > >> Whe

Re: [PATCH 0/9] Introduce support for IGVM files

2024-03-19 Thread Stefano Garzarella
Hi Roy, thanks for this series! On Tue, Feb 27, 2024 at 02:50:06PM +, Roy Hopkins wrote: Hi everyone, This initial patch series submission adds the capability to configure confidential guests using files that conform to the Independent Guest Virtual Machine (IGVM) file format. The series is

[PATCH 2/2] aspeed: Make the ast1030-a1 SoC not user creatable

2024-03-19 Thread Cédric Le Goater
Aspeed SoCs are complex devices that can not be specified on the command line. Fix that to avoid QEMU aborts. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2227 Fixes: 356b230ed138 ("aspeed/soc : Add AST1030 support") Reported-by: Thomas Huth Signed-off-by: Cédric Le Goater --- hw/arm

[PATCH 1/2] aspeed: Make the ast2600-a3 SoC not user creatable

2024-03-19 Thread Cédric Le Goater
Aspeed SoCs are complex devices that can not be specified on the command line. Fix that to avoid QEMU aborts. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2227 Fixes: f25c0ae1079d ("aspeed/soc: Add AST2600 support") Reported-by: Thomas Huth Signed-off-by: Cédric Le Goater --- hw/arm/

Re: [PATCH] target/i386: Export RFDS bit to guests

2024-03-19 Thread Pawan Gupta
On Tue, Mar 19, 2024 at 12:22:08PM +0800, Xiaoyao Li wrote: > On 3/13/2024 10:53 PM, Pawan Gupta wrote: > > Register File Data Sampling (RFDS) is a CPU side-channel vulnerability > > that may expose stale register value. CPUs that set RFDS_NO bit in MSR > > IA32_ARCH_CAPABILITIES indicate that they

[PULL 0/1] Block patches

2024-03-19 Thread Stefan Hajnoczi
The following changes since commit ddc27d2ad9361a81c2b3800d14143bf420dae172: Merge tag 'pull-request-2024-03-18' of https://gitlab.com/thuth/qemu into staging (2024-03-19 10:25:25 +) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request fo

[PULL 1/1] coroutine: cap per-thread local pool size

2024-03-19 Thread Stefan Hajnoczi
The coroutine pool implementation can hit the Linux vm.max_map_count limit, causing QEMU to abort with "failed to allocate memory for stack" or "failed to set up stack guard page" during coroutine creation. This happens because per-thread pools can grow to tens of thousands of coroutines. Each cor

Re: [PATCH 2/9] backends/confidential-guest-support: Add IGVM file parameter

2024-03-19 Thread Stefano Garzarella
On Tue, Feb 27, 2024 at 02:50:08PM +, Roy Hopkins wrote: In order to add support for parsing IGVM files for secure virtual machines, a the path to an IGVM file needs to be specified as part of the guest configuration. It makes sense to add this to the ConfidentialGuestSupport object as this i

Re: [PULL 1/1] coroutine: cap per-thread local pool size

2024-03-19 Thread Daniel P . Berrangé
Sending this PULL feels little rushed, as I still have un-answered questions on the inital patch posting just a few hours ago On Tue, Mar 19, 2024 at 11:09:38AM -0400, Stefan Hajnoczi wrote: > The coroutine pool implementation can hit the Linux vm.max_map_count > limit, causing QEMU to abort w

Re: [PATCH v7] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-03-19 Thread Daniel P . Berrangé
On Wed, Feb 21, 2024 at 01:34:31AM -0500, Shaoqin Huang wrote: > The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide > which PMU events are provided to the guest. Add a new option > `kvm-pmu-filter` as -cpu sub-option to set the PMU Event Filtering. > Without the filter, all P

Re: [PATCH v8] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-03-19 Thread Eric Auger
Hi Shaoqin, On 3/12/24 08:48, Shaoqin Huang wrote: > The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide > which PMU events are provided to the guest. Add a new option > `kvm-pmu-filter` as -cpu sub-option to set the PMU Event Filtering. > Without the filter, all PMU events a

  1   2   3   4   >