Re: [PATCH] mem/x86: add processor address space check for VM memory

2023-09-15 Thread Ani Sinha
> On 14-Sep-2023, at 2:07 PM, David Hildenbrand wrote: > > On 14.09.23 07:53, Ani Sinha wrote: >>> On 12-Sep-2023, at 9:04 PM, David Hildenbrand wrote: >>> >>> [...] >>> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index 54838c0c41..d187890675 100644 > --- a/hw/i386/pc.c >

Re: [PULL 00/39] tcg patch queue

2023-09-15 Thread Richard Henderson
://gitlab.com/rth7680/qemu.git tags/pull-tcg-20230915 for you to fetch changes up to e0d9f49c143359b4a34cb80737af57228c62a008: accel/tcg: Restrict tcg_exec_[un]realizefn() to TCG (2023-09-15 19:06:29 -0700) *: Delete checks

[PULL 19/39] tcg/loongarch64: Lower rotv_vec ops to LSX

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Lower the following ops: - rotrv_vec - rotlv_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-1...@jia.je> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +- tcg/loongarch64/tcg-target.c.inc | 14

[PULL 22/39] tcg: Add gvec compare with immediate and scalar operand

2023-09-15 Thread Richard Henderson
Signed-off-by: Richard Henderson Tested-by: Song Gao Reviewed-by: Song Gao Message-Id: <20230831030904.1194667-2-richard.hender...@linaro.org> --- accel/tcg/tcg-runtime.h | 25 ++ include/tcg/tcg-op-gvec-common.h | 6 ++ accel/tcg/tcg-runtime-gvec.c | 26 ++

[PULL 18/39] tcg/loongarch64: Lower vector shift integer ops

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Lower the following ops: - shli_vec - shrv_vec - sarv_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-1...@jia.je> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +-

[PULL 04/39] softmmu: Delete checks for old host definitions

2023-09-15 Thread Richard Henderson
From: Akihiko Odaki PA-RISC host support is already removed with commit b1cef6d02f ("Drop remaining bits of ia64 host support"). Signed-off-by: Akihiko Odaki Message-Id: <20230810225922.21600-1-akihiko.od...@daynix.com> Signed-off-by: Richard Henderson --- softmmu/async-teardown.c | 3 --- 1

[PULL 37/39] util/cpuinfo-aarch64: Add CPUINFO_BTI

2023-09-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- host/include/aarch64/host/cpuinfo.h | 1 + util/cpuinfo-aarch64.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/host/include/aarch64/host/cpuinfo.h b/host/include/aarch64/host/cpuinfo.h index

[PULL 31/39] accel/tcg: Merge io_writex into do_st_mmio_leN

2023-09-15 Thread Richard Henderson
Avoid multiple calls to io_prepare for unaligned acceses. One call to do_st_mmio_leN will never cross pages. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 82 +- 1 file changed, 30 insertions(+), 52 deletions(-) diff --git

[PULL 27/39] plugin: Simplify struct qemu_plugin_hwaddr

2023-09-15 Thread Richard Henderson
Rather than saving MemoryRegionSection and offset, save phys_addr and MemoryRegion. This matches up much closer with the plugin api. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/qemu/plugin-memory.h | 11 ++- accel/tcg/cputlb.c | 16 +---

[PULL 33/39] accel/tcg: Introduce do_st16_mmio_leN

2023-09-15 Thread Richard Henderson
Split out int_st_mmio_leN, to be used by both do_st_mmio_leN and do_st16_mmio_leN. Move the locks down into the two functions, since each one now covers all accesses to once page. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 88 ++ 1

[PULL 21/39] tcg/loongarch64: Implement 128-bit load & store

2023-09-15 Thread Richard Henderson
From: Jiajie Chen If LSX is available, use LSX instructions to implement 128-bit load & store when MO_128 is required, otherwise use two 64-bit loads & stores. Signed-off-by: Jiajie Chen Message-Id: <20230908022302.180442-1...@jia.je> Reviewed-by: Richard Henderson Signed-off-by: Richard

[PULL 32/39] accel/tcg: Introduce do_ld16_mmio_beN

2023-09-15 Thread Richard Henderson
Split out int_ld_mmio_beN, to be used by both do_ld_mmio_beN and do_ld16_mmio_beN. Move the locks down into the two functions, since each one now covers all accesses to once page. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 91 ++ 1

[PULL 28/39] accel/tcg: Merge cpu_transaction_failed into io_failed

2023-09-15 Thread Richard Henderson
Push computation down into the if statements to the point the data is used. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 33 + 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/accel/tcg/cputlb.c

[PULL 13/39] tcg/loongarch64: Lower mul_vec to vmul

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-...@jia.je> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +- tcg/loongarch64/tcg-target.c.inc | 8 2 files changed, 9 insertions(+), 1

[PULL 07/39] tcg/loongarch64: Lower basic tcg vec ops to LSX

2023-09-15 Thread Richard Henderson
From: Jiajie Chen LSX support on host cpu is detected via hwcap. Lower the following ops to LSX: - dup_vec - dupi_vec - dupm_vec - ld_vec - st_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-...@jia.je> Signed-off-by: Richard Henderson ---

[PULL 20/39] tcg/loongarch64: Lower rotli_vec to vrotri

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-1...@jia.je> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +- tcg/loongarch64/tcg-target.c.inc | 21 + 2 files changed, 22

[PULL 25/39] accel/tcg: Split out io_prepare and io_failed

2023-09-15 Thread Richard Henderson
These are common code from io_readx and io_writex. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 77 +++--- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/accel/tcg/cputlb.c

[PULL 15/39] tcg/loongarch64: Lower vector saturated ops

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Lower the following ops: - ssadd_vec - usadd_vec - sssub_vec - ussub_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-1...@jia.je> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +-

[PULL 03/39] util: Delete checks for old host definitions

2023-09-15 Thread Richard Henderson
From: Akihiko Odaki IA-64 and PA-RISC host support is already removed with commit b1cef6d02f ("Drop remaining bits of ia64 host support"). Signed-off-by: Akihiko Odaki Message-Id: <20230810225922.21600-1-akihiko.od...@daynix.com> Signed-off-by: Richard Henderson --- util/oslib-posix.c | 15

[PULL 29/39] accel/tcg: Replace direct use of io_readx/io_writex in do_{ld, st}_1

2023-09-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index f3635afb36..cc36e681a7 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -2342,7 +2342,8 @@ static uint8_t

[PULL 26/39] accel/tcg: Use CPUTLBEntryFull.phys_addr in io_failed

2023-09-15 Thread Richard Henderson
Since the introduction of CPUTLBEntryFull, we can recover the full cpu address space physical address without having to examine the MemoryRegionSection. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 12 1 file changed, 4

[PULL 39/39] tcg: Map code_gen_buffer with PROT_BTI

2023-09-15 Thread Richard Henderson
For linux aarch64 host supporting BTI, map the buffer to require BTI instructions at branch landing pads. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/region.c | 41 ++--- 1 file changed, 30 insertions(+), 11 deletions(-)

[PULL 01/39] accel/tcg: mttcg remove false-negative halted assertion

2023-09-15 Thread Richard Henderson
From: Nicholas Piggin mttcg asserts that an execution ending with EXCP_HALTED must have cpu->halted. However between the event or instruction that sets cpu->halted and requests exit and the assertion here, an asynchronous event could clear cpu->halted. This leads to crashes running AIX on

[PULL 02/39] accel/tcg: Fix the comment for CPUTLBEntryFull

2023-09-15 Thread Richard Henderson
From: LIU Zhiwei When memory region is ram, the lower TARGET_PAGE_BITS is not the physical section number. Instead, its value is always 0. Add comment and assert to make it clear. Signed-off-by: LIU Zhiwei Message-Id: <20230901060118.379-1-zhiwei_...@linux.alibaba.com> Reviewed-by: Richard

[PULL 10/39] tcg/loongarch64: Lower add/sub_vec to vadd/vsub

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Lower the following ops: - add_vec - sub_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-...@jia.je> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target-con-str.h |

[PULL 16/39] tcg/loongarch64: Lower vector shift vector ops

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Lower the following ops: - shlv_vec - shrv_vec - sarv_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-1...@jia.je> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +-

[PULL 11/39] tcg/loongarch64: Lower vector bitwise operations

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Lower the following ops: - and_vec - andc_vec - or_vec - orc_vec - xor_vec - nor_vec - not_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-...@jia.je> Signed-off-by: Richard Henderson ---

[PULL 36/39] tcg: Add tcg_out_tb_start backend hook

2023-09-15 Thread Richard Henderson
This hook may emit code at the beginning of the TB. Suggested-by: Jordan Niethe Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg.c| 3 +++ tcg/aarch64/tcg-target.c.inc | 5 + tcg/arm/tcg-target.c.inc | 5 +

[PULL 23/39] target/arm: Use tcg_gen_gvec_cmpi for compare vs 0

2023-09-15 Thread Richard Henderson
Signed-off-by: Richard Henderson Reviewed-by: Song Gao Message-Id: <20230831030904.1194667-3-richard.hender...@linaro.org> --- target/arm/tcg/translate.c | 56 ++ 1 file changed, 9 insertions(+), 47 deletions(-) diff --git a/target/arm/tcg/translate.c

[PULL 38/39] tcg/aarch64: Emit BTI insns at jump landing pads

2023-09-15 Thread Richard Henderson
The prologue is entered via "call"; the epilogue, each tb, and each goto_tb continuation point are all reached via "jump". As tcg_out_goto_long is only used by tcg_out_exit_tb, merge the two functions. Change the indirect register used to TCG_REG_TMP1, aka X17, so that the BTI condition created

[PULL 17/39] tcg/loongarch64: Lower bitsel_vec to vbitsel

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-1...@jia.je> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.h | 2 +- tcg/loongarch64/tcg-target.c.inc |

[PULL 12/39] tcg/loongarch64: Lower neg_vec to vneg

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-...@jia.je> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +- tcg/loongarch64/tcg-target.c.inc | 8 2 files changed, 9 insertions(+), 1

[PULL 05/39] thunk: Delete checks for old host definitions

2023-09-15 Thread Richard Henderson
From: Akihiko Odaki Alpha, IA-64, and PA-RISC hosts are no longer supported. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Message-Id: <20230808152314.102036-1-akihiko.od...@daynix.com> Signed-off-by: Richard Henderson --- include/exec/user/thunk.h | 3 +-- 1 file changed, 1

[PULL 35/39] fpu: Handle m68k extended precision denormals properly

2023-09-15 Thread Richard Henderson
Motorola treats denormals with explicit integer bit set as having unbiased exponent 0, unlike Intel which treats it as having unbiased exponent 1 (more like all other IEEE formats that have no explicit integer bit). Add a flag on FloatFmt to differentiate the behaviour. Reported-by: Keith

[PULL 34/39] fpu: Add conversions between bfloat16 and [u]int8

2023-09-15 Thread Richard Henderson
From: LIU Zhiwei We missed these functions when upstreaming the bfloat16 support. Signed-off-by: LIU Zhiwei Message-Id: <20230531065458.2082-1-zhiwei_...@linux.alibaba.com> Signed-off-by: Richard Henderson --- include/fpu/softfloat.h | 12 + fpu/softfloat.c | 58

[PULL 00/39] tcg patch queue

2023-09-15 Thread Richard Henderson
-20230915 for you to fetch changes up to e0d9f49c143359b4a34cb80737af57228c62a008: accel/tcg: Restrict tcg_exec_[un]realizefn() to TCG (2023-09-15 19:06:29 -0700) *: Delete checks for old host definitions tcg/loongarch64: Generate LSX

[PULL 14/39] tcg/loongarch64: Lower vector min max ops

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Lower the following ops: - smin_vec - smax_vec - umin_vec - umax_vec Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-1...@jia.je> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +-

[PULL 08/39] tcg: pass vece to tcg_target_const_match()

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Pass vece to tcg_target_const_match() to allow correct interpretation of const args of vector ops. Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230908022302.180442-...@jia.je> Signed-off-by: Richard Henderson

[PULL 24/39] accel/tcg: Simplify tlb_plugin_lookup

2023-09-15 Thread Richard Henderson
Now that we defer address space update and tlb_flush until the next async_run_on_cpu, the plugin run at the end of the instruction no longer has to contend with a flushed tlb. Therefore, delete SavedIOTLB entirely. Properly return false from tlb_plugin_lookup when we do not have a tlb match.

[PULL 30/39] accel/tcg: Merge io_readx into do_ld_mmio_beN

2023-09-15 Thread Richard Henderson
Avoid multiple calls to io_prepare for unaligned acceses. One call to do_ld_mmio_beN will never cross pages. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 84 +- 1 file changed, 30 insertions(+), 54 deletions(-) diff --git

[PULL 09/39] tcg/loongarch64: Lower cmp_vec to vseq/vsle/vslt

2023-09-15 Thread Richard Henderson
From: Jiajie Chen Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Message-Id: <20230908022302.180442-...@jia.je> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target-con-str.h | 1 + tcg/loongarch64/tcg-target.c.inc | 65

Re: [PATCH] MAINTAINERS: Nick Piggin PPC maintainer, other PPC changes

2023-09-15 Thread David Gibson
On Fri, Sep 15, 2023 at 08:05:07AM -0300, Daniel Henrique Barboza wrote: > Update all relevant PowerPC entries as follows: > > - Nick Piggin is promoted to Maintainer in all qemu-ppc subsystems. > Nick has been a solid contributor for the last couple of years and > has the required knowledge

Re: [PATCH v2 5/8] qemu-img: rebase: avoid unnecessary COW operations

2023-09-15 Thread Eric Blake
On Fri, Sep 15, 2023 at 07:20:13PM +0300, Andrey Drobyshev wrote: > When rebasing an image from one backing file to another, we need to > compare data from old and new backings. If the diff between that data > happens to be unaligned to the target cluster size, we might end up > doing partial

Re: [PATCH 0/2] target/arm: Implement Neoverse-N2

2023-09-15 Thread Marcin Juszkiewicz
W dniu 15.09.2023 o 20:54, Peter Maydell pisze: This patchset implements a model of the Neoverse-N2 CPU. Because it's very similar to the Cortex-A710 we don't need to implement any new features for it; but because it supports 48 bit physical addresses we can use it in the sbsa-ref board. Patch

Re: [PATCH v3 2/5] softmmu: Support concurrent bounce buffers

2023-09-15 Thread Stefan Hajnoczi
On Fri, 15 Sept 2023 at 05:55, Mattias Nissler wrote: > > On Thu, Sep 14, 2023 at 8:49 PM Stefan Hajnoczi wrote: > > > > On Thu, Sep 07, 2023 at 06:04:07AM -0700, Mattias Nissler wrote: > > > When DMA memory can't be directly accessed, as is the case when > > > running the device model in a

Re: [PATCH 2/5] accel: Introduce accel_cpu_unrealize() stub

2023-09-15 Thread Philippe Mathieu-Daudé
On 15/9/23 21:00, Philippe Mathieu-Daudé wrote: Prepare the stub for parity with accel_cpu_realize(). Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 6 ++ accel/accel-common.c | 4 cpu.c| 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-)

Re: [PATCH v2 4/8] qemu-img: add chunk size parameter to compare_buffers()

2023-09-15 Thread Eric Blake
On Fri, Sep 15, 2023 at 07:20:12PM +0300, Andrey Drobyshev wrote: > Add @chsize param to the function which, if non-zero, would represent > the chunk size to be used for comparison. If it's zero, then > BDRV_SECTOR_SIZE is used as default chunk size, which is the previous > behaviour. > > In

Re: [PATCH v2 3/8] qemu-img: rebase: use backing files' BlockBackend for buffer alignment

2023-09-15 Thread Andrey Drobyshev
On 9/15/23 21:39, Eric Blake wrote: > On Fri, Sep 15, 2023 at 07:20:11PM +0300, Andrey Drobyshev wrote: >> Since commit bb1c05973cf ("qemu-img: Use qemu_blockalign"), buffers for >> the data read from the old and new backing files are aligned using >> BlockDriverState (or BlockBackend later on)

[PATCH 4/5] accel/tcg: Have tcg_exec_realizefn() return a boolean

2023-09-15 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have tcg_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-all.h | 2 +- accel/tcg/cpu-exec.c | 4 +++- 2

[PATCH 5/5] accel/tcg: Restrict tcg_exec_[un]realizefn() to TCG

2023-09-15 Thread Philippe Mathieu-Daudé
We don't need to expose these TCG-specific methods to the whole code base. Register them as AccelClass handlers, they will be called by the generic accel_cpu_[un]realize() methods. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal.h | 3 +++ include/exec/cpu-all.h | 2 --

[PATCH 3/5] accel: Declare AccelClass::[un]realize_cpu() handlers

2023-09-15 Thread Philippe Mathieu-Daudé
Currently accel_cpu_realize() only performs target-specific realization. Introduce the [un]realize_cpu fields in the base AccelClass to be able to perform target-agnostic [un]realization of vCPUs. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 2 ++ accel/accel-common.c | 21

[PATCH 1/5] accel: Rename accel_cpu_realizefn() -> accel_cpu_realize()

2023-09-15 Thread Philippe Mathieu-Daudé
We use the '*fn' suffix for handlers, this is a public method. Drop the suffix. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 4 ++-- accel/accel-common.c | 2 +- cpu.c | 2 +- target/i386/kvm/kvm-cpu.c | 2 +- 4 files changed, 5 insertions(+), 5

[PATCH 2/5] accel: Introduce accel_cpu_unrealize() stub

2023-09-15 Thread Philippe Mathieu-Daudé
Prepare the stub for parity with accel_cpu_realize(). Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 6 ++ accel/accel-common.c | 4 cpu.c| 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/qemu/accel.h

[PATCH 0/5] accel: Restrict tcg_exec_[un]realizefn() to TCG

2023-09-15 Thread Philippe Mathieu-Daudé
- Add missing accel_cpu_unrealize() - Add AccelClass::[un]realize_cpu handlers - Use tcg_exec_[un]realizefn as AccelClass handlers Philippe Mathieu-Daudé (5): accel: Rename accel_cpu_realizefn() -> accel_cpu_realize() accel: Introduce accel_cpu_unrealize() stub accel: Declare

[PATCH 0/2] target/arm: Implement Neoverse-N2

2023-09-15 Thread Peter Maydell
This patchset implements a model of the Neoverse-N2 CPU. Because it's very similar to the Cortex-A710 we don't need to implement any new features for it; but because it supports 48 bit physical addresses we can use it in the sbsa-ref board. Patch 1 fixes a few minor errors in the A710 definition

[PATCH 2/2] target/arm: Implement Neoverse N2 CPU model

2023-09-15 Thread Peter Maydell
Implement a model of the Neoverse N2 CPU. This is an Armv9.0-A processor very similar to the Cortex-A710. The differences are: * no FEAT_EVT * FEAT_DGH (data gathering hint) * FEAT_NV (not yet implemented in QEMU) * Statistical Profiling Extension (not implemented in QEMU) * 48 bit physical

[PATCH 1/2] target/arm: Correct minor errors in Cortex-A710 definition

2023-09-15 Thread Peter Maydell
Correct a couple of minor errors in the Cortex-A710 definition: * ID_AA64DFR0_EL1.DebugVer is 9 (indicating Armv8.4 debug architecture) * ID_AA64ISAR1_EL1.APA is 5 (indicating more PAuth support) * there is an IMPDEF CPUCFR_EL1, like that on the Neoverse-N1 Fixes: e3d45c0a89576 ("target/arm:

Re: [PATCH v2 0/3] accel/tcg: Alternate fix for #1866

2023-09-15 Thread Richard Henderson
On 9/15/23 09:32, Richard Henderson wrote: Supercedes: 20230914174436.1597356-1-richard.hender...@linaro.org ("[PATCH 0/6] accel/tcg: Always require can_do_io (#1866)") An alternate fix for #1866 without touching can_do_io, and is perhaps a bit cleaner and clearer. Instead, the current cpu

[PATCH 19/21] tests: extend test 131 to cover availability of the discard operation

2023-09-15 Thread Denis V. Lunev
This patch contains test which minimally tests discard and new cluster allocation logic. The following checks are added: * write 2 clusters, discard the first allocated * write another cluster, check that the hole is filled * write 2 clusters, discard the first allocated, write 1 cluster at

[PATCH 16/21] parallels: naive implementation of allocate_clusters with used bitmap

2023-09-15 Thread Denis V. Lunev
The access to the bitmap is not optimized completely. Signed-off-by: Denis V. Lunev --- block/parallels.c | 51 --- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index a6d2f05863..2efa578e21

[PATCH 14/21] parallels: accept multiple clusters in mark_used()

2023-09-15 Thread Denis V. Lunev
This would be useful in the next patch in allocate_clusters(). This change would not imply serious performance drawbacks as usually image is full of data or are at the end of the bitmap. Signed-off-by: Denis V. Lunev --- block/parallels.c | 18 ++ 1 file changed, 10

[PATCH 00/21] implement discard operation for Parallels images

2023-09-15 Thread Denis V. Lunev
This series introduces new block allocator scheme into unused data blocks inside the image first and only after that extends the file. On top of that naive implementation of discard and write-zeroes (through the discard) is added. There are also a bunch of bugs revealed in the code during the

[PATCH 02/21] parallels: mark driver as supporting CBT

2023-09-15 Thread Denis V. Lunev
Parallels driver indeed support Parallels Dirty Bitmap Feature in read-only mode. The patch adds bdrv_supports_persistent_dirty_bitmap() callback which always return 1 to indicate that. This will allow to copy CBT from Parallels image with qemu-img. Note: read-write support is signalled through

[PATCH 11/21] parallels: collect bitmap of used clusters at open

2023-09-15 Thread Denis V. Lunev
If the operation is failed, we need to check image consistency if the problem is not about memory allocation. Bitmap adjustments in allocate_cluster are not performed yet. They worth to be separate. This was proven useful during debug of this series. Kept as is for future bissecting. It should

[PATCH 17/21] parallels: improve readability of allocate_clusters

2023-09-15 Thread Denis V. Lunev
Replace 'space' representing the amount of data to preallocate with 'bytes'. Rationale: * 'space' at each place is converted to bytes * the unit is more close to the variable name Signed-off-by: Denis V. Lunev --- block/parallels.c | 13 + 1 file changed, 5 insertions(+), 8

[PATCH 06/21] parallels: refactor path when we need to re-check image in parallels_open

2023-09-15 Thread Denis V. Lunev
More conditions follows thus the check should be more scalable. Signed-off-by: Denis V. Lunev --- block/parallels.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 8f223bfd89..aa29df9f77 100644 ---

[PATCH 12/21] tests: fix broken deduplication check in parallels format test

2023-09-15 Thread Denis V. Lunev
Original check is broken as supposed reading from 2 different clusters results in read from the same file offset twice. This is definitely wrong. We should be sure that * the content of both clusters is correct after repair * clusters are at the different offsets after repair In order to check

[PATCH 15/21] parallels: update used bitmap in allocate_cluster

2023-09-15 Thread Denis V. Lunev
We should extend the bitmap ff the file is extended and set the bit in the image used bitmap once the cluster is allocated. Sanity check at that moment also looks like a good idea. Signed-off-by: Denis V. Lunev --- block/parallels.c | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH 20/21] parallels: naive implementation of parallels_co_pwrite_zeroes

2023-09-15 Thread Denis V. Lunev
The zero flag is missed in the Parallels format specification. We can resort to discard if we have no backing file. Signed-off-by: Denis V. Lunev --- block/parallels.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH 11/21] parallels: collect bitmap of used clusters at open

2023-09-15 Thread Denis V. Lunev
If the operation is failed, we need to check image consistency if the problem is not about memory allocation. Bitmap adjustments in allocate_cluster are not performed yet. They worth to be separate. This was proven useful during debug of this series. Kept as is for future bissecting. It should

[PATCH 18/21] parallels: naive implementation of parallels_co_pdiscard

2023-09-15 Thread Denis V. Lunev
* Discarding with backing stores is not supported by the format. * There is no buffering/queueing of the discard operation. * Only operations aligned to the cluster are supported. Signed-off-by: Denis V. Lunev --- block/parallels.c | 47 +++ 1 file

[PATCH 07/21] parallels: create mark_used() helper which sets bit in used bitmap

2023-09-15 Thread Denis V. Lunev
This functionality is used twice already and next patch will add more code with it. Signed-off-by: Denis V. Lunev --- block/parallels.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH 02/21] parallels: mark driver as supporting CBT

2023-09-15 Thread Denis V. Lunev
Parallels driver indeed support Parallels Dirty Bitmap Feature in read-only mode. The patch adds bdrv_supports_persistent_dirty_bitmap() callback which always return 1 to indicate that. This will allow to copy CBT from Parallels image with qemu-img. Note: read-write support is signalled through

[PATCH 13/21] tests: test self-cure of parallels image with duplicated clusters

2023-09-15 Thread Denis V. Lunev
The test is quite similar with the original one for duplicated clusters. There is the only difference in the operation which should fix the image. Signed-off-by: Denis V. Lunev --- tests/qemu-iotests/tests/parallels-checks | 36 +++

[PATCH 09/21] parallels: fix broken parallels_check_data_off()

2023-09-15 Thread Denis V. Lunev
Once we have repaired data_off field in the header we should update s->data_start which is calculated on the base of it. Signed-off-by: Denis V. Lunev --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c index 60ad41b49b..bdc4dd081b

[PATCH 08/21] tests: ensure that image validation will not cure the corruption

2023-09-15 Thread Denis V. Lunev
Since commit cfce1091d55322789582480798a891cbaf66924e Author: Alexander Ivanov Date: Tue Jul 18 12:44:29 2023 +0200 parallels: Image repairing in parallels_open() there is a potential pit fall with calling qemu-io -c "read" The image is opened in read-write mode and thus

[PATCH 21/21] tests: extend test 131 to cover availability of the write-zeroes

2023-09-15 Thread Denis V. Lunev
This patch contains test which minimally tests write-zeroes on top of working discard. The following checks are added: * write 2 clusters, write-zero to the first allocated cluster * write 2 cluster, write-zero to the half the first allocated cluster Signed-off-by: Denis V. Lunev ---

[PATCH 10/21] parallels: add test which will validate data_off fixes through repair

2023-09-15 Thread Denis V. Lunev
We have only check through self-repair and that proven to be not enough. Signed-off-by: Denis V. Lunev --- tests/qemu-iotests/tests/parallels-checks | 17 + tests/qemu-iotests/tests/parallels-checks.out | 18 ++ 2 files changed, 35 insertions(+) diff --git

[PATCH 05/21] parallels: return earlier from parallels_open() function on error

2023-09-15 Thread Denis V. Lunev
At the beginning of the function we can return immediately until we really allocate s->header. Signed-off-by: Denis V. Lunev --- block/parallels.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH 03/21] parallels: invent parallels_opts_prealloc() helper to parse prealloc opts

2023-09-15 Thread Denis V. Lunev
This patch creates above mentioned helper and moves its usage to the beginning of parallels_open(). This simplifies parallels_open() a bit. The patch also ensures that we store prealloc_size on block driver state always in sectors. This makes code cleaner and avoids wrong opinion at the

[PATCH 01/21] parallels: fix formatting in bdrv_parallels initialization

2023-09-15 Thread Denis V. Lunev
Old code is ugly and contains tabulations. There are no functional changes in this patch. Signed-off-by: Denis V. Lunev --- block/parallels.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH 04/21] parallels: return earler in fail_format branch in parallels_open()

2023-09-15 Thread Denis V. Lunev
We do not need to perform any deallocation/cleanup if wrong format is detected. Signed-off-by: Denis V. Lunev --- block/parallels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index 1d5409f2ba..0f127427bf 100644 ---

Re: [PATCH v2 3/8] qemu-img: rebase: use backing files' BlockBackend for buffer alignment

2023-09-15 Thread Eric Blake
On Fri, Sep 15, 2023 at 07:20:11PM +0300, Andrey Drobyshev wrote: > Since commit bb1c05973cf ("qemu-img: Use qemu_blockalign"), buffers for > the data read from the old and new backing files are aligned using > BlockDriverState (or BlockBackend later on) referring to the target image. > However,

Re: [PATCH v1 0/4] vfio: report NUMA nodes for device memory

2023-09-15 Thread David Hildenbrand
On 15.09.23 16:47, Alex Williamson wrote: On Fri, 15 Sep 2023 16:19:29 +0200 Cédric Le Goater wrote: Hello Ankit, On 9/15/23 04:45, ank...@nvidia.com wrote: From: Ankit Agrawal For devices which allow CPU to cache coherently access their memory, it is sensible to expose such memory as

Re: [PATCH] spapr: Remove support for NVIDIA V100 GPU with NVLink2

2023-09-15 Thread Alex Williamson
On Fri, 15 Sep 2023 09:59:36 +0200 Cédric Le Goater wrote: > NVLink2 support was removed from the PPC PowerNV platform and VFIO in > Linux 5.13 with commits : > > 562d1e207d32 ("powerpc/powernv: remove the nvlink support") > b392a1989170 ("vfio/pci: remove vfio_pci_nvlink2") > > This was

Re: [PATCH v2 2/3] vdpa net: stop probing if cannot set features

2023-09-15 Thread Philippe Mathieu-Daudé
On 15/9/23 19:08, Eugenio Pérez wrote: Otherwise it continues the CVQ isolation probing. Fixes: 152128d646 ("vdpa: move CVQ isolation check to net_init_vhost_vdpa") Reported-by: Peter Maydell Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH v2 1/3] vdpa net: fix error message setting virtio status

2023-09-15 Thread Philippe Mathieu-Daudé
On 15/9/23 19:08, Eugenio Pérez wrote: It incorrectly prints "error setting features", probably because a copy paste miss. Fixes: 152128d646 ("vdpa: move CVQ isolation check to net_init_vhost_vdpa") Reported-by: Peter Maydell Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 2 +- 1 file

Re: [PATCH v2 3/3] softmmu: Introduce cpu_address_space_sync

2023-09-15 Thread Richard Henderson
On 9/15/23 09:57, Philippe Mathieu-Daudé wrote: On 15/9/23 18:32, Richard Henderson wrote: Synchronously check and update the address space for the current cpu for any slow path access. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1866 Signed-off-by: Richard Henderson ---  

Re: [PATCH v2 0/3] accel/tcg: Alternate fix for #1866

2023-09-15 Thread Richard Henderson
On 9/15/23 09:55, Philippe Mathieu-Daudé wrote: On 15/9/23 18:32, Richard Henderson wrote: Supercedes: 20230914174436.1597356-1-richard.hender...@linaro.org ("[PATCH 0/6] accel/tcg: Always require can_do_io (#1866)") Patches 1-4 (5?) are cleanups although, isn't it? Yes, 1-4 are good

Re: [PATCH v2 0/5] elf2dmp: improve Win2022, Win11 and large dumps

2023-09-15 Thread Akihiko Odaki
On 2023/09/16 2:01, Viktor Prutyanov wrote: Windows Server 2022 and Windows 11 require more careful kernel PE image search and handling of PDB than previous Windows versions. Also, improve support of large ELF dump files, dumps with unaligned memory ranges and with big number of ranges. Viktor

Re: [RFC PATCH 0/8] i386/sev: Use C API of Rust SEV library

2023-09-15 Thread Stefan Hajnoczi
On Fri, 15 Sept 2023 at 09:50, Peter Maydell wrote: > > On Fri, 15 Sept 2023 at 10:54, Daniel P. Berrangé wrote: > > My summary, is that I'd personally be in favour of opening the door > > to Rust code as a mandatory pre-requisite for QEMU, at the very least > > for system emulators. Not because

[PATCH v2 3/3] vdpa net: follow VirtIO initialization properly at cvq isolation probing

2023-09-15 Thread Eugenio Pérez
This patch solves a few issues. The most obvious is that the feature set was done previous to ACKNOWLEDGE | DRIVER status bit set. Current vdpa devices are permissive with this, but it is better to follow the standard. Fixes: 152128d646 ("vdpa: move CVQ isolation check to net_init_vhost_vdpa")

[PATCH v2 2/3] vdpa net: stop probing if cannot set features

2023-09-15 Thread Eugenio Pérez
Otherwise it continues the CVQ isolation probing. Fixes: 152128d646 ("vdpa: move CVQ isolation check to net_init_vhost_vdpa") Reported-by: Peter Maydell Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c

[PATCH v2 1/3] vdpa net: fix error message setting virtio status

2023-09-15 Thread Eugenio Pérez
It incorrectly prints "error setting features", probably because a copy paste miss. Fixes: 152128d646 ("vdpa: move CVQ isolation check to net_init_vhost_vdpa") Reported-by: Peter Maydell Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v2 0/3] Follow VirtIO initialization properly at vdpa net cvq isolation probing

2023-09-15 Thread Eugenio Pérez
This series solves a few issues. The most obvious is that the feature set was done previous to ACKNOWLEDGE | DRIVER status bit set. Current vdpa devices are permissive with this, but it is better to follow the standard. Apart from that it fixes two issues reported by Peter Maydell: * Stop

Re: [RFC PATCH 0/8] i386/sev: Use C API of Rust SEV library

2023-09-15 Thread Tyler Fanelli
On 9/15/23 7:33 AM, Stefan Hajnoczi wrote: On Fri, 15 Sept 2023 at 05:54, Daniel P. Berrangé wrote: On Thu, Sep 14, 2023 at 01:58:27PM -0400, Tyler Fanelli wrote: These patches are submitted as an RFC mainly because I'm a relative newcomer to QEMU with no knowledge of the community's views on

Re: [PATCH 4/4] hw/cxl: Line length reductions

2023-09-15 Thread Jonathan Cameron via
On Fri, 15 Sep 2023 18:01:30 +0100 Jonathan Cameron via wrote: > On Thu, 14 Sep 2023 15:57:55 +0300 > Michael Tokarev wrote: > > > 13.09.2023 18:05, Jonathan Cameron via wrote: > > > Michael Tsirkin observed that there were some unnecessarily > > > long lines in the CXL code in a recent

Re: [PATCH 2/3] vdpa net: stop probing if cannot set features

2023-09-15 Thread Philippe Mathieu-Daudé
On 15/9/23 19:03, Eugenio Pérez wrote: Otherwise it continues the CVQ isolation probing. Fixes: 152128d646 ("vdpa: move CVQ isolation check to net_init_vhost_vdpa") Reviewed-by: Philippe Mathieu-Daudé Reported-by: Peter Maydell Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 1 +

[PATCH v2 4/4] hw/cxl: Line length reductions

2023-09-15 Thread Jonathan Cameron via
Michael Tsirkin observed that there were some unnecessarily long lines in the CXL code in a recent review. This patch is intended to rectify that where it does not hurt readability. Reviewed-by: Michael Tokarev Signed-off-by: Jonathan Cameron --- include/hw/cxl/cxl_component.h | 3 ++-

Re: [PATCH 1/3] vdpa net: fix error message setting virtio status

2023-09-15 Thread Philippe Mathieu-Daudé
On 15/9/23 19:03, Eugenio Pérez wrote: It incorrectly prints "error setting features", probably because a copy paste miss. Reported-by: Peter Maydell Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe

  1   2   3   4   >