Re: [PULL 00/12] qtest and s390x patches

2022-11-07 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [RFC PATCH] tests/docker: allow user to override check target

2022-11-07 Thread Philippe Mathieu-Daudé
On 7/11/22 18:40, Alex Bennée wrote: Philippe Mathieu-Daudé writes: On 7/11/22 15:52, Alex Bennée wrote: This is useful when trying to bisect a particular failing test behind a docker run. For example: make docker-test-clang@fedora \ TARGET_LIST=arm-softmmu \ CHECK_TARGET="me

Re: [PATCH 0/2] util/log: Make the per-thread flag immutable

2022-11-07 Thread Stefan Hajnoczi
On Mon, 7 Nov 2022 at 07:36, Greg Kurz wrote: > > On Sat, 5 Nov 2022 09:37:26 +1100 > Richard Henderson wrote: > > > On 11/4/22 23:00, Greg Kurz wrote: > > > While working on the "util/log: Always send errors to logfile when > > > daemonized" > > > series [1], I've encountered some issues with t

Re: [PULL v3 49/81] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors

2022-11-07 Thread Bernhard Beschow
Am 7. November 2022 13:00:36 UTC schrieb "Michael S. Tsirkin" : >On Mon, Nov 07, 2022 at 06:16:25PM +0530, Ani Sinha wrote: >> On Mon, Nov 7, 2022 at 6:03 PM Michael S. Tsirkin wrote: >> > >> > On Sun, Nov 06, 2022 at 10:16:41PM +0100, Bernhard Beschow wrote: >> > > >> > > >> > > On Sat, Nov 5, 20

[PATCH-for-7.2 0/2] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-07 Thread Philippe Mathieu-Daudé
Fix for CVE-2022-3872. See description in first patch. Philippe Mathieu-Daudé (2): hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872) hw/sd/sdhci: Factor common Present State bits in sdhci_data_transfer() hw/sd/sdhci.c | 9 + 1 file changed, 5 insertions(+),

[PATCH-for-7.2 2/2] hw/sd/sdhci: Factor common Present State bits in sdhci_data_transfer()

2022-11-07 Thread Philippe Mathieu-Daudé
When we do a non-DMA transfer, we have to set the 'DAT Line Active' and 'Command Inhibit (DAT)' bits in the 'Present State' register. Factor that common code to ease code review. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(

[PATCH-for-7.2 1/2] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-07 Thread Philippe Mathieu-Daudé
When sdhci_write_block_to_card() is called to transfer data from the FIFO to the SD bus, the data is already present in the buffer and we have to consume it directly. See the description of the 'Buffer Write Enable' bit from the 'Present State' register (prnsts::SDHC_SPACE_AVAILABLE) in Table 2.14

Re: [PATCH] docs/cxl: Fix some typos

2022-11-07 Thread Ira Weiny
On Mon, Nov 07, 2022 at 10:09:23AM -0800, Davidlohr Bueso wrote: > Found while reading the doc. > > Signed-off-by: Davidlohr Bueso Reviewed-by: Ira Weiny > --- > docs/system/devices/cxl.rst | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/docs/system/devi

Re: [PULL v3 49/81] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors

2022-11-07 Thread Michael S. Tsirkin
On Mon, Nov 07, 2022 at 10:07:52PM +, Bernhard Beschow wrote: > Am 7. November 2022 13:00:36 UTC schrieb "Michael S. Tsirkin" > : > >On Mon, Nov 07, 2022 at 06:16:25PM +0530, Ani Sinha wrote: > >> On Mon, Nov 7, 2022 at 6:03 PM Michael S. Tsirkin wrote: > >> > > >> > On Sun, Nov 06, 2022 at 1

Re: [PATCH] docs/cxl: Fix some typos

2022-11-07 Thread Alison Schofield
On Mon, Nov 07, 2022 at 10:09:23AM -0800, Davidlohr Bueso wrote: > Found while reading the doc. > > Signed-off-by: Davidlohr Bueso > --- > docs/system/devices/cxl.rst | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/docs/system/devices/cxl.rst b/docs/system/

Re: [PATCH 2/2] target/mips: Correct check for CABS instructions

2022-11-07 Thread Philippe Mathieu-Daudé
On 2/11/22 17:57, Jiaxun Yang wrote: Accroading to "MIPS Architecture for Programmers Volume IV-c: The MIPS-3D Application-Specific Extension to the MIPS64 Architecture" (MD00099). CABS.cond.fmt belongs to MIPS-3D ASE, and it has nothing to do with COP1X opcode. Remove all unnecessary COP1X chec

[PULL v4 00/83] pci,pc,virtio: features, tests, fixes, cleanups

2022-11-07 Thread Michael S. Tsirkin
Changes from v3: Applied and squashed fix by Ani for modular build breakage Reordered Julia's patches to avoid bisect breakage Checkpatch fixes for Jason's patches Added Alex's patch to partially address virtio is_started mess There is a bigger issue found by Christian A. Ehrhar

Re: [PATCH 1/2] target/mips: Don't check COP1X for 64 bit FP mode

2022-11-07 Thread Philippe Mathieu-Daudé
On 2/11/22 17:57, Jiaxun Yang wrote: Some implementations (i.e. Loongson-2F) may decide to implement a 64 bit FPU without implmenting COP1X instructions. As the eligibility of 64 bit FP instructions is already determined by CP0St_FR, there is no need to check for COP1X again. Signed-off-by: Jia

[PULL v4 03/83] acpi/ssdt: Fix aml_or() and aml_and() in if clause

2022-11-07 Thread Michael S. Tsirkin
From: Robert Hoo In If condition, using bitwise and/or, rather than logical and/or. The result change in AML code: If (((Local6 == Zero) | (Arg0 != Local0))) ==> If (((Local6 == Zero) || (Arg0 != Local0))) If (((ObjectType (Arg3) == 0x04) & (SizeOf (Arg3) == One))) ==> If (((ObjectType (Arg3)

[PULL v4 11/83] acpi/tests/avocado/bits: initial commit of test scripts that are run by biosbits

2022-11-07 Thread Michael S. Tsirkin
From: Ani Sinha This is initial commit of cpuid, acpi and smbios python test scripts for biosbits to execute. No change has been made to them from the original code written by the biosbits author Josh Triplett. They are required to be installed into the bits iso file and then run from within the

[PULL v4 05/83] acpi/nvdimm: Implement ACPI NVDIMM Label Methods

2022-11-07 Thread Michael S. Tsirkin
From: Robert Hoo Recent ACPI spec [1] has defined NVDIMM Label Methods _LS{I,R,W}, which deprecates corresponding _DSM Functions defined by PMEM _DSM Interface spec [2]. Since the semantics of the new Label Methods are almost same as old _DSM methods, the implementations here simply wrapper old

[PULL v4 04/83] acpi/nvdimm: define macro for NVDIMM Device _DSM

2022-11-07 Thread Michael S. Tsirkin
From: Robert Hoo Since it will be heavily used in next patch, define macro NVDIMM_DEVICE_DSM_UUID for "4309AC30-0D11-11E4-9191-0800200C9A66", which is NVDIMM device specific method uuid defined in NVDIMM _DSM interface spec, Section 3. [1] No functional changes in this patch. [1] https://pmem.i

[PULL v4 06/83] test/acpi/bios-tables-test: SSDT: update golden master binaries

2022-11-07 Thread Michael S. Tsirkin
From: Robert Hoo And empty bios-tables-test-allowed-diff.h. Diff of ASL form, from qtest testlog.txt: @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20180629 (64-bit version) * Copyright (c) 2000 - 2018 Intel Corporation * * Disassembling to

[PULL v4 07/83] virtio-crypto: Support asynchronous mode

2022-11-07 Thread Michael S. Tsirkin
From: Lei He virtio-crypto: Modify the current interface of virtio-crypto device to support asynchronous mode. Signed-off-by: lei he Message-Id: <20221008085030.70212-2-helei.si...@bytedance.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/sysemu/cryptodev.h

[PULL v4 25/83] hw/pci-bridge/cxl-upstream: Add a CDAT table access DOE

2022-11-07 Thread Michael S. Tsirkin
From: Jonathan Cameron This Data Object Exchange Mailbox allows software to query the latency and bandwidth between ports on the switch. For now only provide information on routes between the upstream port and each downstream port (not p2p). Signed-off-by: Jonathan Cameron -- Changes since v8:

[PULL v4 22/83] hw/mem/cxl-type3: Add MSIX support

2022-11-07 Thread Michael S. Tsirkin
From: Jonathan Cameron This will be used by several upcoming patch sets so break it out such that it doesn't matter which one lands first. Signed-off-by: Jonathan Cameron Message-Id: <20221014151045.24781-3-jonathan.came...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[PULL v4 01/83] hw/i386/e820: remove legacy reserved entries for e820

2022-11-07 Thread Michael S. Tsirkin
From: Ani Sinha e820 reserved entries were used before the dynamic entries with fw config files were intoduced. Please see the following change: 7d67110f2d9a6("pc: add etc/e820 fw_cfg file") Identical support was introduced into seabios as well with the following commit: ce39bd4031820 ("Add supp

[PULL v4 15/83] acpi/tests/avocado/bits/doc: add a doc file to describe the acpi bits test

2022-11-07 Thread Michael S. Tsirkin
From: Ani Sinha A doc file is added under docs/devel that describes the purpose of the various test files and gives guidance to developers on where and how to make changes. Cc: Daniel P. Berrange" Cc: Paolo Bonzini Cc: Maydell Peter Cc: John Snow Cc: Thomas Huth Cc: Alex Bennée Cc: Igor Ma

[PULL v4 26/83] hw/virtio/virtio-iommu-pci: Enforce the device is plugged on the root bus

2022-11-07 Thread Michael S. Tsirkin
From: Eric Auger In theory the virtio-iommu-pci could be plugged anywhere in the PCIe topology and as long as the dt/acpi info are properly built this should work. However at the moment we fail to do that because the virtio-iommu-pci BDF is not computed at plug time and in that case vms->virtio_i

[PULL v4 02/83] tests/acpi: allow SSDT changes

2022-11-07 Thread Michael S. Tsirkin
From: Robert Hoo Signed-off-by: Robert Hoo Reviewed-by: Jingqi Liu Message-Id: <20220922122155.1326543-2-robert...@linux.intel.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 1 file changed, 2 insertions(+) diff

[PULL v4 62/83] hmat acpi: Don't require initiator value in -numa

2022-11-07 Thread Michael S. Tsirkin
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

[PULL v4 10/83] cryptodev: Add a lkcf-backend for cryptodev

2022-11-07 Thread Michael S. Tsirkin
From: Lei He cryptodev: Added a new type of backend named lkcf-backend for cryptodev. This backend upload asymmetric keys to linux kernel, and let kernel do the accelerations if possible. The lkcf stands for Linux Kernel Cryptography Framework. Signed-off-by: lei he Message-Id: <20221008085030.

[PULL v4 18/83] acpi: fadt: support revision 6.0 of the ACPI specification

2022-11-07 Thread Michael S. Tsirkin
From: Miguel Luis Update the Fixed ACPI Description Table (FADT) to revision 6.0 of the ACPI specification adding the field "Hypervisor Vendor Identity". This field's description states the following: "64-bit identifier of hypervisor vendor. All bytes in this field are considered part of the ven

[PULL v4 08/83] crypto: Support DER encodings

2022-11-07 Thread Michael S. Tsirkin
From: Lei He Add encoding interfaces for DER encoding: 1. support decoding of 'bit string', 'octet string', 'object id' and 'context specific tag' for DER encoder. 2. implemented a simple DER encoder. 3. add more testsuits for DER encoder. Signed-off-by: lei he Message-Id: <20221008085030.70212

[PULL v4 31/83] virtio-pci: support queue reset

2022-11-07 Thread Michael S. Tsirkin
From: Xuan Zhuo PCI devices support vq reset. Based on this function, the driver can adjust the size of the ring, and quickly recycle the buffer in the ring. The migration of the virtio devices will not happen during a reset operation. This is becuase the global iothread lock is held. Migration

[PULL v4 50/83] acpi: enumerate SMB bridge automatically along with other PCI devices

2022-11-07 Thread Michael S. Tsirkin
From: Igor Mammedov to make that happen (bridge sits at _ADR: 0x001F0003), relax PCI enumeration logic to include devices with *function* > 0 if device has something to say about itself (i.e. has build_dev_aml callback set). Signed-off-by: Igor Mammedov Message-Id: <20221017102146.2254096-8-ima

[PULL v4 16/83] MAINTAINERS: add myself as the maintainer for acpi biosbits avocado tests

2022-11-07 Thread Michael S. Tsirkin
From: Ani Sinha I wrote the biosbits avocado tests for testing QEMU's ACPI/SMBIOS implementation and all the related changes including fixes in biosbits software itself. Making myself as the maintainer for QEMU's biosbits related files and test scripts. Cc: Daniel P. Berrangé Cc: Paolo Bonzini

[PULL v4 21/83] hw/pci: PCIe Data Object Exchange emulation

2022-11-07 Thread Michael S. Tsirkin
From: Huai-Cheng Kuo Emulation of PCIe Data Object Exchange (DOE) PCIE Base Specification r6.0 6.3 Data Object Exchange Supports multiple DOE PCIe Extended Capabilities for a single PCIe device. For each capability, a static array of DOEProtocol should be passed to pcie_doe_init(). The protocols

[PULL v4 61/83] hw/i386/acpi-build: Resolve north rather than south bridges

2022-11-07 Thread Michael S. Tsirkin
From: Bernhard Beschow The code currently assumes Q35 iff ICH9 and i440fx iff PIIX. Now that more AML generation has been moved into the south bridges and since the machines define themselves primarily through their north bridges, let's switch to resolving the north bridges for AML generation ins

[PULL v4 12/83] acpi/tests/avocado/bits: disable acpi PSS tests that are failing in biosbits

2022-11-07 Thread Michael S. Tsirkin
From: Ani Sinha PSS tests in acpi test suite seems to be failing in biosbits. This is because the test is unable to find PSS support in QEMU bios. Let us disable them for now so that make check does not fail. We can fix the tests and re-enable them later. Example failure: ACPI _PSS (Pstate

[PULL v4 09/83] crypto: Support export akcipher to pkcs8

2022-11-07 Thread Michael S. Tsirkin
From: Lei He crypto: support export RSA private keys with PKCS#8 standard. So that users can upload this private key to linux kernel. Signed-off-by: lei he Message-Id: <20221008085030.70212-4-helei.si...@bytedance.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed

[PULL v4 44/83] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors

2022-11-07 Thread Michael S. Tsirkin
From: Igor Mammedov NB: We do not expect any functional change in any ACPI tables with this change. It's only a refactoring. NB2: Some targets (or1k) do not support acpi and CONFIG_ACPI is off for them. However, modules are reused between all architectures so CONFIG_ACPI is on. For those archit

[PULL v4 30/83] virtio: core: vq reset feature negotation support

2022-11-07 Thread Michael S. Tsirkin
From: Kangjie Xu A a new command line parameter "queue_reset" is added. Meanwhile, the vq reset feature is disabled for pre-7.2 machines. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20221017092558.111082-5-xuanz...@linux.alibaba.com> Reviewed-by: Mich

[PULL v4 45/83] tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML automatically

2022-11-07 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20221017102146.2254096-3-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 34 + 1 file changed, 34 insertions(+) diff --gi

[PULL v4 46/83] acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML

2022-11-07 Thread Michael S. Tsirkin
From: Igor Mammedov PCI-ISA bridges that are built in PIIX/Q35 are building its own AML using AcpiDevAmlIf interface. Now build_append_pci_bus_devices() gained AcpiDevAmlIf interface support to get AML of devices atached to PCI slots. So drop ad-hoc build_q35_isa_bridge()/build_piix4_isa_bridge()

[PULL v4 32/83] virtio-pci: support queue enable

2022-11-07 Thread Michael S. Tsirkin
From: Kangjie Xu PCI devices support device specific vq enable. Based on this function, the driver can re-enable the virtqueue after the virtqueue is reset. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20221017092558.111082-7-xuanz...@linux.alibaba.com

[PULL v4 43/83] vhost-user: Fix out of order vring host notification handling

2022-11-07 Thread Michael S. Tsirkin
From: Yajun Wu vhost backend sends host notification for every VQ. If backend creates VQs in parallel, the VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG may arrive to QEMU in different order than incremental queue index order. For example VQ 1's message arrive earlier than VQ 0's: After alloc VhostUs

[PULL v4 77/83] hw/smbios: add core_count2 to smbios table type 4

2022-11-07 Thread Michael S. Tsirkin
From: Julia Suvorova In order to use the increased number of cpus, we need to bring smbios tables in line with the SMBIOS 3.0 specification. This allows us to introduce core_count2 which acts as a duplicate of core_count if we have fewer cores than 256, and contains the actual core number per soc

[PULL v4 82/83] hw/virtio: introduce virtio_device_should_start

2022-11-07 Thread Michael S. Tsirkin
From: Alex Bennée The previous fix to virtio_device_started revealed a problem in its use by both the core and the device code. The core code should be able to handle the device "starting" while the VM isn't running to handle the restoration of migration state. To solve this duel use introduce a

[PULL v4 63/83] tests: acpi: add and whitelist *.hmat-noinitiator expected blobs

2022-11-07 Thread Michael S. Tsirkin
From: Brice Goglin .. which will be used by follow up hmat-noinitiator test-case. Signed-off-by: Brice Goglin Signed-off-by: Hesham Almatary Message-Id: <20221027100037.251-3-hesham.almat...@huawei.com> Tested-by: Yicong Yang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL v4 73/83] intel-iommu: convert VTD_PE_GET_FPD_ERR() to be a function

2022-11-07 Thread Michael S. Tsirkin
From: 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 fun

[PULL v4 66/83] tests: Add HMAT AArch64/virt empty table files

2022-11-07 Thread Michael S. Tsirkin
From: Hesham Almatary Signed-off-by: Hesham Almatary Message-Id: <20221027100037.251-6-hesham.almat...@huawei.com> Tested-by: Yicong Yang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 5 + tests/data/acpi/virt/APIC.acp

[PULL v4 34/83] vhost: expose vhost_virtqueue_stop()

2022-11-07 Thread Michael S. Tsirkin
From: Kangjie Xu Expose vhost_virtqueue_stop(), we need to use it when resetting a virtqueue. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20221017092558.111082-9-xuanz...@linux.alibaba.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsi

[PULL v4 52/83] tests: acpi: pc/q35 whitelist DSDT before \_GPE cleanup

2022-11-07 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20221017102146.2254096-10-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 34 + 1 file changed, 34 insertions(+) diff --g

[PULL v4 19/83] acpi: arm/virt: madt: bump to revision 4 accordingly to ACPI 6.0 Errata A

2022-11-07 Thread Michael S. Tsirkin
From: Miguel Luis MADT has been updated with the GIC Structures from ACPI 6.0 Errata A and so MADT revision and GICC Structure must be updated also. Fixes: 37f33084ed2e ("acpi: arm/virt: madt: use build_append_int_noprefix() API to compose MADT table") Signed-off-by: Miguel Luis Reviewed-by:

[PULL v4 68/83] tests: acpi: aarch64/virt: add a test for hmat nodes with no initiators

2022-11-07 Thread Michael S. Tsirkin
From: Hesham Almatary 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 q

[PULL v4 51/83] tests: acpi: update expected blobs

2022-11-07 Thread Michael S. Tsirkin
From: Igor Mammedov Expected change in q35 tests: @@ -2797,14 +2797,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x0001) } } -Scope (_SB.PCI0) -{ -Device (SMB0) -{ -

[PULL v4 60/83] hw/i386/acpi-build: Resolve redundant attribute

2022-11-07 Thread Michael S. Tsirkin
From: Bernhard Beschow The is_piix4 attribute is set once in one location and read once in another. Doing both in one location allows for removing the attribute altogether. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221026133110.91828-3-shen...@gmail.com

[PULL v4 24/83] hw/mem/cxl-type3: Add CXL CDAT Data Object Exchange

2022-11-07 Thread Michael S. Tsirkin
From: Huai-Cheng Kuo The CDAT can be specified in two ways. One is to add ",cdat=" in "-device cxl-type3"'s command option. The file is required to provide the whole CDAT table in binary mode. The other is to use the default that provides some 'reasonable' numbers based on type of memory and size

[PULL v4 23/83] hw/cxl/cdat: CXL CDAT Data Object Exchange implementation

2022-11-07 Thread Michael S. Tsirkin
From: Huai-Cheng Kuo The Data Object Exchange implementation of CXL Coherent Device Attribute Table (CDAT). This implementation is referring to "Coherent Device Attribute Table Specification, Rev. 1.03, July. 2022" and "Compute Express Link Specification, Rev. 3.0, July. 2022" This patch adds co

[PULL v4 55/83] hw/acpi/erst.c: Fix memory handling issues

2022-11-07 Thread Michael S. Tsirkin
From: "Christian A. Ehrhardt" - Fix memset argument order: The second argument is the value, the length goes last. - Fix an integer overflow reported by Alexander Bulekov. Both issues allow the guest to overrun the host buffer allocated for the ERST memory device. Cc: Eric DeVolder Cc: qemu-

[PULL v4 81/83] tests/acpi: update tables for new core count test

2022-11-07 Thread Michael S. Tsirkin
From: Julia Suvorova Changes in the tables (for 275 cores): FACP: + Use APIC Cluster Model (V4) : 1 APIC: +[02Ch 0044 1]Subtable Type : 00 [Processor Local APIC] +[02Dh 0045 1] Length : 08 +[02Eh 0046 1] Processor ID : 0

[PULL v4 72/83] intel-iommu: drop VTDBus

2022-11-07 Thread Michael S. Tsirkin
From: 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 drop

[PULL v4 54/83] tests: acpi: update expected blobs

2022-11-07 Thread Michael S. Tsirkin
From: Igor Mammedov Expected changes are: 1) Moving _GPE scope declaration achec of all _E0x methods +Scope (_GPE) +{ +Name (_HID, "ACPI0006" /* GPE Block Device */) // _HID: Hardware ID +} + Scope (_SB) { Device (\_SB.PCI0.PRES)

[PULL v4 42/83] virtio-rng-pci: Allow setting nvectors, so we can use MSI-X

2022-11-07 Thread Michael S. Tsirkin
From: David Daney Most other virtio-pci devices allow MSI-X, let's have it for rng too. Signed-off-by: David Daney Reviewed-by: Marcin Nowakowski Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221014160947.66105-1-phi...@fungible.com> Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S

[PULL v4 47/83] tests: acpi: update expected DSDT after ISA bridge is moved directly under PCI host bridge

2022-11-07 Thread Michael S. Tsirkin
From: Igor Mammedov example of the change for PC machine with hotplug disabled on root buss (no BSEL case): -Field (PCI0.ISA.P40C, ByteAcc, NoLock, Preserve) +Field (S08.P40C, ByteAcc, NoLock, Preserve) === -Scope (_SB.PCI0) -{ -Device (ISA) -{ -

[PULL v4 57/83] msix: Assert that specified vector is in range

2022-11-07 Thread Michael S. Tsirkin
From: Akihiko Odaki There were several different ways to deal with the situation where the vector specified for a msix function is out of bound: - early return a function and keep progresssing - propagate the error to the caller - mark msix unusable - assert it is in bound - just ignore An out-o

[PULL v4 48/83] tests: acpi: whitelist DSDT before generating ICH9_SMB AML automatically

2022-11-07 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20221017102146.2254096-6-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 21 + 1 file changed, 21 insertions(+) diff --gi

[PULL v4 37/83] virtio-net: introduce flush_or_purge_queued_packets()

2022-11-07 Thread Michael S. Tsirkin
From: Kangjie Xu Introduce the fucntion flush_or_purge_queued_packets(), it will be used in device reset and virtqueue reset. Therefore, we extract the common logic as a new function. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20221017092558.111082-12

[PULL v4 33/83] vhost: expose vhost_virtqueue_start()

2022-11-07 Thread Michael S. Tsirkin
From: Kangjie Xu Expose vhost_virtqueue_start(), we need to use it when restarting a virtqueue. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20221017092558.111082-8-xuanz...@linux.alibaba.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. T

[PULL v4 67/83] hw/arm/virt: Enable HMAT on arm virt machine

2022-11-07 Thread Michael S. Tsirkin
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 Message-Id: <20221027100037.251-7-he

Re: [PATCH] target/mips: enable LBX/LWX/* instructions for Octeon

2022-11-07 Thread Philippe Mathieu-Daudé
On 1/11/22 06:29, Pavel Dovgalyuk wrote: This patch changes condition and function name for enabling indexed load instructions for Octeon vCPUs. Octeons do not have DSP extension, but implement LBX-and-others. Signed-off-by: Pavel Dovgalyuk --- target/mips/tcg/translate.c | 10 +++---

[PULL v4 59/83] hw/i386/acpi-build: Remove unused struct

2022-11-07 Thread Michael S. Tsirkin
From: Bernhard Beschow Ammends commit b23046abe78f48498a423b802d6d86ba0172d57f 'pc: acpi-build: simplify PCI bus tree generation'. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221026133110.91828-2-shen...@gmail.com> Message-Id: <20221028103419.93398-2-shen

[PULL v4 38/83] virtio-net: support queue reset

2022-11-07 Thread Michael S. Tsirkin
From: Xuan Zhuo virtio-net and vhost-kernel implement queue reset. Queued packets in the corresponding queue pair are flushed or purged. For virtio-net, userspace datapath will be disabled later in __virtio_queue_reset(). It will set addr of vring to 0 and idx to 0. Thus, virtio_net_receive() an

[PULL v4 56/83] MAINTAINERS: Add qapi/virtio.json to section "virtio"

2022-11-07 Thread Michael S. Tsirkin
From: Markus Armbruster Cc: Michael S. Tsirkin Signed-off-by: Markus Armbruster Message-Id: <20221020120458.80709-1-arm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)

[PULL v4 76/83] vhost-user: Support vhost_dev_start

2022-11-07 Thread Michael S. Tsirkin
From: Yajun Wu The motivation of adding vhost-user vhost_dev_start support is to improve backend configuration speed and reduce live migration VM downtime. Today VQ configuration is issued one by one. For virtio net with multi-queue support, backend needs to update RSS (Receive side scaling) on

[PULL v4 64/83] tests: acpi: q35: add test for hmat nodes without initiators

2022-11-07 Thread Michael S. Tsirkin
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

[PULL v4 65/83] tests: acpi: q35: update expected blobs *.hmat-noinitiators expected HMAT:

2022-11-07 Thread Michael S. Tsirkin
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]

[PULL v4 53/83] acpi: pc/35: sanitize _GPE declaration order

2022-11-07 Thread Michael S. Tsirkin
From: Igor Mammedov Move _GPE block declaration before it gets referenced by other hotplug handlers. While at it move PCI hotplug (_E01) handler after PCI tree description to avoid forward reference to to not yet declared methods/devices. PS: Forward 'usage' usualy is fine as long as it's hidden

[PULL v4 39/83] virtio-net: support queue_enable

2022-11-07 Thread Michael S. Tsirkin
From: Kangjie Xu Support queue_enable in vhost-kernel scenario. It can be called when a vq reset operation has been performed and the vq is restared. It should be noted that we can restart the vq when the vhost has already started. When launching a new vhost device, the vhost is not started and

[PULL v4 14/83] acpi/tests/avocado/bits: add acpi and smbios avocado tests that uses biosbits

2022-11-07 Thread Michael S. Tsirkin
From: Ani Sinha This introduces QEMU acpi/smbios biosbits avocado test which is run from within the python virtual environment. When the bits tests are run, bits binaries are downloaded from an external repo/location, bios bits iso is regenerated containing the acpi/smbios bits tests that are mai

[PULL v4 20/83] tests/acpi: virt: update ACPI MADT and FADT binaries

2022-11-07 Thread Michael S. Tsirkin
From: Miguel Luis Step 6 & 7 of the bios-tables-test.c documented procedure. Differences between disassembled ASL files for MADT: @@ -11,9 +11,9 @@ */ [000h 4]Signature : "APIC"[Multiple APIC Description Table (MADT)] -[004h 0004 4] Table Le

Re: [PATCH v2 0/3] MIPS system emulation miscellaneous fixes

2022-11-07 Thread Philippe Mathieu-Daudé
On 31/10/22 14:25, Jiaxun Yang wrote: Hi all, I was trying to build a MIPS VirtIO board[1] for QEMU that is able to work with all processors we support. When I was bring up varoius CPUs on that board I noticed some issues with the system emulation code that I'm fixing in this series. Thanks.

[PULL v4 58/83] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-11-07 Thread Michael S. Tsirkin
From: Gregory Price Early-boot e820 records will be inserted by the bios/efi/early boot software and be reported to the kernel via insert_resource. Later, when CXL drivers iterate through the regions again, they will insert another resource and make the RESERVED memory area a child. This RESERV

[PULL v4 27/83] virtio: introduce __virtio_queue_reset()

2022-11-07 Thread Michael S. Tsirkin
From: Xuan Zhuo Separate the logic of vq reset. This logic will be called directly later. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20221017092558.111082-2-xuanz...@linux.alibaba.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio.c |

[PULL v4 75/83] vhost: Change the sequence of device start

2022-11-07 Thread Michael S. Tsirkin
From: Yajun Wu This patch is part of adding vhost-user vhost_dev_start support. The motivation is to improve backend configuration speed and reduce live migration VM downtime. Moving the device start routines after finishing all the necessary device and VQ configuration, further aligning to the

[PULL v4 13/83] acpi/tests/avocado/bits: add biosbits config file for running bios tests

2022-11-07 Thread Michael S. Tsirkin
From: Ani Sinha This change adds initial biosbits config file that instructs biosbits to run bios test suits in batch mode. Additionally acpi and smbios structures are also dumped. Cc: Daniel P. Berrangé Cc: Paolo Bonzini Cc: Maydell Peter Cc: John Snow Cc: Thomas Huth Cc: Alex Bennée Cc:

[PULL v4 36/83] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_restart()

2022-11-07 Thread Michael S. Tsirkin
From: Kangjie Xu Introduce vhost_net_virtqueue_restart(), which can restart the specific virtqueue when the vhost net started running before. If it fails to restart the virtqueue, the device will be stopped. Here we do not reuse vhost_net_start_one() or vhost_dev_start() because they work at que

[PULL v4 74/83] intel-iommu: PASID support

2022-11-07 Thread Michael S. Tsirkin
From: 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

Re: [PATCH 0/5] disas/nanomips: Format string fixes

2022-11-07 Thread Philippe Mathieu-Daudé
On 1/11/22 12:44, Philippe Mathieu-Daudé wrote: Fix invalid string formats reported by Stefan: https://lore.kernel.org/qemu-devel/78553699-00c1-ad69-1d58-02f75a1f4...@weilnetz.de/ Philippe Mathieu-Daudé (5): disas/nanomips: Fix invalid PRId64 format calling img_format() disas/nanomips: Fix

[PULL v4 69/83] tests: virt: Update expected *.acpihmatvirt tables

2022-11-07 Thread Michael S. Tsirkin
From: Hesham Almatary * 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] Ch

Re: [PATCH] target/mips: enable LBX/LWX/* instructions for Octeon

2022-11-07 Thread Philippe Mathieu-Daudé
On 1/11/22 06:29, Pavel Dovgalyuk wrote: This patch changes condition and function name for enabling indexed load instructions for Octeon vCPUs. Octeons do not have DSP extension, but implement LBX-and-others. Signed-off-by: Pavel Dovgalyuk --- target/mips/tcg/translate.c | 10 +++---

[PULL v4 79/83] tests/acpi: allow changes for core_count2 test

2022-11-07 Thread Michael S. Tsirkin
From: Julia Suvorova Signed-off-by: Julia Suvorova Message-Id: <20220731162141.178443-4-jus...@redhat.com> Message-Id: <2022101731.101412-4-jus...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Acked-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowe

[PULL v4 80/83] bios-tables-test: add test for number of cores > 255

2022-11-07 Thread Michael S. Tsirkin
From: Julia Suvorova The new test is run with a large number of cpus and checks if the core_count field in smbios_cpu_test (structure type 4) is correct. Choose q35 as it allows to run with -smp > 255. Signed-off-by: Julia Suvorova Message-Id: <20220731162141.178443-5-jus...@redhat.com> Messag

[PULL v4 40/83] vhost: vhost-kernel: enable vq reset feature

2022-11-07 Thread Michael S. Tsirkin
From: Kangjie Xu Add virtqueue reset feature for vhost-kernel. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20221017092558.111082-15-xuanz...@linux.alibaba.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/vhost_net.c

[PULL v4 41/83] virtio-net: enable vq reset feature

2022-11-07 Thread Michael S. Tsirkin
From: Xuan Zhuo Add virtqueue reset feature for virtio-net Signed-off-by: Xuan Zhuo Message-Id: <20221017092558.111082-16-xuanz...@linux.alibaba.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/

[PULL v4 35/83] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_reset()

2022-11-07 Thread Michael S. Tsirkin
From: Kangjie Xu Introduce vhost_virtqueue_reset(), which can reset the specific virtqueue in the device. Then it will unmap vrings and the desc of the virtqueue. Here we do not reuse the vhost_net_stop_one() or vhost_dev_stop(), because they work at queue pair level. We do not use vhost_virtque

Re: [PATCH v2 2/3] target/mips: Cast offset field of Octeon BBIT to int16_t

2022-11-07 Thread Philippe Mathieu-Daudé
On 31/10/22 14:25, Jiaxun Yang wrote: As per "Cavium Networks OCTEON Plus CN50XX Hardware Reference Manual" offset field is signed 16 bit value. However arg_BBIT.offset is unsigned. We need to cast it as signed to do address calculation. Signed-off-by: Jiaxun Yang --- v2: Do casting in decodetr

[PULL v4 28/83] virtio: introduce virtio_queue_reset()

2022-11-07 Thread Michael S. Tsirkin
From: Xuan Zhuo Introduce a new interface function virtio_queue_reset() to implement reset for vq. Add a new callback to VirtioDeviceClass for queue reset operation for each child device. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Message-Id: <20221017092558.111082-3-xuanz...@linux.alibaba

Re: [PATCH 1/2] target/mips: Don't check COP1X for 64 bit FP mode

2022-11-07 Thread Philippe Mathieu-Daudé
On 2/11/22 17:57, Jiaxun Yang wrote: Some implementations (i.e. Loongson-2F) may decide to implement a 64 bit FPU without implmenting COP1X instructions. As the eligibility of 64 bit FP instructions is already determined by CP0St_FR, there is no need to check for COP1X again. Signed-off-by: Jia

[PULL v4 49/83] acpi: add get_dev_aml_func() helper

2022-11-07 Thread Michael S. Tsirkin
From: Igor Mammedov It will be used in followup commits to figure out if device has it's own, device specific AML block. Signed-off-by: Igor Mammedov Message-Id: <20221017102146.2254096-7-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Ani S

[PULL v4 17/83] tests/acpi: virt: allow acpi MADT and FADT changes

2022-11-07 Thread Michael S. Tsirkin
From: Miguel Luis Step 3 from bios-tables-test.c documented procedure. Signed-off-by: Miguel Luis Message-Id: <20221011181730.10885-2-miguel.l...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Acked-by: Ani Sinha --- tests/qtest/bios-tables-test-allowed-diff.h

[PULL v4 78/83] bios-tables-test: teach test to use smbios 3.0 tables

2022-11-07 Thread Michael S. Tsirkin
From: Julia Suvorova Introduce the 64-bit entry point. Since we no longer have a total number of structures, stop checking for the new ones at the EOF structure (type 127). Signed-off-by: Julia Suvorova Reviewed-by: Igor Mammedov Message-Id: <20220731162141.178443-3-jus...@redhat.com> Message-

[PULL v4 83/83] checkpatch: better pattern for inline comments

2022-11-07 Thread Michael S. Tsirkin
checkpatch is unhappy about this line: WARNING: Block comments use a leading /* on a separate line #50: FILE: hw/acpi/nvdimm.c:1074: + aml_equal(aml_sizeof(pckg), aml_int(1)) /* 1 element? */)); but there's nothing wrong with it - the check is just too simplistic. I

[PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-07 Thread Michael S. Tsirkin
From: Kangjie Xu Introduce the interface queue_enable() in VirtioDeviceClass and the fucntion virtio_queue_enable() in virtio, it can be called when VIRTIO_PCI_COMMON_Q_ENABLE is written and related virtqueue can be started. It only supports the devices of virtio 1 or later. The not-supported dev

<    1   2   3   >