Re: [PATCH] Deprecate the "-no-acpi" command line switch

2023-02-23 Thread Sunil V L
On Fri, Feb 24, 2023 at 08:34:41AM +0100, Thomas Huth wrote: > Similar to "-no-hpet", the "-no-acpi" switch is a legacy command > line option that should be replaced with the "acpi" machine parameter > nowadays. > > Signed-off-by: Thomas Huth > --- > docs/about/deprecated.rst | 6 ++ >

Re: [PATCH v5 5/5] dump: Add create_win_dump() stub for non-x86 targets

2023-02-23 Thread Thomas Huth
On 24/02/2023 08.38, Philippe Mathieu-Daudé wrote: Implement the non-x86 create_win_dump(). We can remove the last TARGET_X86_64 #ifdef'ry in dump.c, which thus becomes target-independent. Update meson accordingly. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by:

Re: [PATCH v5 4/5] dump: Introduce win_dump_available()

2023-02-23 Thread Thomas Huth
On 24/02/2023 08.38, Philippe Mathieu-Daudé wrote: Remove a pair of TARGET_X86_64 #ifdef'ry by introducing the win_dump_available() method. Doing so we can build win_dump.c on any target, and simplify the meson rule. Nit: The commit description is a little bit misleading now since you

Re: [PATCH v3 1/2] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-02-23 Thread Philippe Mathieu-Daudé
On 24/2/23 01:39, Ilya Leoshkevich wrote: target_rlimit64 contains uint64_t fields, so it's 8-byte aligned on some hosts, while some guests may align their respective type on a 4-byte boundary. This may lead to an unaligned access, which is an UB. Fix by defining the fields as abi_ullong. This

Re: [PATCH] Deprecate the "-no-acpi" command line switch

2023-02-23 Thread Philippe Mathieu-Daudé
On 24/2/23 08:34, Thomas Huth wrote: Similar to "-no-hpet", the "-no-acpi" switch is a legacy command line option that should be replaced with the "acpi" machine parameter nowadays. Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 6 ++ softmmu/vl.c | 1 + 2

[PATCH v5 4/5] dump: Introduce win_dump_available()

2023-02-23 Thread Philippe Mathieu-Daudé
Remove a pair of TARGET_X86_64 #ifdef'ry by introducing the win_dump_available() method. Doing so we can build win_dump.c on any target, and simplify the meson rule. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 16

[PATCH v5 1/5] dump: Replace tswapN() -> cpu_to_dumpN()

2023-02-23 Thread Philippe Mathieu-Daudé
All uses of tswap in that file are wrong, and should be using cpu_to_dumpN, which correctly tests the endianness of the output. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- dump/dump.c | 8 1 file

[PATCH v5 0/5] dump: Make most of it target agnostic (build once)

2023-02-23 Thread Philippe Mathieu-Daudé
Since v4: - more unused headers removed - KISS, use a bit of #ifdef'ry to avoid a stub file Thanks to Richard help, we can now build dump.o once for all targets, keeping win_dump.o for x86* targets. Philippe Mathieu-Daudé (5): dump: Replace tswapN() -> cpu_to_dumpN() dump: Replace

[PATCH v5 5/5] dump: Add create_win_dump() stub for non-x86 targets

2023-02-23 Thread Philippe Mathieu-Daudé
Implement the non-x86 create_win_dump(). We can remove the last TARGET_X86_64 #ifdef'ry in dump.c, which thus becomes target-independent. Update meson accordingly. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 2 --

[PATCH v5 3/5] dump: Clean included headers

2023-02-23 Thread Philippe Mathieu-Daudé
"qemu/win_dump_defs.h" is only required by win_dump.c, but win_dump.h requires "sysemu/dump.h" which declares the DumpState type. Remove various unused headers. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- dump/dump-hmp-cmds.c | 2 +-

[PATCH v5 2/5] dump: Replace TARGET_PAGE_SIZE -> qemu_target_page_size()

2023-02-23 Thread Philippe Mathieu-Daudé
TARGET_PAGE_SIZE is target specific. In preparation of making dump.c target-agnostic, replace the compile-time TARGET_PAGE_SIZE definition by runtime qemu_target_page_size(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- dump/dump.c | 3 ++-

[PATCH] Deprecate the "-no-acpi" command line switch

2023-02-23 Thread Thomas Huth
Similar to "-no-hpet", the "-no-acpi" switch is a legacy command line option that should be replaced with the "acpi" machine parameter nowadays. Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 6 ++ softmmu/vl.c | 1 + 2 files changed, 7 insertions(+) diff --git

Re: [RFC PATCH 10/43] target/loongarch: Implement vaddw/vsubw

2023-02-23 Thread gaosong
在 2023/2/23 下午11:22, Richard Henderson 写道: On 2/22/23 22:23, gaosong wrote: Hi, Richard 在 2023/2/21 上午1:21, Richard Henderson 写道: On 2/19/23 21:47, gaosong wrote: I have some questions: 1 Should we need implement  GVecGen*  for simple gvec instructiosn? such as add, sub , or , xor..

Re: [PATCH v2 0/4] NUMA: Apply socket-NUMA-node boundary for aarch64 and RiscV machines

2023-02-23 Thread Gavin Shan
Hi Drew, On 2/23/23 11:25 PM, Andrew Jones wrote: On Thu, Feb 23, 2023 at 04:13:57PM +0800, Gavin Shan wrote: For arm64 and RiscV architecture, the driver (/base/arch_topology.c) is used to populate the CPU topology in the Linux guest. It's required that the CPUs in one socket can't span

Re: [PATCH 2/5] hw/isa/vt82c686: Implement PCI IRQ routing

2023-02-23 Thread Bernhard Beschow
Am 23. Februar 2023 23:47:58 UTC schrieb BALATON Zoltan : >On Thu, 23 Feb 2023, Bernhard Beschow wrote: >> Am 23. Februar 2023 21:11:23 UTC schrieb BALATON Zoltan : >>> On Thu, 23 Feb 2023, Bernhard Beschow wrote: The real VIA south bridges implement a PCI IRQ router which is configured

Re: [PATCH v2 0/4] NUMA: Apply socket-NUMA-node boundary for aarch64 and RiscV machines

2023-02-23 Thread Gavin Shan
On 2/24/23 12:18 AM, Daniel Henrique Barboza wrote: On 2/23/23 05:13, Gavin Shan wrote: For arm64 and RiscV architecture, the driver (/base/arch_topology.c) is used to populate the CPU topology in the Linux guest. It's required that the CPUs in one socket can't span mutiple NUMA nodes.

Re: [PATCH v4 5/7] dump: Introduce create_win_dump()

2023-02-23 Thread Thomas Huth
On 24/02/2023 00.17, Philippe Mathieu-Daudé wrote: Remove another TARGET_X86_64 #ifdef'ry by introducing a create_win_dump() stub. We'll extract it to a stub file for non-x86 targets in the next commit. Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 7 +-- 1 file changed, 5

Re: [PATCH v4 4/7] dump: Introduce win_dump_available()

2023-02-23 Thread Thomas Huth
On 24/02/2023 00.17, Philippe Mathieu-Daudé wrote: Remove a pair of TARGET_X86_64 #ifdef'ry by introducing the win_dump_available() method. We'll soon extract it to a stub file for non-x86 targets. Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 23 +--

Re: [PATCH v4 3/7] dump: Correct headers included

2023-02-23 Thread Thomas Huth
On 24/02/2023 00.17, Philippe Mathieu-Daudé wrote: "qemu/win_dump_defs.h" is only required by win_dump.c, but win_dump.h requires "sysemu/dump.h" which declares the DumpState type. Signed-off-by: Philippe Mathieu-Daudé --- dump/win_dump.c | 1 + dump/win_dump.h | 2 +- 2 files changed, 2

Re: [PATCH v4 2/7] dump: Replace TARGET_PAGE_SIZE -> qemu_target_page_size()

2023-02-23 Thread Thomas Huth
On 24/02/2023 00.17, Philippe Mathieu-Daudé wrote: TARGET_PAGE_SIZE is target specific. In preparation of making dump.c target-agnostic, replace the compile-time TARGET_PAGE_SIZE definition by runtime qemu_target_page_size(). Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 3 ++- 1

Re: [PATCH v4 1/7] dump: Replace tswapN() -> cpu_to_dumpN()

2023-02-23 Thread Thomas Huth
On 24/02/2023 00.17, Philippe Mathieu-Daudé wrote: All uses of tswap in that file are wrong, and should be using cpu_to_dumpN, which correctly tests the endianness of the output. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 8 1 file

Re: [PATCH] accel/tcg: Add 'size' param to probe_access_full

2023-02-23 Thread Philippe Mathieu-Daudé
On 24/2/23 01:45, Richard Henderson wrote: Change to match the recent change to probe_access_flags. All existing callers updated to supply 0, so no change in behaviour. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 +- accel/tcg/cputlb.c | 4

Re: [PULL 0/9] Fourth RISC-V PR for QEMU 8.0

2023-02-23 Thread Thomas Huth
Hi! On 23/02/2023 23.49, Palmer Dabbelt wrote: On Wed, 22 Feb 2023 07:56:10 PST (-0800), Palmer Dabbelt wrote: On Tue, 21 Feb 2023 08:43:47 PST (-0800), Peter Maydell wrote: ... This seems to have caused CI to decide it needs to rerun the 'docker-opensbi' job, which doesn't work:

Re: [PATCH v4 6/7] dump: Build once by adding stubs for non-x86 targets

2023-02-23 Thread Philippe Mathieu-Daudé
On 24/2/23 00:51, Richard Henderson wrote: On 2/23/23 13:17, Philippe Mathieu-Daudé wrote: Extract non-x86 stubs to win_dump-stub.c. We can now build dump.o once for system emulation. Update meson. Signed-off-by: Philippe Mathieu-Daudé ---   dump/dump.c  | 14 --  

Re: [PATCH v2] docs/about/build-platforms: Refine the distro support policy

2023-02-23 Thread Markus Armbruster
Thomas Huth writes: > For long-term distributions that release a new version only very > seldom, we limit the support to five years after the initial release. > Otherwise, we might need to support distros like openSUSE 15 for > up to 7 or even more years in total due to our "two more years >

Re: [PATCH v4 0/4] target: Restrict 'qapi-commands-machine.h' to system emulation

2023-02-23 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > All series reviewed, can patches be picked by corresponding > maintainers, or should I include them in on of my PRs? > > The "qapi-commands-machine.h" header is not generated in user-only > emulation. This series removes its use in user-emu code by moving > the

Re: [PATCH] MAINTAINERS: Cover RCU documentation

2023-02-23 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > ping^2 You misspelled "Paolo?" You're welcome! ;-P

Re: Fortnightly KVM call for 2023-02-07

2023-02-23 Thread Markus Armbruster
Sean Christopherson writes: > On Tue, Jan 24, 2023, Juan Quintela wrote: >> Please, send any topic that you are interested in covering in the next >> call in 2 weeks. >> >> We have already topics: >> - single qemu binary >> People on previous call (today) asked if Markus, Paolo and Peter

Re: [PATCH] .gitlab-ci.d/base: Mark jobs as interruptible by default

2023-02-23 Thread Thomas Huth
On 23/02/2023 21.23, Philippe Mathieu-Daudé wrote: On 23/2/23 20:13, Thomas Huth wrote: When handling pull requests in the staging branch, it often happens that one of the job fails due to a problem, so that the pull request can't be merged. Peter/Richard/Stefan then informs the sender of the

Re: [PATCH v2 0/4] NUMA: Apply socket-NUMA-node boundary for aarch64 and RiscV machines

2023-02-23 Thread Gavin Shan
On 2/23/23 11:57 PM, Daniel P. Berrangé wrote: On Thu, Feb 23, 2023 at 04:13:57PM +0800, Gavin Shan wrote: For arm64 and RiscV architecture, the driver (/base/arch_topology.c) is used to populate the CPU topology in the Linux guest. It's required that the CPUs in one socket can't span mutiple

Re: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory

2023-02-23 Thread Chao Peng
> > int restrictedmem_bind(struct file *file, pgoff_t start, pgoff_t end, > >struct restrictedmem_notifier *notifier, bool exclusive) > > { > > struct restrictedmem *rm = file->f_mapping->private_data; > > int ret = -EINVAL; > > > > down_write(>lock); > > > >

Re: [PULL v2 00/36] Testing, docs, semihosting and plugin updates

2023-02-23 Thread Akihiko Odaki
On 2023/02/23 21:59, Philippe Mathieu-Daudé wrote: On 3/2/23 18:38, Philippe Mathieu-Daudé wrote: On 2/2/23 17:01, Alex Bennée wrote: Testing, docs, semihosting and plugin updates

[PATCH 3/3] qga: test: Add tests for `merge-output` flag

2023-02-23 Thread Daniel Xu
This commit adds a test to ensure `merge-output` functions as expected. We also add a negative test to ensure we haven't regressed previous functionality. Signed-off-by: Daniel Xu --- tests/unit/test-qga.c | 128 -- 1 file changed, 111 insertions(+), 17

[PATCH 2/3] qga: Add optional `merge-output` flag to guest-exec qapi

2023-02-23 Thread Daniel Xu
Currently, the captured output (via `capture-output`) is segregated into separate GuestExecStatus fields (`out-data` and `err-data`). This means that downstream consumers have no way to reassemble the captured data back into the original stream. This is relevant for chatty and semi-interactive

[PATCH 0/3] qga: Add optional `merge-output` flag to guest-exec QAPI

2023-02-23 Thread Daniel Xu
Currently, the captured output (via `capture-output`) is segregated into separate GuestExecStatus fields (`out-data` and `err-data`). This means that downstream consumers have no way to reassemble the captured data back into the original stream. This is relevant for chatty and semi-interactive

[PATCH 1/3] qga: test: Use absolute path to test data

2023-02-23 Thread Daniel Xu
It looks like qga's working directory is in a tempdir. So the relative path that the test case gives qga through the QGA_OS_RELEASE= env variable does not resolve correctly. Fix by doing a poor man's path canonicalization of the test data file. Note we cannot use g_canonicalize_filename() b/c

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

2023-02-23 Thread Anton Kuchin
On 23/02/2023 23:24, Stefan Hajnoczi wrote: On Thu, Feb 23, 2023 at 02:36:33AM -0500, Michael S. Tsirkin wrote: 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

[PATCH 4/6] target/riscv: Add *envcfg.PBMTE related check in address translation

2023-02-23 Thread Weiwei Li
menvcfg.PBMTE bit controls whether the Svpbmt extension is available for use in S-mode and G-stage address translation. henvcfg.PBMTE bit controls whether the Svpbmt extension is available for use in VS-stage address translation. Set *envcfg.PBMTE default true for backward compatibility.

[PATCH 6/6] target/riscv: Export Svadu property

2023-02-23 Thread Weiwei Li
Set it default true for backward compatibility Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index b81ab65de5..d7c4c747dc 100644 --- a/target/riscv/cpu.c +++

[PATCH 5/6] target/riscv: Add *envcfg.HADE related check in address translation

2023-02-23 Thread Weiwei Li
When menvcfg.HADE is 1, hardware updating of PTE A/D bits is enabled during single-stage address translation. When the hypervisor extension is implemented, if menvcfg.HADE is 1, hardware updating of PTE A/D bits is enabled during G-stage address translation. Set *envcfg.HADE default true for

[PATCH 3/6] target/riscv: Add csr support for svadu

2023-02-23 Thread Weiwei Li
Add ext_svadu property Add HADE field in *envcfg: * menvcfg.HADE is read-only zero if Svadu is not implemented. * henvcfg.HADE is read-only zero if menvcfg.HADE is zero. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.h | 1 + target/riscv/cpu_bits.h | 4

[PATCH 1/6] target/riscv: Fix the relationship between menvcfg.PBMTE/STCE and Svpbmt/Sstc extensions

2023-02-23 Thread Weiwei Li
menvcfg.PBMTE/STCE are read-only zero if Svpbmt/Sstc are not implemented. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/csr.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index

[PATCH 2/6] target/riscv: Fix the relationship of PBMTE/STCE fields between menvcfg and henvcfg

2023-02-23 Thread Weiwei Li
henvcfg.PBMTE/STCE are read-only zero if menvcfg.PBMTE/STCE are zero. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/csr.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index

[PATCH 0/6] target/riscv: Add support for Svadu extension

2023-02-23 Thread Weiwei Li
This patchset adds support svadu extension. It also fixes some relationship between *envcfg fields and Svpbmt/Sstc extensions. Specification for Svadu extension can be found in: https://github.com/riscv/riscv-svadu The port is available here:

RE: [PATCH v5 7/9] aspeed/soc : Add AST1030 support

2023-02-23 Thread Troy Lee
Hi Philippe, > -Original Message- > From: Philippe Mathieu-Daudé > Sent: Thursday, February 23, 2023 6:44 PM > To: Jamin Lin ; Cédric Le Goater ; > Peter Maydell ; Andrew Jeffery > ; Joel Stanley ; Alistair Francis > ; Cleber Rosa ; Wainer dos > Santos Moschetta ; Beraldo Leal > ; open

Re: [PATCH] vdpa: stop all svq on device deletion

2023-02-23 Thread Jason Wang
On Thu, Feb 23, 2023 at 4:51 PM Laurent Vivier wrote: > > Hi, > > this patch fixes a QEMU crash, could it be merged? Acked-by: Jason Wang I think it should go with Michael's tree. Thanks > > Thanks, > Laurent > > On 2/9/23 18:00, Eugenio Pérez wrote: > > Not stopping them leave the device in

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

2023-02-23 Thread Jason Wang
On Thu, Feb 23, 2023 at 7:07 PM Eugenio Perez Martin wrote: > > On Thu, Feb 23, 2023 at 3:38 AM Jason Wang wrote: > > > > > > 在 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

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

2023-02-23 Thread Jason Wang
On Thu, Feb 23, 2023 at 11:47 PM Peter Xu wrote: > > On Thu, Feb 23, 2023 at 02:59:19PM +0800, Jason Wang wrote: > > 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

Re: [PATCH v7 4/4] target/riscv: add Zicbop cbo.prefetch{i, r, m} placeholder

2023-02-23 Thread liweiwei
On 2023/2/24 07:44, Daniel Henrique Barboza wrote: From: Christoph Muellner The cmo.prefetch instructions are nops for QEMU (no emulation of the memory hierarchy, no illegal instructions, no permission faults, no traps). Add a comment noting where they would be decoded in case cbo.prefetch

Re: [PATCH v7 3/4] target/riscv: implement Zicbom extension

2023-02-23 Thread liweiwei
On 2023/2/24 07:44, Daniel Henrique Barboza wrote: From: Christoph Muellner Zicbom is the Cache-Block Management extension defined in the already ratified RISC-V Base Cache Management Operation (CBO) ISA extension [1]. The extension contains three instructions: cbo.clean, cbo.flush and

Re: [PATCH v7 2/4] target/riscv: implement Zicboz extension

2023-02-23 Thread liweiwei
On 2023/2/24 07:44, Daniel Henrique Barboza wrote: From: Christoph Muellner The RISC-V base cache management operation (CBO) ISA extension has been ratified. It defines three extensions: Cache-Block Management, Cache-Block Prefetch and Cache-Block Zero. More information about the spec can be

[qemu-web PATCH] Announce Google Summer of Code and Outreachy 2023

2023-02-23 Thread Stefan Hajnoczi
QEMU is participating in GSoC and Outreachy again. This blog post will draw people's attention to our open source internships and increase the number of applicants. Signed-off-by: Stefan Hajnoczi --- _posts/2023-02-23-gsoc-outreachy-2023.md | 46 1 file changed, 46

[PATCH] accel/tcg: Add 'size' param to probe_access_full

2023-02-23 Thread Richard Henderson
Change to match the recent change to probe_access_flags. All existing callers updated to supply 0, so no change in behaviour. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 +- accel/tcg/cputlb.c | 4 ++-- target/arm/mte_helper.c | 4

[PATCH v3 0/2] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-02-23 Thread Ilya Leoshkevich
v2: https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg07017.html v2 -> v3: Fix __put_user() argument order mixup. I tested v2 only against sh4, where the original problem was discovered, but it regresses aarch64. v1:

[PATCH v3 1/2] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-02-23 Thread Ilya Leoshkevich
target_rlimit64 contains uint64_t fields, so it's 8-byte aligned on some hosts, while some guests may align their respective type on a 4-byte boundary. This may lead to an unaligned access, which is an UB. Fix by defining the fields as abi_ullong. This makes the host alignment match that of the

[PATCH v3 2/2] tests/tcg/linux-test: Add linux-fork-trap test

2023-02-23 Thread Ilya Leoshkevich
Check that dying due to a signal does not deadlock. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/linux/linux-fork-trap.c | 51 + 1 file changed, 51 insertions(+) create mode 100644

Re: [PATCH 2/2] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2023-02-23 Thread Fan Ni
On Mon, Feb 20, 2023 at 11:46:46AM +, Jonathan Cameron wrote: > On Fri, 17 Feb 2023 06:08:57 -0500 > Gregory Price wrote: > > > On Fri, Feb 17, 2023 at 04:16:17PM +, Jonathan Cameron via wrote: > > > On Tue, 31 Jan 2023 16:38:47 + > > > Jonathan Cameron via wrote: > > > > > > >

Re: [PATCH v7 1/4] tcg: add 'size' param to probe_access_flags()

2023-02-23 Thread Richard Henderson
On 2/23/23 14:19, Richard Henderson wrote: On 2/23/23 13:44, Daniel Henrique Barboza wrote: +    if (unlikely(flags & TLB_NOTDIRTY)) { +    notdirty_write(env_cpu(env), addr, 1, full, retaddr); That '1' should be 'size'.  Fixed locally. Hmph, well, that matches the interface, but it's

Re: [PATCH v7 1/4] tcg: add 'size' param to probe_access_flags()

2023-02-23 Thread Richard Henderson
On 2/23/23 13:44, Daniel Henrique Barboza wrote: +if (unlikely(flags & TLB_NOTDIRTY)) { +notdirty_write(env_cpu(env), addr, 1, full, retaddr); That '1' should be 'size'. Fixed locally. r~

[PATCH] hw/display/sm501: Add alternatives to pixman routines

2023-02-23 Thread BALATON Zoltan
Pixman can sometimes return false so add fallbacks for such cases and also add a property to disable pixman and always use the fallbacks which can be useful on platforms where pixman is broken or for testing different drawing methods. Signed-off-by: BALATON Zoltan --- Also ping for the other

Re: [PATCH v7 1/4] tcg: add 'size' param to probe_access_flags()

2023-02-23 Thread Richard Henderson
On 2/23/23 13:44, Daniel Henrique Barboza wrote: probe_access_flags() as it is today uses probe_access_full(), which in turn uses probe_access_internal() with size = 0. probe_access_internal() then uses the size to call the tlb_fill() callback for the given CPU. This size param ('fault_size' as

Re: [PATCH v7 3/4] target/riscv: implement Zicbom extension

2023-02-23 Thread Richard Henderson
On 2/23/23 13:44, Daniel Henrique Barboza wrote: From: Christoph Muellner Zicbom is the Cache-Block Management extension defined in the already ratified RISC-V Base Cache Management Operation (CBO) ISA extension [1]. The extension contains three instructions: cbo.clean, cbo.flush and

Re: [PATCH v7 2/4] target/riscv: implement Zicboz extension

2023-02-23 Thread Richard Henderson
On 2/23/23 13:44, Daniel Henrique Barboza wrote: From: Christoph Muellner The RISC-V base cache management operation (CBO) ISA extension has been ratified. It defines three extensions: Cache-Block Management, Cache-Block Prefetch and Cache-Block Zero. More information about the spec can be

Re: [PATCH v7 1/4] tcg: add 'size' param to probe_access_flags()

2023-02-23 Thread Richard Henderson
On 2/23/23 13:44, Daniel Henrique Barboza wrote: probe_access_flags() as it is today uses probe_access_full(), which in turn uses probe_access_internal() with size = 0. probe_access_internal() then uses the size to call the tlb_fill() callback for the given CPU. This size param ('fault_size' as

Re: [PATCH 2/5] hw/isa/vt82c686: Implement PCI IRQ routing

2023-02-23 Thread BALATON Zoltan
On Fri, 24 Feb 2023, BALATON Zoltan wrote: On Thu, 23 Feb 2023, Bernhard Beschow wrote: Am 23. Februar 2023 21:11:23 UTC schrieb BALATON Zoltan : On Thu, 23 Feb 2023, Bernhard Beschow wrote: The real VIA south bridges implement a PCI IRQ router which is configured by the BIOS or the OS. In

Re: [PATCH v4 7/7] dump: Rename x86-specific file as win_dump_x86.c

2023-02-23 Thread Richard Henderson
On 2/23/23 13:17, Philippe Mathieu-Daudé wrote: win_dump.c is x86 specific. Rename it as such in case someone is willing to add win_dump-aarch64 :) I think this is premature. I would *hope* there's a lot in here that would be shared. r~

Re: [PATCH v4 6/7] dump: Build once by adding stubs for non-x86 targets

2023-02-23 Thread Richard Henderson
On 2/23/23 13:17, Philippe Mathieu-Daudé wrote: Extract non-x86 stubs to win_dump-stub.c. We can now build dump.o once for system emulation. Update meson. Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 14 -- dump/meson.build | 6 --

Re: [PATCH 2/5] hw/isa/vt82c686: Implement PCI IRQ routing

2023-02-23 Thread BALATON Zoltan
On Thu, 23 Feb 2023, Bernhard Beschow wrote: Am 23. Februar 2023 21:11:23 UTC schrieb BALATON Zoltan : On Thu, 23 Feb 2023, Bernhard Beschow wrote: The real VIA south bridges implement a PCI IRQ router which is configured by the BIOS or the OS. In order to respect these configurations, QEMU

[PATCH v7 3/4] target/riscv: implement Zicbom extension

2023-02-23 Thread Daniel Henrique Barboza
From: Christoph Muellner Zicbom is the Cache-Block Management extension defined in the already ratified RISC-V Base Cache Management Operation (CBO) ISA extension [1]. The extension contains three instructions: cbo.clean, cbo.flush and cbo.inval. All of them must be implemented in the same

[PATCH v7 0/4] riscv: Add support for Zicbo[m,z,p] instructions

2023-02-23 Thread Daniel Henrique Barboza
Hi, This new version has changes based on feedbacks of both v5 and v6. Patch 1 was revamped. We're modifying probe_access_flags() to accept a 'size' parameter to allow for RISC-V usage with PMP. Changes in the existing callers are trivial and no behavior change is done (well, at least it's not

[PATCH v7 1/4] tcg: add 'size' param to probe_access_flags()

2023-02-23 Thread Daniel Henrique Barboza
probe_access_flags() as it is today uses probe_access_full(), which in turn uses probe_access_internal() with size = 0. probe_access_internal() then uses the size to call the tlb_fill() callback for the given CPU. This size param ('fault_size' as probe_access_internal() calls it) is ignored by

[PATCH v7 2/4] target/riscv: implement Zicboz extension

2023-02-23 Thread Daniel Henrique Barboza
From: Christoph Muellner The RISC-V base cache management operation (CBO) ISA extension has been ratified. It defines three extensions: Cache-Block Management, Cache-Block Prefetch and Cache-Block Zero. More information about the spec can be found at [1]. Let's start by implementing the

[PATCH v7 4/4] target/riscv: add Zicbop cbo.prefetch{i, r, m} placeholder

2023-02-23 Thread Daniel Henrique Barboza
From: Christoph Muellner The cmo.prefetch instructions are nops for QEMU (no emulation of the memory hierarchy, no illegal instructions, no permission faults, no traps). Add a comment noting where they would be decoded in case cbo.prefetch instructions become relevant in the future.

Re: [PATCH v4 5/7] dump: Introduce create_win_dump()

2023-02-23 Thread Richard Henderson
On 2/23/23 13:17, Philippe Mathieu-Daudé wrote: Remove another TARGET_X86_64 #ifdef'ry by introducing a create_win_dump() stub. We'll extract it to a stub file for non-x86 targets in the next commit. Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 7 +-- 1 file changed, 5

Re: [PATCH v4 4/7] dump: Introduce win_dump_available()

2023-02-23 Thread Richard Henderson
On 2/23/23 13:17, Philippe Mathieu-Daudé wrote: @@ -2130,12 +2136,10 @@ void qmp_dump_guest_memory(bool paging, const char *file, } #endif -#ifndef TARGET_X86_64 -if (has_format && format == DUMP_GUEST_MEMORY_FORMAT_WIN_DMP) { -error_setg(errp, "Windows dump is only

Re: [PATCH v4 3/7] dump: Correct headers included

2023-02-23 Thread Richard Henderson
On 2/23/23 13:17, Philippe Mathieu-Daudé wrote: "qemu/win_dump_defs.h" is only required by win_dump.c, but win_dump.h requires "sysemu/dump.h" which declares the DumpState type. Signed-off-by: Philippe Mathieu-Daudé --- dump/win_dump.c | 1 + dump/win_dump.h | 2 +- 2 files changed, 2

Re: [PATCH v4 2/7] dump: Replace TARGET_PAGE_SIZE -> qemu_target_page_size()

2023-02-23 Thread Richard Henderson
On 2/23/23 13:17, Philippe Mathieu-Daudé wrote: TARGET_PAGE_SIZE is target specific. In preparation of making dump.c target-agnostic, replace the compile-time TARGET_PAGE_SIZE definition by runtime qemu_target_page_size(). Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 3 ++- 1 file

Re: [PATCH v4 1/7] dump: Replace tswapN() -> cpu_to_dumpN()

2023-02-23 Thread Richard Henderson
On 2/23/23 13:17, Philippe Mathieu-Daudé wrote: All uses of tswap in that file are wrong, and should be using cpu_to_dumpN, which correctly tests the endianness of the output. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 8 1 file

Re: [PATCH 2/5] hw/isa/vt82c686: Implement PCI IRQ routing

2023-02-23 Thread BALATON Zoltan
On Thu, 23 Feb 2023, BALATON Zoltan wrote: On Thu, 23 Feb 2023, Bernhard Beschow wrote: The real VIA south bridges implement a PCI IRQ router which is configured by the BIOS or the OS. In order to respect these configurations, QEMU needs to implement it as well. Note: The implementation was

Re: [RFC PATCH] target/arm: properly document FEAT_CRC32

2023-02-23 Thread Richard Henderson
On 2/23/23 13:22, Philippe Mathieu-Daudé wrote: On 24/2/23 00:01, Richard Henderson wrote: On 2/22/23 01:01, Alex Bennée wrote: This is a mandatory feature for Armv8.1 architectures but we don't state the feature clearly in our emulation list. While checking verify our cortex-a76 model matches

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

2023-02-23 Thread Jason Gunthorpe
On Thu, Feb 23, 2023 at 03:33:09PM -0700, Alex Williamson wrote: > On Thu, 23 Feb 2023 16:55:54 -0400 > Jason Gunthorpe wrote: > > > On Thu, Feb 23, 2023 at 01:06:33PM -0700, Alex Williamson wrote: > > > > #2 is the presumption that the guest is using an identity map. > > > > > > This is a

Re: [PATCH 2/5] hw/isa/vt82c686: Implement PCI IRQ routing

2023-02-23 Thread Bernhard Beschow
Am 23. Februar 2023 21:11:23 UTC schrieb BALATON Zoltan : >On Thu, 23 Feb 2023, Bernhard Beschow wrote: >> The real VIA south bridges implement a PCI IRQ router which is configured >> by the BIOS or the OS. In order to respect these configurations, QEMU >> needs to implement it as well. >> >>

Re: [PATCH v4 7/7] dump: Rename x86-specific file as win_dump_x86.c

2023-02-23 Thread Philippe Mathieu-Daudé
Oops, "win_dump-x86.c" in subject... On 24/2/23 00:17, Philippe Mathieu-Daudé wrote: win_dump.c is x86 specific. Rename it as such in case someone is willing to add win_dump-aarch64 :) Signed-off-by: Philippe Mathieu-Daudé --- dump/meson.build| 2 +- dump/{win_dump.c =>

Re: [RFC PATCH] target/arm: properly document FEAT_CRC32

2023-02-23 Thread Philippe Mathieu-Daudé
On 24/2/23 00:01, Richard Henderson wrote: On 2/22/23 01:01, Alex Bennée wrote: This is a mandatory feature for Armv8.1 architectures but we don't state the feature clearly in our emulation list. While checking verify our cortex-a76 model matches up with the current TRM by breaking out the long

Re: [PATCH v2 1/2] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-02-23 Thread Philippe Mathieu-Daudé
On 24/2/23 00:11, Ilya Leoshkevich wrote: target_rlimit64 contains uint64_t fields, so it's 8-byte aligned on some hosts, while some guests may align their respective type on a 4-byte boundary. This may lead to an unaligned access, which is an UB. Fix by defining the fields as abi_ullong. This

[PATCH v4 6/7] dump: Build once by adding stubs for non-x86 targets

2023-02-23 Thread Philippe Mathieu-Daudé
Extract non-x86 stubs to win_dump-stub.c. We can now build dump.o once for system emulation. Update meson. Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 14 -- dump/meson.build | 6 -- dump/win_dump-stub.c | 23 +++ 3 files changed, 27

[PATCH v4 2/7] dump: Replace TARGET_PAGE_SIZE -> qemu_target_page_size()

2023-02-23 Thread Philippe Mathieu-Daudé
TARGET_PAGE_SIZE is target specific. In preparation of making dump.c target-agnostic, replace the compile-time TARGET_PAGE_SIZE definition by runtime qemu_target_page_size(). Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v4 3/7] dump: Correct headers included

2023-02-23 Thread Philippe Mathieu-Daudé
"qemu/win_dump_defs.h" is only required by win_dump.c, but win_dump.h requires "sysemu/dump.h" which declares the DumpState type. Signed-off-by: Philippe Mathieu-Daudé --- dump/win_dump.c | 1 + dump/win_dump.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v4 7/7] dump: Rename x86-specific file as win_dump_x86.c

2023-02-23 Thread Philippe Mathieu-Daudé
win_dump.c is x86 specific. Rename it as such in case someone is willing to add win_dump-aarch64 :) Signed-off-by: Philippe Mathieu-Daudé --- dump/meson.build| 2 +- dump/{win_dump.c => win_dump-x86.c} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename

[PATCH v4 5/7] dump: Introduce create_win_dump()

2023-02-23 Thread Philippe Mathieu-Daudé
Remove another TARGET_X86_64 #ifdef'ry by introducing a create_win_dump() stub. We'll extract it to a stub file for non-x86 targets in the next commit. Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dump/dump.c

[PATCH v4 4/7] dump: Introduce win_dump_available()

2023-02-23 Thread Philippe Mathieu-Daudé
Remove a pair of TARGET_X86_64 #ifdef'ry by introducing the win_dump_available() method. We'll soon extract it to a stub file for non-x86 targets. Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 23 +-- dump/win_dump.c | 5 + dump/win_dump.h | 3 +++ 3

[PATCH v4 1/7] dump: Replace tswapN() -> cpu_to_dumpN()

2023-02-23 Thread Philippe Mathieu-Daudé
All uses of tswap in that file are wrong, and should be using cpu_to_dumpN, which correctly tests the endianness of the output. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- dump/dump.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v4 0/7] dump: Make most of it target agnostic (build once)

2023-02-23 Thread Philippe Mathieu-Daudé
Thanks to Richard help, we can now build dump.o once for all targets, keeping win_dump.o for x86* targets. Philippe Mathieu-Daudé (7): dump: Replace tswapN() -> cpu_to_dumpN() dump: Replace TARGET_PAGE_SIZE -> qemu_target_page_size() dump: Correct headers included dump: Introduce

Re: [PATCH v2 1/2] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-02-23 Thread Richard Henderson
On 2/23/23 13:11, Ilya Leoshkevich wrote: target_rlimit64 contains uint64_t fields, so it's 8-byte aligned on some hosts, while some guests may align their respective type on a 4-byte boundary. This may lead to an unaligned access, which is an UB. Fix by defining the fields as abi_ullong. This

[PATCH v2 2/2] tests/tcg/linux-test: Add linux-fork-trap test

2023-02-23 Thread Ilya Leoshkevich
Check that dying due to a signal does not deadlock. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/linux/linux-fork-trap.c | 51 + 1 file changed, 51 insertions(+) create mode 100644

[PATCH v2 1/2] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-02-23 Thread Ilya Leoshkevich
target_rlimit64 contains uint64_t fields, so it's 8-byte aligned on some hosts, while some guests may align their respective type on a 4-byte boundary. This may lead to an unaligned access, which is an UB. Fix by defining the fields as abi_ullong. This makes the host alignment match that of the

[PATCH v2 0/2] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-02-23 Thread Ilya Leoshkevich
v1: https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg06999.html v1 -> v2: Fix by using proper target_rlimit64 alignment (Richard). Use __get_user() and __put_user() (Philippe - if I understood the suggestion correctly). Hi, Richard reported [1] that the new

Re: [RFC PATCH] target/arm: properly document FEAT_CRC32

2023-02-23 Thread Richard Henderson
On 2/22/23 01:01, Alex Bennée wrote: This is a mandatory feature for Armv8.1 architectures but we don't state the feature clearly in our emulation list. While checking verify our cortex-a76 model matches up with the current TRM by breaking out the long form isar into a more modern readable

Re: [PULL 0/9] Fourth RISC-V PR for QEMU 8.0

2023-02-23 Thread Palmer Dabbelt
On Wed, 22 Feb 2023 07:56:10 PST (-0800), Palmer Dabbelt wrote: On Tue, 21 Feb 2023 08:43:47 PST (-0800), Peter Maydell wrote: On Fri, 17 Feb 2023 at 17:53, Palmer Dabbelt wrote: The following changes since commit 417296c8d8588f782018d01a317f88957e9786d6: tests/qtest/netdev-socket: Raise

Re: [PATCH 1/2] linux-user: Fix unaligned memory access in prlimit64 syscall

2023-02-23 Thread Ilya Leoshkevich
On Thu, 2023-02-23 at 12:31 -1000, Richard Henderson wrote: > On 2/23/23 11:58, Ilya Leoshkevich wrote: > > 32-bit guests may enforce only 4-byte alignment for > > target_rlimit64, > > whereas 64-bit hosts normally require the 8-byte one. Therefore > > accessing this struct directly is UB. > > >

  1   2   3   4   5   6   >