Re: [PATCH v7 00/10] make write_misa a no-op and FEATURE_* cleanups

2023-03-02 Thread Daniel Henrique Barboza
On 3/1/23 20:43, Palmer Dabbelt wrote: On Wed, 22 Feb 2023 10:51:55 PST (-0800), dbarb...@ventanamicro.com wrote: Hi, In this version we gave up removing all the write_misa() body and, instead, we went back to something closer to what we were doing in v2. write_misa() is now gated behind an

Re: [PATCH 0/4] RISCVCPUConfig related cleanups

2023-03-02 Thread Daniel Henrique Barboza
On 3/1/23 23:24, Bin Meng wrote: Hi Palmer, On Thu, Mar 2, 2023 at 10:08 AM Palmer Dabbelt wrote: On Fri, 24 Feb 2023 09:45:16 PST (-0800), dbarb...@ventanamicro.com wrote: Hi, These cleanups were suggested by LIU Zhiwei during the review of the RISCV_FEATURE_* cleanups, currently on ver

Re: [virtio-dev] [RFC QEMU] docs: vhost-user: Add custom memory mapping support

2023-03-02 Thread Viresh Kumar
On 01-03-23, 12:29, Stefan Hajnoczi wrote: > What is the advantage over defining separate messages? Separate messages > are cleaner and more typesafe. I thought we wanted to keep single message for one kind of functionality, which is mmap related quirks here. And so it would be better if we can re

[PULL 01/53] hw/smbios: fix field corruption in type 4 table

2023-03-02 Thread Michael S. Tsirkin
From: Julia Suvorova Since table type 4 of SMBIOS version 2.6 is shorter than 3.0, the strings which follow immediately after the struct fields have been overwritten by unconditional filling of later fields such as core_count2. Make these fields dependent on the SMBIOS version. Fixes: 05e27d74c7

[PULL 02/53] Revert "x86: don't let decompressed kernel image clobber setup_data"

2023-03-02 Thread Michael S. Tsirkin
This reverts commit eac7a7791bb6d719233deed750034042318ffd56. Fixes: eac7a7791b ("x86: don't let decompressed kernel image clobber setup_data") Signed-off-by: Michael S. Tsirkin Tested-by: Nathan Chancellor Tested-by: Dov Murik Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL 04/53] Revert "x86: re-initialize RNG seed when selecting kernel"

2023-03-02 Thread Michael S. Tsirkin
This reverts commit cc63374a5a7c240b7d3be734ef589dabbefc7527. Fixes: cc63374a5a ("x86: re-initialize RNG seed when selecting kernel") Signed-off-by: Michael S. Tsirkin Tested-by: Nathan Chancellor Tested-by: Dov Murik Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-

[PULL 12/53] vhost-user-i2c: Back up vqs before cleaning up vhost_dev

2023-03-02 Thread Michael S. Tsirkin
From: Akihiko Odaki vhost_dev_cleanup() clears vhost_dev so back up its vqs member to free the memory pointed by the member. Fixes: 7221d3b634 ("hw/virtio: add boilerplate for vhost-user-i2c device") Signed-off-by: Akihiko Odaki Message-Id: <20230130140435.78049-1-akihiko.od...@daynix.com> Revi

[PULL 03/53] Revert "x86: do not re-randomize RNG seed on snapshot load"

2023-03-02 Thread Michael S. Tsirkin
This reverts commit 14b29fea742034186403914b4d013d0e83f19e78. Signed-off-by: Michael S. Tsirkin Fixes: 14b29fea74 ("x86: do not re-randomize RNG seed on snapshot load") Tested-by: Nathan Chancellor Tested-by: Dov Murik Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed

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

2023-03-02 Thread Michael S. Tsirkin
The following changes since commit 627634031092e1514f363fd8659a579398de0f0e: Merge tag 'buildsys-qom-qdev-ui-20230227' of https://github.com/philmd/qemu into staging (2023-02-28 15:09:18 +) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags

[PULL 05/53] Revert "x86: reinitialize RNG seed on system reboot"

2023-03-02 Thread Michael S. Tsirkin
This reverts commit 763a2828bf313ed55878b09759dc435355035f2e. Fixes: 763a2828bf ("x86: reinitialize RNG seed on system reboot") Signed-off-by: Michael S. Tsirkin Tested-by: Nathan Chancellor Tested-by: Dov Murik Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Da

[PULL 35/53] chardev/char-socket: set s->listener = NULL in char_socket_finalize

2023-03-02 Thread Michael S. Tsirkin
From: Yajun Wu After live migration with virtio block device, qemu crash at: #0 0x55914f46f795 in object_dynamic_cast_assert (obj=0x559151b7b090, typename=0x55914f80fbc4 "qio-channel", file=0x55914f80fb90 "/images/testvfe/sw/qemu.gerrit/include/io/channel.h", line=30, func=0x5591

[PULL 08/53] Revert "hw/i386: pass RNG seed via setup_data entry"

2023-03-02 Thread Michael S. Tsirkin
This reverts commit 67f7e426e53833a5db75b0d813e8d537b8a75bd2. Additionally to the automatic revert, I went over the code and dropped all mentions of legacy_no_rng_seed manually, effectively reverting a combination of 2 additional commits: commit ffe2d2382e5f1aae1abc4081af407905ef380311 Au

[PULL 21/53] pci/shpc: change shpc_get_status() return type to uint8_t

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy The result of the function is always one byte. The result is always assigned to uint8_t variable. Also, shpc_get_status() should be symmetric to shpc_set_status() which has uint8_t value argument. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton

[PULL 20/53] pci/shpc: set attention led to OFF on reset

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy 0 is not a valid state for the led. Let's start with OFF. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin Message-Id: <20230216180356.156832-2-vsement...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL 15/53] hw/timer/hpet: Fix expiration time overflow

2023-03-02 Thread Michael S. Tsirkin
From: Akihiko Odaki The expiration time provided for timer_mod() can overflow if a ridiculously large value is set to the comparator register. The resulting value can represent a past time after rounded, forcing the timer to fire immediately. If the timer is configured as periodic, it will rearm

[PULL 41/53] intel-iommu: send UNMAP notifications for domain or global inv desc

2023-03-02 Thread Michael S. Tsirkin
From: Peter Xu We don't send UNMAP notification upon domain or global invalidation which will lead the notifier can't work correctly. One example is to use vhost remote IOTLB without enabling device IOTLB. Fixing this by sending UNMAP notification. Signed-off-by: Peter Xu Signed-off-by: Jason

[PULL 17/53] libvhost-user: Adopt new backend naming

2023-03-02 Thread Michael S. Tsirkin
From: Maxime Coquelin The Vhost-user specification changed feature and request naming from _SLAVE_ to _BACKEND_. This patch adopts the new naming convention. Signed-off-by: Maxime Coquelin Message-Id: <20230208203259.381326-3-maxime.coque...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Rev

[PULL 14/53] virtio-rng-pci: fix transitional migration compat for vectors

2023-03-02 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" In bad9c5a516 ("virtio-rng-pci: fix migration compat for vectors") I fixed the virtio-rng-pci migration compatibility, but it was discovered that we also need to fix the other aliases of the device for the transitional cases. Fixes: 9ea02e8f1 ('virtio-rng-pci: Allo

[PULL 18/53] vhost-user: Adopt new backend naming

2023-03-02 Thread Michael S. Tsirkin
From: Maxime Coquelin The Vhost-user specification changed feature and request naming from _SLAVE_ to _BACKEND_. This patch adopts the new naming convention. Signed-off-by: Maxime Coquelin Message-Id: <20230208203259.381326-4-maxime.coque...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Rev

[PULL 09/53] virtio-net: clear guest_announce feature if no cvq backend

2023-03-02 Thread Michael S. Tsirkin
From: Eugenio Pérez Since GUEST_ANNOUNCE is emulated the feature bit could be set without backend support. This happens in the vDPA case. However, backend vDPA parent may not have CVQ support. This causes an incoherent feature set, and the driver may refuse to start. This happens in virtio-ne

[PULL 28/53] pcie: drop unused PCIExpressIndicator

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy The structure type is unused. Also, it's the only user of corresponding macros, so drop them too. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Anton Kuchin Message-Id: <20230216180356.156832-10-vsement...@yande

[PULL 29/53] pcie: pcie_cap_slot_enable_power() use correct helper

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy *_by_mask() helpers shouldn't be used here (and that's the only one). *_by_mask() helpers do shift their value argument, but in pcie.c code we use values that are already shifted appropriately. Happily, PCI_EXP_SLTCTL_PWR_ON is zero, so shift doesn't matter. But

[PULL 30/53] pcie: introduce pcie_sltctl_powered_off() helper

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy In pcie_cap_slot_write_config() we check for PCI_EXP_SLTCTL_PWR_OFF in a bad form. We should distinguish PCI_EXP_SLTCTL_PWR which is a "mask" and PCI_EXP_SLTCTL_PWR_OFF which is value for that mask. Better code is in pcie_cap_slot_unplug_request_cb() and in pci

[PULL 06/53] Revert "x86: use typedef for SetupData struct"

2023-03-02 Thread Michael S. Tsirkin
This reverts commit eebb38a5633a77f5fa79d6486d5b2fcf8fbe3c07. Fixes: eebb38a563 ("x86: use typedef for SetupData struct") Signed-off-by: Michael S. Tsirkin Tested-by: Nathan Chancellor Tested-by: Dov Murik Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Daniel P

[PULL 27/53] pcie_regs: drop duplicated indicator value macros

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy We already have indicator values in include/standard-headers/linux/pci_regs.h , no reason to reinvent them in include/hw/pci/pcie_regs.h. (and we already have usage of PCI_EXP_SLTCTL_PWR_IND_BLINK and PCI_EXP_SLTCTL_PWR_IND_OFF in hw/pci/pcie.c, so let's be cons

[PULL 37/53] intel-iommu: fail MAP notifier without caching mode

2023-03-02 Thread Michael S. Tsirkin
From: Jason Wang Without caching mode, MAP notifier won't work correctly since guest won't send IOTLB update event when it establishes new mappings in the I/O page tables. Let's fail the IOMMU notifiers early instead of misbehaving silently. Reviewed-by: Eric Auger Tested-by: Viktor Prutyanov

[PULL 32/53] vhost: avoid a potential use of an uninitialized variable in vhost_svq_poll()

2023-03-02 Thread Michael S. Tsirkin
From: Carlos López In vhost_svq_poll(), if vhost_svq_get_buf() fails due to a device providing invalid descriptors, len is left uninitialized and returned to the caller, potentally leaking stack data or causing undefined behavior. Fix this by initializing len to 0. Found with GCC 13 and -fanaly

[PULL 26/53] pcie: pcie_cap_slot_write_config(): use correct macro

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy PCI_EXP_SLTCTL_PIC_OFF is a value, and PCI_EXP_SLTCTL_PIC is a mask. Happily PCI_EXP_SLTCTL_PIC_OFF is a maximum value for this mask and is equal to the mask itself. Still the code looks like a bug. Let's make it more reader-friendly. Signed-off-by: Vladimir Se

[PULL 34/53] hw/pci: Trace IRQ routing on PCI topology

2023-03-02 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé Trace how IRQ are rooted from EP to RC. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230211152239.88106-3-phi...@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pci.c| 8 hw/pci/trace-events | 1 +

[PULL 47/53] tests/acpi: Allow update of q35/DSDT.cxl

2023-03-02 Thread Michael S. Tsirkin
From: Jonathan Cameron Next patch will drop duplicate _UID entry so allow update. Reviewed-by: Gregory Price Tested-by: Gregory Price Signed-off-by: Jonathan Cameron Message-Id: <20230206172816.8201-6-jonathan.came...@huawei.com> Reviewed-by: Fan Ni Reviewed-by: Michael S. Tsirkin Signed-of

[PULL 53/53] tests/data/acpi/virt: drop (most) duplicate files.

2023-03-02 Thread Michael S. Tsirkin
When virt ACPI files were added, lots of duplicates were created because we forgot that there's a no-prefix fallback: e.g. if tests/data/acpi/virt/APIC.memhp is not there then test will use tests/data/acpi/virt/APIC. Drop these. These were found with $find tests/data/acpi/ -type f -exec sha256sum

[PULL 40/53] smmu: switch to use memory_region_unmap_iommu_notifier_range()

2023-03-02 Thread Michael S. Tsirkin
From: Jason Wang Signed-off-by: Jason Wang Message-Id: <20230223065924.42503-5-jasow...@redhat.com> Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/arm/smmu-common.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --

[PULL 44/53] hw/pci-bridge/cxl_downstream: Fix type naming mismatch

2023-03-02 Thread Michael S. Tsirkin
From: Jonathan Cameron Fix capitalization difference between struct name and typedef. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ira Weiny Reviewed-by: Gregory Price Tested-by: Gregory Price Signed-off-by: Jonathan Cameron Message-Id: <20230206172816

[PULL 25/53] pci/shpc: refactor shpc_device_plug_common()

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy Rename it to shpc_device_get_slot(), to mention what it does rather than how it is used. It also helps to reuse it in further commit. Also, add a return value and get rid of local_err. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin Mes

[PULL 51/53] qemu/uuid: Add UUID static initializer

2023-03-02 Thread Michael S. Tsirkin
From: Ira Weiny UUID's are defined as network byte order fields. No static initializer was available for UUID's in their standard big endian format. Define a big endian initializer for UUIDs. Reviewed-by: Gregory Price Tested-by: Gregory Price Signed-off-by: Ira Weiny Signed-off-by: Jonatha

[PULL 42/53] MAINTAINERS: Add Fan Ni as Compute eXpress Link QEMU reviewer

2023-03-02 Thread Michael S. Tsirkin
From: Jonathan Cameron Fan Ni has offered to help out with QEMU CXL emulation reviewing. Add him as a designated reviewer. Thanks to Fan for stepping up after I requested help following Ben stepping down as co-maintainer. Fan base been active in testing and review recently so great to have Fan o

[PULL 11/53] vhost-user-gpio: Configure vhost_dev when connecting

2023-03-02 Thread Michael S. Tsirkin
From: Akihiko Odaki vhost_dev_cleanup(), called from vu_gpio_disconnect(), clears vhost_dev so vhost-user-gpio must set the members of vhost_dev each time connecting. do_vhost_user_cleanup() should also acquire the pointer to vqs directly from VHostUserGPIO instead of referring to vhost_dev as i

[PULL 50/53] qemu/bswap: Add const_le64()

2023-03-02 Thread Michael S. Tsirkin
From: Ira Weiny Gcc requires constant versions of cpu_to_le* calls. Add a 64 bit version. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Gregory Price Tested-by: Gregory Price Signed-off-by: Ira Weiny Signed-off-by: Jonathan Cameron Message-Id: <2023020617281

[PULL 10/53] backends/vhost-user: remove the ioeventfd check

2023-03-02 Thread Michael S. Tsirkin
From: Alex Bennée While ioeventfds are needed for good performance with KVM guests it should not be a gating requirement. We can run vhost-user backends using simulated ioeventfds or inband signalling. With this change I can run: $QEMU $OPTS \ -display gtk,gl=on \ -device vhost-user-g

[PULL 19/53] vdpa: stop all svq on device deletion

2023-03-02 Thread Michael S. Tsirkin
From: Eugenio Pérez Not stopping them leave the device in a bad state when virtio-net fronted device is unplugged with device_del monitor command. This is not triggable in regular poweroff or qemu forces shutdown because cleanup is called right after vhost_vdpa_dev_start(false). But devices hot

Re: [PATCH v5 13/18] pci: introduce pci_find_the_only_child()

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 00:09, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:51PM +0300, Vladimir Sementsov-Ogievskiy wrote: To be used in further patch to identify the device hot-plugged into pcie-root-port. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin Wait a second doe

[PULL 36/53] memory: Optimize replay of guest mapping

2023-03-02 Thread Michael S. Tsirkin
From: Zhenzhong Duan On x86, there are two notifiers registered due to vtd-ir memory region splitting the whole address space. During replay of the address space for each notifier, the whole address space is scanned which is unnecessory. We only need to scan the space belong to notifier montiore

[PULL 39/53] memory: introduce memory_region_unmap_iommu_notifier_range()

2023-03-02 Thread Michael S. Tsirkin
From: Jason Wang This patch introduces a new helper to unmap the range of a specific IOMMU notifier. Signed-off-by: Jason Wang Message-Id: <20230223065924.42503-4-jasow...@redhat.com> Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/exec/me

[PULL 45/53] hw/cxl: set cxl-type3 device type to PCI_CLASS_MEMORY_CXL

2023-03-02 Thread Michael S. Tsirkin
From: Gregory Price Current code sets to STORAGE_EXPRESS and then overrides it. Reviewed-by: Davidlohr Bueso Reviewed-by: Ira Weiny Signed-off-by: Gregory Price Signed-off-by: Jonathan Cameron Message-Id: <20230206172816.8201-4-jonathan.came...@huawei.com> Reviewed-by: Fan Ni Reviewed-by: M

[PULL 33/53] libvhost-user: check for NULL when allocating a virtqueue element

2023-03-02 Thread Michael S. Tsirkin
From: Carlos López Check the return value for malloc(), avoiding a NULL pointer dereference, and propagate error in function callers. Found with GCC 13 and -fanalyzer: ../subprojects/libvhost-user/libvhost-user.c: In function ‘virtqueue_alloc_element’: ../subprojects/libvhost-user/libvhost-use

[PULL 23/53] pci/shpc: more generic handle hot-unplug in shpc_slot_command()

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy Free slot if both conditions (power-led = OFF and state = DISABLED) becomes true regardless of the sequence. It is similar to how PCIe hotplug works. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin Message-Id: <20230216180356.156832-5-vs

Re: [PATCH] acpi: cpuhp: fix guest-visible maximum access size to the legacy reg block

2023-03-02 Thread Christian Ehrhardt
On Wed, Mar 1, 2023 at 9:04 AM Laszlo Ersek wrote: > > Hello Christian, > > On 3/1/23 08:17, Christian Ehrhardt wrote: > > On Thu, Jan 5, 2023 at 8:14 AM Laszlo Ersek wrote: > >> > >> On 1/4/23 13:35, Michael S. Tsirkin wrote: > >>> On Wed, Jan 04, 2023 at 10:01:38AM +0100, Laszlo Ersek wrote: >

[PULL 07/53] Revert "x86: return modified setup_data only if read as memory, not as file"

2023-03-02 Thread Michael S. Tsirkin
This reverts commit e935b735085dfa61d8e6d276b6f9e7687796a3c7. Fixes: e935b73508 ("x86: return modified setup_data only if read as memory, not as file") Signed-off-by: Michael S. Tsirkin Tested-by: Nathan Chancellor Tested-by: Dov Murik Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[PULL 48/53] hw/i386/acpi: Drop duplicate _UID entry for CXL root bridge

2023-03-02 Thread Michael S. Tsirkin
From: Jonathan Cameron Noticed as this prevents iASL disasembling the DSDT table. Reviewed-by: Ira Weiny Reviewed-by: Gregory Price Tested-by: Gregory Price Signed-off-by: Jonathan Cameron Message-Id: <20230206172816.8201-7-jonathan.came...@huawei.com> Reviewed-by: Fan Ni Reviewed-by: Micha

[PULL 24/53] pci/shpc: pass PCIDevice pointer to shpc_slot_command()

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy We'll need it in further patch to report bridge in QAPI event. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin Message-Id: <20230216180356.156832-6-vsement...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsi

[PULL 46/53] hw/cxl: Add CXL_CAPACITY_MULTIPLIER definition

2023-03-02 Thread Michael S. Tsirkin
From: Gregory Price Remove usage of magic numbers when accessing capacity fields and replace with CXL_CAPACITY_MULTIPLIER, matching the kernel definition. Signed-off-by: Gregory Price Reviewed-by: Davidlohr Bueso Signed-off-by: Jonathan Cameron Message-Id: <20230206172816.8201-5-jonathan.cam

[PULL 22/53] pci/shpc: shpc_slot_command(): handle PWRONLY -> ENABLED transition

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy ENABLED -> PWRONLY transition is not allowed and we handle it by shpc_invalid_command(). But PWRONLY -> ENABLED transition is silently ignored, which seems wrong. Let's handle it as correct. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin

[PULL 38/53] intel-iommu: fail DEVIOTLB_UNMAP without dt mode

2023-03-02 Thread Michael S. Tsirkin
From: Jason Wang Without dt mode, device IOTLB notifier won't work since guest won't send device IOTLB invalidation descriptor in this case. Let's fail early instead of misbehaving silently. Reviewed-by: Laurent Vivier Tested-by: Laurent Vivier Tested-by: Viktor Prutyanov Buglink: https://bug

[PULL 49/53] tests: acpi: Update q35/DSDT.cxl for removed duplicate UID

2023-03-02 Thread Michael S. Tsirkin
From: Jonathan Cameron Dropping the ID effects this table in trivial fashion. Reviewed-by: Gregory Price Tested-by: Gregory Price Signed-off-by: Jonathan Cameron Message-Id: <20230206172816.8201-8-jonathan.came...@huawei.com> Reviewed-by: Fan Ni Reviewed-by: Michael S. Tsirkin Signed-off-by

[PULL 13/53] vhost-user-rng: Back up vqs before cleaning up vhost_dev

2023-03-02 Thread Michael S. Tsirkin
From: Akihiko Odaki vhost_dev_cleanup() clears vhost_dev so back up its vqs member to free the memory pointed by the member. Fixes: 821d28b88f ("vhost-user-rng: Add vhost-user-rng implementation") Signed-off-by: Akihiko Odaki Message-Id: <20230130140516.78078-1-akihiko.od...@daynix.com> Reviewe

[PULL 52/53] hw/cxl/mailbox: Use new UUID network order define for cel_uuid

2023-03-02 Thread Michael S. Tsirkin
From: Ira Weiny The cel_uuid was programatically generated previously because there was no static initializer for network order UUIDs. Use the new network order initializer for cel_uuid. Adjust cxl_initialize_mailbox() because it can't fail now. Update specification reference. Reviewed-by: Ph

[PULL 16/53] docs: vhost-user: replace _SLAVE_ with _BACKEND_

2023-03-02 Thread Michael S. Tsirkin
From: Maxime Coquelin Backend's message and protocol features names were still using "_SLAVE_" naming. For consistency with the new naming convention, replace it with _BACKEND_. Signed-off-by: Maxime Coquelin Message-Id: <20230208203259.381326-2-maxime.coque...@redhat.com> Reviewed-by: Philippe

[PULL 43/53] hw/mem/cxl_type3: Improve error handling in realize()

2023-03-02 Thread Michael S. Tsirkin
From: Jonathan Cameron msix_init_exclusive_bar() can fail, so if it does cleanup the address space. Reviewed-by: Ira Weiny Reviewed-by: Gregory Price Tested-by: Gregory Price Signed-off-by: Jonathan Cameron Message-Id: <20230206172816.8201-2-jonathan.came...@huawei.com> Reviewed-by: Fan Ni

[PULL 31/53] pcie: set power indicator to off on reset by default

2023-03-02 Thread Michael S. Tsirkin
From: Vladimir Sementsov-Ogievskiy It should be zero, the only valid values are ON, OFF and BLINK. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin Message-Id: <20230216180356.156832-13-vsement...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. T

Re: [PATCH v5 13/18] pci: introduce pci_find_the_only_child()

2023-03-02 Thread Michael S. Tsirkin
On Thu, Mar 02, 2023 at 11:28:44AM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 02.03.23 00:09, Michael S. Tsirkin wrote: > > On Thu, Feb 16, 2023 at 09:03:51PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > To be used in further patch to identify the device hot-plugged into > > > pcie-ro

Re: [PATCH v5 18/18] qapi: introduce DEVICE_ON event

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 00:07, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:56PM +0300, Vladimir Sementsov-Ogievskiy wrote: We have DEVICE_DELETED event, that signals that device_del command is actually completed. But we don't have a counter-part for device_add. Still it's sensible for SHPC and P

Re: [PATCH v5 18/18] qapi: introduce DEVICE_ON event

2023-03-02 Thread Michael S. Tsirkin
On Thu, Feb 16, 2023 at 09:03:56PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We have DEVICE_DELETED event, that signals that device_del command is > actually completed. But we don't have a counter-part for device_add. > Still it's sensible for SHPC and PCIe-native hotplug, as there are time > wh

Re: [PATCH v5 13/18] pci: introduce pci_find_the_only_child()

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 11:37, Michael S. Tsirkin wrote: On Thu, Mar 02, 2023 at 11:28:44AM +0300, Vladimir Sementsov-Ogievskiy wrote: On 02.03.23 00:09, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:51PM +0300, Vladimir Sementsov-Ogievskiy wrote: To be used in further patch to identify the devi

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-03-02 Thread Maxime Coquelin
On 2/1/23 12:19, Eugenio Perez Martin wrote: On Wed, Feb 1, 2023 at 12:14 PM Maxime Coquelin wrote: Thanks Eugenio for working on this. On 1/31/23 20:10, Eugenio Perez Martin wrote: Hi, The current approach of offering an emulated CVQ to the guest and map the commands to vhost-user is no

Re: [PATCH v5 18/18] qapi: introduce DEVICE_ON event

2023-03-02 Thread Michael S. Tsirkin
On Thu, Mar 02, 2023 at 11:39:42AM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 02.03.23 00:07, Michael S. Tsirkin wrote: > > On Thu, Feb 16, 2023 at 09:03:56PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > We have DEVICE_DELETED event, that signals that device_del command is > > > actua

Re: [PATCH v5 00/18] pci hotplug tracking

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 00:16, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:38PM +0300, Vladimir Sementsov-Ogievskiy wrote: Hi all! v5: - don't deprecate IDs and return to ID & QOM scheme - split complicated HOTPLUG_STATE patch into several ones One small point: when you change patchset s

Re: [PATCH v5 13/18] pci: introduce pci_find_the_only_child()

2023-03-02 Thread Michael S. Tsirkin
On Thu, Mar 02, 2023 at 11:45:00AM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 02.03.23 11:37, Michael S. Tsirkin wrote: > > On Thu, Mar 02, 2023 at 11:28:44AM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > On 02.03.23 00:09, Michael S. Tsirkin wrote: > > > > On Thu, Feb 16, 2023 at 09:0

Re: [PATCH v16 11/11] docs/s390x/cpu topology: document s390x cpu topology

2023-03-02 Thread Pierre Morel
On 3/1/23 16:52, Nina Schoetterl-Glausch wrote: On Wed, 2023-02-22 at 15:21 +0100, Pierre Morel wrote: Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- docs/system/s390x/cpu-topology.rst | 378 + docs/system/t

Re: [PATCH v5 5/7] hw/isa/vt82c686: Work around missing level sensitive irq in i8259 model

2023-03-02 Thread David Woodhouse
On Wed, 2023-03-01 at 23:47 +0100, BALATON Zoltan wrote: > On Wed, 1 Mar 2023, David Woodhouse wrote: > > On Wed, 2023-03-01 at 19:01 +0100, BALATON Zoltan wrote: > > > > > > > It isn't a *correct* fix without a little bit more typing, but does > > > > this make it work? > > > > > > > > diff --gi

Re: [PATCH v2 09/11] aspeed: Introduce a spi_boot region under the SoC

2023-03-02 Thread Cédric Le Goater
On 3/1/23 18:52, Philippe Mathieu-Daudé wrote: On 1/3/23 17:56, Cédric Le Goater wrote: The default boot address of the Aspeed SoCs is 0x0. For this reason, the FMC flash device contents are remapped by HW on the first 256MB of the address space. In QEMU, this is currently done in the machine in

[PATCH] hw/intc/i8259: Implement legacy LTIM Edge/Level Bank Select

2023-03-02 Thread David Woodhouse
Back in the mists of time, before IBM PS/2 came along with MCA and added per-pin level control in the ELCR register, the i8259 had a chip-wide level-mode control in bit 3 of ICW1. Even in the PIIX3 datasheet from 1996 this is documented as 'This bit is disabled', but apparently MorphOS is using it

Re: [PATCH 1/1] hw/riscv/virt.c: add cbom-block-size fdt property

2023-03-02 Thread Ben Dooks
On 01/03/2023 21:59, Daniel Henrique Barboza wrote: From: Anup Patel The cbom-block-size fdt property property is used to inform the OS about the blocksize in bytes for the Zicbom cache operations. Linux documents it in Documentation/devicetree/bindings/riscv/cpus.yaml as: riscv,cbom-block

[PATCH V5 6/8] hw/riscv/virt: virt-acpi-build.c: Add RHCT Table

2023-03-02 Thread Sunil V L
RISC-V ACPI platforms need to provide RISC-V Hart Capabilities Table (RHCT). Add this to the ACPI tables. Signed-off-by: Sunil V L Reviewed-by: Andrew Jones --- hw/riscv/virt-acpi-build.c | 78 ++ 1 file changed, 78 insertions(+) diff --git a/hw/riscv/virt-a

[PATCH V5 1/8] hw/riscv/virt: Add OEM_ID and OEM_TABLE_ID fields

2023-03-02 Thread Sunil V L
ACPI needs OEM_ID and OEM_TABLE_ID for the machine. Add these fields in the RISCVVirtState structure and initialize with default values. Signed-off-by: Sunil V L Reviewed-by: Bin Meng Acked-by: Alistair Francis Reviewed-by: Andrew Jones --- hw/riscv/virt.c | 5 + include/hw/riscv/

[PATCH V5 0/8] Add basic ACPI support for risc-v virt

2023-03-02 Thread Sunil V L
This series adds the basic ACPI support for the RISC-V virt machine. Currently only RINTC interrupt controller specification is approved by the UEFI forum. External interrupt controller support in ACPI is in progress. This adds support for RINTC and RHCT tables as specified in below ECR links whi

[PATCH V5 8/8] MAINTAINERS: Add entry for RISC-V ACPI

2023-03-02 Thread Sunil V L
RISC-V ACPI related functionality for virt machine is added in virt-acpi-build.c. Add the maintainer entry after moving the ARM ACPI entry under the main ACPI entry. Signed-off-by: Sunil V L Reviewed-by: Bin Meng Acked-by: Alistair Francis Reviewed-by: Andrew Jones --- MAINTAINERS | 18 ++

[PATCH V5 7/8] hw/riscv/virt.c: Initialize the ACPI tables

2023-03-02 Thread Sunil V L
Initialize the ACPI tables if the acpi option is not disabled. Signed-off-by: Sunil V L Reviewed-by: Bin Meng Reviewed-by: Andrew Jones --- hw/riscv/virt.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 9b85d5b747..8329c477a7 100644 --- a/hw/ris

[PATCH V5 4/8] hw/riscv/virt: Enable basic ACPI infrastructure

2023-03-02 Thread Sunil V L
Add basic ACPI infrastructure for RISC-V with below tables. 1) DSDT with below basic objects - CPUs - fw_cfg 2) FADT revision 6 with HW_REDUCED flag 3) XSDT 4) RSDP Add this functionality in a new file virt-acpi-build.c and enable bui

[PATCH V5 5/8] hw/riscv/virt: virt-acpi-build.c: Add RINTC in MADT

2023-03-02 Thread Sunil V L
Add Multiple APIC Description Table (MADT) with the RINTC structure for each cpu. Signed-off-by: Sunil V L Acked-by: Alistair Francis Reviewed-by: Andrew Jones --- hw/riscv/virt-acpi-build.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/hw/riscv/virt-a

[PATCH V5 3/8] hw/riscv/virt: Add memmap pointer to RiscVVirtState

2023-03-02 Thread Sunil V L
memmap needs to be exported outside of virt.c so that modules like acpi can use it. Hence, add a pointer field in RiscVVirtState structure and initialize it with the memorymap. Signed-off-by: Sunil V L Reviewed-by: Bin Meng Acked-by: Alistair Francis Reviewed-by: Andrew Jones --- hw/riscv/vir

[PATCH V5 2/8] hw/riscv/virt: Add a switch to disable ACPI

2023-03-02 Thread Sunil V L
ACPI will be enabled by default. Add a switch to turn off for testing and debug purposes. Signed-off-by: Sunil V L Reviewed-by: Andrew Jones --- hw/riscv/virt.c | 29 + include/hw/riscv/virt.h | 2 ++ 2 files changed, 31 insertions(+) diff --git a/hw/riscv/

[PATCH v2 0/1] hw/riscv/virt.c: add cbo[mz]-block-size fdt properties

2023-03-02 Thread Daniel Henrique Barboza
Based-on: 20230224132536.552293-1-dbarb...@ventanamicro.com ("[PATCH v8 0/4] riscv: Add support for Zicbo[m,z,p] instructions") Hi, This second version, which is still dependent on: [PATCH v8 0/4] riscv: Add support for Zicbo[m,z,p] instructions Is adding the cboz FDT property as well as reques

[PATCH v2 1/1] hw/riscv/virt.c: add cbo[mz]-block-size fdt properties

2023-03-02 Thread Daniel Henrique Barboza
From: Anup Patel The cbom-block-size fdt property property is used to inform the OS about the blocksize in bytes for the Zicbom cache operations. Linux documents it in Documentation/devicetree/bindings/riscv/cpus.yaml as: riscv,cbom-block-size: $ref: /schemas/types.yaml#/definitions/uint32

Re: [PATCH v5 18/18] qapi: introduce DEVICE_ON event

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 11:50, Michael S. Tsirkin wrote: On Thu, Mar 02, 2023 at 11:39:42AM +0300, Vladimir Sementsov-Ogievskiy wrote: On 02.03.23 00:07, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:56PM +0300, Vladimir Sementsov-Ogievskiy wrote: We have DEVICE_DELETED event, that signals that

[RFC PATCH v3 1/4] qapi, i386: Move kernel-hashes to SevCommonProperties

2023-03-02 Thread Dov Murik
In order to enable kernel-hashes for SNP, pull it from SevGuestProperties to its parent SevCommonProperties so it will be available for both SEV and SNP. Signed-off-by: Dov Murik --- qapi/qom.json | 12 ++-- target/i386/sev.c | 44 ++-- 2 files

[RFC PATCH v3 2/4] i386/sev: Extract build_kernel_loader_hashes

2023-03-02 Thread Dov Murik
Extract the building of the kernel hashes table out from sev_add_kernel_loader_hashes() to allow building it in other memory areas (for SNP support). No functional change intended. Signed-off-by: Dov Murik --- target/i386/sev.c | 110 ++ 1 file change

[RFC PATCH v3 4/4] i386/sev: Allow measured direct kernel boot on SNP

2023-03-02 Thread Dov Murik
In SNP, the hashes page designated with a specific metadata entry published in AmdSev OVMF. Therefore, if the user enabled kernel hashes (for measured direct boot), QEMU should prepare the content of hashes table, and during the processing of the metadata entry it copy the content into the designa

[RFC PATCH v3 0/4] i386/sev: Support measured direct kernel boot on SNP

2023-03-02 Thread Dov Murik
(This RFC patch series is based on AMD's RFC upmv10-snpv3 tree [1]. So far that RFC tree was not submitted for review in qemu-devel.) In order to enable measured direct kernel boot on SNP, QEMU needs to fill the hashes page when kernel-hashes=on. This relies on several changes to the SNP metada

Re: [PATCH v6 4/4] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-03-02 Thread Paul Durrant
On 01/03/2023 20:54, Michael S. Tsirkin wrote: On Sat, Feb 04, 2023 at 11:07:37PM -0500, Alexander Bulekov wrote: This protects devices from bh->mmio reentrancy issues. Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi Signed-off-by: Alexander Bulekov Reviewed-by: Michael S. Tsirkin

[RFC PATCH v3 3/4] i386/sev: Reorder struct declarations

2023-03-02 Thread Dov Murik
Move the declaration of PaddedSevHashTable before SevSnpGuest so we can add a new such field to the latter. No functional change intended. Signed-off-by: Dov Murik --- target/i386/sev.c | 56 +++ 1 file changed, 28 insertions(+), 28 deletions(-) diff

Re: [PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-03-02 Thread David Hildenbrand
On 01.03.23 23:08, Maciej S. Szmigiero wrote: On 1.03.2023 18:24, David Hildenbrand wrote: (...) With virtio-mem one can simply have per-node virtio-mem devices. 2) I'm not sure what's the overhead of having, let's say, 1 TiB backing memory device mostly marked madvise(MADV_DONTNEED). Like, how

Re: [PATCH v3 07/10] qapi: implement conditional command arguments

2023-03-02 Thread Daniel P . Berrangé
On Thu, Mar 02, 2023 at 07:58:28AM +0100, Markus Armbruster wrote: > Marc-André Lureau writes: > > > Hi > > > > On Wed, Mar 1, 2023 at 5:16 PM Markus Armbruster wrote: > >> What about 3. have an additional command conditional on CONFIG_WIN32? > >> Existing getfd stays the same: always fails when

Re: [PATCH v5 00/18] pci hotplug tracking

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 00:17, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:38PM +0300, Vladimir Sementsov-Ogievskiy wrote: Hi all! v5: - don't deprecate IDs and return to ID & QOM scheme - split complicated HOTPLUG_STATE patch into several ones picked up 1-12 Thanks! -- Best regards,

Re: [PATCH v5 13/18] pci: introduce pci_find_the_only_child()

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 11:53, Michael S. Tsirkin wrote: On Thu, Mar 02, 2023 at 11:45:00AM +0300, Vladimir Sementsov-Ogievskiy wrote: On 02.03.23 11:37, Michael S. Tsirkin wrote: On Thu, Mar 02, 2023 at 11:28:44AM +0300, Vladimir Sementsov-Ogievskiy wrote: On 02.03.23 00:09, Michael S. Tsirkin wrote: On

Re: [PATCH v5 18/18] qapi: introduce DEVICE_ON event

2023-03-02 Thread Michael S. Tsirkin
On Thu, Mar 02, 2023 at 12:16:23PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 02.03.23 11:50, Michael S. Tsirkin wrote: > > On Thu, Mar 02, 2023 at 11:39:42AM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > On 02.03.23 00:07, Michael S. Tsirkin wrote: > > > > On Thu, Feb 16, 2023 at 09:0

Re: [PATCH v5 13/18] pci: introduce pci_find_the_only_child()

2023-03-02 Thread Michael S. Tsirkin
On Thu, Mar 02, 2023 at 12:35:54PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 02.03.23 11:53, Michael S. Tsirkin wrote: > > On Thu, Mar 02, 2023 at 11:45:00AM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > On 02.03.23 11:37, Michael S. Tsirkin wrote: > > > > On Thu, Mar 02, 2023 at 11:2

Re: [PATCH v3 06/10] monitor: release the lock before calling close()

2023-03-02 Thread Alex Bennée
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > As per comment, presumably to avoid syscall in critical section. > > Fixes: 0210c3b39bef08 ("monitor: Use LOCK_GUARD macros") > Signed-off-by: Marc-André Lureau I know this is already merged but as an academic exercise we could

Re: [PATCH RFC 0/4] memory: Fix (/ Discuss) a few rcu issues

2023-03-02 Thread David Hildenbrand
On 25.02.23 17:31, Peter Xu wrote: [not for merging, but for discussion; this is something I found when looking at another issue on Chuang's optimization for migration downtime] Summary: we tried to access memory_listeners, address_spaces, etc. in RCU way. However we didn't implement them wit

Re: Bug in master branch: IbmPrep40pMachine.test_factory_firmware_and_netbsd broken

2023-03-02 Thread Cédric Le Goater
On 3/2/23 08:47, Thomas Huth wrote:  Hi all, seems like we've got another bug that sneaked in during the CI minutes blackout: The avocado test IbmPrep40pMachine.test_factory_firmware_and_netbsd is now broken reliably, see:  https://gitlab.com/qemu-project/qemu/-/jobs/3858833617#L300  http

Re: [PATCH v2 0/6] hw/cxl: Poison get, inject, clear

2023-03-02 Thread Jonathan Cameron via
On Wed, 1 Mar 2023 17:15:56 -0800 Alison Schofield wrote: > On Mon, Feb 27, 2023 at 05:03:05PM +, Jonathan Cameron wrote: > > Hi Jonathan, > Can you share your repo with this support? How about your qemu cmdline? > I'm more of a 'try it out' type of a reviewer for qemu changes. https://git

  1   2   3   4   5   6   7   >