Re: [PATCH v4 0/4] Support RISC-V IOPMP

2023-12-04 Thread Ethan Chen via
Ping. https://patchew.org/QEMU/20231122053251.440723-1-etha...@andestech.com/ On Wed, Nov 22, 2023 at 01:32:47PM +0800, Ethan Chen wrote: > This series implements IOPMP specification v1.0.0-draft4 rapid-k model. > The specification url: > https://github.com/riscv-non-isa/iopmp-spec/blob/main/riscv

Re: [PATCH] ui/gtk: flush display pipeline before saving vmstate when blob=true

2023-12-04 Thread Marc-André Lureau
Hi On Tue, Dec 5, 2023 at 6:40 AM Dongwon Kim wrote: > > If the guest state is paused before it gets a response for the current > scanout frame submission (resource-flush), it won't start submitting > new frames after being restored as it still waits for the old response, > which is accepted as a

[PATCH v2] qemu: send stop event after bdrv_flush_all

2023-12-04 Thread tianren
From: Tianren Zhang The stop process is not finished until bdrv_flush_all is done. Some users (e.g., libvirt) detect the STOP event and invokes some lock release logic to revoke the disk lock held by current qemu when such event is emitted. In such case, if the bdrv_flush_all is after the stop ev

[PULL 0/1] ufs fix for 2023-12-05

2023-12-04 Thread Jeuk Kim
From: Jeuk Kim The following changes since commit 1664d74c50739401c8b40e8b514d12b5fc250067: tests/avocado: Update yamon-bin-02.22.zip URL (2023-12-04 08:17:35 -0500) are available in the Git repository at: https://gitlab.com/jeuk20.kim/qemu.git tags/pull-ufs-20231205 for you to fetch chan

[PULL 1/1] hw/ufs: avoid generating the same ID string for different LU devices

2023-12-04 Thread Jeuk Kim
From: Akinobu Mita QEMU would not start when trying to create two UFS host controllers and a UFS logical unit for each with the following options: -device ufs,id=bus0 \ -device ufs-lu,drive=drive1,bus=bus0,lun=0 \ -device ufs,id=bus1 \ -device ufs-lu,drive=drive2,bus=bus1,lun=0 \ This is becaus

Re: [PATCH-for-8.2?] hw/ufs: avoid generating the same ID string for different LU devices

2023-12-04 Thread Jeuk Kim
Hi Philippe, Thank you for informing me. I want this issue is fixed for the 8.2 release. I created an issue like you said, but I couldn't assign the milestone (I'm guessing it's a permission problem). https://gitlab.com/qemu-project/qemu/-/issues/2018 Could you help me with this? Regardless, I'

Re: [PATCH-for-8.2?] hw/ufs: avoid generating the same ID string for different LU devices

2023-12-04 Thread Jeuk Kim
On 4/12/23 16:05, Akinobu Mita wrote: > QEMU would not start when trying to create two UFS host controllers and > a UFS logical unit for each with the following options: > > -device ufs,id=bus0 \ > -device ufs-lu,drive=drive1,bus=bus0,lun=0 \ > -device ufs,id=bus1 \ > -device ufs-lu,drive=drive2,

Re: [PATCH v5] accel/kvm: Turn DPRINTF macro use into tracepoints

2023-12-04 Thread JAI ARORA
Hello maintainers, This is a friendly ping. Are there any other review comments for this patch? Thanks, Jai Arora On Sat, 2 Dec 2023 at 10:19, Jai Arora wrote: > Patch removes DPRINTF macro and adds multiple tracepoints > to capture different kvm events. > > We also drop the DPRINTFs that don

RE: [PATCH 3/9] Hexagon (target/hexagon) Make generators object oriented - gen_helper_protos

2023-12-04 Thread Brian Cain
> -Original Message- > From: Taylor Simpson > Sent: Monday, December 4, 2023 7:53 PM > To: qemu-devel@nongnu.org > Cc: Brian Cain ; Matheus Bernardino (QUIC) > ; Sid Manning ; Marco > Liebel (QUIC) ; richard.hender...@linaro.org; > phi...@linaro.org; a...@rev.ng; a...@rev.ng; ltaylorsimp

Re: [PATCH v6 00/16] Support smp.clusters for x86 in QEMU

2023-12-04 Thread Zhao Liu
Hi maintainers, Just a friendly ping. Do I need to refresh another version? Thanks, Zhao On Fri, Nov 17, 2023 at 03:50:50PM +0800, Zhao Liu wrote: > Date: Fri, 17 Nov 2023 15:50:50 +0800 > From: Zhao Liu > Subject: [PATCH v6 00/16] Support smp.clusters for x86 in QEMU > X-Mailer: git-send-email

Re: [RFC 1/3] scripts/checkpatch: Check common spelling be default

2023-12-04 Thread Zhao Liu
Hi Thomas, On Mon, Dec 04, 2023 at 10:07:12AM +0100, Thomas Huth wrote: > Date: Mon, 4 Dec 2023 10:07:12 +0100 > From: Thomas Huth > Subject: Re: [RFC 1/3] scripts/checkpatch: Check common spelling be default > > On 04/12/2023 09.29, Zhao Liu wrote: > > From: Zhao Liu > > > > Add the check for

RE: [PATCH 1/9] Hexagon (target/hexagon) Clean up handling of modifier registers

2023-12-04 Thread Brian Cain
> -Original Message- > From: Taylor Simpson > Sent: Monday, December 4, 2023 7:53 PM > To: qemu-devel@nongnu.org > Cc: Brian Cain ; Matheus Bernardino (QUIC) > ; Sid Manning ; Marco > Liebel (QUIC) ; richard.hender...@linaro.org; > phi...@linaro.org; a...@rev.ng; a...@rev.ng; ltaylorsimp

RE: [PATCH 6/9] Hexagon (target/hexagon) Make generators object oriented - gen_op_regs

2023-12-04 Thread Brian Cain
> -Original Message- > From: Taylor Simpson > Sent: Monday, December 4, 2023 7:53 PM > To: qemu-devel@nongnu.org > Cc: Brian Cain ; Matheus Bernardino (QUIC) > ; Sid Manning ; Marco > Liebel (QUIC) ; richard.hender...@linaro.org; > phi...@linaro.org; a...@rev.ng; a...@rev.ng; ltaylorsimp

RE: [PATCH 2/9] Hexagon (target/hexagon) Make generators object oriented - gen_tcg_funcs

2023-12-04 Thread Brian Cain
> -Original Message- > From: Taylor Simpson > Sent: Monday, December 4, 2023 7:53 PM > To: qemu-devel@nongnu.org > Cc: Brian Cain ; Matheus Bernardino (QUIC) > ; Sid Manning ; Marco > Liebel (QUIC) ; richard.hender...@linaro.org; > phi...@linaro.org; a...@rev.ng; a...@rev.ng; ltaylorsimp

[PATCH] ui/gtk: flush display pipeline before saving vmstate when blob=true

2023-12-04 Thread Dongwon Kim
If the guest state is paused before it gets a response for the current scanout frame submission (resource-flush), it won't start submitting new frames after being restored as it still waits for the old response, which is accepted as a scanout render done signal. So it's needed to unblock the curren

[PATCH 4/9] Hexagon (target/hexagon) Make generators object oriented - gen_helper_funcs

2023-12-04 Thread Taylor Simpson
Signed-off-by: Taylor Simpson --- target/hexagon/gen_helper_funcs.py | 400 +++-- target/hexagon/hex_common.py | 58 - 2 files changed, 151 insertions(+), 307 deletions(-) diff --git a/target/hexagon/gen_helper_funcs.py b/target/hexagon/gen_helper_funcs.py ind

[PATCH 9/9] Hexagon (target/hexagon) Remove dead functions from hex_common.py

2023-12-04 Thread Taylor Simpson
These functions are no longer used after making the generators object oriented. Signed-off-by: Taylor Simpson --- target/hexagon/hex_common.py | 51 1 file changed, 51 deletions(-) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py inde

[PATCH 7/9] Hexagon (target/hexagon) Make generators object oriented - gen_analyze_funcs

2023-12-04 Thread Taylor Simpson
This patch conflicts with https://lists.gnu.org/archive/html/qemu-devel/2023-11/msg00729.html If that series goes in first, we'll rework this patch and vice versa. Signed-off-by: Taylor Simpson --- target/hexagon/gen_analyze_funcs.py | 163 +--- target/hexagon/hex_common.

[PATCH 1/9] Hexagon (target/hexagon) Clean up handling of modifier registers

2023-12-04 Thread Taylor Simpson
Currently, the register number (MuN) for modifier registers is the modifier register number rather than the index into hex_gpr. This patch changes MuN to the hex_gpr index, which is consistent with the handling of control registers. Note that HELPER(fcircadd) needs the CS register corresponding t

[PATCH 2/9] Hexagon (target/hexagon) Make generators object oriented - gen_tcg_funcs

2023-12-04 Thread Taylor Simpson
The generators are generally a bunch of Python if-then-else statements based on the regtype and regid. Encapsulate regtype/regid into a class hierarchy. Clients lookup the register and invoke methods. This has several advantages for making the code easier to read, understand, and maintain - The

[PATCH 6/9] Hexagon (target/hexagon) Make generators object oriented - gen_op_regs

2023-12-04 Thread Taylor Simpson
Signed-off-by: Taylor Simpson --- target/hexagon/gen_op_regs.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/hexagon/gen_op_regs.py b/target/hexagon/gen_op_regs.py index a8a7712129..7b7b33895a 100755 --- a/target/hexagon/gen_op_regs.py +++ b/target/hexagon/gen_

Re: [RFC 0/8] Support generic Luks encryption

2023-12-04 Thread Yong Huang
On Tue, Dec 5, 2023 at 1:44 AM Daniel P. Berrangé wrote: > On Tue, Dec 05, 2023 at 01:32:51AM +0800, Yong Huang wrote: > > On Tue, Dec 5, 2023 at 12:51 AM Daniel P. Berrangé > > wrote: > > > > > On Tue, Dec 05, 2023 at 12:41:16AM +0800, Yong Huang wrote: > > > > On Tue, Dec 5, 2023 at 12:24 AM D

[PATCH 8/9] Hexagon (target/hexagon) Remove unused WRITES_PRED_REG attribute

2023-12-04 Thread Taylor Simpson
This is the only remaining use of the is_written function. We will remove it in the subsequent commit. Signed-off-by: Taylor Simpson --- target/hexagon/attribs_def.h.inc | 1 - target/hexagon/hex_common.py | 11 --- 2 files changed, 12 deletions(-) diff --git a/target/hexagon/attr

[PATCH 3/9] Hexagon (target/hexagon) Make generators object oriented - gen_helper_protos

2023-12-04 Thread Taylor Simpson
Signed-off-by: Taylor Simpson --- target/hexagon/gen_helper_protos.py | 184 target/hexagon/hex_common.py| 15 +-- 2 files changed, 55 insertions(+), 144 deletions(-) diff --git a/target/hexagon/gen_helper_protos.py b/target/hexagon/gen_helper_protos.py ind

[PATCH 0/9] Hexagon (target/hexagon) Make generators object oriented

2023-12-04 Thread Taylor Simpson
See commit message in second patch Taylor Simpson (9): Hexagon (target/hexagon) Clean up handling of modifier registers Hexagon (target/hexagon) Make generators object oriented - gen_tcg_funcs Hexagon (target/hexagon) Make generators object oriented - gen_helper_protos Hexagon (tar

[PATCH 5/9] Hexagon (target/hexagon) Make generators object oriented - gen_idef_parser_funcs

2023-12-04 Thread Taylor Simpson
Signed-off-by: Taylor Simpson --- target/hexagon/gen_idef_parser_funcs.py | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/target/hexagon/gen_idef_parser_funcs.py b/target/hexagon/gen_idef_parser_funcs.py index f4518e653f..550a48cb7b 100644 --- a/target/h

[RFC PATCH 07/11] hw/acpi: Add ACPI GED support for the sleep event

2023-12-04 Thread Annie Li
From: Miguel Luis Add support for ACPI GED sleep event on the ACPI device interface so that HW-reduced systems can enable guests to sleep. Signed-off-by: Miguel Luis --- hw/acpi/generic_event_device.c | 9 + include/hw/acpi/generic_event_device.h | 1 + 2 files changed, 10 inse

[RFC PATCH 09/11] hw/arm: enable sleep support for arm/virt

2023-12-04 Thread Annie Li
From: Miguel Luis Include the ACPI control method device into arm/virt ACPI tables and the corresponding handling which enables triggering the event. Signed-off-by: Miguel Luis --- hw/arm/virt-acpi-build.c | 13 + hw/arm/virt.c| 13 - include/hw/arm/virt.h

[RFC PATCH 03/11] test/acpi: allow DSDT table changes

2023-12-04 Thread Annie Li
List various DSDT files allowed to be changed in tests/qtest/bios-tables-test-allowed-diff.h Signed-off-by: Annie Li --- tests/qtest/bios-tables-test-allowed-diff.h | 41 + 1 file changed, 41 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qte

[RFC PATCH 11/11] arm/virt: enable sleep support

2023-12-04 Thread Annie Li
From: Miguel Luis This is for reference that qmp_system_sleep relies on wakeup support delegated by qemu_wakeup_suspend_enabled() hence the need for calling qemu_register_wakeup_support(). Signed-off-by: Miguel Luis --- hw/arm/virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/v

[RFC PATCH 10/11] tests/acpi: Update FACP and DSDT tables for sleep button

2023-12-04 Thread Annie Li
From: Miguel Luis * * ACPI Data Table [FACP] * * Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue */ [000h 4]Signature : "FACP"[Fixed ACPI Description Table (FADT)] [004h 0004 4] Table Length : 0114 [008h 0008

[RFC PATCH 08/11] tests/acpi: allow FACP and DSDT table changes for arm/virt

2023-12-04 Thread Annie Li
From: Miguel Luis List changed files for FACP and DSDT table changes for the arm/virt. Signed-off-by: Miguel Luis --- tests/qtest/bios-tables-test-allowed-diff.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-te

[RFC PATCH 06/11] acpi: Send the GPE event of suspend and wakeup for x86

2023-12-04 Thread Annie Li
The GPE event is triggered to notify the guest to suspend or wakeup itself. This patch removes the previous implementation of QEMU_WAKEUP_REASON_OTHER pretending the resume was caused by power button. Signed-off-by: Annie Li --- hw/acpi/core.c | 17 + hw/cor

[RFC PATCH 05/11] tests/acpi/bios-tables-test: update DSDT tables for Control Method Sleep button

2023-12-04 Thread Annie Li
Update various DSDT tables and empty bios-tables-test-allowed-diff.h Following the step 5 and 6 in tests/qtest/bios-tables-test.c, the changes in the tables are: DSDT: /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20210604 (64-bit version) * Copyright (c) 2000 - 2

[RFC PATCH 04/11] acpi: Support Control Method sleep button for x86

2023-12-04 Thread Annie Li
Add Control Method Sleep button and its GPE event handler for x86. Signed-off-by: Annie Li --- hw/i386/acpi-build.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 80db183b78..75985e1423 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i38

[RFC PATCH 02/11] acpi: Implement control method sleep button

2023-12-04 Thread Annie Li
The control method sleep button is added, as well as its GPE event handler. Co-Developed-by: Miguel Luis Signed-off-by: Annie Li --- hw/acpi/control_method_device.c | 49 + hw/acpi/meson.build | 1 + include/hw/acpi/control_method_device.h |

[RFC PATCH 01/11] acpi: hmp/qmp: Add hmp/qmp support for system_sleep

2023-12-04 Thread Annie Li
Following hmp/qmp commands are implemented for pressing virtual sleep button, hmp: system_sleep qmp: { "execute": "system_sleep" } These commands put the guest into suspend or other power states depending on the power settings inside the guest. Signed-off-by: Annie Li --- hmp-commands.hx

[RFC PATCH 00/11] Support ACPI Control Method Sleep button

2023-12-04 Thread Annie Li
The ACPI sleep button can be implemented as a fixed hardware button or Control Method Sleep button. The patch of implementing a fixed hardware sleep button was posted here 1). More discussions can be found here 2). Essentially, the discussion mainly focuses on whether the sleep button is implement

[PATCH v3 1/2] vhost: Add worker backend callouts

2023-12-04 Thread Mike Christie
This adds the vhost backend callouts for the worker ioctls added in the 6.4 linux kernel commit: c1ecd8e95007 ("vhost: allow userspace to create workers") Signed-off-by: Mike Christie Reviewed-by: Stefano Garzarella Reviewed-by: Stefan Hajnoczi --- hw/virtio/vhost-backend.c | 28

[PATCH v3 0/2] vhost-scsi: Support worker ioctls

2023-12-04 Thread Mike Christie
The following patches allow users to configure the vhost worker threads for vhost-scsi. With vhost-net we get a worker thread per rx/tx virtqueue pair, but for vhost-scsi we get one worker for all workqueues. This becomes a bottlneck after 2 queues are used. In the upstream linux kernel commit: h

[PATCH v3 2/2] vhost-scsi: Add support for a worker thread per virtqueue

2023-12-04 Thread Mike Christie
This adds support for vhost-scsi to be able to create a worker thread per virtqueue. Right now for vhost-net we get a worker thread per tx/rx virtqueue pair which scales nicely as we add more virtqueues and CPUs, but for scsi we get the single worker thread that's shared by all virtqueues. When try

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-04 Thread Richard Henderson
On 12/4/23 12:09, Michal Suchánek wrote: On Mon, Dec 04, 2023 at 02:50:17PM -0500, Stefan Hajnoczi wrote: On Mon, 4 Dec 2023 at 14:40, Philippe Mathieu-Daudé wrote: +void tcg_unregister_thread(void) +{ +unsigned int n; + +n = qatomic_fetch_dec(&tcg_cur_ctxs); +g_free(tcg_ctxs[n]);

Re: [PATCH V6 13/14] tests/qtest: bootfile per vm

2023-12-04 Thread Peter Xu
On Mon, Dec 04, 2023 at 06:13:36PM -0300, Fabiano Rosas wrote: > Steve Sistare writes: > > > Create a separate bootfile for the outgoing and incoming vm, so the block > > layer can lock the file during the background migration test. Otherwise, > > the test fails with: > > "Failed to get "write

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-04 Thread Steven Sistare
On 12/4/2023 12:24 PM, Peter Xu wrote: > On Fri, Dec 01, 2023 at 11:23:33AM -0500, Steven Sistare wrote: @@ -109,6 +117,7 @@ static int global_state_post_load(void *opaque, int version_id) return -EINVAL; } s->state = r; +vm_set_suspended(s->vm_

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-04 Thread Peter Xu
On Mon, Dec 04, 2023 at 06:09:16PM -0300, Fabiano Rosas wrote: > Right, I got your point. I just think we could avoid designing this new > string format by creating new fields with the extra space: > > typedef struct QEMU_PACKED { > uint32_t size; > uint8_t runstate[50]; > uint8_t unus

QEMU CentOS Stream 8 x86_64 runner is offline

2023-12-04 Thread Stefan Hajnoczi
Hi, GitLab is reporting that that the CentOS Stream 8 x86_64 runner (#12198892) has been offline for a few hours. The machine responds to ping so maybe gitlab-runner just needs to be restarted? Thanks, Stefan signature.asc Description: PGP signature

Re: [PATCH V6 10/14] tests/qtest: option to suspend during migration

2023-12-04 Thread Fabiano Rosas
Steve Sistare writes: > Add an option to suspend the src in a-b-bootblock.S, which puts the guest > in S3 state after one round of writing to memory. The option is enabled by > poking a 1 into the suspend_me word in the boot block prior to starting the > src vm. Generate symbol offsets in a-b-b

Re: [PATCH V6 14/14] tests/qtest: background migration with suspend

2023-12-04 Thread Fabiano Rosas
Steve Sistare writes: > Add a test case to verify that the suspended state is handled correctly by > a background migration. The test suspends the src, migrates, then wakes > the dest. > > Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas

Re: [PATCH V6 13/14] tests/qtest: bootfile per vm

2023-12-04 Thread Fabiano Rosas
Steve Sistare writes: > Create a separate bootfile for the outgoing and incoming vm, so the block > layer can lock the file during the background migration test. Otherwise, > the test fails with: > "Failed to get "write" lock. Is another process using the image >[/tmp/migration-test-WAKPD

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-04 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Dec 04, 2023 at 04:31:56PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Fri, Dec 01, 2023 at 11:23:33AM -0500, Steven Sistare wrote: >> >> >> @@ -109,6 +117,7 @@ static int global_state_post_load(void *opaque, >> >> >> int version_id) >> >> >>

Re: [PATCH V6 11/14] tests/qtest: precopy migration with suspend

2023-12-04 Thread Peter Xu
On Thu, Nov 30, 2023 at 01:37:24PM -0800, Steve Sistare wrote: > Add a test case to verify that the suspended state is handled correctly > during live migration precopy. The test suspends the src, migrates, then > wakes the dest. > > Signed-off-by: Steve Sistare > --- > tests/qtest/migration-he

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-04 Thread Michal Suchánek
On Mon, Dec 04, 2023 at 02:50:17PM -0500, Stefan Hajnoczi wrote: > On Mon, 4 Dec 2023 at 14:40, Philippe Mathieu-Daudé wrote: > > > > Unplugging vCPU triggers the following assertion in > > Unplugging leaks the tcg context refcount but does not trigger the > assertion directly. Maybe clarify that

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-04 Thread Peter Xu
On Mon, Dec 04, 2023 at 04:31:56PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Fri, Dec 01, 2023 at 11:23:33AM -0500, Steven Sistare wrote: > >> >> @@ -109,6 +117,7 @@ static int global_state_post_load(void *opaque, int > >> >> version_id) > >> >> return -EINVAL; > >> >>

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-04 Thread Stefan Hajnoczi
On Mon, 4 Dec 2023 at 14:40, Philippe Mathieu-Daudé wrote: > > Unplugging vCPU triggers the following assertion in Unplugging leaks the tcg context refcount but does not trigger the assertion directly. Maybe clarify that by changing the wording: "Plugging a vCPU after it has been unplugged trigg

Re: qemu ppc64 crash when adding CPU

2023-12-04 Thread Philippe Mathieu-Daudé
Hi, On 4/12/23 19:57, Stefan Hajnoczi wrote: On Mon, 4 Dec 2023 at 13:37, Michal Suchánek wrote: Looking at tcg.c line 784 is here: ster_thread(void) { TCGContext *s = g_malloc(sizeof(*s)); unsigned int i, n; *s = tcg_init_ctx; /* Relink mem_base. */ for (i = 0,

[RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-04 Thread Philippe Mathieu-Daudé
Unplugging vCPU triggers the following assertion in tcg_register_thread(): 796 void tcg_register_thread(void) 797 { ... 812 /* Claim an entry in tcg_ctxs */ 813 n = qatomic_fetch_inc(&tcg_cur_ctxs); 814 g_assert(n < tcg_max_ctxs); Implement and use tcg_unregister_thread() so whe

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-04 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Dec 01, 2023 at 11:23:33AM -0500, Steven Sistare wrote: >> >> @@ -109,6 +117,7 @@ static int global_state_post_load(void *opaque, int >> >> version_id) >> >> return -EINVAL; >> >> } >> >> s->state = r; >> >> +vm_set_suspended(s->vm_was_suspended

Re: [PATCH 1/2] target/riscv: Add vill check for whole vector register move instructions

2023-12-04 Thread Daniel Henrique Barboza
On 11/29/23 14:03, Max Chou wrote: The ratified version of RISC-V V spec section 16.6 says that `The instructions operate as if EEW=SEW`. So the whole vector register move instructions depend on the vtype register that means the whole vector register move instructions should raise an illegal-

Re: [PATCH-for-8.2?] hw/ufs: avoid generating the same ID string for different LU devices

2023-12-04 Thread Philippe Mathieu-Daudé
Hi Jeuk, On 4/12/23 17:50, Philippe Mathieu-Daudé wrote: On 4/12/23 16:05, Akinobu Mita wrote: QEMU would not start when trying to create two UFS host controllers and a UFS logical unit for each with the following options: -device ufs,id=bus0 \ -device ufs-lu,drive=drive1,bus=bus0,lun=0 \ -dev

[PATCH RFC v3 0/1] Implement STM32L4x5 EXTI

2023-12-04 Thread ~inesvarhol
This patch allows to emulate the STM32L4x5 EXTI device. It implements register access and software interruptions. This is RFC because we're new at contributing to QEMU. We had some difficulties writing qtests and the result might be bizarre. We have some questions about the next steps for our stm

[PATCH RFC v3 1/1] Implement STM32L4x5 EXTI

2023-12-04 Thread ~inesvarhol
From: Inès Varhol Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol --- hw/arm/Kconfig| 1 + hw/arm/stm32l4x5_soc.c| 65 +++- hw/misc/Kconfig | 3 + hw/misc/meson.build | 1 + hw/misc/stm32l4x5_exti.c | 306 +

Re: qemu ppc64 crash when adding CPU

2023-12-04 Thread Stefan Hajnoczi
On Mon, 4 Dec 2023 at 13:37, Michal Suchánek wrote: > > Hello, > > When running a VM with libvirt I get: > > /usr/bin/qemu-system-ppc64 --version > QEMU emulator version 8.1.3 (Virtualization / 15.5) > Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers > > /usr/bin/qemu-system

Re: [PATCH] hostmem: Round up memory size for qemu_madvise() in host_memory_backend_memory_complete()

2023-12-04 Thread David Hildenbrand
Fair enough. After all of this, I'm inclined to turn this into a proper error and deny not page aligned sizes. There's no real benefit in having them and furthermore, the original bug report is about cryptic error message. I guess if we glue this to compat machines we should be definitely fi

qemu ppc64 crash when adding CPU

2023-12-04 Thread Michal Suchánek
Hello, When running a VM with libvirt I get: /usr/bin/qemu-system-ppc64 --version QEMU emulator version 8.1.3 (Virtualization / 15.5) Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers /usr/bin/qemu-system-ppc64 -name guest=sles12sp5-ppc64le,debug-threads=on -S -object {"qom

Re: [RFC 0/8] Support generic Luks encryption

2023-12-04 Thread Daniel P . Berrangé
On Tue, Dec 05, 2023 at 01:32:51AM +0800, Yong Huang wrote: > On Tue, Dec 5, 2023 at 12:51 AM Daniel P. Berrangé > wrote: > > > On Tue, Dec 05, 2023 at 12:41:16AM +0800, Yong Huang wrote: > > > On Tue, Dec 5, 2023 at 12:24 AM Daniel P. Berrangé > > > wrote: > > > > > > > On Tue, Dec 05, 2023 at

Re: [PATCH] Revert "test/qga: use G_TEST_DIR to locate os-release test file"

2023-12-04 Thread Andrey Drobyshev
On 12/4/23 19:09, Marc-André Lureau wrote: > Hi > > On Mon, Dec 4, 2023 at 9:01 PM Andrey Drobyshev > wrote: >> >> On 12/4/23 18:51, Marc-André Lureau wrote: >>> Hi >>> >>> On Mon, Dec 4, 2023 at 8:33 PM Andrey Drobyshev >>> wrote: Since the commit a85d09269b QGA_OS_RELEASE variable po

Re: [PATCH v2] system/memory: use ldn_he_p/stn_he_p

2023-12-04 Thread Patrick Venture
On Mon, Dec 4, 2023 at 3:24 AM Philippe Mathieu-Daudé wrote: > Hi Patrick, > > On 3/12/23 16:42, Patrick Venture wrote: > > > Friendly ping? Is this going to be applied or do I need to add another > > CC or? I do think it should go into stable. > > I'll send a PR with this patch included. > Tha

Re: [RFC 0/8] Support generic Luks encryption

2023-12-04 Thread Yong Huang
On Tue, Dec 5, 2023 at 12:51 AM Daniel P. Berrangé wrote: > On Tue, Dec 05, 2023 at 12:41:16AM +0800, Yong Huang wrote: > > On Tue, Dec 5, 2023 at 12:24 AM Daniel P. Berrangé > > wrote: > > > > > On Tue, Dec 05, 2023 at 12:06:17AM +0800, Hyman Huang wrote: > > > > This functionality was motivate

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-04 Thread Peter Xu
On Fri, Dec 01, 2023 at 11:23:33AM -0500, Steven Sistare wrote: > >> @@ -109,6 +117,7 @@ static int global_state_post_load(void *opaque, int > >> version_id) > >> return -EINVAL; > >> } > >> s->state = r; > >> +vm_set_suspended(s->vm_was_suspended || r == RUN_STATE_SUSPENDED

Re: [PATCH] Revert "test/qga: use G_TEST_DIR to locate os-release test file"

2023-12-04 Thread Marc-André Lureau
Hi On Mon, Dec 4, 2023 at 9:01 PM Andrey Drobyshev wrote: > > On 12/4/23 18:51, Marc-André Lureau wrote: > > Hi > > > > On Mon, Dec 4, 2023 at 8:33 PM Andrey Drobyshev > > wrote: > >> > >> Since the commit a85d09269b QGA_OS_RELEASE variable points to the path > >> relative to the build dir. The

Re: [PATCH] Revert "test/qga: use G_TEST_DIR to locate os-release test file"

2023-12-04 Thread Andrey Drobyshev
On 12/4/23 18:51, Marc-André Lureau wrote: > Hi > > On Mon, Dec 4, 2023 at 8:33 PM Andrey Drobyshev > wrote: >> >> Since the commit a85d09269b QGA_OS_RELEASE variable points to the path >> relative to the build dir. Then on qemu-ga startup this path can't be >> found as qemu-ga cwd is somewhere

Re: [PATCH 2/2] linux-user: Fix openat() emulation to not modify atime

2023-12-04 Thread Daniel P . Berrangé
On Thu, Nov 30, 2023 at 07:21:40PM -0800, Shu-Chun Weng wrote: > Commit b8002058 strengthened openat()'s /proc detection by calling > realpath(3) on the given path, which allows various paths and symlinks > that points to the /proc file system to be intercepted correctly. > > Using realpath(3), th

Re: [RFC 0/8] Support generic Luks encryption

2023-12-04 Thread Daniel P . Berrangé
On Tue, Dec 05, 2023 at 12:41:16AM +0800, Yong Huang wrote: > On Tue, Dec 5, 2023 at 12:24 AM Daniel P. Berrangé > wrote: > > > On Tue, Dec 05, 2023 at 12:06:17AM +0800, Hyman Huang wrote: > > > This functionality was motivated by the following to-do list seen > > > in crypto documents: > > > htt

Re: [PATCH] Revert "test/qga: use G_TEST_DIR to locate os-release test file"

2023-12-04 Thread Marc-André Lureau
Hi On Mon, Dec 4, 2023 at 8:33 PM Andrey Drobyshev wrote: > > Since the commit a85d09269b QGA_OS_RELEASE variable points to the path > relative to the build dir. Then on qemu-ga startup this path can't be > found as qemu-ga cwd is somewhere else, which leads to the test failure: > > # ./tests/

Re: [PATCH-for-8.2?] hw/ufs: avoid generating the same ID string for different LU devices

2023-12-04 Thread Philippe Mathieu-Daudé
On 4/12/23 16:05, Akinobu Mita wrote: QEMU would not start when trying to create two UFS host controllers and a UFS logical unit for each with the following options: -device ufs,id=bus0 \ -device ufs-lu,drive=drive1,bus=bus0,lun=0 \ -device ufs,id=bus1 \ -device ufs-lu,drive=drive2,bus=bus1,lun=

[PATCH v2 0/4] scsi: eliminate AioContext lock

2023-12-04 Thread Stefan Hajnoczi
v2: - Reschedule BH in new AioContext if change is detected [Kevin] - Drop stray "remember" in Patch 2's commit description [Eric] The SCSI subsystem uses the AioContext lock to protect internal state. This is necessary because the main loop and the IOThread can access SCSI state in parallel. This

Re: [RFC 0/8] Support generic Luks encryption

2023-12-04 Thread Yong Huang
On Tue, Dec 5, 2023 at 12:24 AM Daniel P. Berrangé wrote: > On Tue, Dec 05, 2023 at 12:06:17AM +0800, Hyman Huang wrote: > > This functionality was motivated by the following to-do list seen > > in crypto documents: > > https://wiki.qemu.org/Features/Block/Crypto > > > > The last chapter says we

[PATCH v2 1/4] scsi: only access SCSIDevice->requests from one thread

2023-12-04 Thread Stefan Hajnoczi
Stop depending on the AioContext lock and instead access SCSIDevice->requests from only one thread at a time: - When the VM is running only the BlockBackend's AioContext may access the requests list. - When the VM is stopped only the main loop may access the requests list. These constraints pr

[PATCH v2 2/4] virtio-scsi: don't lock AioContext around virtio_queue_aio_attach_host_notifier()

2023-12-04 Thread Stefan Hajnoczi
virtio_queue_aio_attach_host_notifier() does not require the AioContext lock. Stop taking the lock and add an explicit smp_wmb() because we were relying on the implicit barrier in the AioContext lock before. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- hw/

[PATCH v2 4/4] dma-helpers: don't lock AioContext in dma_blk_cb()

2023-12-04 Thread Stefan Hajnoczi
Commit abfcd2760b3e ("dma-helpers: prevent dma_blk_cb() vs dma_aio_cancel() race") acquired the AioContext lock inside dma_blk_cb() to avoid a race with scsi_device_purge_requests() running in the main loop thread. The SCSI code no longer calls dma_aio_cancel() from the main loop thread while I/O

[PATCH v2 3/4] scsi: don't lock AioContext in I/O code path

2023-12-04 Thread Stefan Hajnoczi
blk_aio_*() doesn't require the AioContext lock and the SCSI subsystem's internal state also does not anymore. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Acked-by: Kevin Wolf --- hw/scsi/scsi-disk.c| 23 --- hw/scsi/scsi-generic.c | 20 +++-

Re: [PATCH V6 03/14] cpus: stop vm in suspended runstate

2023-12-04 Thread Steven Sistare
On 12/4/2023 11:35 AM, Peter Xu wrote: > On Fri, Dec 01, 2023 at 12:11:32PM -0500, Steven Sistare wrote: diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h index f6a337b..1d6828f 100644 --- a/include/sysemu/runstate.h +++ b/include/sysemu/runstate.h @@ -40,6

Re: [PATCH 1/4] scsi: only access SCSIDevice->requests from one thread

2023-12-04 Thread Stefan Hajnoczi
On Fri, Dec 01, 2023 at 05:03:13PM +0100, Kevin Wolf wrote: > Am 23.11.2023 um 20:49 hat Stefan Hajnoczi geschrieben: > > Stop depending on the AioContext lock and instead access > > SCSIDevice->requests from only one thread at a time: > > - When the VM is running only the BlockBackend's AioContext

Re: [PATCH V6 03/14] cpus: stop vm in suspended runstate

2023-12-04 Thread Peter Xu
On Fri, Dec 01, 2023 at 12:11:32PM -0500, Steven Sistare wrote: > >> diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h > >> index f6a337b..1d6828f 100644 > >> --- a/include/sysemu/runstate.h > >> +++ b/include/sysemu/runstate.h > >> @@ -40,6 +40,11 @@ static inline bool > >> shutd

Re: [RFC 0/8] Support generic Luks encryption

2023-12-04 Thread Yong Huang
On Tue, Dec 5, 2023 at 12:24 AM Daniel P. Berrangé wrote: > On Tue, Dec 05, 2023 at 12:06:17AM +0800, Hyman Huang wrote: > > This functionality was motivated by the following to-do list seen > > in crypto documents: > > https://wiki.qemu.org/Features/Block/Crypto > > > > The last chapter says we

[PATCH] Revert "test/qga: use G_TEST_DIR to locate os-release test file"

2023-12-04 Thread Andrey Drobyshev
Since the commit a85d09269b QGA_OS_RELEASE variable points to the path relative to the build dir. Then on qemu-ga startup this path can't be found as qemu-ga cwd is somewhere else, which leads to the test failure: # ./tests/unit/test-qga -p /qga/guest-get-osinfo # random seed: R02S3a90c22d77f

Re: [RFC 0/8] Support generic Luks encryption

2023-12-04 Thread Daniel P . Berrangé
On Tue, Dec 05, 2023 at 12:06:17AM +0800, Hyman Huang wrote: > This functionality was motivated by the following to-do list seen > in crypto documents: > https://wiki.qemu.org/Features/Block/Crypto > > The last chapter says we should "separate header volume": > > The LUKS format has ability to

[RFC 4/8] Gluks: Introduce Gluks options

2023-12-04 Thread Hyman Huang
Similar to Luks, the Gluks format primarily recycles the Luks choices with the exception of the "size" option. Signed-off-by: Hyman Huang --- block/crypto.c | 4 ++-- block/generic-luks.c | 18 ++ block/generic-luks.h | 3 +++ 3 files changed, 23 insertions(+), 2 deletion

[RFC 6/8] crypto: Provide the Luks crypto driver to Gluks

2023-12-04 Thread Hyman Huang
Hooks up the Luks crypto driver for Gluks. Signed-off-by: Hyman Huang --- crypto/block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/block.c b/crypto/block.c index 3dcf22a69f..7e695c0a04 100644 --- a/crypto/block.c +++ b/crypto/block.c @@ -27,6 +27,7 @@ static const QCryptoBlockD

[PATCH] hw/ufs: avoid generating the same ID string for different LU devices

2023-12-04 Thread Akinobu Mita
QEMU would not start when trying to create two UFS host controllers and a UFS logical unit for each with the following options: -device ufs,id=bus0 \ -device ufs-lu,drive=drive1,bus=bus0,lun=0 \ -device ufs,id=bus1 \ -device ufs-lu,drive=drive2,bus=bus1,lun=0 \ This is because the same ID string

[RFC 5/8] qapi: Introduce Gluks types to qapi

2023-12-04 Thread Hyman Huang
Primarily using the Luks types again, Gluks adds an extra option called "header", which points to the Luks header node's description. Signed-off-by: Hyman Huang --- qapi/block-core.json | 22 +- qapi/crypto.json | 10 +++--- 2 files changed, 28 insertions(+), 4 deleti

[RFC 1/8] crypto: Export util functions and structures

2023-12-04 Thread Hyman Huang
Luks driver logic is primarily reused by Gluk, which, therefore, exports several pre-existing functions and structures. Signed-off-by: Hyman Huang --- block/crypto.c | 16 block/crypto.h | 23 +++ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git

[RFC 2/8] crypto: Introduce payload offset set function

2023-12-04 Thread Hyman Huang
Implement the payload offset set function for Gluks. Signed-off-by: Hyman Huang --- crypto/block.c | 4 include/crypto/block.h | 1 + 2 files changed, 5 insertions(+) diff --git a/crypto/block.c b/crypto/block.c index 7bb4b74a37..3dcf22a69f 100644 --- a/crypto/block.c +++ b/crypto/

[RFC 3/8] Gluks: Add the basic framework

2023-12-04 Thread Hyman Huang
Gluks would be a built-in format in the QEMU block layer. Signed-off-by: Hyman Huang --- block/generic-luks.c | 81 block/generic-luks.h | 26 ++ block/meson.build| 1 + 3 files changed, 108 insertions(+) create mode 100644 block/gen

[RFC 8/8] block: Support Gluks format image creation using qemu-img

2023-12-04 Thread Hyman Huang
To create a Gluks header image, use the command as follows: $ qemu-img create --object secret,id=sec0,data=abc123 -f gluks > -o cipher-alg=aes-256,cipher-mode=xts -o key-secret=sec0 > cipher.gluks Signed-off-by: Hyman Huang --- block.c | 5 + block/generic-luks.c | 53 +

[RFC 7/8] Gluks: Implement the fundamental block layer driver hooks

2023-12-04 Thread Hyman Huang
Signed-off-by: Hyman Huang --- block/generic-luks.c | 104 ++- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/block/generic-luks.c b/block/generic-luks.c index ebc0365d40..32cbedc86f 100644 --- a/block/generic-luks.c +++ b/block/generic-luk

[RFC 0/8] Support generic Luks encryption

2023-12-04 Thread Hyman Huang
This functionality was motivated by the following to-do list seen in crypto documents: https://wiki.qemu.org/Features/Block/Crypto The last chapter says we should "separate header volume": The LUKS format has ability to store the header in a separate volume from the payload. We should extend th

Re: [PATCH 2/4] virtio-scsi: don't lock AioContext around virtio_queue_aio_attach_host_notifier()

2023-12-04 Thread Stefan Hajnoczi
On Mon, Nov 27, 2023 at 09:21:08AM -0600, Eric Blake wrote: > On Thu, Nov 23, 2023 at 02:49:29PM -0500, Stefan Hajnoczi wrote: > > virtio_queue_aio_attach_host_notifier() does not require the AioContext > > lock. Stop taking the lock and remember add an explicit smp_wmb() > > s/remember// ? Will

Re: [PATCH 2/2] linux-user: Fix openat() emulation to not modify atime

2023-12-04 Thread Stefan Hajnoczi
On Mon, Dec 04, 2023 at 02:39:24PM +0100, Philippe Mathieu-Daudé wrote: > Hi Laurent, Helge, Richard, > > On 1/12/23 19:51, Shu-Chun Weng wrote: > > On Fri, Dec 1, 2023 at 4:42 AM Philippe Mathieu-Daudé > > wrote: > > > > Hi Shu-Chun, > > > > On 1/12/23 04:21,

Re: [PATCH 06/12] scsi: remove AioContext locking

2023-12-04 Thread Stefan Hajnoczi
On Mon, Dec 04, 2023 at 01:23:09PM +0100, Kevin Wolf wrote: > Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben: > > The AioContext lock no longer has any effect. Remove it. > > > > Signed-off-by: Stefan Hajnoczi > > --- > > include/hw/virtio/virtio-scsi.h | 14 -- > > hw/scsi/s

  1   2   >