Re: [PATCH v5 8/8] hw/mem/cxl_type3: Add CXL RAS Error Injection Support.

2023-02-22 Thread Markus Armbruster
Thomas Huth writes: > On 22/02/2023 19.16, Philippe Mathieu-Daudé wrote: >> +Thomas (meson) & Marc-André (conditional QAPI) > > + Markus > >> On 22/2/23 17:49, Jonathan Cameron wrote: [...] >> Doesn't these need >> >>     'if': 'CONFIG_CXL_MEM_DEVICE', >> >> ? >

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-22 Thread Michael S. Tsirkin
On Wed, Feb 22, 2023 at 03:21:42PM -0500, Michael S. Tsirkin wrote: > On Wed, Feb 22, 2023 at 08:25:19PM +0200, Anton Kuchin wrote: > > On 22/02/2023 19:12, Michael S. Tsirkin wrote: > > > On Wed, Feb 22, 2023 at 07:05:47PM +0200, Anton Kuchin wrote: > > > > On 22/02/2023 18:51, Michael S. Tsirkin

Re: Questions about how block devices use snapshots

2023-02-22 Thread Zhiyong Ye
Hi Kevin, Thank you for your reply and this method works. May I ask if this 'image-end-offset' field can be shown in the qemu-img info too? Because it is also a very useful information whether qcow2 is placed on a file or a block device. Regards Zhiyong On 2/21/23 11:58 PM, Kevin Wolf

Re: [PATCH] qapi: allow unions to contain further unions

2023-02-22 Thread Markus Armbruster
Daniel P. Berrangé writes: > This extends the QAPI schema validation to permit unions inside unions, > provided the checks for clashing fields pass. > > Signed-off-by: Daniel P. Berrangé > --- > > This patch comes out of the discussion on Het's migration series > starting at this patch: > >

Re: [PATCH] hw/smbios: fix field corruption in type 4 table

2023-02-22 Thread Michael S. Tsirkin
On Wed, Feb 22, 2023 at 10:00:49PM +0100, Julia Suvorova wrote: > Since table type 4 of SMBIOS version 2.6 is shorter than 3.0, the > strings which follow immediately after the struct fields have been > overwritten by unconditional filling of later fields such as core_count2. > Make these fields

Re: [PATCH] hw/i386: fix microvm segfault with virtio cmdline

2023-02-22 Thread Michael S. Tsirkin
didn't read the patch yet but just formatting comments: On Wed, Feb 22, 2023 at 10:39:10PM -0800, Daniel Hoffman wrote: > The 'microvm' machine type allows for disabling ACPI, in which case > the VirtIO device configuration is passed via appending it to the > kernel cmdline. > > If no cmdline

[PATCH V2 0/5] Fix UNMAP notifier for intel-iommu

2023-02-22 Thread Jason Wang
Hi All: According to ATS, device should work if ATS is disabled. This is not correctly implemented in the current intel-iommu since it doesn't handle the UNMAP notifier correctly. This breaks the vhost-net + vIOMMU without dt. The root casue is that the when there's a device IOTLB miss (note

[PATCH V2 1/5] intel-iommu: fail MAP notifier without caching mode

2023-02-22 Thread Jason Wang
Without caching mode, MAP notifier won't work correctly since guest won't send IOTLB update event when it establishes new mappings in the I/O page tables. Let's fail the IOMMU notifiers early instead of misbehaving silently. Reviewed-by: Eric Auger Tested-by: Viktor Prutyanov Signed-off-by:

[PATCH V2 3/5] memory: introduce memory_region_unmap_iommu_notifier_range()

2023-02-22 Thread Jason Wang
This patch introduces a new helper to unmap the range of a specific IOMMU notifier. Signed-off-by: Jason Wang --- include/exec/memory.h | 10 ++ softmmu/memory.c | 13 + 2 files changed, 23 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index

[PATCH V2 5/5] intel-iommu: send UNMAP notifications for domain or global inv desc

2023-02-22 Thread Jason Wang
From: Peter Xu We don't send UNMAP notification upon domain or global invalidation which will lead the notifier can't work correctly. One example is to use vhost remote IOTLB without enabling device IOTLB. Fixing this by sending UNMAP notification. Signed-off-by: Peter Xu Signed-off-by: Jason

[PATCH V2 4/5] smmu: switch to use memory_region_unmap_iommu_notifier_range()

2023-02-22 Thread Jason Wang
Signed-off-by: Jason Wang --- hw/arm/smmu-common.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 733c964778..5e2847d511 100644 --- a/hw/arm/smmu-common.c +++ b/hw/arm/smmu-common.c @@ -467,20 +467,6 @@

[PATCH V2 2/5] intel-iommu: fail DEVIOTLB_UNMAP without dt mode

2023-02-22 Thread Jason Wang
Without dt mode, device IOTLB notifier won't work since guest won't send device IOTLB invalidation descriptor in this case. Let's fail early instead of misbehaving silently. Reviewed-by: Laurent Vivier Tested-by: Laurent Vivier Tested-by: Viktor Prutyanov Buglink:

Re: [PATCH v5 8/8] hw/mem/cxl_type3: Add CXL RAS Error Injection Support.

2023-02-22 Thread Thomas Huth
On 22/02/2023 19.16, Philippe Mathieu-Daudé wrote: +Thomas (meson) & Marc-André (conditional QAPI) + Markus On 22/2/23 17:49, Jonathan Cameron wrote: +# Type of uncorrectable CXL error to inject. These errors are reported via +# an AER uncorrectable internal error with additional

Re: [PATCH] hw/virtio: added virtio-serial test cases

2023-02-22 Thread Dan Hoffman
Is there interest in this? On Fri, Nov 11, 2022 at 10:33 PM Daniel Hoffman wrote: > > The previous test cases for virtio-serial only tested initialization of > the device. I've included four new test cases: rx for virtconsole, tx > for virtconsole, rx for virtserialport, tx for virtserialport.

[PATCH] hw/i386: fix microvm segfault with virtio cmdline

2023-02-22 Thread Daniel Hoffman
The 'microvm' machine type allows for disabling ACPI, in which case the VirtIO device configuration is passed via appending it to the kernel cmdline. If no cmdline parameter was passed, then a null pointer is dereferenced when the new cmdline is copied back. A solution is to always define the

Re: [PATCH v7 03/10] target/riscv: allow MISA writes as experimental

2023-02-22 Thread Andrew Jones
On Wed, Feb 22, 2023 at 03:51:58PM -0300, Daniel Henrique Barboza wrote: > At this moment, and apparently since ever, we have no way of enabling > RISCV_FEATURE_MISA. This means that all the code from write_misa(), all > the nuts and bolts that handles how to properly write this CSR, has > always

Re: [PATCH v3 5/6] meson: prefer 'sphinx-build' to 'sphinx-build-3'

2023-02-22 Thread Markus Armbruster
John Snow writes: > On Wed, Feb 22, 2023 at 2:15 AM Markus Armbruster wrote: >> >> John Snow writes: >> >> > On Tue, Feb 21, 2023, 1:50 AM Markus Armbruster wrote: >> > >> >> John Snow writes: >> >> >> >> > Once upon a time, "sphinx-build" on certain RPM platforms invoked >> >> >

Re: [PATCH v3 5/6] meson: prefer 'sphinx-build' to 'sphinx-build-3'

2023-02-22 Thread John Snow
On Wed, Feb 22, 2023 at 2:15 AM Markus Armbruster wrote: > > John Snow writes: > > > On Tue, Feb 21, 2023, 1:50 AM Markus Armbruster wrote: > > > >> John Snow writes: > >> > >> > Once upon a time, "sphinx-build" on certain RPM platforms invoked > >> > specifically a Python 2.x version, while

[PULL 0/2] Python patches

2023-02-22 Thread John Snow
The following changes since commit 79b677d658d3d35e1e776826ac4abb28cdce69b8: Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2023-02-21 11:28:31 +) are available in the Git repository at: https://gitlab.com/jsnow/qemu.git tags/python-pull-request for you

[PULL 2/2] python: drop pipenv

2023-02-22 Thread John Snow
The pipenv tool was nice in theory, but in practice it's just too hard to update selectively, and it makes using it a pain. The qemu.qmp repo dropped pipenv support a while back and it's been functioning just fine, so I'm backporting that change here to qemu.git. Signed-off-by: John Snow

[PULL 1/2] python: support pylint 2.16

2023-02-22 Thread John Snow
Pylint 2.16 adds a few new checks that cause the optional check-tox CI job to fail. 1. The superfluous-parens check seems to be a bit more aggressive, 2. broad-exception-raised is new; it discourages "raise Exception". Fix these minor issues and turn the lights green. Signed-off-by: John Snow

Re: [PATCH RESEND 04/18] i386/cpu: Fix number of addressable IDs in CPUID.04H

2023-02-22 Thread Xiaoyao Li
On 2/22/2023 2:37 PM, Zhao Liu wrote: Hi Xiaoyao, Thanks, I've spent some time thinking about it here. On Mon, Feb 20, 2023 at 02:59:20PM +0800, Xiaoyao Li wrote: Date: Mon, 20 Feb 2023 14:59:20 +0800 From: Xiaoyao Li Subject: Re: [PATCH RESEND 04/18] i386/cpu: Fix number of addressable IDs

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

2023-02-22 Thread Chuang Xu
Hi, Peter On 2023/2/22 下午11:57, Peter Xu wrote: On Wed, Feb 22, 2023 at 02:27:55PM +0800, Chuang Xu wrote: Hi, Peter Hi, Chuang, Note that as I mentioned in the comment, we temporarily replace this value to prevent commit() and address_space_to_flatview() call each other recursively, and

Re: [PATCH 2/3] intel-iommu: fail DEVIOTLB_UNMAP without dt mode

2023-02-22 Thread Jason Wang
On Fri, Dec 2, 2022 at 12:03 AM Peter Xu wrote: > > On Tue, Nov 29, 2022 at 04:10:36PM +0800, Jason Wang wrote: > > Without dt mode, device IOTLB notifier won't work since guest won't > > send device IOTLB invalidation descriptor in this case. Let's fail > > early instead of misbehaving silently.

Re: [PATCH v2 09/13] vdpa net: block migration if the device has CVQ

2023-02-22 Thread Jason Wang
在 2023/2/22 15:28, Eugenio Perez Martin 写道: On Wed, Feb 22, 2023 at 5:01 AM Jason Wang wrote: 在 2023/2/8 17:42, Eugenio Pérez 写道: Devices with CVQ needs to migrate state beyond vq state. Leaving this to future series. I may miss something but what is missed to support CVQ/MQ? To

Re: [PATCH v2 11/13] vdpa: block migration if dev does not have _F_SUSPEND

2023-02-22 Thread Jason Wang
在 2023/2/22 22:25, Eugenio Perez Martin 写道: On Wed, Feb 22, 2023 at 5:05 AM Jason Wang wrote: 在 2023/2/8 17:42, Eugenio Pérez 写道: Next patches enable devices to be migrated even if vdpa netdev has not been started with x-svq. However, not all devices are migratable, so we need to block

Re: [PATCH v7 03/10] target/riscv: allow MISA writes as experimental

2023-02-22 Thread liweiwei
On 2023/2/23 02:51, Daniel Henrique Barboza wrote: At this moment, and apparently since ever, we have no way of enabling RISCV_FEATURE_MISA. This means that all the code from write_misa(), all the nuts and bolts that handles how to properly write this CSR, has always been a no-op as well

Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU

2023-02-22 Thread Jason Gunthorpe
On Wed, Feb 22, 2023 at 04:34:39PM -0700, Alex Williamson wrote: > > +/* > > + * With vIOMMU we try to track the entire IOVA space. As the IOVA > > space can > > + * be rather big, devices might not be able to track it due to HW > > + * limitations. In that case: > > + * (1)

Re: [PATCH v2 11/20] vfio/common: Add device dirty page tracking start/stop

2023-02-22 Thread Jason Gunthorpe
On Wed, Feb 22, 2023 at 03:40:43PM -0700, Alex Williamson wrote: > > +/* > > + * DMA logging uAPI guarantees to support at least num_ranges that > > fits into > > + * a single host kernel page. To be on the safe side, use this as a > > limit > > + * from which to merge to a

Re: [RFC PATCH 0/2] Add flag as THP allocation hint for memfd_restricted() syscall

2023-02-22 Thread Ackerley Tng
Yuan Yao writes: On Sat, Feb 18, 2023 at 12:43:00AM +, Ackerley Tng wrote: Hello, This patchset builds upon the memfd_restricted() system call that has been discussed in the ‘KVM: mm: fd-based approach for supporting KVM’ patch series, at

Re: [RFC PATCH 1/2] mm: restrictedmem: Allow userspace to specify mount_path for memfd_restricted

2023-02-22 Thread Ackerley Tng
"Kirill A. Shutemov" writes: On Thu, Feb 16, 2023 at 12:41:16AM +, Ackerley Tng wrote: By default, the backing shmem file for a restrictedmem fd is created on shmem's kernel space mount. With this patch, an optional tmpfs mount can be specified, which will be used as the mountpoint

Re: [PATCH v1 5/6] hw/arm/virt: Enable backup bitmap for dirty ring

2023-02-22 Thread Gavin Shan
On 2/23/23 2:54 AM, Peter Maydell wrote: On Wed, 22 Feb 2023 at 04:36, Gavin Shan wrote: On 2/22/23 3:27 AM, Peter Maydell wrote: Why does this need to be board-specific code? Is there some way we can just do the right thing automatically? Why does the GIC/ITS matter? The kernel should

Re: [PATCH 0/5] Pegasos2 fixes and audio output support

2023-02-22 Thread BALATON Zoltan
On Wed, 22 Feb 2023, BALATON Zoltan wrote: > On Wed, 22 Feb 2023, Bernhard Beschow wrote: >> Am 22. Februar 2023 19:25:16 UTC schrieb BALATON Zoltan >> : >>> On Wed, 22 Feb 2023, Bernhard Beschow wrote: On Wed, Feb 22, 2023 at 4:38 PM Bernhard Beschow wrote: > On Tue, Feb 21, 2023

Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU

2023-02-22 Thread Alex Williamson
On Wed, 22 Feb 2023 19:49:12 +0200 Avihai Horon wrote: > Currently, device dirty page tracking with vIOMMU is not supported - RAM > pages are perpetually marked dirty in this case. > > When vIOMMU is used, IOVA ranges are DMA mapped/unmapped on the fly as > the vIOMMU maps/unmaps them. These

[PATCH v2 20/28] target/hppa: Don't use tcg_temp_local_new

2023-02-22 Thread Richard Henderson
This wasn't actually used at all, just some unused macro re-definitions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/translate.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index

Re: [PATCH] target/i386: Fix BZHI instruction

2023-02-22 Thread Richard Henderson
Ping 2. r~ On 2/15/23 20:50, Richard Henderson wrote: Ping. r~ On 1/14/23 13:32, Richard Henderson wrote: We did not correctly handle N >= operand size. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1374 Signed-off-by: Richard Henderson ---   tests/tcg/i386/test-i386-bmi2.c |  3

[PATCH v2 18/28] target/cris: Don't use tcg_temp_local_new

2023-02-22 Thread Richard Henderson
Since tcg_temp_new is now identical, use that. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/cris/translate.c | 6 +++--- target/cris/translate_v10.c.inc | 10 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH v2 21/28] target/i386: Don't use tcg_temp_local_new

2023-02-22 Thread Richard Henderson
Since tcg_temp_new is now identical, use that. In some cases we can avoid a copy from A0 or T0. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git

[PATCH v2 12/28] accel/tcg/plugin: Use tcg_temp_ebb_*

2023-02-22 Thread Richard Henderson
All of these uses have quite local scope. Avoid tcg_const_*, because we haven't added a corresponding interface for TEMP_EBB. Use explicit tcg_gen_movi_* instead. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 24 ++-- 1

[PATCH v2 27/28] tcg: Update docs/devel/tcg-ops.rst for temporary changes

2023-02-22 Thread Richard Henderson
Rewrite the sections which talked about 'local temporaries'. Remove some assumptions which no longer hold. Signed-off-by: Richard Henderson --- docs/devel/tcg-ops.rst | 103 + 1 file changed, 54 insertions(+), 49 deletions(-) diff --git

[PATCH v2 04/28] tcg: Remove branch-to-next regardless of reference count

2023-02-22 Thread Richard Henderson
Just because the label reference count is more than 1 does not mean we cannot remove a branch-to-next. By doing this first, the label reference count may drop to 0, and then the label itself gets removed as before. Signed-off-by: Richard Henderson --- tcg/tcg.c | 33

[PATCH v2 25/28] exec/gen-icount: Don't use tcg_temp_local_new_i32

2023-02-22 Thread Richard Henderson
Since tcg_temp_new_i32 is now identical, use that. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index

[PATCH v2 26/28] tcg: Remove tcg_temp_local_new_*, tcg_const_local_*

2023-02-22 Thread Richard Henderson
These symbols are now unused. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 2 -- include/tcg/tcg.h| 28 tcg/tcg.c| 16 3 files changed, 46 deletions(-) diff --git

[PATCH v2 19/28] target/hexagon: Don't use tcg_temp_local_new_*

2023-02-22 Thread Richard Henderson
Since tcg_temp_new_* is now identical, use those. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hexagon/idef-parser/README.rst | 4 ++-- target/hexagon/gen_tcg.h| 4 ++-- target/hexagon/genptr.c | 16

[PATCH v2 05/28] tcg: Rename TEMP_LOCAL to TEMP_TB

2023-02-22 Thread Richard Henderson
Use TEMP_TB as that is more explicit about the default lifetime of the data. While "global" and "local" used to be contrasting, we have more lifetimes than that now. Do not yet rename tcg_temp_local_new_*, just the enum. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson ---

[PATCH v2 23/28] target/ppc: Don't use tcg_temp_local_new

2023-02-22 Thread Richard Henderson
Since tcg_temp_new is now identical, use that. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/ppc/translate.c | 6 +++--- target/ppc/translate/spe-impl.c.inc | 8 target/ppc/translate/vmx-impl.c.inc | 4 ++-- 3 files changed, 9

[PATCH v2 03/28] accel/tcg: Use more accurate max_insns for tb_overflow

2023-02-22 Thread Richard Henderson
Write back the number of insns that we attempt to translate, so that if we longjmp out we have a more accurate limit for the next attempt. This results in fewer restarts when some limit is consumed by few instructions. Signed-off-by: Richard Henderson --- accel/tcg/translator.c | 2 +- 1 file

[PATCH v2 22/28] target/mips: Don't use tcg_temp_local_new

2023-02-22 Thread Richard Henderson
Since tcg_temp_new is now identical, use that. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 57 ++-- target/mips/tcg/nanomips_translate.c.inc | 4 +- 2 files changed, 16 insertions(+), 45 deletions(-)

[PATCH v2 28/28] tcg: Use noinline for major tcg_gen_code_subroutines

2023-02-22 Thread Richard Henderson
This makes it easier to assign blame with perf. Signed-off-by: Richard Henderson --- tcg/tcg.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 4b244eebc2..b65f2ffdbe 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2619,7 +2619,8 @@ TCGOp

[PATCH v2 16/28] target/arm: Drop copies in gen_sve_{ldr,str}

2023-02-22 Thread Richard Henderson
Since we now get TEMP_TB temporaries by default, we no longer need to make copies across these loops. These were the only uses of new_tmp_a64_local(), so remove that as well. Signed-off-by: Richard Henderson --- target/arm/translate-a64.h | 1 - target/arm/translate-a64.c | 6 --

[PATCH v2 24/28] target/xtensa: Don't use tcg_temp_local_new_*

2023-02-22 Thread Richard Henderson
Since tcg_temp_new_* is now identical, use those. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index

[PATCH v2 15/28] tcg: Change default temp lifetime to TEMP_TB

2023-02-22 Thread Richard Henderson
Guest front-ends now get temps that span the lifetime of the translation block by default, which avoids accidentally using the temp across branches and invalidating the data. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 8 1 file

[PATCH v2 10/28] tcg: Add tcg_gen_movi_ptr

2023-02-22 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index 839d91c0c7..66b1461caa 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -1285,6

[PATCH v2 17/28] target/arm: Don't use tcg_temp_local_new_*

2023-02-22 Thread Richard Henderson
Since tcg_temp_new_* is now identical, use those. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 6 +++--- target/arm/translate.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/arm/translate-sve.c

[PATCH v2 11/28] tcg: Use tcg_temp_ebb_new_* in tcg/

2023-02-22 Thread Richard Henderson
All of these have obvious and quite local scope. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg-op-gvec.c | 270 +++--- tcg/tcg-op.c | 258 ++-- tcg/tcg.c | 2 +- 3

[PATCH v2 06/28] tcg: Add liveness_pass_0

2023-02-22 Thread Richard Henderson
Attempt to reduce the lifetime of TEMP_TB. Signed-off-by: Richard Henderson --- tcg/tcg.c | 69 +++ 1 file changed, 69 insertions(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index bf2af8b0fe..8d4ce7bd1e 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@

[PATCH v2 07/28] tcg: Remove TEMP_NORMAL

2023-02-22 Thread Richard Henderson
TEMP_NORMAL is a subset of TEMP_EBB. Promote single basic block temps to single extended basic block. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 -- tcg/tcg.c | 19 +++ 2 files changed, 3 insertions(+), 18

[PATCH v2 02/28] accel/tcg: Pass max_insn to gen_intermediate_code by pointer

2023-02-22 Thread Richard Henderson
In preparation for returning the number of insns generated via the same pointer. Adjust only the prototypes so far. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/translator.h | 4 ++-- accel/tcg/translate-all.c | 2 +- accel/tcg/translator.c

[PATCH v2 14/28] tcg: Don't re-use TEMP_TB temporaries

2023-02-22 Thread Richard Henderson
Reusing TEMP_TB interferes with detecting whether the temp can be adjusted to TEMP_EBB. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 +- tcg/tcg.c | 101 -- 2 files changed, 53 insertions(+), 50 deletions(-) diff --git

[PATCH v2 09/28] tcg: Add tcg_temp_ebb_new_{i32,i64,ptr}

2023-02-22 Thread Richard Henderson
TCG internals will want to be able to allocate and reuse explicitly life-limited temporaries. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 28 1 file changed, 28 insertions(+) diff --git a/include/tcg/tcg.h

[PATCH v2 01/28] tcg: Adjust TCGContext.temps_in_use check

2023-02-22 Thread Richard Henderson
Change the temps_in_use check to use assert not fprintf. Move the assert for double-free before the check for count, since that is the more immediate problem. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg.c | 12 +--- 1 file changed, 5 insertions(+),

[PATCH v2 00/28] tcg: Simplify temporary usage

2023-02-22 Thread Richard Henderson
The biggest pitfall for new users of TCG is the fact that "normal" temporaries die at branches, and we must therefore use a different "local" temporary in that case. The following patch set changes that, so that the "normal" temporary is the one that lives across branches, and there is a special

[PATCH v2 13/28] accel/tcg/plugin: Tidy plugin_gen_disable_mem_helpers

2023-02-22 Thread Richard Henderson
Here we are creating a temp whose value needs to be replaced, but always storing NULL into CPUState.plugin_mem_cbs. Use tcg_constant_ptr(0) explicitly. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 8 ++-- 1 file changed, 2 insertions(+),

[PATCH v2 08/28] tcg: Pass TCGTempKind to tcg_temp_new_internal

2023-02-22 Thread Richard Henderson
While the argument can only be TEMP_EBB or TEMP_TB, it's more obvious this way. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 18 +- tcg/tcg.c | 8 2 files changed, 13 insertions(+), 13 deletions(-) diff --git

Re: [PATCH 0/5] Pegasos2 fixes and audio output support

2023-02-22 Thread BALATON Zoltan
On Wed, 22 Feb 2023, Bernhard Beschow wrote: Am 22. Februar 2023 21:12:01 UTC schrieb BALATON Zoltan : On Wed, 22 Feb 2023, Bernhard Beschow wrote: Am 22. Februar 2023 19:25:16 UTC schrieb BALATON Zoltan : On Wed, 22 Feb 2023, Bernhard Beschow wrote: On Wed, Feb 22, 2023 at 4:38 PM Bernhard

Re: [PATCH v2 11/20] vfio/common: Add device dirty page tracking start/stop

2023-02-22 Thread Alex Williamson
On Wed, 22 Feb 2023 19:49:06 +0200 Avihai Horon wrote: > From: Joao Martins > > Add device dirty page tracking start/stop functionality. This uses the > device DMA logging uAPI to start and stop dirty page tracking by device. > > Device dirty page tracking is used only if all devices within a

Re: [PATCH] tcg: Allow displaying TCG_TYPE_I128 arguments

2023-02-22 Thread Richard Henderson
On 2/22/23 11:28, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- tcg/tcg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index a4a3da6804..3df2c6a6af 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1955,6 +1955,7 @@ static char

Re: [PATCH 0/5] Pegasos2 fixes and audio output support

2023-02-22 Thread BALATON Zoltan
On Wed, 22 Feb 2023, Bernhard Beschow wrote: Am 22. Februar 2023 19:25:16 UTC schrieb BALATON Zoltan : On Wed, 22 Feb 2023, Bernhard Beschow wrote: On Wed, Feb 22, 2023 at 4:38 PM Bernhard Beschow wrote: On Tue, Feb 21, 2023 at 7:44 PM BALATON Zoltan wrote: This series fixes PCI interrupts

Re: [PATCH 0/5] Pegasos2 fixes and audio output support

2023-02-22 Thread Bernhard Beschow
Am 22. Februar 2023 21:12:01 UTC schrieb BALATON Zoltan : >On Wed, 22 Feb 2023, Bernhard Beschow wrote: >> Am 22. Februar 2023 19:25:16 UTC schrieb BALATON Zoltan : >>> On Wed, 22 Feb 2023, Bernhard Beschow wrote: On Wed, Feb 22, 2023 at 4:38 PM Bernhard Beschow wrote: > On Tue, Feb

Re: [PATCH v2 7/7] target/arm: Add CPU properties for most v8.3 PAC features

2023-02-22 Thread Richard Henderson
On 2/22/23 09:35, Aaron Lindsay wrote: Signed-off-by: Aaron Lindsay --- target/arm/cpu.h | 5 +++ target/arm/cpu64.c | 81 ++ 2 files changed, 72 insertions(+), 14 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index

Re: [PATCH v2 10/20] vfio/common: Record DMA mapped IOVA ranges

2023-02-22 Thread Alex Williamson
On Wed, 22 Feb 2023 19:49:05 +0200 Avihai Horon wrote: > From: Joao Martins > > According to the device DMA logging uAPI, IOVA ranges to be logged by > the device must be provided all at once upon DMA logging start. > > As preparation for the following patches which will add device dirty >

Re: [PATCH v5 21/29] hw/net/net_tx_pkt: Automatically determine if virtio-net header is used

2023-02-22 Thread Akihiko Odaki
On 2023/02/21 12:38, Jason Wang wrote: 在 2023/2/1 11:35, Akihiko Odaki 写道: The new function qemu_get_using_vnet_hdr() allows to automatically determine if virtio-net header is used. Signed-off-by: Akihiko Odaki ---   hw/net/e1000e_core.c |  3 +--   hw/net/net_tx_pkt.c  | 19

Re: [PATCH v10 0/9] KVM: mm: fd-based approach for supporting KVM

2023-02-22 Thread Sean Christopherson
On Thu, Feb 16, 2023, David Hildenbrand wrote: > On 16.02.23 06:13, Mike Rapoport wrote: > > Hi, > > > > On Fri, Dec 02, 2022 at 02:13:38PM +0800, Chao Peng wrote: > > > This patch series implements KVM guest private memory for confidential > > > computing scenarios like Intel TDX[1]. If a TDX

Re: [PATCH v2 07/20] vfio/common: Add VFIOBitmap and (de)alloc functions

2023-02-22 Thread Alex Williamson
On Wed, 22 Feb 2023 19:49:02 +0200 Avihai Horon wrote: > There are already two places where dirty page bitmap allocation and > calculations are done in open code. With device dirty page tracking > being added in next patches, there are going to be even more places. > > To avoid code

Re: [PATCH v2 6/7] target/arm: Implement v8.3 FPAC and FPACCOMBINE

2023-02-22 Thread Richard Henderson
On 2/22/23 09:35, Aaron Lindsay wrote: +static G_NORETURN +void pauth_fail_exception(CPUARMState *env, bool data, int keynumber, uintptr_t ra) +{ +int target_el = arm_current_el(env); +if (target_el == 0) { +uint64_t hcr = arm_hcr_el2_eff(env); +if

Re: [PATCH 0/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'

2023-02-22 Thread Philippe Mathieu-Daudé
On 3/2/23 17:30, Philippe Mathieu-Daudé wrote: To ease code review, rename ACPI CPU hotplug variables to more meaningful names. Since hotplug parent can't be any QOM object, and must be a QDev, convert AcpiCpuHotplug::device from Object* to DeviceState*. Philippe Mathieu-Daudé (3):

[PATCH] tcg: Allow displaying TCG_TYPE_I128 arguments

2023-02-22 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- tcg/tcg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index a4a3da6804..3df2c6a6af 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1955,6 +1955,7 @@ static char *tcg_get_arg_str_ptr(TCGContext *s, char *buf, int buf_size,

[PATCH v2 2/3] contrib/elf2dmp: move PE dir search to pe_get_data_dir_entry

2023-02-22 Thread Viktor Prutyanov
Move out PE directory search functionality to be reused not only for Debug Directory processing but for arbitrary PE directory. Signed-off-by: Viktor Prutyanov --- contrib/elf2dmp/main.c | 71 +- 1 file changed, 42 insertions(+), 29 deletions(-) diff

[PATCH v2 3/3] contrib/elf2dmp: add PE name check and Windows Server 2022 support

2023-02-22 Thread Viktor Prutyanov
Since its inception elf2dmp has checked MZ signatures within an address space above IDT[0] interrupt vector and took first PE image found as Windows Kernel. But in Windows Server 2022 memory dump this address space range is full of invalid PE fragments and the tool must check that PE image is

[PATCH v2 1/3] contrib/elf2dmp: fix code style

2023-02-22 Thread Viktor Prutyanov
Originally elf2dmp were added with some code style issues, especially in pe.h header, and some were introduced by 2d0fc797faaa73fbc1d30f5f9e90407bf3dd93f0. Fix them now. Signed-off-by: Viktor Prutyanov --- contrib/elf2dmp/addrspace.c | 1 + contrib/elf2dmp/main.c | 9 ++--

[PATCH v2 0/3] contrib/elf2dmp: Windows Server 2022 support

2023-02-22 Thread Viktor Prutyanov
Hi, For now, elf2dmp is unable to convert ELF-dump to DMP-dump made of Windows Server 2022 guest. This patch series fixes it. v1: improve code-style fix v2: don't remove data directory entry RVA print and DOS header size check Viktor Prutyanov (3): contrib/elf2dmp: fix code style

Re: [PATCH 0/5] Pegasos2 fixes and audio output support

2023-02-22 Thread BALATON Zoltan
On Wed, 22 Feb 2023, Bernhard Beschow wrote: Am 22. Februar 2023 19:25:16 UTC schrieb BALATON Zoltan : On Wed, 22 Feb 2023, Bernhard Beschow wrote: On Wed, Feb 22, 2023 at 4:38 PM Bernhard Beschow wrote: On Tue, Feb 21, 2023 at 7:44 PM BALATON Zoltan wrote: This series fixes PCI interrupts

Re: [PATCH 0/5] Pegasos2 fixes and audio output support

2023-02-22 Thread Bernhard Beschow
Am 22. Februar 2023 19:25:16 UTC schrieb BALATON Zoltan : >On Wed, 22 Feb 2023, Bernhard Beschow wrote: >> On Wed, Feb 22, 2023 at 4:38 PM Bernhard Beschow wrote: >>> On Tue, Feb 21, 2023 at 7:44 PM BALATON Zoltan wrote: This series fixes PCI interrupts on the ppc/pegasos2 machine and adds

Re: [PATCH v1 2/3] contrib/elf2dmp: move PE dir search to pe_get_data_dir_entry

2023-02-22 Thread Viktor Prutyanov
Hello, On Wed, Feb 22, 2023 at 10:07 PM Annie.li wrote: > > Hello Viktor, > > See my following comments inline, > > On 11/29/2022 7:03 PM, Viktor Prutyanov wrote: > > Move out PE directory search functionality to be reused not only > > for Debug Directory processing but for arbitrary PE

[PATCH] hw/smbios: fix field corruption in type 4 table

2023-02-22 Thread Julia Suvorova
Since table type 4 of SMBIOS version 2.6 is shorter than 3.0, the strings which follow immediately after the struct fields have been overwritten by unconditional filling of later fields such as core_count2. Make these fields dependent on the SMBIOS version. Fixes:

Re: [PATCH v2 03/20] vfio/migration: Add VFIO migration pre-copy support

2023-02-22 Thread Alex Williamson
On Wed, 22 Feb 2023 19:48:58 +0200 Avihai Horon wrote: > Pre-copy support allows the VFIO device data to be transferred while the > VM is running. This helps to accommodate VFIO devices that have a large > amount of data that needs to be transferred, and it can reduce migration > downtime. > >

Re: [PATCH v2 5/7] targer/arm: Inform helpers whether a PAC instruction is 'combined'

2023-02-22 Thread Richard Henderson
On 2/22/23 09:35, Aaron Lindsay wrote: static uint64_t pauth_auth(CPUARMState *env, uint64_t ptr, uint64_t modifier, - ARMPACKey *key, bool data, int keynumber) + ARMPACKey *key, bool data, int keynumber, + bool

Re: [PATCH v2 00/20] vfio: Add migration pre-copy support and device dirty tracking

2023-02-22 Thread Alex Williamson
There are various errors running this through the CI on gitlab. This one seems bogus but needs to be resolved regardless: https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 FAILED: libqemu-aarch64-softmmu.fa.p/hw_vfio_common.c.o 2786s390x-linux-gnu-gcc -m64

Re: [PATCH v2 4/7] target/arm: Implement v8.3 Pauth2

2023-02-22 Thread Richard Henderson
On 2/22/23 09:35, Aaron Lindsay wrote: +result = ((ptr ^ pac) & xor_mask) | (ptr & ~xor_mask); Simplifies to result = ptr ^ (pac & xor_mask); which, IMO is also clearer. Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-22 Thread Anton Kuchin
On 22/02/2023 22:21, Michael S. Tsirkin wrote: On Wed, Feb 22, 2023 at 08:25:19PM +0200, Anton Kuchin wrote: On 22/02/2023 19:12, Michael S. Tsirkin wrote: On Wed, Feb 22, 2023 at 07:05:47PM +0200, Anton Kuchin wrote: On 22/02/2023 18:51, Michael S. Tsirkin wrote: On Wed, Feb 22, 2023 at

Re: [PATCH v2 3/7] target/arm: Implement v8.3 EnhancedPAC

2023-02-22 Thread Richard Henderson
On 2/22/23 09:35, Aaron Lindsay wrote: +if (cpu_isar_feature(aa64_pauth_epac, env_archcpu(env))) { It might be cleaner, especially later, to have ARMCPU *cpu = env_archcpu(env); at the top of the function. r~

Re: [PATCH v2 3/7] target/arm: Implement v8.3 EnhancedPAC

2023-02-22 Thread Richard Henderson
On 2/22/23 09:35, Aaron Lindsay wrote: Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell --- target/arm/pauth_helper.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 2/7] target/arm: Implement v8.3 QARMA3 PAC cipher

2023-02-22 Thread Richard Henderson
On 2/22/23 09:35, Aaron Lindsay wrote: -workingval = pac_sub(workingval); +if (isqarma3) +workingval = pac_sub1(workingval); +else +workingval = pac_sub(workingval); Braces required for all if+else. Multiple instances. Otherwise, Reviewed-by:

Re: [PATCH v2 1/7] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection

2023-02-22 Thread Richard Henderson
On 2/22/23 09:35, Aaron Lindsay wrote: +static inline bool isar_feature_aa64_pauth_arch_qarma3(const ARMISARegisters *id) +{ +/* + * Return true if pauth is enabled with the architected QARMA3 algorithm. + * QEMU will always set APA3+GPA3 to the same value. + */ This language

Re: [PATCH v4 3/9] hw/i386/pc_q35: Reuse machine parameter

2023-02-22 Thread Michael S. Tsirkin
On Wed, Feb 22, 2023 at 06:52:02PM +0100, Bernhard Beschow wrote: > Am 22. Februar 2023 11:03:38 UTC schrieb "Philippe Mathieu-Daudé" > : > >On 13/2/23 17:19, Bernhard Beschow wrote: > >> Signed-off-by: Bernhard Beschow > >> Reviewed-by: Thomas Huth > >> --- > >> hw/i386/pc_q35.c | 2 +- > >>

Re: [PATCH 5/5] hw: Remove mentions of NDEBUG

2023-02-22 Thread Michael S. Tsirkin
On Wed, Feb 22, 2023 at 08:43:35AM -1000, Richard Henderson wrote: > On 2/22/23 06:28, Michael S. Tsirkin wrote: > > On Wed, Feb 22, 2023 at 05:11:36PM +0100, Philippe Mathieu-Daudé wrote: > > > On 22/2/23 13:05, Michael S. Tsirkin wrote: > > > > On Wed, Feb 22, 2023 at 12:25:20AM +0100, Philippe

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-22 Thread Michael S. Tsirkin
On Wed, Feb 22, 2023 at 08:25:19PM +0200, Anton Kuchin wrote: > On 22/02/2023 19:12, Michael S. Tsirkin wrote: > > On Wed, Feb 22, 2023 at 07:05:47PM +0200, Anton Kuchin wrote: > > > On 22/02/2023 18:51, Michael S. Tsirkin wrote: > > > > On Wed, Feb 22, 2023 at 06:49:10PM +0200, Anton Kuchin

Re: [PATCH v6 0/3] block/rbd: Add support for layered encryption

2023-02-22 Thread Ilya Dryomov
On Mon, Jan 30, 2023 at 2:16 PM Ilya Dryomov wrote: > > On Sun, Jan 29, 2023 at 12:31 PM o...@il.ibm.com > wrote: > > > > v6: nit fixes > > v5: nit fixes > > v4: split to multiple commits > > add support for more than just luks-any in layered encryption > > nit fixes > > v3: further nit

Re: [PATCH v1 3/3] contrib/elf2dmp: add PE name check and Windows Server 2022 support

2023-02-22 Thread Viktor Prutyanov
On Wed, Feb 22, 2023 at 10:07 PM Annie.li wrote: > > > On 11/29/2022 7:03 PM, Viktor Prutyanov wrote: > > Since its inception elf2dmp has checked MZ signatures within an > > address space above IDT[0] interrupt vector and took first PE image > > found as Windows Kernel. > > But in Windows Server

[PATCH v2 6/7] target/arm: Implement v8.3 FPAC and FPACCOMBINE

2023-02-22 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/pauth_helper.c | 35 ++- target/arm/syndrome.h | 7 +++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c index 96770d7860..db6cf9b5bc 100644

  1   2   3   4   >