Re: [PATCH] accel/tcg: nochain should disable goto_ptr

2024-05-31 Thread niugen
on 2024/6/1 01:32, Richard Henderson wrote: On 5/31/24 03:17, NiuGenen wrote: Signed-off-by: NiuGenen ---   accel/tcg/cpu-exec.c | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 2972f75b96..084fa645c7 100644 ---

Re: [PATCH v4 00/31] Add AMD Secure Nested Paging (SEV-SNP) support

2024-05-31 Thread Gupta, Pankaj
Hi Paolo, please check if branch qemu-coco-queue of https://gitlab.com/bonzini/qemu works for you! Getting compilation error here: Hope I am looking at correct branch. Oops, sorry: diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 96dc41d355c..ede3ef1225f 100644 ---

[PATCH] chardev: add path option for pty backend

2024-05-31 Thread Octavian Purdila
Add path option to the pty char backend which will create a symbolic link to the given path that points to the allocated PTY. Based on patch from Paulo Neves: https://patchew.org/QEMU/1548509635-15776-1-git-send-email-ptsne...@gmail.com/ Tested with the following invocations that the link is

[PATCH v2 2/8] hw/riscv/virt.c: add aplic nodename helper

2024-05-31 Thread Daniel Henrique Barboza
We'll change the aplic DT nodename in the next patch and the name is hardcoded in 2 different functions. Create a helper to change a single place later. While we're at it, in create_fdt_socket_aplic(), move 'aplic_name' inside the conditional to avoid allocating a string that won't be used when

[PATCH v2 7/8] hw/riscv/virt.c: imsics DT: add 'qemu, imsics' to 'compatible'

2024-05-31 Thread Daniel Henrique Barboza
The DT docs for riscv,imsics [1] predicts a 'qemu,imsics' enum in the 'compatible' property. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,imsics.yaml Reported-by: Conor Dooley Fixes: 28d8c281200f ("hw/riscv: virt: Add optional AIA IMSIC support to virt machine")

[PATCH v2 5/8] hw/riscv/virt.c: aplic DT: rename prop to 'riscv, delegation'

2024-05-31 Thread Daniel Henrique Barboza
The DT docs for riscv,aplic [1] predicts a 'riscv,delegation' property. Not 'riscv,delegate'. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.yaml Reported-by: Conor Dooley Fixes: e6faee65855b ("hw/riscv: virt: Add optional AIA APLIC support to virt machine")

[PATCH v2 4/8] hw/riscv/virt.c: aplic DT: add 'qemu, aplic' to 'compatible'

2024-05-31 Thread Daniel Henrique Barboza
The DT docs for riscv,aplic [1] predicts a 'qemu,aplic' enum in the 'compatible' property. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.yaml Reported-by: Conor Dooley Fixes: e6faee65855b ("hw/riscv: virt: Add optional AIA APLIC support to virt machine") Signed-off-by:

[PATCH v2 0/8] hw/riscv/virt.c: aplic/imsic DT fixes

2024-05-31 Thread Daniel Henrique Barboza
Hi, This is a series that is being spun from the reviews given on patch 1 [1]. We'll fix some DT validation issues we have in the 'virt' machine [2] that aren't related to missing extensions in the DT spec. I'll leave to maintainers to squash the patches as they see fit. I split it this way to

[PATCH v2 8/8] hw/riscv/virt.c: imsics DT: add '#msi-cells'

2024-05-31 Thread Daniel Henrique Barboza
The DT docs for riscv,imsics [1] requires a 'msi-cell' property. Add one and set it zero. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,imsics.yaml Reported-by: Conor Dooley Fixes: 28d8c281200f ("hw/riscv: virt: Add optional AIA IMSIC support to virt machine") Signed-off-by:

[PATCH v2 3/8] hw/riscv/virt.c: rename aplic nodename to 'interrupt-controller'

2024-05-31 Thread Daniel Henrique Barboza
The correct name of the aplic controller node, as per Linux kernel DT docs [1], is 'interrupt-controller@addr'. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,aplic.yaml Reported-by: Conor Dooley Fixes: e6faee65855b ("hw/riscv: virt: Add optional AIA APLIC support to virt

[PATCH v2 6/8] hw/riscv/virt.c: change imsic nodename to 'interrupt-controller'

2024-05-31 Thread Daniel Henrique Barboza
The Linux DT docs for imsic [1] predicts an 'interrupt-controller@addr' node, not 'imsic@addr', given this node inherits the 'interrupt-controller' node. [1] Documentation/devicetree/bindings/interrupt-controller/riscv,imsics.yaml Reported-by: Conor Dooley Fixes: 28d8c281200f ("hw/riscv: virt:

[PATCH v2 1/8] hw/riscv/virt.c: add address-cells in create_fdt_one_aplic()

2024-05-31 Thread Daniel Henrique Barboza
We need #address-cells properties in all interrupt controllers that are referred by an interrupt-map [1]. For the RISC-V machine, both PLIC and APLIC controllers must have this property. PLIC already sets it in create_fdt_socket_plic(). Set the property for APLIC in create_fdt_one_aplic(). [1]

Re: [PULL 25/72] Adds migration support for Branch History Rolling Buffer (BHRB) internal state.

2024-05-31 Thread Fabiano Rosas
Nicholas Piggin writes: > From: Glenn Miles > > Reviewed-by: Nicholas Piggin > Signed-off-by: Glenn Miles > Signed-off-by: Nicholas Piggin > --- > target/ppc/machine.c | 21 + > 1 file changed, 21 insertions(+) > > diff --git a/target/ppc/machine.c b/target/ppc/machine.c

Re: [PULL 00/43] target-arm queue

2024-05-31 Thread Richard Henderson
://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20240531 for you to fetch changes up to 3c3c233677d4f2fe5f35c5d6d6e9b53df48054f4: hw/usb/hcd-ohci: Fix #1510, #303: pid not IN or OUT (2024-05-31 11:26:00 +0100) target-arm

Re: [PATCH V1 19/26] physmem: preserve ram blocks for cpr

2024-05-31 Thread Steven Sistare via
On 5/30/2024 2:39 PM, Peter Xu wrote: On Thu, May 30, 2024 at 01:12:40PM -0400, Steven Sistare wrote: On 5/29/2024 3:25 PM, Peter Xu wrote: On Wed, May 29, 2024 at 01:31:53PM -0400, Steven Sistare wrote: On 5/28/2024 5:44 PM, Peter Xu wrote: On Mon, Apr 29, 2024 at 08:55:28AM -0700, Steve

Re: [PATCH V1 17/26] machine: memfd-alloc option

2024-05-31 Thread Steven Sistare via
On 5/30/2024 2:14 PM, Peter Xu wrote: On Thu, May 30, 2024 at 01:11:09PM -0400, Steven Sistare wrote: On 5/29/2024 3:14 PM, Peter Xu wrote: On Wed, May 29, 2024 at 01:31:38PM -0400, Steven Sistare wrote: diff --git a/system/memory.c b/system/memory.c index 49f1cb2..ca04a0e 100644 ---

[PATCH RFC v2 2/2] ui/gtk: Add a new parameter to assign connectors/monitors

2024-05-31 Thread dongwon . kim
From: Vivek Kasireddy The new parameter named "connector" can be used to assign physical monitors/connectors to individual GFX VCs such that when the monitor is connected or hot-plugged, the associated GTK window would be moved to it. If the monitor is disconnected or unplugged, the associated

[RFC PATCH v2 0/2] ui/gtk: Introduce new param - Connectors

2024-05-31 Thread dongwon . kim
From: Dongwon Kim This patch series is a replacement of https://mail.gnu.org/archive/html/qemu-devel/2023-06/msg03989.html There is a need, expressed by several users, to assign ownership of one or more physical monitors/connectors to individual guests. This creates a clear notion of which

[RFC PATCH v2 1/2] ui/gtk: Factor out tab window creation into a separate

2024-05-31 Thread dongwon . kim
From: Vivek Kasireddy Pull the code that creates a new window associated with a notebook tab into a separate function. This new function can be useful not just when user wants to detach a tab but also in the future when a new window creation is needed in other scenarios. Cc: Gerd Hoffmann Cc:

Re: [PATCH] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs

2024-05-31 Thread Cord Amfmgm
On Fri, May 31, 2024 at 9:03 AM Peter Maydell wrote: > On Tue, 21 May 2024 at 00:26, David Hubbard wrote: > > > > From: Cord Amfmgm > > > > This changes the way the ohci emulation handles a Transfer Descriptor > with > > "Current Buffer Pointer" set to "Buffer End" + 1. > > > > The OHCI spec

[PATCH v3 1/2] qio: Inherit follow_coroutine_ctx across TLS

2024-05-31 Thread Eric Blake
Since qemu 8.2, the combination of NBD + TLS + iothread crashes on an assertion failure: qemu-kvm: ../io/channel.c:534: void qio_channel_restart_read(void *): Assertion `qemu_get_current_aio_context() == qemu_coroutine_get_aio_context(co)' failed. It turns out that when we removed AioContext

[PATCH v3 0/2] Fix NBD+TLS regression in presence of iothread

2024-05-31 Thread Eric Blake
In v3: - 2/2: fix iotest filtering [kwolf] v2 was here: https://lists.gnu.org/archive/html/qemu-devel/2024-05/msg03517.html and this time, I'll wait for R-b before sending my v2 pull request: https://lists.gnu.org/archive/html/qemu-devel/2024-05/msg06206.html Eric Blake (2): qio: Inherit

[PATCH v3 2/2] iotests: test NBD+TLS+iothread

2024-05-31 Thread Eric Blake
Prevent regressions when using NBD with TLS in the presence of iothreads, adding coverage the fix to qio channels made in the previous patch. The shell function pick_unused_port() was copied from nbdkit.git/tests/functions.sh.in, where it had all authors from Red Hat, agreeing to the resulting

Re: [PATCH v4 00/31] Add AMD Secure Nested Paging (SEV-SNP) support

2024-05-31 Thread Paolo Bonzini
On Fri, May 31, 2024 at 7:41 PM Gupta, Pankaj wrote: > > please check if branch qemu-coco-queue of > > https://gitlab.com/bonzini/qemu works for you! > > Getting compilation error here: Hope I am looking at correct branch. Oops, sorry: diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c

[RFC PATCH v2 6/6] target/riscv: rvv: Optimize vl8re8.v/vs8r.v with limitations

2024-05-31 Thread Max Chou
The vector load/store whole register instructions (e.g. vl8re8.v/vs8r.v) perform unmasked continuous load/store. We can optimize these instructions by replacing the corresponding helper functions by TCG ops to copy more data at a time with following assumptions: * Host and target are little

Re: [PATCH v4 00/31] Add AMD Secure Nested Paging (SEV-SNP) support

2024-05-31 Thread Gupta, Pankaj
These patches implement SEV-SNP base support along with CPUID enforcement support for QEMU, and are also available at: https://github.com/pagupta/qemu/tree/snp_v4 Latest version of kvm changes are posted here [2] and also queued in kvm/next. Patch Layout 01-03: 'error_setg'

[RFC PATCH v2 1/6] target/riscv: Separate vector segment ld/st instructions

2024-05-31 Thread Max Chou
This commit separate the helper function implementations of vector segment load/store instructions from other vector load/store instructions. This can improve performance by avoiding unnecessary segment operation when NF = 1. Signed-off-by: Max Chou --- target/riscv/helper.h |

[RFC PATCH v2 4/6] target/riscv: Add check_probe_[read|write] helper functions

2024-05-31 Thread Max Chou
The helper_check_probe_[read|write] functions wrap the probe_pages function to perform virtual address resolution for continuous vector load/store instructions. Signed-off-by: Max Chou --- target/riscv/helper.h| 4 target/riscv/vector_helper.c | 12 2 files changed,

[RFC PATCH v2 5/6] target/riscv: rvv: Optimize v[l|s]e8.v with limitations

2024-05-31 Thread Max Chou
The vector unit-stride load/store instructions (e.g. vle8.v/vse8.v) perform continuous load/store. We can replace the corresponding helper functions by TCG ops to copy more data at a time with following assumptions: * Perform virtual address resolution once for entire vector at beginning *

[RFC PATCH v2 3/6] target/riscv: Inline vext_ldst_us and corresponding function for performance

2024-05-31 Thread Max Chou
In the vector unit-stride load/store helper functions. the vext_ldst_us function corresponding most of the execution time. Inline the functions can avoid the function call overhead to improve the helper function performance. Signed-off-by: Max Chou Reviewed-by: Richard Henderson ---

[RFC PATCH v2 0/6] Improve the performance of RISC-V vector unit-stride/whole register ld/st instructions

2024-05-31 Thread Max Chou
Hi, This RFC patch set tries to fix the issue of https://gitlab.com/qemu-project/qemu/-/issues/2137. In this new version, we added patches that try to load/store more data at a time in part of vector continuous load/store (unit-stride/whole register) instructions with some assumptions (e.g. no

[RFC PATCH v2 2/6] accel/tcg: Avoid unnecessary call overhead from qemu_plugin_vcpu_mem_cb

2024-05-31 Thread Max Chou
If there are not any QEMU plugin memory callback functions, checking before calling the qemu_plugin_vcpu_mem_cb function can reduce the function call overhead. Signed-off-by: Max Chou --- accel/tcg/ldst_common.c.inc | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 0/6] host/i386: require x86-64-v2 ISA

2024-05-31 Thread Richard Henderson
On 5/31/24 02:14, Paolo Bonzini wrote: Paolo Bonzini (6): host/i386: nothing looks at CPUINFO_SSE4 meson: assume x86-64-v2 baseline ISA host/i386: assume presence of CMOV host/i386: assume presence of SSE2 host/i386: assume presence of SSSE3 host/i386: assume presence of POPCNT

Re: [PATCH v6 5/8] hw/misc/stm32l4x5_rcc: Handle Register Updates

2024-05-31 Thread Peter Maydell
On Sun, 3 Mar 2024 at 14:08, Arnaud Minier wrote: > > Update the RCC state and propagate frequency changes when writing to the > RCC registers. Currently, ICSCR, CIER, the reset registers and the stop > mode registers are not implemented. > > Some fields have not been implemented due to

Re: [PATCH v4 00/31] Add AMD Secure Nested Paging (SEV-SNP) support

2024-05-31 Thread Paolo Bonzini
On Fri, May 31, 2024 at 1:20 PM Paolo Bonzini wrote: > > On Thu, May 30, 2024 at 1:16 PM Pankaj Gupta wrote: > > > > These patches implement SEV-SNP base support along with CPUID enforcement > > support for QEMU, and are also available at: > > > > https://github.com/pagupta/qemu/tree/snp_v4 > >

Re: [PATCH] accel/tcg: nochain should disable goto_ptr

2024-05-31 Thread Richard Henderson
On 5/31/24 03:17, NiuGenen wrote: Signed-off-by: NiuGenen --- accel/tcg/cpu-exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 2972f75b96..084fa645c7 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@

Re: [PATCH v3 5/6] iotests: Filter out `vvfat` fmt from failing tests

2024-05-31 Thread Kevin Wolf
Am 26.05.2024 um 11:56 hat Amjad Alsharafi geschrieben: > `vvfat` is a special format and not all tests (even generic) can run > without crashing. So, added `unsupported_fmt: vvfat` to all failling > tests. > > Also added `vvfat` format into `meson.build`, vvfaat tests can be run > on the

Re: [PATCH v3 0/6] vvfat: Fix write bugs for large files and add iotests

2024-05-31 Thread Kevin Wolf
Am 26.05.2024 um 11:56 hat Amjad Alsharafi geschrieben: > These patches fix some bugs found when modifying files in vvfat. > First, there was a bug when writing to the cluster 2 or above of a file, it > will copy the cluster before it instead, so, when writing to cluster=2, the > content of

Re: [PATCH V2 2/3] target/i386: call cpu_exec_realizefn before x86_cpu_filter_features

2024-05-31 Thread Chen, Zide
On 5/30/2024 11:30 PM, Zhao Liu wrote: > Hi Zide, > > On Fri, May 24, 2024 at 01:00:16PM -0700, Zide Chen wrote: >> Date: Fri, 24 May 2024 13:00:16 -0700 >> From: Zide Chen >> Subject: [PATCH V2 2/3] target/i386: call cpu_exec_realizefn before >> x86_cpu_filter_features >> X-Mailer:

Re: [PATCH V2 3/3] target/i386: Move host_cpu_enable_cpu_pm into kvm_cpu_realizefn()

2024-05-31 Thread Chen, Zide
On 5/30/2024 11:53 PM, Zhao Liu wrote: > On Fri, May 24, 2024 at 01:00:17PM -0700, Zide Chen wrote: >> Date: Fri, 24 May 2024 13:00:17 -0700 >> From: Zide Chen >> Subject: [PATCH V2 3/3] target/i386: Move host_cpu_enable_cpu_pm into >> kvm_cpu_realizefn() >> X-Mailer: git-send-email 2.34.1 >>

[PATCH] accel/kvm: Fix two lines with hard-coded tabs

2024-05-31 Thread Peter Maydell
In kvm-all.c, two lines have been accidentally indented with hard-coded tabs rather than spaces. Normalise to match the rest of the file. Signed-off-by: Peter Maydell --- accel/kvm/kvm-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/kvm/kvm-all.c

Re: [PATCH 5/7] target/i386: Split out gdb-internal.h

2024-05-31 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 3/7] accel/tcg: Return the TranslationBlock from cpu_unwind_state_data

2024-05-31 Thread Alex Bennée
Richard Henderson writes: > Fix the i386 get_memio_eip function to use tb->cflags > instead of cs->tcg_cflags. > > Signed-off-by: Richard Henderson > --- > include/exec/cpu-common.h | 9 + > accel/tcg/translate-all.c | 9 + > target/i386/helper.c | 6 -- > 3 files

Re: [PATCH 2/7] accel/tcg: Set CPUState.plugin_ra before all plugin callbacks

2024-05-31 Thread Alex Bennée
Richard Henderson writes: We really could do with a description of why we are setting plugin_ra and what we mean to achieve by it. I think it is so we can then do the same PC/other register recovery as we do at synchronous faulting exceptions be it generated TCG code or a helper. However we

Re: [PATCH v4 18/31] hw/i386/sev: Add function to get SEV metadata from OVMF header

2024-05-31 Thread Liam Merwick via
On 31/05/2024 16:41, Paolo Bonzini wrote: > On Fri, May 31, 2024 at 5:20 PM Liam Merwick wrote: >>> +metadata = (OvmfSevMetadata *)(flash_ptr + flash_size - data->offset); >>> +if (memcmp(metadata->signature, "ASEV", 4) != 0) { >>> +return; >>> +} >>> + >>> +

Re: [PULL 0/2] NBD patches for 2024-05-30

2024-05-31 Thread Peter Maydell
On Fri, 31 May 2024 at 17:17, Eric Blake wrote: > > On Thu, May 30, 2024 at 07:22:16AM GMT, Eric Blake wrote: > > The following changes since commit 3b2fe44bb7f605f179e5e7feb2c13c2eb3abbb80: > > > > Merge tag 'pull-request-2024-05-29' of https://gitlab.com/thuth/qemu into > > staging

Re: [PATCH] hw/cxl: Fix read from bogus memory

2024-05-31 Thread Peter Maydell
On Fri, 31 May 2024 at 17:22, Ira Weiny wrote: > > Peter and coverity report: > > We've passed '' to address_space_write(), which means "read > from the address on the stack where the function argument 'data' > lives", so instead of writing 64 bytes of data to the guest ,

Re: [PATCH v3 0/6] Implement icount=auto using TCG Plugins

2024-05-31 Thread Alex Bennée
Pierrick Bouvier writes: > The goal here is to be able to scale temporally execution of qemu-user/system, > using a given number of instructions per second. > > We define a virtual clock, that can be late or in advance compared to real > time. > When we are in advance, we slow execution (by

Re: [PATCH] plugins: Ensure register handles are not NULL

2024-05-31 Thread Alex Bennée
Akihiko Odaki writes: > Ensure register handles are not NULL so that a plugin can assume NULL is > invalid as a register handle. > > Signed-off-by: Akihiko Odaki Queued to plugins/next, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 0/4] hw/s390x: Alias @dump-skeys -> @dump-s390-skey and deprecate

2024-05-31 Thread Thomas Huth
On 31/05/2024 16.02, Dr. David Alan Gilbert wrote: * Thomas Huth (th...@redhat.com) wrote: On 30/05/2024 09.45, Philippe Mathieu-Daudé wrote: We are trying to unify all qemu-system-FOO to a single binary. In order to do that we need to remove QAPI target specific code. @dump-skeys is only

Re: [PULL 04/53] hw/cxl: Add clear poison mailbox command support.

2024-05-31 Thread Ira Weiny
Peter Maydell wrote: > Ping! This looks like it should be an easy one-liner fix > for a Coverity-detected read-from-bogus-memory bug -- > could one of the CXL folks have a look at it and send > a patch, please ? Done. Jonathan could you double check I only compile tested. I think you are

[PATCH] hw/cxl: Fix read from bogus memory

2024-05-31 Thread Ira Weiny
as = >hostpmem_as; } -address_space_write(as, dpa_offset, MEMTXATTRS_UNSPECIFIED, , +address_space_write(as, dpa_offset, MEMTXATTRS_UNSPECIFIED, data, CXL_CACHE_LINE_SIZE); return true; } --- base-commit: 3b2fe44bb7f605f179e5e7feb2c13c2eb3abbb80 change-id:

Re: [PULL 0/2] NBD patches for 2024-05-30

2024-05-31 Thread Eric Blake
On Thu, May 30, 2024 at 07:22:16AM GMT, Eric Blake wrote: > The following changes since commit 3b2fe44bb7f605f179e5e7feb2c13c2eb3abbb80: > > Merge tag 'pull-request-2024-05-29' of https://gitlab.com/thuth/qemu into > staging (2024-05-29 08:38:20 -0700) > > are available in the Git repository

Re: [PATCH v3 1/6] vvfat: Fix bug in writing to middle of file

2024-05-31 Thread Kevin Wolf
Am 26.05.2024 um 11:56 hat Amjad Alsharafi geschrieben: > Before this commit, the behavior when calling `commit_one_file` for > example with `offset=0x2000` (second cluster), what will happen is that > we won't fetch the next cluster from the fat, and instead use the first > cluster for the read

Re: [PATCH v2 2/2] iotests: test NBD+TLS+iothread

2024-05-31 Thread Eric Blake
On Fri, May 31, 2024 at 04:36:20PM GMT, Kevin Wolf wrote: > Am 18.05.2024 um 04:50 hat Eric Blake geschrieben: > > Prevent regressions when using NBD with TLS in the presence of > > iothreads, adding coverage the fix to qio channels made in the > > previous patch. > > > > CC:

Re: Unexpected error in rme_configure_one() at ../target/arm/kvm-rme.c:159

2024-05-31 Thread Jean-Philippe Brucker
On Fri, May 31, 2024 at 11:16:30PM +0900, Itaru Kitayama wrote: > Thanks! I wasn’t aware of it The good news is that after whole day of try and > error attempts I was able to > bring up a Realm VM on FVP. Here’s my version of overlay yaml, cca-v2.yaml: That is good news, thanks for the update >

Re: [PATCH v2 4/4] tests/qtest/migration-test: Add a postcopy memfile test

2024-05-31 Thread Fabiano Rosas
Peter Xu writes: > On Thu, May 30, 2024 at 07:54:07PM +1000, Nicholas Piggin wrote: >> Postcopy requires userfaultfd support, which requires tmpfs if a memory >> file is used. >> >> This adds back support for /dev/shm memory files, but adds preallocation >> to skip environments where that mount

Re: [PATCH v2 07/18] monitor: Simplify fdset and fd removal

2024-05-31 Thread Peter Xu
On Thu, May 23, 2024 at 04:05:37PM -0300, Fabiano Rosas wrote: > Remove fds right away instead of setting the ->removed flag. We don't > need the extra complexity of having a cleanup function reap the > removed entries at a later time. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu --

Re: [PATCH v2 13/18] monitor: fdset: Match against O_DIRECT

2024-05-31 Thread Peter Xu
On Fri, May 31, 2024 at 12:42:05PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Thu, May 23, 2024 at 04:05:43PM -0300, Fabiano Rosas wrote: > >> We're about to enable the use of O_DIRECT in the migration code and > >> due to the alignment restrictions imposed by filesystems we need to

Re: [PATCH v2 06/18] monitor: Stop removing non-duplicated fds

2024-05-31 Thread Peter Xu
On Fri, May 31, 2024 at 12:25:52PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Thu, May 23, 2024 at 04:05:36PM -0300, Fabiano Rosas wrote: > >> We've been up until now cleaning up any file descriptors that have > >> been passed into QEMU and never duplicated[1,2]. A file descriptor >

Re: [PATCH v2 2/4] tests/qtest/migration-test: Enable test_mode_reboot

2024-05-31 Thread Fabiano Rosas
Nicholas Piggin writes: > Fabiano pointed out this test probably is not flaky, just that it could > not run under Gitlab CI due to very small shm filesystem size in that > environment. > > Now that it has moved to use /tmp instead of /dev/shm files, enable it. > > Signed-off-by: Nicholas Piggin

Re: [PATCH v3 1/4] osdep: Make qemu_madvise() to set errno in all cases

2024-05-31 Thread Philippe Mathieu-Daudé
On 31/5/24 17:10, Michal Privoznik wrote: The unspoken premise of qemu_madvise() is that errno is set on error. And it is mostly the case except for posix_madvise() which is documented to return either zero (on success) or a positive error number. This means, we must set errno ourselves. And

Re: [PATCH v2 13/18] monitor: fdset: Match against O_DIRECT

2024-05-31 Thread Fabiano Rosas
Peter Xu writes: > On Thu, May 23, 2024 at 04:05:43PM -0300, Fabiano Rosas wrote: >> We're about to enable the use of O_DIRECT in the migration code and >> due to the alignment restrictions imposed by filesystems we need to >> make sure the flag is only used when doing aligned IO. >> >> The

Re: [PATCH v4 18/31] hw/i386/sev: Add function to get SEV metadata from OVMF header

2024-05-31 Thread Paolo Bonzini
On Fri, May 31, 2024 at 5:20 PM Liam Merwick wrote: > > +metadata = (OvmfSevMetadata *)(flash_ptr + flash_size - data->offset); > > +if (memcmp(metadata->signature, "ASEV", 4) != 0) { > > +return; > > +} > > + > > +ovmf_sev_metadata_table = g_malloc(metadata->len); > >

Re: [PATCH v3 4/4] backends/hostmem: Report error when memory size is unaligned

2024-05-31 Thread Philippe Mathieu-Daudé
On 31/5/24 17:10, Michal Privoznik wrote: If memory-backend-{file,ram} has a size that's not aligned to underlying page size it is not only wasteful, but also may lead to hard to debug behaviour. For instance, in case memory-backend-file and hugepages, madvise() and mbind() fail. Rightfully so,

Re: [PATCH v4 02/31] linux-headers: Update to current kvm/next

2024-05-31 Thread Paolo Bonzini
On Fri, May 31, 2024 at 4:38 PM Liam Merwick wrote: > > --- a/linux-headers/asm-x86/kvm.h > > +++ b/linux-headers/asm-x86/kvm.h > > @@ -870,5 +919,6 @@ struct kvm_hyperv_eventfd { > > #define KVM_X86_SW_PROTECTED_VM 1 > > #define KVM_X86_SEV_VM 2 > > #define

Re: [PATCH v2 11/18] migration/multifd: Add direct-io support

2024-05-31 Thread Fabiano Rosas
Peter Xu writes: > On Thu, May 23, 2024 at 04:05:41PM -0300, Fabiano Rosas wrote: >> When multifd is used along with mapped-ram, we can take benefit of a >> filesystem that supports the O_DIRECT flag and perform direct I/O in >> the multifd threads. This brings a significant performance

Re: [PATCH v2 06/18] monitor: Stop removing non-duplicated fds

2024-05-31 Thread Fabiano Rosas
Peter Xu writes: > On Thu, May 23, 2024 at 04:05:36PM -0300, Fabiano Rosas wrote: >> We've been up until now cleaning up any file descriptors that have >> been passed into QEMU and never duplicated[1,2]. A file descriptor >> without duplicates indicates that no part of QEMU has made use of >>

Re: Unexpected error in rme_configure_one() at ../target/arm/kvm-rme.c:159

2024-05-31 Thread Ard Biesheuvel
On Fri, 31 May 2024 at 17:09, Jean-Philippe Brucker wrote: > > Hi Gavin, > > On Fri, May 31, 2024 at 04:23:13PM +1000, Gavin Shan wrote: > > I got a chance to try CCA software components, suggested by [1]. However, > > the edk2 > > is stuck somewhere. I didn't reach to stage of loading guest

Re: [PATCH v4 18/31] hw/i386/sev: Add function to get SEV metadata from OVMF header

2024-05-31 Thread Liam Merwick via
On 30/05/2024 12:16, Pankaj Gupta wrote: > From: Brijesh Singh > > A recent version of OVMF expanded the reset vector GUID list to add > SEV-specific metadata GUID. The SEV metadata describes the reserved > memory regions such as the secrets and CPUID page used during the SEV-SNP > guest launch.

Re: [PATCH] scripts/coverity-scan/COMPONENTS.md: Update paths to match gitlab CI

2024-05-31 Thread Philippe Mathieu-Daudé
Hi Peter, On 31/5/24 16:21, Peter Maydell wrote: Since commit 83aa1baa069c we have been running the build for Coverity Scan as a Gitlab CI job, rather than the old setup where it was run on a local developer's machine. This is working well, but the absolute paths of files are different for the

Re: [PATCH v3 00/27] qemu-img: refersh options and --help handling, cleanups

2024-05-31 Thread Michael Tokarev
A friendly ping? It took me quite some time and energy for all this. It'd be sad if it gets lost. /mjt 24.04.2024 11:50, Michael Tokarev wrote: Quite big patchset trying to implement normal, readable qemu-img --help (and qemu-img COMMAND --help) output with readable descriptions, and adding

[PATCH v3 0/4] backends/hostmem: Report more errors on failures

2024-05-31 Thread Michal Privoznik
v3 of: diff to v2: - In 1/4 I've reworked setting errno because of how posix_madvise() behaves on Darwin, - In 4/4 I'm now using size_to_str() to print the page size, oh, and the error message now contains the backend name too. Michal Privoznik (4): osdep: Make qemu_madvise() to set errno

[PATCH v3 4/4] backends/hostmem: Report error when memory size is unaligned

2024-05-31 Thread Michal Privoznik
If memory-backend-{file,ram} has a size that's not aligned to underlying page size it is not only wasteful, but also may lead to hard to debug behaviour. For instance, in case memory-backend-file and hugepages, madvise() and mbind() fail. Rightfully so, page is the smallest unit they can work

[PATCH v3 2/4] osdep: Make qemu_madvise() return ENOSYS on unsupported OSes

2024-05-31 Thread Michal Privoznik
Not every OS is capable of madvise() or posix_madvise() even. In that case, errno should be set to ENOSYS as it reflects the cause better. Signed-off-by: Michal Privoznik Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand --- util/osdep.c | 2 +- 1 file changed, 1

[PATCH v3 1/4] osdep: Make qemu_madvise() to set errno in all cases

2024-05-31 Thread Michal Privoznik
The unspoken premise of qemu_madvise() is that errno is set on error. And it is mostly the case except for posix_madvise() which is documented to return either zero (on success) or a positive error number. This means, we must set errno ourselves. And while at it, make the function return a

[PATCH v3 3/4] backends/hostmem: Report error on qemu_madvise() failures

2024-05-31 Thread Michal Privoznik
If user sets .merge or .dump attributes qemu_madvise() is called with corresponding advice. But it is never checked for failure which may mislead users into thinking the attribute is set correctly. Report an appropriate error. Signed-off-by: Michal Privoznik Reviewed-by: Philippe Mathieu-Daudé

Re: Unexpected error in rme_configure_one() at ../target/arm/kvm-rme.c:159

2024-05-31 Thread Jean-Philippe Brucker
Hi Gavin, On Fri, May 31, 2024 at 04:23:13PM +1000, Gavin Shan wrote: > I got a chance to try CCA software components, suggested by [1]. However, the > edk2 > is stuck somewhere. I didn't reach to stage of loading guest kernel yet. I'm > replying > to see if anyone has a idea. ... > INFO:

Re: [PATCH v2 05/18] monitor: Introduce monitor_fdset_*free

2024-05-31 Thread Fabiano Rosas
Peter Xu writes: > On Thu, May 23, 2024 at 04:05:35PM -0300, Fabiano Rosas wrote: >> Introduce two new functions to remove and free no longer used fds and >> fdsets. >> >> We need those to decouple the remove/free routines from >> monitor_fdset_cleanup() which will go away in the next patches.

Re: [PATCH v2 01/18] migration: Fix file migration with fdset

2024-05-31 Thread Fabiano Rosas
Peter Xu writes: > On Thu, May 23, 2024 at 04:05:31PM -0300, Fabiano Rosas wrote: >> When the "file:" migration support was added we missed the special >> case in the qemu_open_old implementation that allows for a particular >> file name format to be used to refer to a set of file descriptors

Re: [RFC 0/6] scripts: Rewrite simpletrace printer in Rust

2024-05-31 Thread Alex Bennée
Daniel P. Berrangé writes: > On Mon, May 27, 2024 at 04:14:15PM +0800, Zhao Liu wrote: >> Hi maintainers and list, >> >> This RFC series attempts to re-implement simpletrace.py with Rust, which >> is the 1st task of Paolo's GSoC 2024 proposal. >> >> There are two motivations for this work: >>

Re: [PATCH v4 02/31] linux-headers: Update to current kvm/next

2024-05-31 Thread Liam Merwick via
On 30/05/2024 12:16, Pankaj Gupta wrote: > Co-developed-by: Michael Roth > Signed-off-by: Michael Roth > Signed-off-by: Pankaj Gupta > --- > linux-headers/asm-loongarch/bitsperlong.h | 23 ++ > linux-headers/asm-loongarch/kvm.h | 4 ++ > linux-headers/asm-loongarch/mman.h

Re: [PATCH v2 2/2] iotests: test NBD+TLS+iothread

2024-05-31 Thread Kevin Wolf
Am 18.05.2024 um 04:50 hat Eric Blake geschrieben: > Prevent regressions when using NBD with TLS in the presence of > iothreads, adding coverage the fix to qio channels made in the > previous patch. > > CC: qemu-sta...@nongnu.org > Signed-off-by: Eric Blake > diff --git

Re: [PATCH v2 0/6] Rework x86 page table walks

2024-05-31 Thread Peter Maydell
On Fri, 31 May 2024 at 14:48, Peter Maydell wrote: > > On Fri, 24 May 2024 at 18:08, Don Porter wrote: > > > > This version of the 'info pg' command adopts Peter Maydell's request > > to write some guest-agnostic page table iterator and accessor code, > > along with architecture-specific hooks.

[PATCH] scripts/coverity-scan/COMPONENTS.md: Update paths to match gitlab CI

2024-05-31 Thread Peter Maydell
Since commit 83aa1baa069c we have been running the build for Coverity Scan as a Gitlab CI job, rather than the old setup where it was run on a local developer's machine. This is working well, but the absolute paths of files are different for the Gitlab CI job, which means that the regexes we use

Re: [PATCH v2 2/6] Convert 'info tlb' to use generic iterator

2024-05-31 Thread Dr. David Alan Gilbert
* Don Porter (por...@cs.unc.edu) wrote: > Signed-off-by: Don Porter If this changes the output of 'info tlb' could you add a before/after to the commit message please. Also, have a look at glib's g_printf and friends, you might find they're easier;

Re: Unexpected error in rme_configure_one() at ../target/arm/kvm-rme.c:159

2024-05-31 Thread Itaru Kitayama
Hi Jean, > On May 31, 2024, at 19:21, Jean-Philippe Brucker > wrote: > > Hi Itaru, > > On Fri, May 31, 2024 at 10:57:13AM +0100, Peter Maydell wrote: >> On Fri, 31 May 2024 at 05:20, Itaru Kitayama >> wrote: >>> >>> >>> On May 30, 2024, at 22:30, Philippe Mathieu-Daudé wrote:

Re: [PATCH v2 1/6] Add an "info pg" command that prints the current page tables

2024-05-31 Thread Dr. David Alan Gilbert
* Don Porter (por...@cs.unc.edu) wrote: > The new "info pg" monitor command prints the current page table, > including virtual address ranges, flag bits, and snippets of physical > page numbers. Completely filled regions of the page table with > compatible flags are "folded", with the result that

Re: [PATCH] hw/dma/xlnx_dpdma: Read descriptor into buffer, not into pointer-to-buffer

2024-05-31 Thread Edgar E. Iglesias
On Fri, May 31, 2024 at 2:46 PM Peter Maydell wrote: > In fdf029762f501 we factored out the handling of reading and writing > DMA descriptors from guest memory. Unfortunately we accidentally > made the descriptor-read read the descriptor into the address of the > buffer rather than into the

Re: [PATCH] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs

2024-05-31 Thread Peter Maydell
On Tue, 21 May 2024 at 00:26, David Hubbard wrote: > > From: Cord Amfmgm > > This changes the way the ohci emulation handles a Transfer Descriptor with > "Current Buffer Pointer" set to "Buffer End" + 1. > > The OHCI spec 4.3.1.2 Table 4-2 allows td.cbp to be one byte more than td.be > to signal

Re: [PATCH 0/4] hw/s390x: Alias @dump-skeys -> @dump-s390-skey and deprecate

2024-05-31 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > On 30/05/2024 09.45, Philippe Mathieu-Daudé wrote: > > We are trying to unify all qemu-system-FOO to a single binary. > > In order to do that we need to remove QAPI target specific code. > > > > @dump-skeys is only available on qemu-system-s390x. This

Re: [PATCH 2/5] cpu: move Qemu[Thread|Cond] setup into common code

2024-05-31 Thread Reinoud Zandijk
On Thu, May 30, 2024 at 03:29:41PM -0700, Pierrick Bouvier wrote: > On 5/30/24 12:42, Alex Bennée wrote: > > Aside from the round robin threads this is all common code. By > > moving the halt_cond setup we also no longer need hacks to work around > > the race between QOM object creation and thread

Re: [PATCH v2 0/6] Rework x86 page table walks

2024-05-31 Thread Peter Maydell
On Fri, 24 May 2024 at 18:08, Don Porter wrote: > > This version of the 'info pg' command adopts Peter Maydell's request > to write some guest-agnostic page table iterator and accessor code, > along with architecture-specific hooks. The first patch in this > series contributes a generic page

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-31 Thread Dorjoy Chowdhury
Hi Peter, On Fri, May 31, 2024, 6:53 PM Peter Maydell wrote: > On Fri, 3 May 2024 at 17:53, Dorjoy Chowdhury > wrote: > > > > On Fri, May 3, 2024 at 10:28 PM Peter Maydell > wrote: > > > > > > On Fri, 19 Apr 2024 at 19:31, Dorjoy Chowdhury > wrote: > > > > > > > > Some ARM CPUs advertise

Re: [PATCH v2 4/4] tests/qtest/migration-test: Add a postcopy memfile test

2024-05-31 Thread Peter Xu
On Thu, May 30, 2024 at 07:54:07PM +1000, Nicholas Piggin wrote: > Postcopy requires userfaultfd support, which requires tmpfs if a memory > file is used. > > This adds back support for /dev/shm memory files, but adds preallocation > to skip environments where that mount is limited in size. > >

Re: [PATCH v4 0/3] hw/riscv/virt: pflash improvements

2024-05-31 Thread Sunil V L
On Thu, May 30, 2024 at 04:37:56AM -0700, Andrea Bolognani wrote: > On Mon, Nov 20, 2023 at 08:06:19PM GMT, Sunil V L wrote: > > On Mon, Nov 20, 2023 at 02:29:28PM +, Andrea Bolognani wrote: > > > On Fri, May 26, 2023 at 11:10:12AM +0200, Andrew Jones wrote: > > > > > > > So, are edk2 users

Re: [PATCH] physmem: allow debug writes to MMIO regions

2024-05-31 Thread Peter Maydell
On Mon, 20 May 2024 at 19:48, Perry Hung wrote: > > Philippe, Peter, > > Thank you for the comments. I am not even sure what the semantics of > putting a breakpoint or watchpoint > on device regions are supposed to be. I would imagine it is > architecture-specific as to whether this is even

Re: [PATCH 1/6] host/i386: nothing looks at CPUINFO_SSE4

2024-05-31 Thread Philippe Mathieu-Daudé
On 31/5/24 11:14, Paolo Bonzini wrote: The only user was the SSE4.1 variant of buffer_is_zero, which has been removed; code to compute CPUINFO_SSE4 is dead. Signed-off-by: Paolo Bonzini --- host/include/i386/host/cpuinfo.h | 1 - util/cpuinfo-i386.c | 1 - 2 files changed, 2

Re: [PATCH] hw/dma/xlnx_dpdma: Read descriptor into buffer, not into pointer-to-buffer

2024-05-31 Thread Philippe Mathieu-Daudé
On 31/5/24 14:46, Peter Maydell wrote: In fdf029762f501 we factored out the handling of reading and writing DMA descriptors from guest memory. Unfortunately we accidentally made the descriptor-read read the descriptor into the address of the buffer rather than into the buffer, because we didn't

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-31 Thread Peter Maydell
On Fri, 3 May 2024 at 17:53, Dorjoy Chowdhury wrote: > > On Fri, May 3, 2024 at 10:28 PM Peter Maydell > wrote: > > > > On Fri, 19 Apr 2024 at 19:31, Dorjoy Chowdhury > > wrote: > > > > > > Some ARM CPUs advertise themselves as SMT by having the MT[24] bit set > > > to 1 in the MPIDR

  1   2   3   >