Re: [RFC v4 06/11] tcg: Add tcg opcodes and helpers for native library calls

2023-08-09 Thread Alex Bennée
Yeqi Fu writes: > This commit implements tcg opcodes and helpers for extracting and > invoke native functions. > > Signed-off-by: Yeqi Fu > --- > accel/tcg/tcg-runtime.h | 22 ++ > include/tcg/tcg-op-common.h | 11 +++ > include/tcg/tcg.h | 9 +++ > tcg/tcg-op.c

Re: [PATCH] vfio/pci: hide ROM BAR on SFC9220 10/40G Ethernet Controller PF

2023-08-09 Thread Alex Williamson
On Wed, 9 Aug 2023 14:07:07 +0200 Laszlo Ersek wrote: > On 8/8/23 17:40, Alex Williamson wrote: > > On Tue, 8 Aug 2023 16:59:16 +0200 > > Laszlo Ersek wrote: > > > >> The Solarflare Communications SFC9220 NIC's physical function (PF) appears > >> to expose an expansion ROM with the following

Re: [RFC v4 05/11] linux-user/elfload: Add support for parsing symbols of native libraries.

2023-08-09 Thread Alex Bennée
Richard Henderson writes: > On 8/8/23 07:17, Yeqi Fu wrote: >> This commit addresses the need to parse symbols of native libraries. >> The base address of a shared library is determined by the dynamic >> linker. To simplify the process, we focus on the last three digits, >> which reside within

Re: [RFC v4 10/11] tests/tcg/multiarch: Add nativecall.c test

2023-08-09 Thread Alex Bennée
Yeqi Fu writes: > Introduce a new test for native calls to ensure their functionality. > The process involves cross-compiling the test cases, building them > as dynamically linked binaries, and running these binaries which > necessitates the addition of the appropriate interpreter prefix. > > S

Re: [RFC v4 10/11] tests/tcg/multiarch: Add nativecall.c test

2023-08-09 Thread Alex Bennée
Yeqi Fu writes: > Introduce a new test for native calls to ensure their functionality. > The process involves cross-compiling the test cases, building them > as dynamically linked binaries, and running these binaries which > necessitates the addition of the appropriate interpreter prefix. > > S

[PULL 3/6] linux-user: Use ARRAY_SIZE with bitmask_transtbl

2023-08-09 Thread Richard Henderson
Rather than using a zero tuple to end the table, use a macro to apply ARRAY_SIZE and pass that on to the convert functions. This fixes two bugs in which the conversion functions required that both the target and host masks be non-zero in order to continue, rather than require both target and host

[PULL 0/6] linux-user late fixes

2023-08-09 Thread Richard Henderson
The following changes since commit 32e07fddc6d989dc5fdff4f9c9e47cb1f3911904: Merge tag 'pull-lu-20230808' of https://gitlab.com/rth7680/qemu into staging (2023-08-08 14:10:07 -0700) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-lu-2023080

[PULL 5/6] util/interval-tree: Check root for null in interval_tree_iter_first

2023-08-09 Thread Richard Henderson
From: Helge Deller Fix a crash in qemu-user when running cat /proc/self/maps in a chroot, where /proc isn't mounted. The problem was introduced by commit 3ce3dd8ca965 ("util/selfmap: Rewrite using qemu/interval-tree.h") where in open_self_maps_1() the function read_self_maps() is called an

[PULL 6/6] linux-user: Fix openat() emulation to correctly detect accesses to /proc

2023-08-09 Thread Richard Henderson
From: Helge Deller In qemu we catch accesses to files like /proc/cpuinfo or /proc/net/route and return to the guest contents which would be visible on a real system (instead what the host would show). This patch fixes a bug, where for example the accesses cat /proccpuinfo or cd /proc

[PULL 2/6] linux-user: Split out do_mmap

2023-08-09 Thread Richard Henderson
New function that rejects unsupported map types and flags. In 4b840f96 we should not have accepted MAP_SHARED_VALIDATE without actually validating the rest of the flags. Fixes: 4b840f96 ("linux-user: Populate more bits in mmap_flags_tbl") Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson

[PULL 1/6] qemu/osdep: Remove fallback for MAP_FIXED_NOREPLACE

2023-08-09 Thread Richard Henderson
In order for our emulation of MAP_FIXED_NOREPLACE to succeed within linux-user target_mmap, we require a non-zero value. This does not require host kernel support, merely the bit being defined. MAP_FIXED_NOREPLACE was added with glibc 2.28. From repology.org: Fedora 36: 2.35

[PULL 4/6] tests/tcg: Disable filename test for info proc mappings

2023-08-09 Thread Richard Henderson
This test fails when host page size != guest page size, because qemu may not be able to directly map the file. Fixes: a6341482695 ("tests/tcg: Add a test for info proc mappings") Acked-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tests/tcg/multiarch/gdbstub/test-proc-mappings.py |

Re: [PATCH v2 0/4] virtio-net: add USO feature (UDP segmentation offload)

2023-08-09 Thread Yuri Benditovich
ping On Tue, Aug 1, 2023 at 1:32 AM Yuri Benditovich wrote: > Starting from 6.2 the kernel supports UDP segmentation offload, it > uses GSO_UDP_L4 to mark packets with UDP sermentation request > > v1->v2: > Enable USO features by default starting from 8.1 > Move command-line parameters to the

[PULL 0/1] OpenRISC FPU Fix for 8.1

2023-08-09 Thread Stafford Horne
ll-request-20230809 for you to fetch changes up to 765fdc1e8355d4bae563b3b185c5f9d079384164: target/openrisc: Set EPCR to next PC on FPE exceptions (2023-07-31 22:01:03 +0100) OpenRISC FPU Fix for 8.1 A patch to pass the correct

[PULL 1/1] target/openrisc: Set EPCR to next PC on FPE exceptions

2023-08-09 Thread Stafford Horne
The architecture specification calls for the EPCR to be set to "Address of next not executed instruction" when there is a floating point exception (FPE). This was not being done, so fix it by using the same pattern as syscall. Also, we move this logic down to be done for instructions not in the d

Re: [PATCH] hw/pci-host: Allow extended config space access for Designware PCIe host

2023-08-09 Thread Michael S. Tsirkin
On Wed, Aug 09, 2023 at 10:22:50AM +, Jason Chien wrote: > In pcie_bus_realize(), a root bus is realized as a PCIe bus and a non-root > bus is realized as a PCIe bus if its parent bus is a PCIe bus. However, > the child bus "dw-pcie" is realized before the parent bus "pcie" which is > the root

Re: [PULL 0/2] hw/nvme: more fixes

2023-08-09 Thread Richard Henderson
On 8/9/23 06:39, Klaus Jensen wrote: From: Klaus Jensen Hi, The following changes since commit a8fc5165aab02f328ccd148aafec1e59fd1426eb: Merge tag 'nvme-next-pull-request' ofhttps://gitlab.com/birkelund/qemu into staging (2023-08-08 16:39:20 -0700) are available in the Git repository at:

Re: [PULL 0/6] linux-user late fixes

2023-08-09 Thread Richard Henderson
gitlab.com/rth7680/qemu.git tags/pull-lu-20230809 for you to fetch changes up to b8002058c45a50d893c51cf62ec96c70128fc1eb: linux-user: Fix openat() emulation to correctly detect accesses to /proc (2023-08-09 09:31:30 -0700) linux-u

Re: [PATCH] target/riscv/kvm.c: fix mvendorid size in vcpu_set_machine_ids()

2023-08-09 Thread Daniel Henrique Barboza
Drew, On 8/3/23 09:05, Andrew Jones wrote: On Thu, Aug 03, 2023 at 08:36:57AM -0300, Daniel Henrique Barboza wrote: On 8/3/23 06:29, Andrew Jones wrote: On Wed, Aug 02, 2023 at 03:00:58PM -0300, Daniel Henrique Barboza wrote: cpu->cfg.mvendorid is a 32 bit field and kvm_set_one_reg() always

[PATCH][RFC] Add crash handler for qemu-linux-user

2023-08-09 Thread Helge Deller
If there is an internal program error in qemu source code which triggers a SIGSEGV, qemu will currently assume this is a SIGSEGV of the target and print: (hppa-chroot)root@p100:/# cat /proc/self/maps ** ERROR:../../home/cvs/qemu/qemu/accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertion fa

Re: [PATCH 0/9] Use known good releases when installing in pyvenv

2023-08-09 Thread John Snow
On Wed, Aug 9, 2023 at 5:29 AM Paolo Bonzini wrote: > > This series introduce a new installation command for mkvenv.py that > retrieves the packages to be installed from a TOML file. This allows > being more flexible in using the system version of a package, while at > the same time using a known-

Re: [PATCH v4 9/9] docs/system: add basic virtio-gpu documentation

2023-08-09 Thread Gurchetan Singh
On Tue, Aug 8, 2023 at 10:18 PM Akihiko Odaki wrote: > On 2023/08/09 11:11, Gurchetan Singh wrote: > > This adds basic documentation for virtio-gpu. > > > > Suggested-by: Akihiko Odaki > > Signed-off-by: Gurchetan Singh > > --- > > v2: - Incorporated suggestions by Akihiko Odaki > > - List

Re: [PATCH v2 10/19] target/ppc: Migrate DECR SPR

2023-08-09 Thread Nicholas Piggin
On Wed Aug 9, 2023 at 10:56 PM AEST, Cédric Le Goater wrote: > Hello Nick, > > On 8/8/23 06:19, Nicholas Piggin wrote: > > TCG does not maintain the DEC reigster in the SPR array, so it does get > > migrated. TCG also needs to re-start the decrementer timer on the > > destination machine. > > > >

Re: [PULL 0/1] OpenRISC FPU Fix for 8.1

2023-08-09 Thread Richard Henderson
github.com/stffrdhrn/qemu.git tags/or1k-pull-request-20230809 for you to fetch changes up to 765fdc1e8355d4bae563b3b185c5f9d079384164: target/openrisc: Set EPCR to next PC on FPE exceptions (2023-07-31 22:01:03 +0100) OpenRISC F

Re: [PATCH][RFC] Add crash handler for qemu-linux-user

2023-08-09 Thread Richard Henderson
On 8/9/23 16:07, Helge Deller wrote: +/* did qemu source code crashed? */ +if (unlikely(!h2g_valid(host_addr))) { +qemu_show_backtrace(info); +} This won't do anything at all when reserved_va == 0, i.e. 64-bit guest on 64-bit host, or any 32-b

Re: [PATCH] hw/ppc/e500: fix broken snapshot replay

2023-08-09 Thread Nicholas Piggin
On Wed Aug 9, 2023 at 8:07 PM AEST, Maksim Kostin wrote: > ppce500_reset_device_tree is registered for system reset, but after > c4b075318eb1 this function rerandomizes rng-seed via > qemu_guest_getrandom_nofail. And when loading a snapshot, it tries to read > EVENT_RANDOM that doesn't exist, so we

[PATCH 2/5] target/arm: Reduce dcz_blocksize to uint8_t

2023-08-09 Thread Richard Henderson
This value is only 4 bits wide. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 88e5accda6..7fedbb34ba 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1074,7 +1074,8 @@

[PATCH for-8.2 0/5] target/arm: Implement cortex-a710

2023-08-09 Thread Richard Henderson
This is one of the first generation Armv9 cores, and gives us something concrete to test in that area. Notably, it supports MTE. The first patch is a bug fix of sorts for neoverse-v1, as we don't, and won't, support FEAT_TRF. The only thing missing for the a710 is FEAT_MPAM. I haven't looked at

[PATCH 1/5] target/arm: Disable FEAT_TRF in neoverse-v1

2023-08-09 Thread Richard Henderson
Self-hosted trace is out of scope for QEMU. Cc: qemu-sta...@nongnu.org Signed-off-by: Richard Henderson --- target/arm/tcg/cpu64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c index 8019f00bc3..60e5f034d9 100644 --- a/tar

[PATCH 3/5] target/arm: Allow cpu to configure GM blocksize

2023-08-09 Thread Richard Henderson
Previously we hard-coded the blocksize with GMID_EL1_BS. But the value we choose for -cpu max does not match the value that cortex-a710 uses. Mirror the way we handle dcz_blocksize. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 2 ++ target/arm/internals.h | 6

[PATCH 4/5] target/arm: Support more GM blocksizes

2023-08-09 Thread Richard Henderson
Support all of the easy GM block sizes. Use direct memory operations, since the pointers are aligned. While BS=2 (16 bytes, 1 tag) is a legal setting, that requires an atomic store of one nibble. This is not difficult, but there is also no point in supporting it until required. Note that cortex-

[PATCH 5/5] target/arm: Implement cortex-a710

2023-08-09 Thread Richard Henderson
The cortex-a710 is a first generation ARMv9.0-A processor. Signed-off-by: Richard Henderson --- docs/system/arm/virt.rst | 1 + hw/arm/virt.c| 1 + target/arm/tcg/cpu64.c | 167 +++ 3 files changed, 169 insertions(+) diff --git a/docs/system

Re: [PATCH v5 08/11] target/loongarch: Reject la64-only instructions in la32 mode

2023-08-09 Thread gaosong
在 2023/8/9 下午11:03, Richard Henderson 写道: On 8/9/23 01:26, Jiajie Chen wrote: LoongArch64-only instructions are marked with regard to the instruction manual Table 2. LSX instructions are not marked for now for lack of public manual. I would expect LSX not to be affected by CPUCFG.1.ARCH, but o

Re: [PATCH v5 08/11] target/loongarch: Reject la64-only instructions in la32 mode

2023-08-09 Thread Richard Henderson
On 8/9/23 19:38, gaosong wrote: And, I will send a patch to Check CPUCFG.2.LSX, Thanks for you suggestion. There are similar missing checks for CPUCFG.2 FP, FP_SP, FP_DP, LSPW and LAM. Also note that loongarch_la464_initfn misses setting LSPW. r~

Re: [PATCH v2 0/4] virtio-net: add USO feature (UDP segmentation offload)

2023-08-09 Thread Jason Wang
On Thu, Aug 10, 2023 at 4:21 AM Yuri Benditovich wrote: > > ping I've queued this. Thanks > > On Tue, Aug 1, 2023 at 1:32 AM Yuri Benditovich > wrote: >> >> Starting from 6.2 the kernel supports UDP segmentation offload, it >> uses GSO_UDP_L4 to mark packets with UDP sermentation request >> >

Re: [PATCH 5/5] target/arm: Implement cortex-a710

2023-08-09 Thread Richard Henderson
On 8/9/23 19:35, Richard Henderson wrote: +static const ARMCPRegInfo cortex_a710_cp_reginfo[] = { +/* TODO: trapped by HCR_EL2.TIDCP */ +{ .name = "CPUACTLR4_EL1", .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 0, .crn = 15, .crm = 1, .opc2 = 3, + .access = PL1_RW, .type = ARM

Re: [PULL 1/1] target/openrisc: Set EPCR to next PC on FPE exceptions

2023-08-09 Thread Michael Tokarev
09.08.2023 23:34, Stafford Horne пишет: The architecture specification calls for the EPCR to be set to "Address of next not executed instruction" when there is a floating point exception (FPE). This was not being done, so fix it by using the same pattern as syscall. Also, we move this logic dow

Re: [PATCH v2] migration/calc-dirty-rate: millisecond-granularity period

2023-08-09 Thread Yong Huang
On Wed, Aug 9, 2023 at 9:59 PM wrote: > On Sun, Aug 06, 2023 at 02:31:43PM +0800, Yong Huang wrote: > > On Sat, Aug 5, 2023 at 2:05 AM Markus Armbruster > wrote: > > > > > Andrei Gudkov writes: > > > > > > > Introduces alternative argument calc-time-ms, which is the > > > > the same as calc-tim

Re: [PATCH v2] migration/calc-dirty-rate: millisecond-granularity period

2023-08-09 Thread Yong Huang
On Wed, Aug 9, 2023 at 11:03 PM wrote: > On Sun, Aug 06, 2023 at 02:16:34PM +0800, Yong Huang wrote: > > On Fri, Aug 4, 2023 at 11:03 PM Andrei Gudkov > > wrote: > > > > > Introduces alternative argument calc-time-ms, which is the > > > the same as calc-time but accepts millisecond value. > > >

Re: [PATCH v4 9/9] docs/system: add basic virtio-gpu documentation

2023-08-09 Thread Akihiko Odaki
On 2023/08/10 10:11, Gurchetan Singh wrote: On Tue, Aug 8, 2023 at 10:18 PM Akihiko Odaki > wrote: On 2023/08/09 11:11, Gurchetan Singh wrote: > This adds basic documentation for virtio-gpu. > > Suggested-by: Akihiko Odaki mailto:akihiko.od..

<    1   2