[PATCH] linux-user/hppa: Detect glibc ABORT_INSTRUCTION and EXCP_BREAK handler

2022-10-27 Thread Helge Deller
The glibc on the hppa platform uses the "iitlbp %r0,(%sr0, %r0)" assembler instruction as ABORT_INSTRUCTION. If this (in userspace context) illegal assembler statement is found, dump the registers and report the failure to userspace the same way as the Linux kernel on physical hardware. For other

Re: [PATCH v4 2/4] hw/audio: fix tab indentation

2022-10-27 Thread Thomas Huth
On 25/10/2022 16.28, Amarjargal Gundjalam wrote: The TABs should be replaced with spaces, to make sure that we have a consistent coding style with an indentation of 4 spaces everywhere. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/370 Reviewed-by: Daniel P. Berrangé Signed-off-by: A

Re: [PATCH v4 3/4] hw/display: fix tab indentation

2022-10-27 Thread Thomas Huth
On 25/10/2022 16.28, Amarjargal Gundjalam wrote: The TABs should be replaced with spaces, to make sure that we have a consistent coding style with an indentation of 4 spaces everywhere. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/370 Reviewed-by: Daniel P. Berrangé Signed-off-by: A

Re: [PATCH v3 0/24] Convert nanoMIPS disassembler from C++ to C

2022-10-27 Thread Thomas Huth
On 12/09/2022 14.26, Milica Lazarevic wrote: Hi, This patchset converts the nanomips disassembler to plain C. C++ features like class, std::string type, exception handling, and function overloading have been removed and replaced with the equivalent C code. Hi Philippe, hi Stefan, as far as I

[PATCH] block/block-backend: blk_set_enable_write_cache is IO_CODE

2022-10-27 Thread Emanuele Giuseppe Esposito
blk_set_enable_write_cache() is defined as GLOBAL_STATE_CODE but can be invoked from iothreads when handling scsi requests. This triggers an assertion failure: 0x7fd6c3515ce1 in raise () from /lib/x86_64-linux-gnu/libc.so.6 0x7fd6c34ff537 in abort () from /lib/x86_64-linux-gnu/libc.so.6

[PATCH v4 0/2] vhost-vdpa: add support for vIOMMU

2022-10-27 Thread Cindy Lu
These patches are to support vIOMMU in vdpa device changes in V3 1. Move function vfio_get_xlat_addr to memory.c 2. Use the existing memory listener, while the MR is iommu MR then call the function iommu_region_add/ iommu_region_del changes in V4 1.make the comments in vfio_get_xlat_addr more gen

[PATCH v4 2/2] vhost-vdpa: add support for vIOMMU

2022-10-27 Thread Cindy Lu
Add support for vIOMMU. add the new function to deal with iommu MR. - during iommu_region_add register a specific IOMMU notifier, and store all notifiers in a list. - during iommu_region_del, compare and delete the IOMMU notifier from the list Verified in vp_vdpa and vdpa_sim_net driver Signed-o

[PATCH v4 1/2] vfio: move the function vfio_get_xlat_addr() to memory.c

2022-10-27 Thread Cindy Lu
Move the function vfio_get_xlat_addr to softmmu/memory.c, and change the name to memory_get_xlat_addr().So we can use this function in other devices,such as vDPA device. Signed-off-by: Cindy Lu --- hw/vfio/common.c | 92 ++- include/exec/memory.h | 4

Re: [PATCH] avocado: use sha1 for fc31 imgs to avoid first time re-download

2022-10-27 Thread Thomas Huth
On 24/10/2022 11.02, Daniel P. Berrangé wrote: On Sat, Oct 22, 2022 at 02:03:50PM -0300, Daniel Henrique Barboza wrote: 'make check-avocado' will download any images that aren't present in the cache via 'get-vm-images' in tests/Makefile.include. The target that downloads fedora 31 images, get-vm

Re: Crash in RTC

2022-10-27 Thread Konstantin Kostiuk
ping On Wed, Aug 31, 2022 at 11:33 AM Vadim Rozenfeld wrote: > Just a bit more info related to this issue. > Below is a quote from my previous conversation with Yan > > > QEMU RTC function periodic_timer_update is calling in response > to Windows HAL calls > _HalpRtcArmTimer@16 > and > _HalpRtc

[PATCH V4 0/4] PASID support for Intel IOMMU

2022-10-27 Thread Jason Wang
Hi All: This series tries to introduce PASID support for Intel IOMMU. The work is based on the previous scalabe mode support by implement the ECAP_PASID. A new "x-pasid-mode" is introduced to enable this mode. All internal vIOMMU codes were extended to support PASID instead of the current RID2PASI

[PATCH V4 2/4] intel-iommu: drop VTDBus

2022-10-27 Thread Jason Wang
We introduce VTDBus structure as an intermediate step for searching the address space. This works well with SID based matching/lookup. But when we want to support SID plus PASID based address space lookup, this intermediate steps turns out to be a burden. So the patch simply drops the VTDBus struct

[PATCH V4 1/4] intel-iommu: don't warn guest errors when getting rid2pasid entry

2022-10-27 Thread Jason Wang
We use to warn on wrong rid2pasid entry. But this error could be triggered by the guest and could happens during initialization. So let's don't warn in this case. Signed-off-by: Jason Wang --- hw/i386/intel_iommu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/i386

[PATCH V4 4/4] intel-iommu: PASID support

2022-10-27 Thread Jason Wang
This patch introduce ECAP_PASID via "x-pasid-mode". Based on the existing support for scalable mode, we need to implement the following missing parts: 1) tag VTDAddressSpace with PASID and support IOMMU/DMA translation with PASID 2) tag IOTLB with PASID 3) PASID cache and its flush 4) PASID bas

[PATCH V4 3/4] intel-iommu: convert VTD_PE_GET_FPD_ERR() to be a function

2022-10-27 Thread Jason Wang
We used to have a macro for VTD_PE_GET_FPD_ERR() but it has an internal goto which prevents it from being reused. This patch convert that macro to a dedicated function and let the caller to decide what to do (e.g using goto or not). This makes sure it can be re-used for other function that requires

Re: [PATCH 5/7] block/nfs: Fix 32-bit Windows build

2022-10-27 Thread Kevin Wolf
Am 27.10.2022 um 04:45 hat Bin Meng geschrieben: > Hi Kevin, > [...] > Will you queue this patch via the block tree? Just to be sure, you mean only patch 5? Yes, I can do that. Kevin

Re: [PATCH v10 1/9] s390x/cpu topology: core_id sets s390x CPU topology

2022-10-27 Thread Thomas Huth
On 24/10/2022 21.25, Janis Schoetterl-Glausch wrote: On Wed, 2022-10-12 at 18:20 +0200, Pierre Morel wrote: In the S390x CPU topology the core_id specifies the CPU address and the position of the core withing the topology. Let's build the topology based on the core_id. s390x/cpu topology: core_

Re: [PATCH v1 10/12] hw/arm: introduce xenpv machine

2022-10-27 Thread Alex Bennée
Vikram Garhwal writes: > Optional: When CONFIG_TPM is enabled, it also creates a tpm-tis-device, adds a > TPM emulator and connects to swtpm running on host machine via chardev socket > and support TPM functionalities for a guest domain. > > Extra command line for aarch64 xenpv QEMU to connect

Re: [PATCH v4 2/2] vhost-vdpa: add support for vIOMMU

2022-10-27 Thread Jason Wang
On Thu, Oct 27, 2022 at 3:41 PM Cindy Lu wrote: > > Add support for vIOMMU. add the new function to deal with iommu MR. > - during iommu_region_add register a specific IOMMU notifier, > and store all notifiers in a list. > - during iommu_region_del, compare and delete the IOMMU notifier from the

Re: [PATCH v4 1/2] vfio: move the function vfio_get_xlat_addr() to memory.c

2022-10-27 Thread Jason Wang
On Thu, Oct 27, 2022 at 3:41 PM Cindy Lu wrote: > > Move the function vfio_get_xlat_addr to softmmu/memory.c, and > change the name to memory_get_xlat_addr().So we can use this > function in other devices,such as vDPA device. > > Signed-off-by: Cindy Lu Acked-by: Jason Wang > --- > hw/vfio/co

Re: [PATCH v10 2/9] s390x/cpu topology: reporting the CPU topology to the guest

2022-10-27 Thread Thomas Huth
On 12/10/2022 18.21, Pierre Morel wrote: The guest can use the STSI instruction to get a buffer filled with the CPU topology description. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel --- include/hw/s390x/cpu-topology.h | 3 +

Re: [PATCH v10 3/9] s390x/cpu_topology: resetting the Topology-Change-Report

2022-10-27 Thread Thomas Huth
On 12/10/2022 18.21, Pierre Morel wrote: During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Nico Boehr Revie

Re: [PATCH 5/7] block/nfs: Fix 32-bit Windows build

2022-10-27 Thread Bin Meng
On Thu, Oct 27, 2022 at 3:55 PM Kevin Wolf wrote: > > Am 27.10.2022 um 04:45 hat Bin Meng geschrieben: > > Hi Kevin, > > [...] > > Will you queue this patch via the block tree? > > Just to be sure, you mean only patch 5? Yes, I can do that. > Yes, only this one. Thank you. Regards, Bin

Re: [PATCH v5 00/13] Instantiate VT82xx functions in host device

2022-10-27 Thread Bernhard Beschow
Am 16. September 2022 14:36:05 UTC schrieb "Philippe Mathieu-Daudé" : >On 12/9/22 21:50, Bernhard Beschow wrote: >> Am 1. September 2022 11:41:14 UTC schrieb Bernhard Beschow >> : > >>> Testing done: >>> >>> * `qemu-system-ppc -machine pegasos2 -rtc base=localtime -device >>> ati-vga,guest_hwcu

Re: [PATCH v1 0/3] target/riscv: Apply KVM policy to ISA extensions

2022-10-27 Thread Andrew Jones
On Thu, Oct 27, 2022 at 7:52 AM Mayuresh Chitale wrote: > > Currently the single and multi letter ISA extensions exposed to the guest > vcpu don't confirm to the KVM policies. This patchset updates the kvm headers > and applies policies set in KVM to the extensions exposed to the guest. > > Mayure

Re: [PATCH v1 00/12] Introduce xenpv machine for arm architecture

2022-10-27 Thread Alex Bennée
Vikram Garhwal writes: > Hi, > This series add xenpv machine for aarch64. Motivation behind creating xenpv > machine with IOREQ and TPM was to enable each guest on Xen aarch64 to have > it's > own unique and emulated TPM. > > This series does following: > 1. Moved common xen functionalitie

Re: [PATCH v1 10/12] hw/arm: introduce xenpv machine

2022-10-27 Thread Alex Bennée
Julien Grall writes: > Hi, > > There seem to be some missing patches on xen-devel (including the > cover letter). Is that expected? > > On 15/10/2022 06:07, Vikram Garhwal wrote: >> Add a new machine xenpv which creates a IOREQ server to register/connect with >> Xen Hypervisor. > > I don't like

Re: [PATCH v1 10/12] hw/arm: introduce xenpv machine

2022-10-27 Thread Alex Bennée
Vikram Garhwal writes: > Add a new machine xenpv which creates a IOREQ server to register/connect with > Xen Hypervisor. > > Optional: When CONFIG_TPM is enabled, it also creates a tpm-tis-device, adds a > TPM emulator and connects to swtpm running on host machine via chardev socket > and supp

Re: [PATCH v1 08/12] hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure

2022-10-27 Thread Alex Bennée
Vikram Garhwal writes: > From: Stefano Stabellini > > On ARM it is possible to have a functioning xenpv machine with only the > PV backends and no IOREQ server. If the IOREQ server creation fails continue > to the PV backends initialization. > > Signed-off-by: Stefano Stabellini > --- > hw/x

Re: [PATCH v1 04/12] hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState

2022-10-27 Thread Alex Bennée
Vikram Garhwal writes: > From: Stefano Stabellini > > In preparation to moving most of xen-hvm code to an arch-neutral location, > move: > - shared_vmport_page > - log_for_dirtybit > - dirty_bitmap > - suspend > - wakeup > > out of XenIOState struct as these are only used on x86, especially t

Re: [PATCH] avocado: use sha1 for fc31 imgs to avoid first time re-download

2022-10-27 Thread Daniel P . Berrangé
On Thu, Oct 27, 2022 at 09:46:29AM +0200, Thomas Huth wrote: > On 24/10/2022 11.02, Daniel P. Berrangé wrote: > > On Sat, Oct 22, 2022 at 02:03:50PM -0300, Daniel Henrique Barboza wrote: > > > 'make check-avocado' will download any images that aren't present in the > > > cache via 'get-vm-images' i

Re: [PATCH v3 0/7] hostmem: NUMA-aware memory preallocation using ThreadContext

2022-10-27 Thread David Hildenbrand
On 14.10.22 15:47, David Hildenbrand wrote: This is a follow-up on "util: NUMA aware memory preallocation" [1] by Michal. Setting the CPU affinity of threads from inside QEMU usually isn't easily possible, because we don't want QEMU -- once started and running guest code -- to be able to mess up

Re: [PATCH v1 05/12] hw/i386/xen/xen-hvm: create arch_handle_ioreq and arch_xen_set_memory

2022-10-27 Thread Alex Bennée
Vikram Garhwal writes: > From: Stefano Stabellini > > In preparation to moving most of xen-hvm code to an arch-neutral location, > move the x86-specific portion of xen_set_memory to arch_xen_set_memory. > > Also move handle_vmport_ioreq to arch_handle_ioreq. > > NOTE: This patch breaks the bui

Re: [PATCH v10 1/9] s390x/cpu topology: core_id sets s390x CPU topology

2022-10-27 Thread Janis Schoetterl-Glausch
On Thu, 2022-10-27 at 10:05 +0200, Thomas Huth wrote: > On 24/10/2022 21.25, Janis Schoetterl-Glausch wrote: > > On Wed, 2022-10-12 at 18:20 +0200, Pierre Morel wrote: > > > In the S390x CPU topology the core_id specifies the CPU address > > > and the position of the core withing the topology. > >

Re: [PATCH v1 11/12] meson.build: enable xenpv machine build for ARM

2022-10-27 Thread Alex Bennée
Vikram Garhwal writes: > Add CONFIG_XEN for aarch64 device to support build for ARM targets. So to be clear a --enable-xen only build for any of these binaries essentially ends up being the same thing just with a slightly less discombobulating name? Maybe given there is no real architecture s

Re: [PATCH v10 3/9] s390x/cpu_topology: resetting the Topology-Change-Report

2022-10-27 Thread Pierre Morel
On 10/27/22 10:14, Thomas Huth wrote: On 12/10/2022 18.21, Pierre Morel wrote: During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR)   bit of the SCA in the case of a subsystem reset. Signed-off-by: Pi

Re: [PATCH v1 12/12] meson.build: do not set have_xen_pci_passthrough for aarch64 targets

2022-10-27 Thread Alex Bennée
Vikram Garhwal writes: > From: Stefano Stabellini > > have_xen_pci_passthrough is only used for Xen x86 VMs. > > Signed-off-by: Stefano Stabellini I think this might want to before 11/12. Anyway: Reviewed-by: Alex Bennée > --- > meson.build | 2 ++ > 1 file changed, 2 insertions(+) > > d

Re: [PATCH] target/arm: Fixed Privileged Access Never (PAN) for aarch32

2022-10-27 Thread Timofey Kutergin
Hi Peter, > V8 always implies V7, so we only need to check V7 here. >From silicon perspective - yes, but as I see in qemu, ARM_FEATURE_V7 and ARM_FEATURE_V8 are independent bits which do not affect each other in arm_feature() and set_feature() so they should be tested separately. Did I miss somethi

Re: [PATCH v1 09/12] accel/xen/xen-all: export xenstore_record_dm_state

2022-10-27 Thread Alex Bennée
Vikram Garhwal writes: > xenstore_record_dm_state() will also be used in aarch64 xenpv machine. > > Signed-off-by: Vikram Garhwal > Signed-off-by: Stefano Stabellini > --- > accel/xen/xen-all.c | 2 +- > include/hw/xen/xen.h | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff

Re: [PATCH v1 00/12] Introduce xenpv machine for arm architecture

2022-10-27 Thread Alex Bennée
Vikram Garhwal writes: > Hi, > This series add xenpv machine for aarch64. Motivation behind creating xenpv > machine with IOREQ and TPM was to enable each guest on Xen aarch64 to have > it's > own unique and emulated TPM. > > This series does following: > 1. Moved common xen functionalitie

Re: [PATCH] target/arm: Fixed Privileged Access Never (PAN) for aarch32

2022-10-27 Thread Peter Maydell
On Thu, 27 Oct 2022 at 10:22, Timofey Kutergin wrote: > > V8 always implies V7, so we only need to check V7 here. > From silicon perspective - yes, but as I see in qemu, > ARM_FEATURE_V7 and ARM_FEATURE_V8 are independent bits which do not affect > each > other in arm_feature() and set_feature()

Re: [PATCH v5 00/13] Instantiate VT82xx functions in host device

2022-10-27 Thread Daniel Henrique Barboza
On 10/27/22 05:21, Bernhard Beschow wrote: Am 16. September 2022 14:36:05 UTC schrieb "Philippe Mathieu-Daudé" : On 12/9/22 21:50, Bernhard Beschow wrote: Am 1. September 2022 11:41:14 UTC schrieb Bernhard Beschow : Testing done: * `qemu-system-ppc -machine pegasos2 -rtc base=localtime

Re: [PATCH] target/hppa: Fix fid instruction emulation

2022-10-27 Thread Richard Henderson
On 10/27/22 16:31, Helge Deller wrote: The fid instruction (Floating-Point Identify) puts the FPU model and revision into the Status Register. Since those values shouldn't be 0, store values there which a PCX-L2 (for 32-bit) or a PCX-W2 (for 64-bit) would return. Signed-off-by: Helge Deller di

Re: [PATCH v10 3/9] s390x/cpu_topology: resetting the Topology-Change-Report

2022-10-27 Thread Cédric Le Goater
On 10/27/22 11:11, Pierre Morel wrote: On 10/27/22 10:14, Thomas Huth wrote: On 12/10/2022 18.21, Pierre Morel wrote: During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR)   bit of the SCA in the case o

[PATCH v3 1/8] hmat acpi: Don't require initiator value in -numa

2022-10-27 Thread Hesham Almatary via
From: Brice Goglin The "Memory Proximity Domain Attributes" structure of the ACPI HMAT has a "Processor Proximity Domain Valid" flag that is currently always set because Qemu -numa requires an initiator=X value when hmat=on. Unsetting this flag allows to create more complex memory topologies by h

[PATCH v3 3/8] tests: acpi: q35: add test for hmat nodes without initiators

2022-10-27 Thread Hesham Almatary via
From: Brice Goglin expected HMAT: [000h 4]Signature : "HMAT"[Heterogeneous Memory Attributes Table] [004h 0004 4] Table Length : 0120 [008h 0008 1] Revision : 02 [009h 0009 1] Checksum : 4F [00Ah 00

[PATCH v3 0/8] AArch64/HMAT support and tests

2022-10-27 Thread Hesham Almatary via
This patchset adds support for AArch64/HMAT including a test. It relies on other two patch sets from: Brice Goglin: to support -numa without initiators on q35/x86. https://lore.kernel.org/all/ed23accb-2c8b-90f4-a7a3-f81cc57bf...@inria.fr/ Xiang Chen: to enable/support HMAT on AArch64. https:/

[PATCH v2 3/6] target/openrisc: Always exit after mtspr npc

2022-10-27 Thread Richard Henderson
We have called cpu_restore_state asserting will_exit. Do not go back on that promise. This affects icount. Signed-off-by: Richard Henderson --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_hel

[PATCH v2 6/6] accel/tcg: Remove reset_icount argument from cpu_restore_state_from_tb

2022-10-27 Thread Richard Henderson
The value passed is always true. Reviewed-by: Claudio Fontana Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 2 +- accel/tcg/tb-maint.c | 4 ++-- accel/tcg/translate-all.c | 15 +++ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/accel/tcg/i

[PATCH v2 1/6] accel/tcg: Introduce cpu_unwind_state_data

2022-10-27 Thread Richard Henderson
Add a way to examine the unwind data without actually restoring the data back into env. Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 4 +-- include/exec/exec-all.h | 21 --- accel/tcg/translate-all.c | 74 ++- 3 files changed, 68

[PATCH v2 5/6] accel/tcg: Remove will_exit argument from cpu_restore_state

2022-10-27 Thread Richard Henderson
The value passed is always true, and if the target's synchronize_from_tb hook is non-trivial, not exiting may be erroneous. Reviewed-by: Claudio Fontana Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 5 + accel/tcg/cpu-exec-common.c | 2 +- accel/tcg/tr

[PATCH v2 0/6] tcg: Fix x86 TARGET_TB_PCREL (#1269)

2022-10-27 Thread Richard Henderson
As per #1269, this affects NetBSD installer boot. The problem is that one of the x86 acpi callbacks modifies env->eip during an mmio store, which means that the tracking that translate.c does is thrown out of whack. Introduce a method to extract unwind data without the writeback to env. This isn

[PATCH v3 6/8] hw/arm/virt: Enable HMAT on arm virt machine

2022-10-27 Thread Hesham Almatary via
From: Xiang Chen Since the patchset ("Build ACPI Heterogeneous Memory Attribute Table (HMAT)"), HMAT is supported, but only x86 is enabled. Enable HMAT on arm virt machine. Signed-off-by: Xiang Chen Signed-off-by: Hesham Almatary Reviewed-by: Igor Mammedov --- hw/arm/Kconfig | 1 +

[PATCH v3 8/8] tests: virt: Update expected *.acpihmatvirt tables

2022-10-27 Thread Hesham Almatary via
* Expected ACPI Data Table [HMAT] [000h 4]Signature : "HMAT"[Heterogeneous Memory Attributes Table] [004h 0004 4] Table Length : 0120 [008h 0008 1] Revision : 02 [009h 0009 1] Checksum : 4F [00Ah 0010

[PATCH v2 2/6] target/i386: Use cpu_unwind_state_data for tpr access

2022-10-27 Thread Richard Henderson
Avoid cpu_restore_state, and modifying env->eip out from underneath the translator with TARGET_TB_PCREL. There is some slight duplication from x86_restore_state_to_opc, but it's just a few lines. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1269 Signed-off-by: Richard Henderson --- t

[PATCH v3 4/8] tests: acpi: q35: update expected blobs *.hmat-noinitiators expected HMAT:

2022-10-27 Thread Hesham Almatary via
From: Brice Goglin [000h 4]Signature : "HMAT"[Heterogeneous Memory Attributes Table] [004h 0004 4] Table Length : 0120 [008h 0008 1] Revision : 02 [009h 0009 1] Checksum : 4F [00Ah 0010 6]

[PATCH v3 2/8] tests: acpi: add and whitelist *.hmat-noinitiator expected blobs

2022-10-27 Thread Hesham Almatary via
From: Brice Goglin .. which will be used by follow up hmat-noinitiator test-case. Signed-off-by: Brice Goglin Signed-off-by: Hesham Almatary --- tests/data/acpi/q35/APIC.acpihmat-noinitiator | 0 tests/data/acpi/q35/DSDT.acpihmat-noinitiator | 0 tests/data/acpi/q35/HMAT.acpihmat-noinitiator

[PATCH v3 5/8] tests: Add HMAT AArch64/virt empty table files

2022-10-27 Thread Hesham Almatary via
Signed-off-by: Hesham Almatary --- tests/data/acpi/virt/APIC.acpihmatvirt | 0 tests/data/acpi/virt/DSDT.acpihmatvirt | 0 tests/data/acpi/virt/HMAT.acpihmatvirt | 0 tests/data/acpi/virt/PPTT.acpihmatvirt | 0 tests/data/acpi/virt/SRAT.acpihmatvirt | 0 tests/qtest/bios-

[PATCH v2 4/6] target/openrisc: Use cpu_unwind_state_data for mfspr

2022-10-27 Thread Richard Henderson
Since we do not plan to exit, use cpu_unwind_state_data and extract exactly the data requested. Signed-off-by: Richard Henderson --- target/openrisc/sys_helper.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_hel

[PATCH v3 7/8] tests: acpi: aarch64/virt: add a test for hmat nodes with no initiators

2022-10-27 Thread Hesham Almatary via
This patch imitates the "tests: acpi: q35: add test for hmat nodes without initiators" commit to test numa nodes with different HMAT attributes, but on AArch64/virt. Tested with: qemu-system-aarch64 -accel tcg \ -machine virt,hmat=on,gic-version=3 -cpu cortex-a57 \ -bios qemu-efi-aarch64/QEMU_EFI

Re: [PATCH v10 7/9] s390x/cpu topology: add max_threads machine class attribute

2022-10-27 Thread Cédric Le Goater
Hello Pierre, On 10/12/22 18:21, Pierre Morel wrote: The S390 CPU topology accepts the smp.threads argument while in reality it does not effectively allow multthreading. Let's keep this behavior for machines older than 7.3 and refuse to use threads in newer machines until multithreading is real

Re: [PATCH] target/hppa: Fix fid instruction emulation

2022-10-27 Thread Helge Deller
On 10/27/22 11:48, Richard Henderson wrote: On 10/27/22 16:31, Helge Deller wrote: The fid instruction (Floating-Point Identify) puts the FPU model and revision into the Status Register. Since those values shouldn't be 0, store values there which a PCX-L2 (for 32-bit) or a PCX-W2 (for 64-bit) wo

[PATCH] vl: change PID file path resolve error to warning

2022-10-27 Thread Fiona Ebner
Commit 85c4bf8aa6 ("vl: Unlink absolute PID file path") made it a critical error when the PID file path cannot be resolved. Before this commit, it was possible to invoke QEMU when the PID file was a file created with mkstemp that was already unlinked at the time of the invocation. There might be ot

Re: [PATCH 3/3] vdpa: Expose VIRTIO_NET_F_STATUS unconditionally

2022-10-27 Thread Eugenio Perez Martin
On Thu, Oct 27, 2022 at 8:54 AM Jason Wang wrote: > > On Thu, Oct 27, 2022 at 2:47 PM Eugenio Perez Martin > wrote: > > > > On Thu, Oct 27, 2022 at 6:32 AM Jason Wang wrote: > > > > > > > > > 在 2022/10/26 17:53, Eugenio Pérez 写道: > > > > Now that qemu can handle and emulate it if the vdpa backen

Re: [PATCH 22/24] accel/tcg: Use interval tree for user-only page tracking

2022-10-27 Thread Richard Henderson
On 10/26/22 23:36, Alex Bennée wrote: Richard Henderson writes: Finish weaning user-only away from PageDesc. Using an interval tree to track page permissions means that we can represent very large regions efficiently. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/290 Resolves: htt

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

2022-10-27 Thread Fuad Tabba
Hi, On Tue, Oct 25, 2022 at 4:18 PM Chao Peng wrote: > > From: "Kirill A. Shutemov" > > Introduce 'memfd_restricted' system call with the ability to create > memory areas that are restricted from userspace access through ordinary > MMU operations (e.g. read/write/mmap). The memory content is ex

Re: [PATCH v3 2/2] qtests/arm: add some mte tests

2022-10-27 Thread Cornelia Huck
On Thu, Oct 27 2022, Thomas Huth wrote: > On 26/10/2022 18.05, Cornelia Huck wrote: >> +qtest_add_data_func("/arm/max/query-cpu-model-expansion/tag-memory", >> +NULL, mte_tests_tag_memory_on); > > Is it already possible to compile qemu-system-aarch64 with --dis

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-10-27 Thread Fuad Tabba
Hi, On Tue, Oct 25, 2022 at 4:19 PM Chao Peng wrote: > > This new KVM exit allows userspace to handle memory-related errors. It > indicates an error happens in KVM at guest memory range [gpa, gpa+size). > The flags includes additional information for userspace to handle the > error. Currently bit

[PATCH] target/i386: Expand eflags updates inline

2022-10-27 Thread Richard Henderson
The helpers for reset_rf, cli, sti, clac, stac are completely trivial; implement them inline. Drop some nearby #if 0 code. Signed-off-by: Richard Henderson --- target/i386/helper.h| 5 - target/i386/tcg/cc_helper.c | 41 - target/i386/tcg/transla

Re: [PATCH v9 2/8] KVM: Extend the memslot to support fd-based private memory

2022-10-27 Thread Fuad Tabba
On Tue, Oct 25, 2022 at 4:18 PM Chao Peng wrote: > > In memory encryption usage, guest memory may be encrypted with special > key and can be accessed only by the guest itself. We call such memory > private memory. It's valueless and sometimes can cause problem to allow > userspace to access guest

Re: [PATCH v9 4/8] KVM: Use gfn instead of hva for mmu_notifier_retry

2022-10-27 Thread Fuad Tabba
Hi, On Tue, Oct 25, 2022 at 4:19 PM Chao Peng wrote: > > Currently in mmu_notifier validate path, hva range is recorded and then > checked against in the mmu_notifier_retry_hva() of the page fault path. > However, for the to be introduced private memory, a page fault may not > have a hva associat

Re: [PATCH v9 8/8] KVM: Enable and expose KVM_MEM_PRIVATE

2022-10-27 Thread Fuad Tabba
Hi, On Tue, Oct 25, 2022 at 4:20 PM Chao Peng wrote: > > Expose KVM_MEM_PRIVATE and memslot fields restricted_fd/offset to > userspace. KVM register/unregister private memslot to fd-based > memory backing store and responses to invalidation event from > restrictedmem_notifier to zap the existing

Re: [PATCH v9 5/8] KVM: Register/unregister the guest private memory regions

2022-10-27 Thread Fuad Tabba
Hi, On Tue, Oct 25, 2022 at 4:19 PM Chao Peng wrote: > > Introduce generic private memory register/unregister by reusing existing > SEV ioctls KVM_MEMORY_ENCRYPT_{UN,}REG_REGION. It differs from SEV case > by treating address in the region as gpa instead of hva. Which cases > should these ioctls

Re: [PATCH v4 0/3] MIPS Bootloader helper

2022-10-27 Thread Jiaxun Yang
> 2022年10月26日 20:18,Philippe Mathieu-Daudé 写道: > > This is a respin of Jiaxun v3 [1] addressing the semihosting review > comment [2]. > > [1] > https://lore.kernel.org/qemu-devel/20210127065424.114125-1-jiaxun.y...@flygoat.com/ > [2] > https://lore.kernel.org/qemu-devel/5a22bbe1-5023-6fc3-a

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

2022-10-27 Thread Peter Maydell
On Wed, 26 Oct 2022 at 15:52, Stefan Hajnoczi wrote: > > On Tue, 25 Oct 2022 at 12:51, Peter Maydell wrote: > > target-arm queue: > > * Implement FEAT_E0PD > > * Implement FEAT_HAFDBS > > A second CI failure: > libqemu-aarch64-softmmu.fa.p/target_arm_ptw.c.o -MF > libqemu-aarch64-softmmu.fa.p/

Re: [PATCH 4/9] target/s390x: Use Int128 for return from CKSM

2022-10-27 Thread Ilya Leoshkevich
On Fri, Oct 21, 2022 at 05:30:01PM +1000, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > target/s390x/helper.h | 2 +- > target/s390x/tcg/mem_helper.c | 7 +++ > target/s390x/tcg/translate.c | 6 -- > 3 files changed, 8 insertions(+), 7 deletions(-) Acked-by

Re: [PATCH 5/9] target/s390x: Use Int128 for return from TRE

2022-10-27 Thread Ilya Leoshkevich
On Fri, Oct 21, 2022 at 05:30:02PM +1000, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > target/s390x/helper.h | 2 +- > target/s390x/tcg/mem_helper.c | 7 +++ > target/s390x/tcg/translate.c | 7 +-- > 3 files changed, 9 insertions(+), 7 deletions(-) Acked-b

Re: [PATCH v2 1/6] accel/tcg: Introduce cpu_unwind_state_data

2022-10-27 Thread Claudio Fontana
On 10/27/22 12:02, Richard Henderson wrote: > Add a way to examine the unwind data without actually > restoring the data back into env. > > Signed-off-by: Richard Henderson > --- > accel/tcg/internal.h | 4 +-- > include/exec/exec-all.h | 21 --- > accel/tcg/translate-all.c | 74

Re: [PATCH] target/arm: Fixed Privileged Access Never (PAN) for aarch32

2022-10-27 Thread Timofey Kutergin
Understood, thank you a lot :) Best regards Timofey On Thu, Oct 27, 2022 at 12:35 PM Peter Maydell wrote: > On Thu, 27 Oct 2022 at 10:22, Timofey Kutergin > wrote: > > > V8 always implies V7, so we only need to check V7 here. > > > From silicon perspective - yes, but as I see in qemu, > > ARM

Re: [PATCH v2 0/2] linux-user: handle /proc/self/exe with execve() syscall

2022-10-27 Thread Michael Tokarev
27.10.2022 09:40, Laurent Vivier wrote: .. I tried O_CLOEXEC, but it seems the fd is closed before it is needed by execveat() to re-spawn the process, so it exits with an error (something like EBADF) It works here for me with a simple test program: #include #include #include #include #defi

Re: [PATCH v2 3/6] target/openrisc: Always exit after mtspr npc

2022-10-27 Thread Philippe Mathieu-Daudé
On 27/10/22 12:02, Richard Henderson wrote: We have called cpu_restore_state asserting will_exit. Do not go back on that promise. This affects icount. Signed-off-by: Richard Henderson --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Phili

Re: [PATCH 3/4] meson: enforce a minimum Linux kernel headers version >= 4.18

2022-10-27 Thread Daniel P . Berrangé
On Tue, Oct 04, 2022 at 10:32:05AM +0100, Daniel P. Berrangé wrote: > Various areas of QEMU have a dependency on Linux kernel header > definitions. This falls under the scope of our supported platforms > matrix, but historically we've not checked for a minimum kernel > headers version. This has mad

Re: [PATCH] net: improve error message for missing netdev backend

2022-10-27 Thread Daniel P . Berrangé
ping: Jason, are you willing to queue this since it has two positive reviews. On Mon, Oct 03, 2022 at 11:06:12AM +0100, Daniel P. Berrangé wrote: > The current message when using '-net user...' with SLIRP disabled at > compile time is: > > qemu-system-x86_64: -net user: Parameter 'type' expects

Re: [PATCH 6/9] target/s390x: Copy wout_x1 to wout_x1_P

2022-10-27 Thread Ilya Leoshkevich
On Fri, Oct 21, 2022 at 05:30:03PM +1000, Richard Henderson wrote: > Make a copy of wout_x1 before modifying it, as wout_x1_P > emphasizing that it operates on the out/out2 pair. The insns > that use x1_P are data movement that will not change to Int128. > > Signed-off-by: Richard Henderson > --

Re: [PATCH v3 0/24] Convert nanoMIPS disassembler from C++ to C

2022-10-27 Thread Philippe Mathieu-Daudé
On 27/10/22 09:25, Thomas Huth wrote: On 12/09/2022 14.26, Milica Lazarevic wrote: Hi, This patchset converts the nanomips disassembler to plain C. C++ features like class, std::string type, exception handling, and function overloading have been removed and replaced with the equivalent C code

Re: [PATCH 0/4 v3] Multi-Region and Volatile Memory support for CXL Type-3 Devices

2022-10-27 Thread Jonathan Cameron via
On Wed, 26 Oct 2022 16:47:18 -0400 Gregory Price wrote: > On Wed, Oct 26, 2022 at 08:13:24PM +, Adam Manzanares wrote: > > On Tue, Oct 25, 2022 at 08:47:33PM -0400, Gregory Price wrote: > > > Submitted as an extention to the multi-feature branch maintained > > > by Jonathan Cameron at: > >

Re: [PATCH 7/9] tests/tcg/s390x: Add long-double.c

2022-10-27 Thread Ilya Leoshkevich
On Fri, Oct 21, 2022 at 05:30:04PM +1000, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tests/tcg/s390x/long-double.c | 24 > tests/tcg/s390x/Makefile.target | 1 + > 2 files changed, 25 insertions(+) > create mode 100644 tests/tcg/s390x/long-dou

[PATCH v2 2/7] accel/tcg: Use interval tree for TBs in user-only mode

2022-10-27 Thread Richard Henderson
Begin weaning user-only away from PageDesc. Since, for user-only, all TB (and page) manipulation is done with a single mutex, and there is no virtual/physical discontinuity to split a TB across discontinuous pages, place all of the TBs into a single IntervalTree. This makes it trivial to find all

Re: [PATCH v10 3/9] s390x/cpu_topology: resetting the Topology-Change-Report

2022-10-27 Thread Pierre Morel
On 10/27/22 11:58, Cédric Le Goater wrote: On 10/27/22 11:11, Pierre Morel wrote: On 10/27/22 10:14, Thomas Huth wrote: On 12/10/2022 18.21, Pierre Morel wrote: During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Chan

[PATCH v2 3/7] accel/tcg: Use interval tree for TARGET_PAGE_DATA_SIZE

2022-10-27 Thread Richard Henderson
Continue weaning user-only away from PageDesc. Use an interval tree to record target data. Chunk the data, to minimize allocation overhead. Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 1 - accel/tcg/user-exec.c | 99 --- 2 files changed,

Re: [PATCH v10 2/9] s390x/cpu topology: reporting the CPU topology to the guest

2022-10-27 Thread Pierre Morel
On 10/27/22 10:12, Thomas Huth wrote: On 12/10/2022 18.21, Pierre Morel wrote: The guest can use the STSI instruction to get a buffer filled with the CPU topology description. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel ---  

Re: [PATCH 8/9] target/s390x: Use Int128 for returning float128

2022-10-27 Thread Ilya Leoshkevich
On Fri, Oct 21, 2022 at 05:30:05PM +1000, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > target/s390x/helper.h | 22 +++ > target/s390x/tcg/fpu_helper.c | 29 ++-- > target/s390x/tcg/translate.c | 49 +++--- >

[PATCH] target/arm: Fixed Privileged Access Never (PAN) for aarch32

2022-10-27 Thread Timofey Kutergin
- Use CPSR.PAN to check for PAN state in aarch32 mode - throw permission fault during address translation when PAN is enabled and kernel tries to access user acessible page - ignore SCTLR_XP bit for armv7 and armv8 (conflicts with SCTLR_SPAN). Signed-off-by: Timofey Kutergin ---

[PATCH v2 5/7] accel/tcg: Use interval tree for user-only page tracking

2022-10-27 Thread Richard Henderson
Finish weaning user-only away from PageDesc. Using an interval tree to track page permissions means that we can represent very large regions efficiently. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/290 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/967 Resolves: https://gitla

Re: [PATCH v10 7/9] s390x/cpu topology: add max_threads machine class attribute

2022-10-27 Thread Pierre Morel
On 10/27/22 12:00, Cédric Le Goater wrote: Hello Pierre, On 10/12/22 18:21, Pierre Morel wrote: The S390 CPU topology accepts the smp.threads argument while in reality it does not effectively allow multthreading. Let's keep this behavior for machines older than 7.3 and refuse to use threads

[PATCH v2 7/7] accel/tcg: Move remainder of page locking to tb-maint.c

2022-10-27 Thread Richard Henderson
The only thing that still touches PageDesc in translate-all.c are some locking routines related to tb-maint.c which have not yet been moved. Do so now. Move some code up in tb-maint.c as well, to untangle the maze of ifdefs, and allow a sensible final ordering. Move some declarations from exec/t

[PATCH v2 4/7] accel/tcg: Move page_{get,set}_flags to user-exec.c

2022-10-27 Thread Richard Henderson
This page tracking implementation is specific to user-only, since the system softmmu version is in cputlb.c. Move it out of translate-all.c to user-exec.c. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 17 ++ accel/tcg/translate-all.c | 350

[PATCH v2 1/7] util: Add interval-tree.c

2022-10-27 Thread Richard Henderson
Copy and simplify the Linux kernel's interval_tree_generic.h, instantiating for uint64_t. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/qemu/interval-tree.h| 99 tests/unit/test-interval-tree.c | 209 util/interval-tree.c| 882 +

Re: [PATCH v2 1/6] accel/tcg: Introduce cpu_unwind_state_data

2022-10-27 Thread Richard Henderson
On 10/27/22 20:40, Claudio Fontana wrote: On 10/27/22 12:02, Richard Henderson wrote: Add a way to examine the unwind data without actually restoring the data back into env. Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 4 +-- include/exec/exec-all.h | 21 ---

[PATCH v2 6/7] accel/tcg: Move PageDesc tree into tb-maint.c for system

2022-10-27 Thread Richard Henderson
Now that PageDesc is not used for user-only, and for system it is only used for tb maintenance, move the implementation into tb-main.c appropriately ifdefed. We have not yet eliminated all references to PageDesc for user-only, so retain a typedef to the structure without definition. Signed-off-by

  1   2   3   4   5   >