Re: [PATCH v2 06/23] target/arm: Make HSTR_EL2 traps take priority over UNDEF-at-EL1

2023-01-30 Thread Richard Henderson
On 1/30/23 08:24, Peter Maydell wrote: The semantics of HSTR_EL2 require that it traps cpreg accesses to EL2 for: * EL1 accesses * EL0 accesses, if the access is not UNDEFINED when the trap bit is 0 (You can see this in the I_ZFGJP priority ordering, where HSTR_EL2 traps from EL1 to EL2

[PATCH qemu 1/1] vmxnet3: add mac address restore upon reset

2023-01-30 Thread ~vlaomao
From: VlaoMao Changing the address with a subsequent reboot makes this address permanent until the vm is turned off --- Signed-off-by: Vlao Mao hw/net/vmxnet3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 04159c822..695ca2f92 100644 --- a/hw

Re: [PATCH qemu 1/1] vmxnet3: add mac address restore upon reset

2023-01-30 Thread Влад Мао
Signed-off-by: Vlao Mao пн, 30 янв. 2023 г. в 21:12, Laurent Vivier : > > Le 30/01/2023 à 18:28, ~vlaomao a écrit : > > From: VlaoMao > > > > Changing the address with a subsequent reboot makes this address permanent > > until the vm is turned off > > Missing Signed-off-by. > > See https://www.

[PATCH qemu 0/1] vmxnet3: MAC address falls to permanent

2023-01-30 Thread ~vlaomao
A bug was found with the vmxnet3 driver, after changing the MAC address and rebooting, it falls into the category of a permanent address until the VM is turned off. Here is log output: -bash-4.4# ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:

Re: [PATCH v2 00/23] target/arm: Implement FEAT_FGT fine-grained traps

2023-01-30 Thread Fuad Tabba
Hi, On Mon, Jan 30, 2023 at 6:26 PM Peter Maydell wrote: > > This series implements the FEAT_FGT fine-grained traps architectural > feature. The bulk of this is new system registers HFGRTR_EL2, HFGWTR_EL2, > HFGITR_EL2, HDFGRTR_EL2, HDFGWTR_EL2, which have bits that enable > trapping of system re

Re: [PATCH] softmmu: Use memmove in flatview_write_continue

2023-01-30 Thread Alexander Bulekov
On 230130 2251, Akihiko Odaki wrote: > We found a case where the source passed to flatview_write_continue() may > overlap with the destination when fuzzing igb, a new proposed network > device with sanitizers. > > igb uses pci_dma_map() to get Tx packet, and pci_dma_write() to write Rx > buffer. W

[PULL 09/56] intel-iommu: Document iova_tree

2023-01-30 Thread Michael S. Tsirkin
From: Peter Xu It seems not super clear on when iova_tree is used, and why. Add a rich comment above iova_tree to track why we needed the iova_tree, and when we need it. Also comment for the map/unmap messages, on how they're used and implications (e.g. unmap can be larger than the mapped range

[PULL 02/56] hw/i386/acpi-build: Remove unused attributes

2023-01-30 Thread Michael S. Tsirkin
From: Bernhard Beschow Ammends commit 3db119da7915 'pc: acpi: switch to AML API composed DSDT'. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov Message-Id: <20230121151941.24120-2-shen...@gmail.com> Reviewed-by: Michael S. Tsirkin Signed-off-by:

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

2023-01-30 Thread Michael S. Tsirkin
The following changes since commit 13356edb87506c148b163b8c7eb0695647d00c2a: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-01-24 09:45:33 +) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upst

[PULL 13/56] tests: acpi: whitelist DSDT blobs for tests that use pci-bridges

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-4-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 4 1 file changed, 4 insertions(+) diff --git a/tests/qtest/bio

[PULL 01/56] shpc: disallow unplug when power indicator is blinking

2023-01-30 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy Pressing attention button has special meaning when power indicator is blinking. Better just not do it. For example, trying to remove device immediately after hotplug leads to both commands succeded but device not actually unrealized. Same thing for PCIE hotplu

[PULL 05/56] hw/acpi/acpi_dev_interface: Remove unused parameter from AcpiDeviceIfClass::madt_cpu

2023-01-30 Thread Michael S. Tsirkin
From: Bernhard Beschow The only function ever assigned to AcpiDeviceIfClass::madt_cpu is pc_madt_cpu_entry() which doesn't use the AcpiDeviceIf parameter. Signed-off-by: Bernhard Beschow Reviewed-by: Igor Mammedov Message-Id: <20230121151941.24120-5-shen...@gmail.com> Reviewed-by: Michael S. T

[PULL 10/56] x86: don't let decompressed kernel image clobber setup_data

2023-01-30 Thread Michael S. Tsirkin
From: "Jason A. Donenfeld" The setup_data links are appended to the compressed kernel image. Since the kernel image is typically loaded at 0x10, setup_data lives at `0x10 + compressed_size`, which does not get relocated during the kernel's boot process. The kernel typically decompresses

[PULL 20/56] pcihp: piix4: do not call acpi_pcihp_reset() when ACPI PCI hotplug is disabled

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov piix4_pm_reset() is calling acpi_pcihp_reset() when ACPI PCI hotplug is disabled, which leads to assigning BSEL properties to bridges on path acpi_set_bsel() ... if (qbus_is_hotpluggable(BUS(bus))) { // above happens to be true by default (though it'

[PULL 29/56] tests: acpi: update expected blobs

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov expected change: Scope (PCI0) ... Method (PCNT, 0, NotSerialized) { } ... } Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-20-imamm...@redhat.com> --- tests/qtest/bios-tables-test-allowed-d

[PULL 16/56] tests: acpi: cleanup use_uefi argument usage

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov 'use_uefi' is used for the flag is a part of 'test_data *data' argument that is passed to the same functions, which makes use_uefi argument redundant. Drop it and use 'data::uefi_*' directly, instead. Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-7-imamm.

[PULL 04/56] hw/acpi/piix4: No need to #include "hw/southbridge/piix.h"

2023-01-30 Thread Michael S. Tsirkin
From: Bernhard Beschow hw/acpi/piix4 has its own header with its structure definition etc. Ammends commit 2bfd0845f0 'hw/acpi/piix4: move PIIX4PMState into separate piix4.h header'. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230121151941.24120-4-shen...

[PULL 14/56] tests: acpi: extend pcihp with nested bridges

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov add nested bridges/root-ports to pcihp tests, to make sure follow up patches don't break nested enumeration of bridges in DSDT. Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-5-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[PULL 30/56] tests: acpi: whitelist DSDT before refactoring acpi based PCI hotplug machinery

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-21-imamm...@redhat.com> --- tests/qtest/bios-tables-test-allowed-diff.h | 36 + 1 file changed, 36 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios

[PULL 06/56] vhost-user: Correct a reference of TARGET_AARCH64

2023-01-30 Thread Michael S. Tsirkin
From: Akihiko Odaki Presumably TARGET_ARM_64 should be a mistake of TARGET_AARCH64. Signed-off-by: Akihiko Odaki Message-Id: <20230109063130.81296-1-akihiko.od...@daynix.com> Fixes: 27598393a2 ("Lift max memory slots limit imposed by vhost-user") Reviewed-by: Philippe Mathieu-Daudé Reviewed-by

[PULL 24/56] tests: acpi: extend bridge tests with hotplugged bridges

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov with previous commit fixing malformed PCNT calls to hotplugged bridges, it should be possible add coldplug/hotplug test when describing PCI topology in DSDT without breeaking CI. Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-15-imamm...@redhat.com> Reviewe

[PULL 27/56] tests: acpi: whitelist DSDT before refactoring acpi based PCI hotplug machinery

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-18-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h |

[PULL 08/56] virtio-rng-pci: fix migration compat for vectors

2023-01-30 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Fixup the migration compatibility for existing machine types so that they do not enable msi-x. Symptom: (qemu) qemu: get_pci_config_device: Bad config data: i=0x34 read: 84 device: 98 cmask: ff wmask: 0 w1cmask:0 qemu: Failed to load PCIDevice:config qemu: Failed

[PULL 37/56] x86: pcihp: acpi: prepare slot ignore rule to work with self describing bridges

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Before switching pci bridges to AcpiDevAmlIf interface, ensure that ignored slots are handled correctly. (existing rule works but only if bridge doesn't have AcpiDevAmlIf interface). While at it rewrite related comments to be less confusing (hopefully). Signed-off-by: Igor Ma

[PULL 11/56] tests: qtest: print device_add error before failing test

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-2-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/libqtest.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/qtest/libqtest.c b/tests/qtest

[PULL 26/56] tests: acpi: add reboot cycle to bridge test

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov hotplugged bridges should not be described in DSDT, while it works on cold boot, some ACPPI PCI code are invoked during reboot. This patch will let us catch unexpected AML if hotplug checks are broken. Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-17-imam

[PULL 40/56] pci: make sure pci_bus_is_express() won't error out with "discards ‘const’ qualifier"

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov function doesn't need RW aceess to passed in bus pointer, make it const. Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-31-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pci.h | 2 +- hw/pci/pci.

[PULL 48/56] tests: acpi: whitelist DSDT before moving non-hotpluggble slots description from hotplug path

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-39-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tests

[PULL 12/56] tests: acpi: cleanup arguments to make them more readable

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov no functional change Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-3-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 17 +++-- 1 file changed, 7 insertions(+), 10 d

[PULL 15/56] tests: acpi: update expected blobs

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov add extra nested bridges/root ports to blobs so it would be posible to check how follow up patches would affect it. Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-6-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Rev

[PULL 07/56] hw/pci-host: Use register definitions from PCI standard

2023-01-30 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé No need to document magic values when the definition names from "standard-headers/linux/pci_regs.h" are self-explicit. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230105173702.56610-1-phi...@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michae

[PULL 49/56] pcihp: generate populated non-hotpluggble slot descriptions on non-hotplug path

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Generating slots descriptions populated by non-hotpluggable devices is akward at best and complicates hotplug path (build_append_pcihp_slots) needlessly, and builds only dynamic _DSM for such slots which is overlkill. Clean it up and let non-hotplug path (build_append_pci_bus_

[PULL 19/56] pci: acpi hotplug: rename x-native-hotplug to x-do-not-expose-native-hotplug-cap

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov When ACPI PCI hotplug for Q35 was introduced (6.1), it was implemented by hiding HPC capability on PCIE slot. That however led to a number of regressions and to fix it, it was decided to keep HPC cap exposed in ACPI PCI hotplug case and force guest in ACPI PCI hotplug mode by

[PULL 33/56] tests: acpi: update expected blobs

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Expected changes: * pc/bridge testcase due to ("pcihp: compose PCNT callchain right before its user _GPE._E01") ... +Scope (\_SB.PCI0) +{ +Scope (S18) +{ +Scope (S08) +{ +Method (PCNT, 0, NotSe

[PULL 42/56] tests: acpi: whitelist DSDT before decoupling PCI hotplug code from basic slots description

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-33-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/te

[PULL 41/56] pcihp: isolate rule whether slot should be described in DSDT

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-32-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 83 +++- 1 file changed, 43 insertions(+), 40 delet

[PULL 36/56] tests: acpi: update expected blobs

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov previous commit added endpoint devices to bridge testcases, which exposes extra non-hotpluggable slot in DSDT on bus where hotplug is not available. It should look like this (numbers may vary): +Device (S28) +{ +Name (_ADR, 0x0005)

[PULL 28/56] pcihp: drop pcihp_bridge_en dependency when composing PCNT method

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov .. and use only BSEL presence to decide on how PCNT should be composed. That simplifies possible combinations to consider, but mainly it makes PCIHP AML be governed only by BSEL, which is property of PCIBus (aka part of bridge) and as result it opens possibility to convert bu

[PULL 22/56] x86: pcihp: fix invalid AML PCNT calls to hotplugged bridges

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov When QEMU is started with hotplugged bridges (think migration): QEMU -S -monitor stdio \ -device pci-bridge,chassis_nr=1 \ -device pci-bridge,bus=pci.1,addr=1.0,chassis_nr=2 (qemu) device_add pci-bridge,id=hpbr,bus=pci.1,addr=2.0,chassis_nr=3 (qemu) co

[PULL 55/56] Revert "vhost-user: Introduce nested event loop in vhost_user_read()"

2023-01-30 Thread Michael S. Tsirkin
From: Greg Kurz This reverts commit a7f523c7d114d445c5d83aecdba3efc038e5a692. The nested event loop is broken by design. It's only user was removed. Drop the code as well so that nobody ever tries to use it again. I had to fix a couple of trivial conflicts around return values because of 025faa

[PULL 03/56] hw/isa/isa-bus: Turn isa_build_aml() into qbus_build_aml()

2023-01-30 Thread Michael S. Tsirkin
From: Bernhard Beschow Frees isa-bus.c from implicit ACPI dependency. While at it, resolve open coding of qbus_build_aml() in piix3 and ich9. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov Message-Id: <20230121151941.24120-3-shen...@gmail.com>

[PULL 21/56] pci: acpihp: assign BSEL only to coldplugged bridges

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov ACPI PCI hotplug would broken after bridge hotplug and then migration if hotplugged bridge were specified on target at command line. Currently it's not possible since, 'hotplugged' property was made read-only for some time now. The issue would happen due to BSEL being assigne

[PULL 32/56] pcihp: do not put empty PCNT in DSDT

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov count number of PCNT methods that actually call Notify and if there aren't any, drop PCNT altogether. It mostly affects 'Q35' tests where there is no root-ports /bridges attached and 'PC' machine when ACPI PCI hotplug is completely disabled. Expected ASL change: -

[PULL 18/56] x86: acpi: pcihp: clean up duplicate bridge_in_acpi assignment

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-9-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c

[PULL 46/56] pcihp: acpi: ignore coldplugged bridges when composing hotpluggable slots

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov coldplugged bridges are not unpluggable, so there is no need to describe slots where they are plugged as hotpluggable. To that effect we have a condition that marks slot as non-hotpluggable if it's populated by coldplugged bridge and prevents generation _SUN/_EJ0 objects for i

[PULL 53/56] tests/qtest/bios-tables-test: Make the test less verbose by default

2023-01-30 Thread Michael S. Tsirkin
From: Thomas Huth We are facing the issues that our test logs in the gitlab CI are too big (and thus cut off). The bios-tables-test is one of the few qtests that prints many lines of output by default when running with V=1, so it contributes to this problem. Almost all other qtests are silent wit

[PULL 39/56] pcihp: make bridge describe itself using AcpiDevAmlIfClass:build_dev_aml

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov simplify build_append_pci_bus_devices() a bit by handling bridge specific logic in bridge dedicated AcpiDevAmlIfClass::build_dev_aml callback. Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-30-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off

[PULL 23/56] tests: boot_sector_test: avoid crashing if status is not available yet

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov If test case was started in paused mode (-S CLI option) and then allowed to continue via QMP, boot_sector_test could assert on transient state with following error: assertion failed (qdict_get_try_str(qret, "status") == "running"): (NULL == "running") Instead of crashing

[PULL 56/56] docs/pcie.txt: Replace ioh3420 with pcie-root-port

2023-01-30 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Do not mention ioh3420 in the "how to" doc. The device still works and can be used by already existing setups, but no need to be mentioned. Suggested-by: Andrew Jones Reviewed-by: Laszlo Ersek Signed-off-by: Marcel Apfelbaum Signed-off-by: Daniel P. Berrangé Message-Id

[PULL 45/56] tests: acpi: whitelist DSDT blobs before removing dynamic _DSM on coldplugged bridges

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-36-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 4 1 file changed, 4 insertions(+) diff --git a/tests/qtest/bi

Re: [PATCH] softmmu: Use memmove in flatview_write_continue

2023-01-30 Thread Peter Xu
On Mon, Jan 30, 2023 at 03:03:00PM -0500, Alexander Bulekov wrote: > On 230130 2251, Akihiko Odaki wrote: > > We found a case where the source passed to flatview_write_continue() may > > overlap with the destination when fuzzing igb, a new proposed network > > device with sanitizers. > > > > igb u

[PULL 43/56] pcihp: acpi: decouple hotplug and generic slots description

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Split build_append_pci_bus_devices() onto generic part that builds AML descriptions only for populated slots which is applicable to both hotplug disabled and enabled bridges. And a hotplug only part that complements generic AML with hotplug depended bits (that depend on BSEL),

[PULL 25/56] tests: boot_sector_test(): make it multi-shot

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov if the function is called the 2nd time within the same qtest session, it will prematurely return before boot sector is executed due to remaining signature. Follow up patch will add VM reboot to a test case and will call boot_sector_test() again within the same qtest env, whic

[PULL 44/56] tests: acpi: update expected blobs

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Expected change for non-populated slots is that thay are moved after non-hotpluggable PCI tree description. And expected change for hotplug capable populated slots is: - ... +Name (BSEL, 0x03) +Scope (S00) +{ +

[PULL 38/56] pci: acpi: wire up AcpiDevAmlIf interface to generic bridge

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov ... so that the concrete impl. won't has to duplicate it every time. By default it doesn't do anything unless leaf class defines and sets AcpiDevAmlIfClass::build_dev_aml handler. Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-29-imamm...@redhat.com> Review

[PULL 31/56] pcihp: compose PCNT callchain right before its user _GPE._E01

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov it's a stepping stone to making build_append_pci_bus_devices() suitable for AcpiDevAmlIfClass:build_dev_aml callback and lets further simplify it by separating PCNT generation from slots descriptions. It also makes PCNT callchain ASL much more readable since callchain not lon

[PULL 54/56] Revert "vhost-user: Monitor slave channel in vhost_user_read()"

2023-01-30 Thread Michael S. Tsirkin
From: Greg Kurz This reverts commit db8a3772e300c1a656331a92da0785d81667dc81. Motivation : this is breaking vhost-user with DPDK as reported in [0]. Received unexpected msg type. Expected 22 received 40 Fail to update device iotlb Received unexpected msg type. Expected 40 received 22 Received u

[PULL 34/56] whitelist DSDT before adding endpoint devices to bridge testcases

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-25-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 4 1 file changed, 4 insertions(+) diff --git a/tests/qtest/bi

[PULL 50/56] tests: acpi: update expected blobs

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Expected change removal of dynamic _DSM AML for non-hotpluggable hots-bridge, storage, isa bridge devices from PC machine blobs: -Scope (S00) -{ -Name (ASUN, Zero) -Method (_DSM, 4, Serialized) // _DSM: Device-S

[PULL 51/56] vhost-user: Skip unnecessary duplicated VHOST_USER_ADD/REM_MEM_REG requests

2023-01-30 Thread Michael S. Tsirkin
From: Minghao Yuan The VHOST_USER_ADD/REM_MEM_REG requests should be categorized into non-vring specific messages, and should be sent only once. Signed-off-by: Minghao Yuan Message-Id: <20230123122119.194347-1-yuanm...@chinatelecom.cn> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[PULL 52/56] hw: Use TYPE_PCI_BUS definition where appropriate

2023-01-30 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé Use the proper QOM type definition instead of magic string. This also helps during eventual refactor while using git-grep. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230117193014.83502-1-phi...@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Mi

[PULL 47/56] tests: acpi: update expected blobs

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov expected change is removal of dynamic _DSM bits from slots populated by coldplugged bridges (something like): -Scope (S18) -{ -Name (ASUN, 0x03) -Method (_DSM, 4, Serialized) // _DSM: Device-Specific Me

[PULL 17/56] pci_bridge: remove whitespace

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-8-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci-bridge/pci_bridge_dev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/pci-bridge/pci_bridge_dev.c b/

[PULL 35/56] tests: acpi: add endpoint devices to bridges

2023-01-30 Thread Michael S. Tsirkin
From: Igor Mammedov to make sure that they are enumerated or ignored as expected Signed-off-by: Igor Mammedov Message-Id: <20230112140312.3096331-26-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 37

Re: [PATCH 4/4] iotests/detect-zeroes-registered-buf: add new test

2023-01-30 Thread Stefan Hajnoczi
On Fri, Jan 27, 2023 at 05:25:48PM -0600, Eric Blake wrote: > On Thu, Jan 26, 2023 at 03:14:01PM -0500, Stefan Hajnoczi wrote: > > This regression test demonstrates that detect-zeroes works with > > registered buffers. Bug details: > > https://gitlab.com/qemu-project/qemu/-/issues/1404 > > > > Sig

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-01-30 Thread Alex Bennée
Daniel P. Berrangé writes: > On Mon, Jan 30, 2023 at 11:47:02AM +, Peter Maydell wrote: >> On Mon, 30 Jan 2023 at 11:44, Thomas Huth wrote: >> > >> > Testing 32-bit host OS support takes a lot of precious time during the QEMU >> > contiguous integration tests, and considering that many OS

Re: [PATCH 3/4] qemu-io: add -r option to register I/O buffer

2023-01-30 Thread Stefan Hajnoczi
On Fri, Jan 27, 2023 at 05:24:30PM -0600, Eric Blake wrote: > On Thu, Jan 26, 2023 at 03:14:00PM -0500, Stefan Hajnoczi wrote: > > The blk_register_buf() API is an optimization hint that allows some > > block drivers to avoid I/O buffer housekeeping or bounce buffers. > > > > Add an -r option to r

[PATCH 07/27] tcg: Remove TEMP_NORMAL

2023-01-30 Thread Richard Henderson
TEMP_NORMAL is a subset of TEMP_EBB. Promote single basic block temps to single extended basic block. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 -- tcg/tcg.c | 19 +++ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/include/tcg/tcg.h b/i

[PATCH 03/27] accel/tcg: Use more accurate max_insns for tb_overflow

2023-01-30 Thread Richard Henderson
Write back the number of insns that we attempt to translate, so that if we longjmp out we have a more accurate limit for the next attempt. This results in fewer restarts when some limit is consumed by few instructions. Signed-off-by: Richard Henderson --- accel/tcg/translator.c | 2 +- 1 file c

[PATCH 17/27] target/arm: Don't use tcg_temp_local_new_*

2023-01-30 Thread Richard Henderson
Since tcg_temp_new_* is now identical, use those. Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 6 +++--- target/arm/translate.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 02150d

[PATCH 09/27] tcg: Add tcg_temp_ebb_new_{i32,i64,ptr}

2023-01-30 Thread Richard Henderson
TCG internals will want to be able to allocate and reuse explicitly life-limited temporaries. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 28 1 file changed, 28 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index bbede1e900..fe57373d4

[PATCH 25/27] exec/gen-icount: Don't use tcg_temp_local_new_i32

2023-01-30 Thread Richard Henderson
Since tcg_temp_new_i32 is now identical, use that. Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index c57204ddad..21a1bff8b7 100644 --- a/include/exe

[PATCH 05/27] tcg: Rename TEMP_LOCAL to TEMP_TB

2023-01-30 Thread Richard Henderson
Use TEMP_TB as that is more explicit about the default lifetime of the data. While "global" and "local" used to be contrasting, we have more lifetimes than that now. Do not yet rename tcg_temp_local_new_*, just the enum. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 12

[PATCH] target/arm: Fix physical address resolution for Stage2

2023-01-30 Thread Richard Henderson
Conversion to probe_access_full missed applying the page offset. Cc: qemu-sta...@nongnu.org Reported-by: Sid Manning Fixes: f3639a64f602 ("target/arm: Use softmmu tlbs for page table walking") Signed-off-by: Richard Henderson --- target/arm/ptw.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH 06/27] tcg: Add liveness_pass_0

2023-01-30 Thread Richard Henderson
Attempt to reduce the lifetime of TEMP_TB. Signed-off-by: Richard Henderson --- tcg/tcg.c | 69 +++ 1 file changed, 69 insertions(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index 3e12053229..fb9ab967ea 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -285

[PATCH 04/27] tcg: Remove branch-to-next regardless of reference count

2023-01-30 Thread Richard Henderson
Just because the label reference count is more than 1 does not mean we cannot remove a branch-to-next. By doing this first, the label reference count may drop to 0, and then the label itself gets removed as before. Signed-off-by: Richard Henderson --- tcg/tcg.c | 33 +---

[PATCH 15/27] tcg: Change default temp lifetime to TEMP_TB

2023-01-30 Thread Richard Henderson
Guest front-ends now get temps that span the lifetime of the translation block by default, which avoids accidentally using the temp across branches and invalidating the data. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) dif

[PATCH 01/27] tcg: Adjust TCGContext.temps_in_use check

2023-01-30 Thread Richard Henderson
Change the temps_in_use check to use assert not fprintf. Move the assert for double-free before the check for count, since that is the more immediate problem. Signed-off-by: Richard Henderson --- tcg/tcg.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tcg/tcg.c

[PATCH 27/27] tcg: Update docs/devel/tcg-ops.rst for temporary changes

2023-01-30 Thread Richard Henderson
Rewrite the sections which talked about 'local temporaries'. Remove some assumptions which no longer hold. Signed-off-by: Richard Henderson --- docs/devel/tcg-ops.rst | 103 + 1 file changed, 54 insertions(+), 49 deletions(-) diff --git a/docs/devel/tcg-o

[PATCH 23/27] target/ppc: Don't use tcg_temp_local_new

2023-01-30 Thread Richard Henderson
Since tcg_temp_new is now identical, use that. Signed-off-by: Richard Henderson --- target/ppc/translate.c | 6 +++--- target/ppc/translate/spe-impl.c.inc | 8 target/ppc/translate/vmx-impl.c.inc | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/targe

[PATCH 02/27] accel/tcg: Pass max_insn to gen_intermediate_code by pointer

2023-01-30 Thread Richard Henderson
In preparation for returning the number of insns generated via the same pointer. Adjust only the prototypes so far. Signed-off-by: Richard Henderson --- include/exec/translator.h | 4 ++-- accel/tcg/translate-all.c | 2 +- accel/tcg/translator.c| 4 ++-- target/alpha/translate.c

[PATCH 18/27] target/cris: Don't use tcg_temp_local_new

2023-01-30 Thread Richard Henderson
Since tcg_temp_new is now identical, use that. Signed-off-by: Richard Henderson --- target/cris/translate.c | 6 +++--- target/cris/translate_v10.c.inc | 10 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index

[PATCH 00/27] tcg: Simplify temporary usage

2023-01-30 Thread Richard Henderson
Based-on: 20230126043824.54819-1-richard.hender...@linaro.org ("[PATCH v5 00/36] tcg: Support for Int128 with helpers") The biggest pitfall for new users of TCG is the fact that "normal" temporaries die at branches, and we must therefore use a different "local" temporary in that case. The followi

[PATCH 08/27] tcg: Pass TCGTempKind to tcg_temp_new_internal

2023-01-30 Thread Richard Henderson
While the argument can only be TEMP_EBB or TEMP_TB, it's more obvious this way. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 18 +- tcg/tcg.c | 8 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h

Re: [PATCH] target/arm: Fix physical address resolution for Stage2

2023-01-30 Thread Richard Henderson
On 1/30/23 10:59, Richard Henderson wrote: Conversion to probe_access_full missed applying the page offset. Cc: qemu-sta...@nongnu.org Reported-by: Sid Manning Fixes: f3639a64f602 ("target/arm: Use softmmu tlbs for page table walking") Signed-off-by: Richard Henderson --- target/arm/ptw.c |

[PATCH 24/27] target/xtensa: Don't use tcg_temp_local_new_*

2023-01-30 Thread Richard Henderson
Since tcg_temp_new_* is now identical, use those. Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 8d7bf566de..4af0650deb 100644 --- a/ta

[PATCH 10/27] tcg: Add tcg_gen_movi_ptr

2023-01-30 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index 839d91c0c7..66b1461caa 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -1285,6 +1285,11 @@ static inline void tcg_ge

[PATCH 22/27] target/mips: Don't use tcg_temp_local_new

2023-01-30 Thread Richard Henderson
Since tcg_temp_new is now identical, use that. Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 57 ++-- target/mips/tcg/nanomips_translate.c.inc | 4 +- 2 files changed, 16 insertions(+), 45 deletions(-) diff --git a/target/mips/tcg/translate

[PATCH 13/27] accel/tcg/plugin: Tidy plugin_gen_disable_mem_helpers

2023-01-30 Thread Richard Henderson
Here we are creating a temp whose value needs to be replaced, but always storing NULL into CPUState.plugin_mem_cbs. Use tcg_constant_ptr(0) explicitly. Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/accel/t

[PATCH 12/27] accel/tcg/plugin: Use tcg_temp_ebb_*

2023-01-30 Thread Richard Henderson
All of these uses have quite local scope. Avoid tcg_const_*, because we haven't added a corresponding interface for TEMP_EBB. Use explicit tcg_gen_movi_* instead. Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 24 ++-- 1 file changed, 14 insertions(+), 10 dele

[PATCH 19/27] target/hexagon: Don't use tcg_temp_local_new_*

2023-01-30 Thread Richard Henderson
Since tcg_temp_new_* is now identical, use those. Signed-off-by: Richard Henderson --- target/hexagon/idef-parser/README.rst | 4 ++-- target/hexagon/gen_tcg.h| 4 ++-- target/hexagon/genptr.c | 16 target/hexagon/idef-parser/parse

[PATCH 20/27] target/hppa: Don't use tcg_temp_local_new

2023-01-30 Thread Richard Henderson
This wasn't actually used at all, just some unused macro re-definitions. Signed-off-by: Richard Henderson --- target/hppa/translate.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 0102cf451b..cee960949f 100644 --- a/target/hppa/tran

[PATCH 11/27] tcg: Use tcg_temp_ebb_new_* in tcg/

2023-01-30 Thread Richard Henderson
All of these have obvious and quite local scope. Signed-off-by: Richard Henderson --- tcg/tcg-op-gvec.c | 270 +++--- tcg/tcg-op.c | 258 ++-- tcg/tcg.c | 2 +- 3 files changed, 265 insertions(+), 265

[PATCH 16/27] target/arm: Drop copies in gen_sve_{ldr,str}

2023-01-30 Thread Richard Henderson
Since we now get TEMP_TB temporaries by default, we no longer need to make copies across these loops. These were the only uses of new_tmp_a64_local(), so remove that as well. Signed-off-by: Richard Henderson --- target/arm/translate-a64.h | 1 - target/arm/translate-a64.c | 6 -- target/a

[PATCH 14/27] tcg: Don't re-use TEMP_TB temporaries

2023-01-30 Thread Richard Henderson
Reusing TEMP_TB interferes with detecting whether the temp can be adjusted to TEMP_EBB. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 +- tcg/tcg.c | 101 -- 2 files changed, 53 insertions(+), 50 deletions(-) diff --git a/includ

[PATCH 26/27] tcg: Remove tcg_temp_local_new_*, tcg_const_local_*

2023-01-30 Thread Richard Henderson
These symbols are now unused. Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 2 -- include/tcg/tcg.h| 28 tcg/tcg.c| 16 3 files changed, 46 deletions(-) diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index 66

[PATCH 21/27] target/i386: Don't use tcg_temp_local_new

2023-01-30 Thread Richard Henderson
Since tcg_temp_new is now identical, use that. In some cases we can avoid a copy from A0 or T0. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i

Re: [PATCH 3/6] tests/qtest/display-vga-test: Add proper checks if a device is available

2023-01-30 Thread Richard Henderson
On 1/30/23 00:44, Thomas Huth wrote: int main(int argc, char **argv) { -const char *arch = qtest_get_arch(); +const char *devices[] = { +"cirrus-vga", static const char * const devices[] Otherwise, Reviewed-by: Richard Henderson r~

[PATCH v6 00/36] tcg: Support for Int128 with helpers

2023-01-30 Thread Richard Henderson
Branch: https://gitlab.com/rth7680/qemu/-/tree/tcg-i128 Based-on: 20230124020507.3732200-1-richard.hender...@linaro.org ("[PULL v2 00/15] tcg patch queue") Changes for v6: * R-b applied. Patches lacking review: 05-tcg-Add-TCG_CALL_-RET-ARG-_BY_REF.patch 15-tcg-Add-guest-load-store-primitive

[PATCH v6 07/36] tcg: Add TCG_CALL_RET_BY_VEC

2023-01-30 Thread Richard Henderson
This will be used by _WIN64 to return i128. Not yet used, because allocation is not yet enabled. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 1 + tcg/tcg.c | 19 +++ 2 files changed, 20 insertions(+) diff --git a/tcg/tcg-interna

<    1   2   3   4   5   >