Re: [PATCH v14 00/26] Add LoongArch linux-user emulation support

2022-01-07 Thread gaosong
Hi Richard. On 2022/1/7 下午1:01, Richard Henderson wrote: On 1/6/22 1:41 AM, Song Gao wrote: Based-on:<20220106074740.1754661-1-gaos...@loongson.cn> Hi all, This series only support linux-user emulation. More about LoongArch at:https://github.com/loongson/ The latest kernel:    *https://githu

Re: [PATCH] ide: Explicitly poll for BHs on cancel

2022-01-07 Thread Mark Cave-Ayland
On 06/01/2022 00:11, Philippe Mathieu-Daudé wrote: Cc'ing Mark for macio which seems to have the same issue. Thanks. Presumably this is all done in the IDE layer so there is no need for any changes to the macio device itself? Note that macio really is just a standard IDE interface but IIRC

Re: [PATCH] q800: fix segfault with invalid MacROM

2022-01-07 Thread Mark Cave-Ayland
On 06/01/2022 12:22, Laurent Vivier wrote: "qemu-system-m68k -M q800 -bios /dev/null" crahses with a segfault in q800_init(). This happens because the code doesn't check that rom_ptr() returned a non-NULL pointer . Resolves: https://gitlab.com/qemu-project/qemu/-/issues/756 Reported-by: Peter M

Re: [RFC PATCH 0/2] QEMU/openbios: PPC Software TLB support in the G4 family

2022-01-07 Thread Cédric Le Goater
On 11/29/21 16:28, Fabiano Rosas wrote: Cédric Le Goater writes: Right. If we're doing this to say "I can boot a kernel with a 7450 cpu in QEMU" but the implementation is different from real hardware, then I'm not sure what the real value is. That effectively leaves option b) if someone is w

Re: [PATCH] tests/tcg/loongson64: Add float reference files

2022-01-07 Thread gaosong
Hi Philippe, On 2022/1/4 下午9:20, Philippe Mathieu-Daudé wrote: Generated on Loongson-3A5000 (CPU revision 0x0014c011). Signed-off-by: Philippe Mathieu-Daudé --- tests/tcg/loongson64/float_convs.ref | 748 ++ tests/tcg/loongson64/float_madds.ref | 768

[PATCH v7 0/6] ARM virt: Support CPU cluster topology

2022-01-07 Thread Yanan Wang via
This v7 series enables the support for CPU cluster topology on ARM virt machines. The generic infrastructure for CPU cluster parameter has been in upstream. Background and descriptions: The new Cluster-Aware Scheduling support has landed in Linux 5.16, which has been proved to benefit the scheduli

[PATCH v7 2/6] hw/arm/virt: Support cluster level in DT cpu-map

2022-01-07 Thread Yanan Wang via
Support one cluster level between core and physical package in the cpu-map of Arm/virt devicetree. This is also consistent with Linux Doc "Documentation/devicetree/bindings/cpu/cpu-topology.txt". Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones --- hw/arm/virt.c | 15 --- 1 file

[PATCH v7 5/6] hw/acpi/aml-build: Support cluster level in PPTT generation

2022-01-07 Thread Yanan Wang via
Support CPU cluster topology level in generation of ACPI Processor Properties Topology Table (PPTT). Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones --- hw/acpi/aml-build.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c inde

[PATCH v7 1/6] hw/arm/virt: Support CPU cluster on ARM virt machine

2022-01-07 Thread Yanan Wang via
ARM64 machines like Kunpeng Family Server Chips have a level of hardware topology in which a group of CPU cores share L3 cache tag or L2 cache. For example, Kunpeng 920 typically has 6 or 8 clusters in each NUMA node (also represent range of CPU die), and each cluster has 4 CPU cores. All clusters

[PATCH v7 6/6] tests/acpi/bios-table-test: Update expected virt/PPTT file

2022-01-07 Thread Yanan Wang via
Run ./tests/data/acpi/rebuild-expected-aml.sh from build directory to update PPTT binary. Also empty bios-tables-test-allowed-diff.h. The disassembled differences between actual and expected PPTT: /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20200528 (64-bit version

[PATCH v7 4/6] tests/acpi/bios-tables-test: Allow changes to virt/PPTT file

2022-01-07 Thread Yanan Wang via
List test/data/acpi/virt/PPTT as the expected files allowed to be changed in tests/qtest/bios-tables-test-allowed-diff.h Signed-off-by: Yanan Wang Acked-by: Ani Sinha --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test

[PATCH v7 3/6] hw/acpi/aml-build: Improve scalability of PPTT generation

2022-01-07 Thread Yanan Wang via
Use g_queue APIs to reduce the nested loops and code indentation with the processor hierarchy levels increasing. Consenquently, it's more scalable to add new topology level to build_pptt. No functional change intended. Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones --- hw/acpi/aml-build.c

Re: [PATCH 0/6] linux-user: prctl improvements

2022-01-07 Thread gaosong
Hi Laurent, On 2022/1/6 下午6:46, Laurent Vivier wrote: make the LTP testsuite (20200930) happy again (capset02, prctl01, prctl02, prctl03)? Do we have LTP test documents?   or What test methods do we have for linux-user? As for far, I konw 'make check ' ,'make check-tcg'. and some testcases

Re: [PATCH v6 18/23] hw/intc: Add RISC-V AIA APLIC device emulation

2022-01-07 Thread Frank Chang
Anup Patel 於 2021年12月30日 週四 下午8:55寫道: > From: Anup Patel > > The RISC-V AIA (Advanced Interrupt Architecture) defines a new > interrupt controller for wired interrupts called APLIC (Advanced > Platform Level Interrupt Controller). The APLIC is capabable of > forwarding wired interupts to RISC-V

Re: [PATCH] q800: fix segfault with invalid MacROM

2022-01-07 Thread Laurent Vivier
Le 07/01/2022 à 09:15, Mark Cave-Ayland a écrit : On 06/01/2022 12:22, Laurent Vivier wrote: "qemu-system-m68k -M q800 -bios /dev/null" crahses with a segfault in q800_init(). This happens because the code doesn't check that rom_ptr() returned a non-NULL pointer . Resolves: https://gitlab.com/

Re: Rational behind partial AVX support in Qemu

2022-01-07 Thread Stevie Lavern
Indeed, my bad, i was thinking about the "trivial patch" submission process. For reference, the submitted patch can be found here https://lists.nongnu.org/archive/html/qemu-devel/2022-01/msg00822.html Thanks, Stevie On Thu, Jan 6, 2022 at 5:29 PM Richard Henderson < richard.hender...@linaro.org>

Re: [PATCH 0/6] linux-user: prctl improvements

2022-01-07 Thread Laurent Vivier
Hi Gaosong, Le 07/01/2022 à 09:46, gaosong a écrit : Hi Laurent, On 2022/1/6 下午6:46, Laurent Vivier wrote: make the LTP testsuite (20200930) happy again (capset02, prctl01, prctl02, prctl03)? Do we have LTP test documents?   or What test methods do we have for linux-user? I run the Linux

[RFC PATCH 5/7] x86: Add AMX CPUIDs enumeration

2022-01-07 Thread Yang Zhong
From: Jing Liu Add AMX primary feature bits XFD and AMX_TILE to enumerate the CPU's AMX capability. Meanwhile, add AMX TILE and TMUL CPUID leaf and subleaves which exist when AMX TILE is present to provide the maximum capability of TILE and TMUL. Signed-off-by: Jing Liu Signed-off-by: Yang Zhon

[RFC PATCH 1/7] x86: Fix the 64-byte boundary enumeration for extended state

2022-01-07 Thread Yang Zhong
From: Jing Liu The extended state subleaves (EAX=0Dh, ECX=n, n>1).ECX[1] are all zero, while spec actually introduces that bit 01 should indicate if the extended state component locates on the next 64-byte boundary following the preceding state component when the compacted format of an XSAVE area

[RFC PATCH 0/7] AMX support in Qemu

2022-01-07 Thread Yang Zhong
Intel introduces Advanced Matrix Extensions (AMX) [1] feature that consists of configurable two-dimensional "TILE" registers and new accelerator instructions that operate on them. TMUL (Tile matrix MULtiply) is the first accelerator instruction set to use the new registers. This series is based on

[RFC PATCH 3/7] x86: Grant AMX permission for guest

2022-01-07 Thread Yang Zhong
Kernel mechanism for dynamically enabled XSAVE features asks userspace VMM requesting guest permission if it wants to expose the features. Only with the permission, kernel can try to enable the features when detecting the intention from guest in runtime. Qemu should request the permission for gues

[RFC PATCH 4/7] x86: Add XFD faulting bit for state components

2022-01-07 Thread Yang Zhong
From: Jing Liu Intel introduces XFD faulting mechanism for extended XSAVE features to dynamically enable the features in runtime. If CPUID (EAX=0Dh, ECX=n, n>1).ECX[2] is set as 1, it indicates support for XFD faulting of this state component. Signed-off-by: Jing Liu Signed-off-by: Yang Zhong

[RFC PATCH 2/7] x86: Add AMX XTILECFG and XTILEDATA components

2022-01-07 Thread Yang Zhong
From: Jing Liu AMX XTILECFG and XTILEDATA are managed by XSAVE feature set. State component 17 is used for 64-byte TILECFG register (XTILECFG state) and component 18 is used for 8192 bytes of tile data (XTILEDATA state). Add AMX feature bits to x86_ext_save_areas array to set up AMX components.

[RFC PATCH 6/7] x86: Use new XSAVE ioctls handling

2022-01-07 Thread Yang Zhong
From: Jing Liu Extended feature has large state while current kvm_xsave only allows 4KB. Use new XSAVE ioctls if the xstate size is large than kvm_xsave. Signed-off-by: Jing Liu Signed-off-by: Zeng Guang Signed-off-by: Wei Wang Signed-off-by: Yang Zhong --- linux-headers/asm-x86/kvm.h | 14

[RFC PATCH 7/7] x86: Support XFD and AMX xsave data migration

2022-01-07 Thread Yang Zhong
From: Zeng Guang XFD(eXtended Feature Disable) allows to enable a feature on xsave state while preventing specific user threads from using the feature. Support save and restore XFD MSRs if CPUID.D.1.EAX[4] enumerate to be valid. Likewise migrate the MSRs and related xsave state necessarily. Sig

Re: [PATCH] q800: fix segfault with invalid MacROM

2022-01-07 Thread BALATON Zoltan
On Fri, 7 Jan 2022, Laurent Vivier wrote: Le 07/01/2022 à 09:15, Mark Cave-Ayland a écrit : On 06/01/2022 12:22, Laurent Vivier wrote: "qemu-system-m68k -M q800 -bios /dev/null" crahses with a segfault in q800_init(). This happens because the code doesn't check that rom_ptr() returned a non-NU

Re: [PATCH] q800: fix segfault with invalid MacROM

2022-01-07 Thread Laurent Vivier
Le 07/01/2022 à 10:47, BALATON Zoltan a écrit : On Fri, 7 Jan 2022, Laurent Vivier wrote: Le 07/01/2022 à 09:15, Mark Cave-Ayland a écrit : On 06/01/2022 12:22, Laurent Vivier wrote: "qemu-system-m68k -M q800 -bios /dev/null" crahses with a segfault in q800_init(). This happens because the co

Re: [PATCH] target/arm: Add missing FEAT_TLBIOS instructions

2022-01-07 Thread Peter Maydell
On Fri, 7 Jan 2022 at 01:25, Richard Henderson wrote: > > On 12/31/21 2:39 AM, Idan Horowitz wrote: > > Some of the instructions added by the FEAT_TLBIOS extension were forgotten > > when the extension was originally added to QEMU. > > > > Fixes: 7113d618505b ("target/arm: Add support for FEAT_TLB

Re: [PATCH V7 17/29] pci: export functions for cpr

2022-01-07 Thread Michael S. Tsirkin
On Thu, Jan 06, 2022 at 05:48:28PM -0500, Steven Sistare wrote: > On 1/5/2022 3:16 PM, Michael S. Tsirkin wrote: > > On Wed, Jan 05, 2022 at 12:22:25PM -0500, Steven Sistare wrote: > >> On 12/22/2021 6:07 PM, Michael S. Tsirkin wrote: > >>> On Wed, Dec 22, 2021 at 11:05:22AM -0800, Steve Sistare wr

[PATCH v9 1/7] net/vmnet: add vmnet dependency and customizable option

2022-01-07 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- meson.build | 4 meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 9 insertions(+) diff --git a/meson.build b/meson.build index 53065e96ec..d2d396037a 100644 --- a/meson.build +++ b/meson.b

[PATCH v9 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-01-07 Thread Vladislav Yaroshchuk
Interaction with vmnet.framework in different modes differs only on configuration stage, so we can create common `send`, `receive`, etc. procedures and reuse them. vmnet.framework supports iov, but writing more than one iov into vmnet interface fails with 'VMNET_INVALID_ARGUMENT'. Collecting provi

[PATCH v9 5/7] net/vmnet: implement bridged mode (vmnet-bridged)

2022-01-07 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- net/vmnet-bridged.m | 98 ++--- 1 file changed, 92 insertions(+), 6 deletions(-) diff --git a/net/vmnet-bridged.m b/net/vmnet-bridged.m index 4e42a90391..3c9da9dc8b 100644 --- a/net/vmnet-bridged.m +++ b/net/vmnet-br

[PATCH v9 0/7] Add vmnet.framework based network backend

2022-01-07 Thread Vladislav Yaroshchuk
macOS provides networking API for VMs called 'vmnet.framework': https://developer.apple.com/documentation/vmnet We can provide its support as the new QEMU network backends which represent three different vmnet.framework interface usage modes: * `vmnet-shared`: allows the guest to communicat

[PATCH v9 4/7] net/vmnet: implement host mode (vmnet-host)

2022-01-07 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- net/vmnet-host.c | 93 1 file changed, 87 insertions(+), 6 deletions(-) diff --git a/net/vmnet-host.c b/net/vmnet-host.c index 4a5ef99dc7..9c2e760ed1 100644 --- a/net/vmnet-host.c +++ b/net/vmnet-host.c @@ -

[PATCH v9 2/7] net/vmnet: add vmnet backends to qapi/net

2022-01-07 Thread Vladislav Yaroshchuk
Create separate netdevs for each vmnet operating mode: - vmnet-host - vmnet-shared - vmnet-bridged Signed-off-by: Vladislav Yaroshchuk --- net/clients.h | 11 net/meson.build | 7 +++ net/net.c | 10 net/vmnet-bridged.m | 25 + net/vmnet-common.m | 20

[PATCH v9 6/7] net/vmnet: update qemu-options.hx

2022-01-07 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- qemu-options.hx | 25 + 1 file changed, 25 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index ec90505d84..81dd34f550 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2732,6 +2732,25 @@ DEF("netdev", HAS_ARG, QE

[PATCH v9 7/7] net/vmnet: update MAINTAINERS list

2022-01-07 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f871d759fd..7184e41b8b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2633,6 +2633,11 @@ W: http://info.iet.unipi.it/~luigi/netmap/ S: Maintained F: net/n

Re: [PATCH v8 0/7] Add vmnet.framework based network backend

2022-01-07 Thread Vladislav Yaroshchuk
пт, 7 янв. 2022 г. в 08:03, Jason Wang : > > 在 2022/1/6 下午12:18, Jason Wang 写道: > > > > 在 2021/12/11 下午6:44, Vladislav Yaroshchuk 写道: > >> macOS provides networking API for VMs called 'vmnet.framework': > >> https://developer.apple.com/documentation/vmnet > >> > >> We can provide its support as th

Re: [PATCH v2 1/2] qemu-storage-daemon: Add vhost-user-blk help

2022-01-07 Thread Philippe Mathieu-Daudé
On 1/6/22 23:15, Eric Blake wrote: > On Thu, Dec 23, 2021 at 11:14:25AM +0100, Philippe Mathieu-Daudé wrote: >> Add missing vhost-user-blk help: >> >> $ qemu-storage-daemon -h >> ... >> --export [type=]vhost-user-blk,id=,node-name=, >> addr.type=unix,addr.path=[,writable=on|off

[PATCH v2] q800: fix segfault with invalid MacROM

2022-01-07 Thread Laurent Vivier
"qemu-system-m68k -M q800 -bios /dev/null" crashes with a segfault in q800_init(). This happens because the code doesn't check that rom_ptr() returned a non-NULL pointer . To avoid NULL pointer, don't allow 0 sized file and use bios_size with rom_ptr(). Resolves: https://gitlab.com/qemu-project/q

Re: [PATCH v4 06/11] target/riscv: Add support for hpmcounters/hpmevents

2022-01-07 Thread Bin Meng
On Fri, Jan 7, 2022 at 10:22 AM Atish Patra wrote: > > From: Atish Patra > > With SBI PMU extension, user can use any of the available hpmcounters to > track any perf events based on the value written to mhpmevent csr. > Add read/write functionality for these csrs. > > Signed-off-by: Atish Patra

Re: [PATCH 5/6] target/arm: Implement FEAT_LPA

2022-01-07 Thread Peter Maydell
On Wed, 8 Dec 2021 at 23:15, Richard Henderson wrote: > > Signed-off-by: Richard Henderson Could you put some content in the commit message, please? A brief description of what FEAT_LPA is would be helpful, for instance. While I was rereading the Arm ARM to review this I noticed an related chec

[PATCH v3 0/3] block: Minor vhost-user-blk fixes

2022-01-07 Thread Philippe Mathieu-Daudé
- Add vhost-user-blk help to qemu-storage-daemon, - Do not list vhost-user-blk in BlockExportType when CONFIG_VHOST_USER_BLK_SERVER is disabled. Since v2: - Fix typo (Eric) Since v1: - Reword patch 2 description (Markus) - Fix BlockExportOptions enum build failure (Markus) Philippe Mathieu-Dau

Re: [PATCH] tests/tcg/loongson64: Add float reference files

2022-01-07 Thread Alex Bennée
gaosong writes: > Hi Philippe, > > On 2022/1/4 下午9:20, Philippe Mathieu-Daudé wrote: > > Generated on Loongson-3A5000 (CPU revision 0x0014c011). > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/tcg/loongson64/float_convs.ref | 748 ++ > tests/tcg/loongson64/flo

[PATCH v3 1/3] docs: Correct 'vhost-user-blk' spelling

2022-01-07 Thread Philippe Mathieu-Daudé
Reported-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé --- docs/tools/qemu-storage-daemon.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tools/qemu-storage-daemon.rst b/docs/tools/qemu-storage-daemon.rst index 3e5a9dc0320..9b0eaba6e5c 100644 --- a/docs/tools

[PATCH v3 2/3] qemu-storage-daemon: Add vhost-user-blk help

2022-01-07 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Add missing vhost-user-blk help: $ qemu-storage-daemon -h ... --export [type=]vhost-user-blk,id=,node-name=, addr.type=unix,addr.path=[,writable=on|off] [,logical-block-size=][,num-queues=] export the speci

[PATCH v3 3/3] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER

2022-01-07 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé When building QEMU with --disable-vhost-user and using introspection, query-qmp-schema lists vhost-user-blk even though it's not actually available: { "execute": "query-qmp-schema" } { "return": [ ... { "name": "312",

[PULL v2 02/55] acpi: validate hotplug selector on access

2022-01-07 Thread Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded. Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer. Fixes: b32bd763a1 ("pci: introduce acpi-index property for PCI device") Fixes: CVE-2021-4158 Cc: "Igor Mammedov" Fixes: https://gitlab.com

[PULL v2 01/55] virtio-mem: Don't skip alignment checks when warning about block size

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand If we warn about the block size being smaller than the default, we skip some alignment checks. This can currently only fail on x86-64, when specifying a block size of 1 MiB, however, we detect the THP size of 2 MiB. Fixes: 228957fea3a9 ("virtio-mem: Probe THP size to det

Re: [PULL 09/16] configure: remove DIRS

2022-01-07 Thread Thomas Huth
On 19/12/2021 15.17, Paolo Bonzini wrote: DIRS is used to create the directory in which the LINKS symbolic links reside, or to create directories for object files. The former can be done directly in the symlinking loop, while the latter is done by Meson already, so DIRS is not necessary. Review

[PULL v2 05/55] virtio-pci: decouple the single vector from the interrupt process

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu To reuse the interrupt process in configure interrupt Need to decouple the single vector from the interrupt process. Add new function kvm_virtio_pci_vector_use_one and _release_one. These functions are use for the single vector, the whole process will finish in a loop for the vq n

[PULL v2 07/55] vhost-vdpa: add support for config interrupt

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu Add new call back function in vhost-vdpa, this function will set the event fd to kernel. This function will be called in the vhost_dev_start and vhost_dev_stop Signed-off-by: Cindy Lu Message-Id: <20211104164827.21911-6-l...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off

[PULL v2 06/55] vhost: introduce new VhostOps vhost_set_config_call

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu This patch introduces new VhostOps vhost_set_config_call. This function allows the vhost to set the event fd to kernel Signed-off-by: Cindy Lu Message-Id: <20211104164827.21911-5-l...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw

[PULL v2 00/55] virtio,pci,pc: features,fixes,cleanups

2022-01-07 Thread Michael S. Tsirkin
Changes from v1: - mingw build fixes - added TPM patches which got acks meanwhile Big changes that were tagged originally but did not make the cut: - SRIOV/nvme (not sure they are my tree material anyway) - ACPI ERST (some coding style violations) The following changes since commit 7d4ae4d4978079

[PULL v2 09/55] vhost: add support for configure interrupt

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu Add functions to support configure interrupt. The configure interrupt process will start in vhost_dev_start and stop in vhost_dev_stop. Also add the functions to support vhost_config_pending and vhost_config_mask, for masked_config_notifier, we only use the notifier saved in vq 0.

[PULL v2 15/55] chardev/char-socket: tcp_chr_recv: don't clobber errno

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan tcp_chr_recv communicates the specific error condition to the caller via errno. However, after setting it, it may call into some system calls or library functions which can clobber the errno. Avoid this by moving the errno assignment to the end of the function. Signed-off-by:

[PULL v2 08/55] virtio: add support for configure interrupt

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu Add the functions to support the configure interrupt in virtio The function virtio_config_guest_notifier_read will notify the guest if there is an configure interrupt. The function virtio_config_set_guest_notifier_fd_handler is to set the fd hander for the notifier Signed-off-by:

[PULL v2 03/55] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu To support configure interrupt for vhost-vdpa Introduce VIRTIO_CONFIG_IRQ_IDX -1 as configure interrupt's queue index, Then we can reuse the functions guest_notifier_mask and guest_notifier_pending. Add the check of queue index in these drivers, if the driver does not support confi

[PULL v2 10/55] virtio-net: add support for configure interrupt

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu Add functions to support configure interrupt in virtio_net The functions are config_pending and config_mask, while this input idx is VIRTIO_CONFIG_IRQ_IDX will check the function of configure interrupt. Signed-off-by: Cindy Lu Message-Id: <20211104164827.21911-9-l...@redhat.com>

[PULL v2 16/55] chardev/char-socket: tcp_chr_sync_read: don't clobber errno

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan After the return from tcp_chr_recv, tcp_chr_sync_read calls into a function which eventually makes a system call and may clobber errno. Make a copy of errno right after tcp_chr_recv and restore the errno on return from tcp_chr_sync_read. Signed-off-by: Roman Kagan Message-Id:

[PULL v2 04/55] virtio-pci: decouple notifier from interrupt process

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu To reuse the notifier process in configure interrupt. Use the virtio_pci_get_notifier function to get the notifier. the INPUT of this function is the IDX, the OUTPUT is notifier and the vector Signed-off-by: Cindy Lu Message-Id: <20211104164827.21911-3-l...@redhat.com> Reviewed-b

[PULL v2 19/55] vhost-vdpa: stick to -errno error return convention

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan Almost all VhostOps methods in vdpa_ops follow the convention of returning negated errno on error. Adjust the few that don't. To that end, rework vhost_vdpa_add_status to check if setting of the requested status bits has succeeded and return the respective error code it hasn't

[PULL v2 13/55] trace-events,pci: unify trace events format

2022-01-07 Thread Michael S. Tsirkin
From: Laurent Vivier Unify format used by trace_pci_update_mappings_del(), trace_pci_update_mappings_add(), trace_pci_cfg_write() and trace_pci_cfg_read() to print the device name and bus number, slot number and function number. For instance: pci_cfg_read virtio-net-pci 00:0 @0x20 -> 0xc0

[PULL v2 21/55] vhost: stick to -errno error return convention

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan The generic vhost code expects that many of the VhostOps methods in the respective backends set errno on errors. However, none of the existing backends actually bothers to do so. In a number of those methods errno from the failed call is clobbered by successful later calls to

Re: [PATCH v2] q800: fix segfault with invalid MacROM

2022-01-07 Thread Thomas Huth
On 07/01/2022 11.50, Laurent Vivier wrote: "qemu-system-m68k -M q800 -bios /dev/null" crashes with a segfault in q800_init(). This happens because the code doesn't check that rom_ptr() returned a non-NULL pointer . To avoid NULL pointer, don't allow 0 sized file and use bios_size with rom_ptr().

[PULL v2 18/55] vhost-backend: stick to -errno error return convention

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan Almost all VhostOps methods in kernel_ops follow the convention of returning negated errno on error. Adjust the only one that doesn't. Signed-off-by: Roman Kagan Message-Id: <2021153354.18807-7-rvka...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michae

[PULL v2 14/55] vhost-user-blk: reconnect on any error during realize

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan vhost-user-blk realize only attempts to reconnect if the previous connection attempt failed on "a problem with the connection and not an error related to the content (which would fail again the same way in the next attempt)". However this distinction is very subtle, and may be

[PULL v2 34/55] util/oslib-posix: Support concurrent os_mem_prealloc() invocation

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand Add a mutex to protect the SIGBUS case, as we cannot mess concurrently with the sigbus handler and we have to manage the global variable sigbus_memset_context. The MADV_POPULATE_WRITE path can run concurrently. Note that page_mutex and page_cond are shared between concurr

[PULL v2 11/55] virtio-mmio: add support for configure interrupt

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu Add configure interrupt support for virtio-mmio bus. This interrupt will be working while the backend is vhost-vdpa Signed-off-by: Cindy Lu Message-Id: <20211104164827.21911-10-l...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vir

[PULL v2 23/55] pci: Export the pci_intx() function

2022-01-07 Thread Michael S. Tsirkin
From: Frederic Barrat Move the pci_intx() definition to the PCI header file, so that it can be called from other PCI files. It is used by the next patch. Signed-off-by: Frederic Barrat Message-Id: <2026170133.724751-3-fbar...@linux.ibm.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Mi

[PULL v2 17/55] vhost-backend: avoid overflow on memslots_limit

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan Fix the (hypothetical) potential problem when the value parsed out of the vhost module parameter in sysfs overflows the return value from vhost_kernel_memslots_limit. Signed-off-by: Roman Kagan Message-Id: <2021153354.18807-6-rvka...@yandex-team.ru> Reviewed-by: Michael S.

[PULL v2 33/55] util/oslib-posix: Avoid creating a single thread with MADV_POPULATE_WRITE

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand Let's simplify the case when we only want a single thread and don't have to mess with signal handlers. Reviewed-by: Pankaj Gupta Reviewed-by: Daniel P. Berrangé Reviewed-by: Michal Privoznik Signed-off-by: David Hildenbrand Message-Id: <20211217134611.31172-6-da...@re

[PULL v2 12/55] virtio-pci: add support for configure interrupt

2022-01-07 Thread Michael S. Tsirkin
From: Cindy Lu Add support for configure interrupt, The process is used kvm_irqfd_assign to set the gsi to kernel. When the configure notifier was signal by host, qemu will inject a msix interrupt to guest Signed-off-by: Cindy Lu Message-Id: <20211104164827.21911-11-l...@redhat.com> Reviewed-by

[PULL v2 26/55] hw/smbios: Use qapi for SmbiosEntryPointType

2022-01-07 Thread Michael S. Tsirkin
From: Eduardo Habkost This prepares for exposing the SMBIOS entry point type as a machine property on x86. Based on a patch from Daniel P. Berrangé. Signed-off-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost Message-Id: <20211026151100.1691925-3-ehabk...@redhat.com> Reviewed-by: Michael

[PULL v2 29/55] util/oslib-posix: Let touch_all_pages() return an error

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand Let's prepare touch_all_pages() for returning differing errors. Return an error from the thread and report the last processed error. Translate SIGBUS to -EFAULT, as a SIGBUS can mean all different kind of things (memory error, read error, out of memory). When allocating m

[PULL v2 20/55] vhost-user: stick to -errno error return convention

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan VhostOps methods in user_ops are not very consistent in their error returns: some return negated errno while others just -1. Make sure all of them consistently return negated errno. This also helps error propagation from the functions being called inside. Besides, this synchro

[PULL v2 45/55] tests: acpi: add SLIC table test

2022-01-07 Thread Michael S. Tsirkin
From: Igor Mammedov When user uses '-acpitable' to add SLIC table, some ACPI tables (FADT) will change its 'Oem ID'/'Oem Table ID' fields to match that of SLIC. Test makes sure thati QEMU handles those fields correctly when SLIC table is added with '-acpitable' option. Signed-off-by: Igor Mammed

[PULL v2 25/55] smbios: Rename SMBIOS_ENTRY_POINT_* enums

2022-01-07 Thread Michael S. Tsirkin
From: Eduardo Habkost Rename the enums to match the naming style used by QAPI, and to use "32" and "64" instead of "20" and "31". This will allow us to more easily move the enum to the QAPI schema later. About the naming choice: "SMBIOS 2.1 entry point"/"SMBIOS 3.0 entry point" and "32-bit entr

[PULL v2 30/55] util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand Let's sense support and use it for preallocation. MADV_POPULATE_WRITE does not require a SIGBUS handler, doesn't actually touch page content, and avoids context switches; it is, therefore, faster and easier to handle than our current approach. While MADV_POPULATE_WRITE is

[PULL v2 39/55] linux-headers: sync VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand Let's synchronize the new feature flag, available in Linux since v5.16-rc1. Reviewed-by: Michal Privoznik Signed-off-by: David Hildenbrand Message-Id: <20211217134039.29670-2-da...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- incl

[PULL v2 22/55] vhost-user-blk: propagate error return from generic vhost

2022-01-07 Thread Michael S. Tsirkin
From: Roman Kagan Fix the only callsite that doesn't propagate the error code from the generic vhost code. Signed-off-by: Roman Kagan Message-Id: <2021153354.18807-11-rvka...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Raphael Norwitz --

[PULL v2 47/55] acpihp: simplify acpi_pcihp_disable_root_bus

2022-01-07 Thread Michael S. Tsirkin
From: Ani Sinha Get rid of the static variable that keeps track of whether hotplug has been disabled on the root pci bus. Simply use qbus_is_hotpluggable() api to perform the same check. This eliminates additional if conditional and simplifies the function. Signed-off-by: Ani Sinha Message-Id:

[PULL v2 36/55] virtio-mem: Support "prealloc=on" option

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand For scarce memory resources, such as hugetlb, we want to be able to prealloc such memory resources in order to not crash later on access. On simple user errors we could otherwise easily run out of memory resources an crash the VM -- pretty much undesired. For ordinary mem

[PULL v2 24/55] pcie_aer: Don't trigger a LSI if none are defined

2022-01-07 Thread Michael S. Tsirkin
From: Frederic Barrat Skip triggering an LSI when the AER root error status is updated if no LSI is defined for the device. We can have a root bridge with no LSI, MSI and MSI-X defined, for example on POWER systems. Signed-off-by: Frederic Barrat Message-Id: <2026170133.724751-4-fbar...@lin

[PULL v2 37/55] virtio: signal after wrapping packed used_idx

2022-01-07 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Packed Virtqueues wrap used_idx instead of letting it run freely like Split Virtqueues do. If the used ring wraps more than once there is no way to compare vq->signalled_used and vq->used_idx in virtio_packed_should_notify() since they are modulo vq->vring.num. This causes

[PULL v2 35/55] util/oslib-posix: Forward SIGBUS to MCE handler under Linux

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand Temporarily modifying the SIGBUS handler is really nasty, as we might be unlucky and receive an MCE SIGBUS while having our handler registered. Unfortunately, there is no way around messing with SIGBUS when MADV_POPULATE_WRITE is not applicable or not around. Let's forwar

[PULL v2 41/55] virtio-mem: Set "unplugged-inaccessible=auto" for the 7.0 machine on x86

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand Set the new default to "auto", keeping it set to "off" for compat machines. This property is only available for x86 targets. Reviewed-by: Michal Privoznik Reviewed-by: Pankaj Gupta Signed-off-by: David Hildenbrand Message-Id: <20211217134039.29670-4-da...@redhat.com> R

[PULL v2 28/55] hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device

2022-01-07 Thread Michael S. Tsirkin
From: Andy Pei Turn on pre-defined feature VIRTIO_BLK_F_SIZE_MAX for virtio blk device to avoid guest DMA request sizes which are too large for hardware spec. Signed-off-by: Andy Pei Message-Id: <1641202092-149677-1-git-send-email-andy@intel.com> Reviewed-by: Michael S. Tsirkin Signed-off-

[PULL v2 52/55] virtio/vhost-vsock: don't double close vhostfd, remove redundant cleanup

2022-01-07 Thread Michael S. Tsirkin
From: Daniil Tatianin In case of an error during initialization in vhost_dev_init, vhostfd is closed in vhost_dev_cleanup. Remove close from err_virtio as it's both redundant and causes a double close on vhostfd. Signed-off-by: Daniil Tatianin Message-Id: <20211129125204.1108088-1-d-tatia...@ya

[PULL v2 38/55] MAINTAINERS: Add a separate entry for acpi/VIOT tables

2022-01-07 Thread Michael S. Tsirkin
From: Ani Sinha All work related to VIOT tables are being done by Jean. Adding him as the maintainer for acpi VIOT table code in qemu. Signed-off-by: Ani Sinha Message-Id: <20211213045924.344214-1-...@anisinha.ca> Acked-by: Jean-Philippe Brucker Reviewed-by: Michael S. Tsirkin Signed-off-by:

[PULL v2 44/55] tests: acpi: whitelist expected blobs before changing them

2022-01-07 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20211227193120.1084176-3-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ tests/data/acpi/q35/FACP.slic | Bin 0 -> 244 by

[PULL v2 27/55] hw/i386: expose a "smbios-entry-point-type" PC machine property

2022-01-07 Thread Michael S. Tsirkin
From: Eduardo Habkost The i440fx and Q35 machine types are both hardcoded to use the legacy SMBIOS 2.1 (32-bit) entry point. This is a sensible conservative choice because SeaBIOS only supports SMBIOS 2.1 EDK2, however, can also support SMBIOS 3.0 (64-bit) entry points, and QEMU already uses thi

[PULL v2 50/55] hw/scsi/vhost-scsi: don't leak vqs on error

2022-01-07 Thread Michael S. Tsirkin
From: Daniil Tatianin vhost_dev_init calls vhost_dev_cleanup in case of an error during initialization, which zeroes out the entire vsc->dev as well as the vsc->dev.vqs pointer. This prevents us from properly freeing it in free_vqs. Keep a local copy of the pointer so we can free it later. Signe

[PULL v2 54/55] acpi: tpm: Add missing device identification objects

2022-01-07 Thread Michael S. Tsirkin
From: Stefan Berger Add missing TPM device identification objects _STR and _UID. They will appear as files 'description' and 'uid' under Linux sysfs. Following inspection of sysfs entries for hardware TPMs we chose uid '1'. Cc: Shannon Zhao Cc: Michael S. Tsirkin Cc: Igor Mammedov Cc: Ani Si

[PATCH v3 1/6] target/riscv: add cfg properties for zfinx, zdinx and zhinx{min}

2022-01-07 Thread Weiwei Li
Co-authored-by: ardxwe Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson --- target/riscv/cpu.c | 12 target/riscv/cpu.h | 4 target/riscv/translate.c | 8 3 files changed, 24 insertions(+) diff --git a/target/riscv/c

[PULL v2 53/55] tests: acpi: prepare for updated TPM related tables

2022-01-07 Thread Michael S. Tsirkin
From: Stefan Berger Replace existing TPM related tables, that are about to change, with empty files. Cc: Michael S. Tsirkin Cc: Igor Mammedov Cc: Ani Sinha Signed-off-by: Stefan Berger Acked-by: Ani Sinha Message-id: 20211223022310.575496-2-stef...@linux.ibm.com Message-Id: <20220104175806.

[PULL v2 31/55] util/oslib-posix: Introduce and use MemsetContext for touch_all_pages()

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand Let's minimize the number of global variables to prepare for os_mem_prealloc() getting called concurrently and make the code a bit easier to read. The only consumer that really needs a global variable is the sigbus handler, which will require protection via a mutex in the

[PATCH] configure: do not create roms/seabios/config.mak if SeaBIOS not present

2022-01-07 Thread Paolo Bonzini
If roms/seabios/Makefile is not present, the configure script is not creating the roms/seabios directory anymore (commit 5dce7b8d8c, "configure: remove DIRS", 2021-12-18); thus, creating roms/seabios/config.mak fails. The easiest thing to do is to not create the file, since it will not be used. S

Re: [Qemu-devel] [PATCH] configure: Add pkg-config handling for libgcrypt

2022-01-07 Thread Andrea Bolognani
On Thu, Aug 29, 2019 at 10:15:05AM +0100, Daniel P. Berrangé wrote: > On Thu, Aug 29, 2019 at 04:53:02PM +0800, zhe...@windriver.com wrote: > > libgcrypt may also be controlled by pkg-config, this patch adds pkg-config > > handling for libgcrypt. > > Where are you seeing pkg-config files for libgcr

[PULL v2 32/55] util/oslib-posix: Don't create too many threads with small memory or little pages

2022-01-07 Thread Michael S. Tsirkin
From: David Hildenbrand Let's limit the number of threads to something sane, especially that - We don't have more threads than the number of pages we have - We don't have threads that initialize small (< 64 MiB) memory Reviewed-by: Pankaj Gupta Reviewed-by: Dr. David Alan Gilbert Reviewed-by:

  1   2   3   4   5   >