Re: [RFC v4 1/3] rcu: introduce rcu_read_locked()

2023-01-05 Thread Chuang Xu
On 2023/1/4 下午10:20, Alex Bennée wrote: > Chuang Xu writes: > >> add rcu_read_locked() to detect holding of rcu lock. >> >> Signed-off-by: Chuang Xu >> --- >> include/qemu/rcu.h | 7 +++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h >> index b063c6

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-05 Thread David Hildenbrand
On 05.01.23 02:27, Michael S. Tsirkin wrote: On Fri, Dec 23, 2022 at 10:34:36AM +0100, David Hildenbrand wrote: On 22.12.22 12:02, David Hildenbrand wrote: For virtio-mem, we want to have the plugged/unplugged state of memory blocks available before migrating any actual RAM content. This inform

Re: [PATCH] .gitlab-ci.d/windows: Work-around timeout and OpenGL problems of the MSYS2 jobs

2023-01-05 Thread Thomas Huth
On 04/01/2023 23.01, Peter Maydell wrote: On Wed, 4 Jan 2023 at 12:36, Thomas Huth wrote: The windows jobs (especially the 32-bit job) recently started to hit the timeout limit. Bump it a little bit to ease the situation (80 minutes is quite long already - OTOH, these jobs do not have to wait

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-05 Thread David Hildenbrand
On 04.01.23 18:23, Peter Xu wrote: On Thu, Dec 22, 2022 at 12:02:10PM +0100, David Hildenbrand wrote: Migrating device state before we start iterating is currently impossible. Introduce and use qemu_savevm_state_start_precopy(), and use a new special migration priority -- MIG_PRI_POST_SETUP -- t

Re: [PATCH 1/5] confidential guest support: Introduce a 'check' class handler

2023-01-05 Thread Thomas Huth
On 04/01/2023 12.51, Cédric Le Goater wrote: From: Cédric Le Goater Some machines have specific requirements to activate confidential guest support. Add a class handler to the confidential guest support interface to let the arch implementation perform extra checks. Cc: Eduardo Habkost Cc: Mar

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

2023-01-05 Thread Philippe Mathieu-Daudé
On 5/1/23 08:13, 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: [...] To make things *even more* complicated, the breakage was (and remains, as of today) visible with TCG acceleration only. Commit 5d971f9e6725 make

Re: [PULL 47/47] tests/tcg/multiarch: add vma-pthread.c

2023-01-05 Thread Alex Bennée
Richard Henderson writes: > On 1/4/23 16:37, Richard Henderson wrote: >> On 1/4/23 16:26, Richard Henderson wrote: >>>  From the failures I see on the gitlab merge job, I think I need to >>> resubmit with this new test adjusted to loop less, >>> +    for (i = 0; i < 5; i++) { >>> >>> h

[PULL 03/51] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2023-01-05 Thread Michael S. Tsirkin
From: Eugenio Pérez Since this capability is emulated by qemu shadowed CVQ cannot forward it to the device. Process all that command within qemu. Signed-off-by: Eugenio Pérez Message-Id: <20221221115015.1400889-4-epere...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Ts

[PULL 06/51] hw/acpi/Kconfig: Add missing dependencies to ACPI_ICH9

2023-01-05 Thread Michael S. Tsirkin
From: Bernhard Beschow ich9_lpc_realize() uses apm_init() and ich9_smbus_realize() uses pm_smbus_init(), so both APM and ACPI_SMBUS are provided by the device models managed by ACPI_ICH9. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221216130355.41667-3-sh

[PULL 12/51] vhost-user: Refactor vhost acked features saving

2023-01-05 Thread Michael S. Tsirkin
From: Hyman Huang(黄勇) Abstract vhost acked features saving into vhost_user_save_acked_features, export it as util function. Signed-off-by: Hyman Huang(黄勇) Signed-off-by: Guoyi Tu Message-Id: <50dc9b09b0635e3052551efcc1046c2a85332fcb.1671627406.git.huang...@chinatelecom.cn> Reviewed-by: Michae

[PULL 08/51] hw/acpi/Kconfig: Add missing dependencies to ACPI_PIIX4

2023-01-05 Thread Michael S. Tsirkin
From: Bernhard Beschow piix4_pm_realize() uses apm_init() and pm_smbus_init(), so both APM and ACPI_SMBUS are provided by the device model managed by ACPI_PIIX4. The ACPIREGS are also provided by ACPI_PIIX4, so needs to select ACPI. Signed-off-by: Bernhard Beschow Message-Id: <20221216130355.4

[PULL 04/51] vdpa: do not handle VIRTIO_NET_F_GUEST_ANNOUNCE in vhost-vdpa

2023-01-05 Thread Michael S. Tsirkin
From: Eugenio Pérez So qemu emulates it even in case the device does not support it. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Message-Id: <20221221115015.1400889-5-epere...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- net/vhost-vdpa.c | 1 - 1 f

[PULL 16/51] virtio-pci: decouple notifier from interrupt process

2023-01-05 Thread Michael S. Tsirkin
From: Cindy Lu To reuse the notifier process. We add the virtio_pci_get_notifier to get the notifier and vector. The INPUT for this function is IDX, The OUTPUT is the notifier and the vector Signed-off-by: Cindy Lu Message-Id: <20221222070451.936503-3-l...@redhat.com> Acked-by: Jason Wang Revi

[PULL 30/51] include/hw/pci: Clean up a few things checkpatch.pl would flag

2023-01-05 Thread Michael S. Tsirkin
From: Markus Armbruster Fix a few style violations so that checkpatch.pl won't complain when I move this code. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221222100330.380143-5-arm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[PULL 29/51] include/hw/cxl: Include hw/cxl/*.h where needed

2023-01-05 Thread Michael S. Tsirkin
From: Markus Armbruster hw/cxl/cxl_component.h needs CDATObject from hw/cxl/cxl_cdat.h. hw/cxl/cxl_device.h needs CXLComponentState from hw/cxl/cxl_component.h. Signed-off-by: Markus Armbruster Acked-by: Jonathan Cameron Message-Id: <20221222100330.380143-4-arm...@redhat.com> Reviewed-by: Mic

[PULL 10/51] i386, mips: Resolve redundant ACPI and APM dependencies

2023-01-05 Thread Michael S. Tsirkin
From: Bernhard Beschow Now that all ACPI controllers select the ACPI and APM dependencies themselves, these explicit dependencies became redundant. Remove them. Signed-off-by: Bernhard Beschow Message-Id: <20221216130355.41667-7-shen...@gmail.com> Reviewed-by: Michael S. Tsirkin Signed-off-by:

[PULL 07/51] hw/acpi/Kconfig: Do not needlessly build TYPE_PIIX4_PM in non-PC/Malta machines

2023-01-05 Thread Michael S. Tsirkin
From: Bernhard Beschow TYPE_PIIX4_PM is only used in machines where PIIX chipsets are used which is currently PC and Malta. There is no point building it for the other ACPI_X86 machines. Note that this also removes unneeded ACPI_PIIX4 from PEGASOS2. Signed-off-by: Bernhard Beschow Message-Id:

[PULL 25/51] hw/virtio: Rename virtio_device_find() -> qmp_find_virtio_device()

2023-01-05 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé To emphasize this function is QMP related, rename it. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221222080005.27616-2-phi...@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio.c | 10 +- 1 file cha

[PULL 42/51] vdpa: commit all host notifier MRs in a single MR transaction

2023-01-05 Thread Michael S. Tsirkin
From: Longpeng This allows the vhost-vdpa device to batch the setup of all its MRs of host notifiers. This significantly reduces the device starting time, e.g. the time spend on setup the host notifier MRs reduce from 423ms to 32ms for a VM with 64 vCPUs and 3 vhost-vDPA generic devices (vdpa_si

[PULL 40/51] vhost: simplify vhost_dev_enable_notifiers

2023-01-05 Thread Michael S. Tsirkin
From: Longpeng Simplify the error path in vhost_dev_enable_notifiers by using vhost_dev_disable_notifiers directly. Signed-off-by: Longpeng Message-Id: <20221227072015.3134-2-longpe...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost.c | 20 ++

[PULL 31/51] include/hw/pci: Split pci_device.h off pci.h

2023-01-05 Thread Michael S. Tsirkin
From: Markus Armbruster PCIDeviceClass and PCIDevice are defined in pci.h. Many users of the header don't actually need them. Similar structs live in their own headers: PCIBusClass and PCIBus in pci_bus.h, PCIBridge in pci_bridge.h, PCIHostBridgeClass and PCIHostState in pci_host.h, PCIExpressH

[PULL 44/51] tests: virt: Allow changes to PPTT test table

2023-01-05 Thread Michael S. Tsirkin
From: Yicong Yang Allow changes to test/data/acpi/virt/PPTT*, prepare to change the building policy of the cluster topology. Reviewed-by: Yanan Wang Signed-off-by: Yicong Yang Message-Id: <20221229065513.55652-2-yangyic...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[PULL 36/51] include: Don't include qemu/osdep.h

2023-01-05 Thread Michael S. Tsirkin
From: Markus Armbruster docs/devel/style.rst mandates: The "qemu/osdep.h" header contains preprocessor macros that affect the behavior of core system headers like . It must be the first include so that core system headers included by external libraries get the preprocessor macro

[PULL 26/51] hw/virtio: Extract QMP QOM-specific functions to virtio-qmp.c

2023-01-05 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé virtio.c is big enough, extract more QMP related code to virtio-qmp.c. To do so, expose qmp_find_virtio_device() and declar virtio_list in the internal virtio-qmp.h header. Note we have to leave qmp_x_query_virtio_queue_status() and qmp_x_query_virtio_queue_element()

[PULL 28/51] include/hw/cxl: Move typedef PXBDev to cxl.h, and put it to use

2023-01-05 Thread Michael S. Tsirkin
From: Markus Armbruster hw/cxl/cxl.h uses the PXBDev structure tag instead of the typedef name. The typedef name is defined in hw/pci/pci_bridge.h. Its inclusion was dropped in the previous commit to break an inclusion loop. Move the typedef to hw/cxl/cxl.h, and use it there. Delete an extra

[PULL 13/51] vhost-user: Refactor the chr_closed_bh

2023-01-05 Thread Michael S. Tsirkin
From: Hyman Huang(黄勇) Use vhost_user_save_acked_features to implemente acked features saving. Signed-off-by: Hyman Huang(黄勇) Signed-off-by: Guoyi Tu Message-Id: <6699ee88687b62fb8152fe021e576cd2f468d7ca.1671627406.git.huang...@chinatelecom.cn> Reviewed-by: Michael S. Tsirkin Signed-off-by: M

[PULL 27/51] include/hw/pci: Break inclusion loop pci_bridge.h and cxl.h

2023-01-05 Thread Michael S. Tsirkin
From: Markus Armbruster hw/pci/pci_bridge.h and hw/cxl/cxl.h include each other. Fortunately, breaking the loop is merely a matter of deleting unnecessary includes from headers, and adding them back in places where they are now missing. Signed-off-by: Markus Armbruster Message-Id: <20221222100

[PULL 41/51] vhost: configure all host notifiers in a single MR transaction

2023-01-05 Thread Michael S. Tsirkin
From: Longpeng This allows the vhost device to batch the setup of all its host notifiers. This significantly reduces the device starting time, e.g. the time spend on enabling notifiers reduce from 376ms to 9.1ms for a VM with 64 vCPUs and 3 vhost-vDPA generic devices (vdpa_sim_blk, 64vq per devic

[PULL 21/51] vhost: add support for configure interrupt

2023-01-05 Thread Michael S. Tsirkin
From: Cindy Lu Add functions to support configure interrupt. The configure interrupt process will start in vhost_dev_start and stop in vhost_dev_stop. Also add the functions to support vhost_config_pending and vhost_config_mask. Signed-off-by: Cindy Lu Message-Id: <20221222070451.936503-8-l...

[PULL 09/51] hw/isa/Kconfig: Add missing dependency to VT82C686

2023-01-05 Thread Michael S. Tsirkin
From: Bernhard Beschow The ACPIREGS are provided by TYPE_VIA_PM, so needs to select ACPI. Signed-off-by: Bernhard Beschow Message-Id: <20221216130355.41667-6-shen...@gmail.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: BALATON Zoltan Reviewed-by: Philippe

[PULL 47/51] tests: acpi: Add and whitelist *.topology blobs

2023-01-05 Thread Michael S. Tsirkin
From: Yicong Yang Add and whitelist *.topology blobs, prepares for the aarch64's ACPI topology building test. Reviewed-by: Yanan Wang Signed-off-by: Yicong Yang Message-Id: <20221229065513.55652-5-yangyic...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- t

[PULL 38/51] vdpa-dev: get iova range explicitly

2023-01-05 Thread Michael S. Tsirkin
From: Longpeng In commit a585fad26b ("vdpa: request iova_range only once") we remove GET_IOVA_RANGE form vhost_vdpa_init, the generic vdpa device will start without iova_range populated, so the device won't work. Let's call GET_IOVA_RANGE ioctl explicitly. Fixes: a585fad26b2e6ccc ("vdpa: request

[PULL 24/51] virtio-pci: add support for configure interrupt

2023-01-05 Thread Michael S. Tsirkin
From: Cindy Lu Add process to handle the configure interrupt, The function's logic is the same with vq interrupt.Add extra process to check the configure interrupt Signed-off-by: Cindy Lu Message-Id: <20221222070451.936503-11-l...@redhat.com> Acked-by: Jason Wang Reviewed-by: Michael S. Tsirki

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

2023-01-05 Thread Michael S. Tsirkin
The following changes since commit cb9c6a8e5ad6a1f0ce164d352e3102df46986e22: .gitlab-ci.d/windows: Work-around timeout and OpenGL problems of the MSYS2 jobs (2023-01-04 18:58:33 +) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upst

[PULL 33/51] include/hw/cxl: Break inclusion loop cxl_pci.h and cxl_cdat_h

2023-01-05 Thread Michael S. Tsirkin
From: Markus Armbruster hw/cxl/cxl_pci.h and hw/cxl/cxl_cdat.h include each other. The former doesn't actually need the latter, so drop that inclusion to break the loop. Signed-off-by: Markus Armbruster Message-Id: <20221222100330.380143-8-arm...@redhat.com> Reviewed-by: Michael S. Tsirkin Si

[PULL 37/51] docs/devel: Rules on #include in headers

2023-01-05 Thread Michael S. Tsirkin
From: Markus Armbruster Rules for headers were proposed a long time ago, and generally liked: Message-ID: <87h9g8j57d@blackfin.pond.sub.org> https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html Wortk them into docs/devel/style.rst. Suggested-by: Bernhard Beschow

[PULL 01/51] virtio_net: Modify virtio_net_get_config to early return

2023-01-05 Thread Michael S. Tsirkin
From: Eugenio Pérez Next patches introduce more code on vhost-vdpa branch, with already have too much indentation. Signed-off-by: Eugenio Pérez Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Acked-by: Jason Wang Message-Id: <20221221115015.1400889-2-epere...@redhat.com>

[PULL 32/51] include/hw/pci: Include hw/pci/pci.h where needed

2023-01-05 Thread Michael S. Tsirkin
From: Markus Armbruster hw/pci/pcie_sriov.h needs PCI_NUM_REGIONS. Without the previous commit, this would close an inclusion loop: hw/pci/pci.h used to include hw/pci/pcie.h for PCIExpressDevice, which includes pcie_sriov.h for PCIESriovPF, which now includes hw/pci/pci.h for PCI_NUM_REGIONS.

[PULL 11/51] hw/ppc/Kconfig: Remove unused dependencies from PEGASOS2

2023-01-05 Thread Michael S. Tsirkin
From: Bernhard Beschow Removes the following dependencies from ppc-softmmu: - CONFIG_ACPI_CPU_HOTPLUG - CONFIG_ACPI_CXL - CONFIG_ACPI_HMAT - CONFIG_ACPI_MEMORY_HOTPLUG - CONFIG_ACPI_NVDIMM - CONFIG_ACPI_PCIHP - CONFIG_ACPI_X86 - CONFIG_MEM_DEVICE Signed-off-by: Bernhard Beschow Message-Id: <202

[PULL 46/51] tests: virt: Update expected ACPI tables for virt test

2023-01-05 Thread Michael S. Tsirkin
From: Yicong Yang Update the ACPI tables according to the acpi aml_build change, also empty bios-tables-test-allowed-diff.h. The disassembled differences between actual and expected PPTT: /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20180105 (64-bit version)

[PULL 50/51] acpi: cpuhp: fix guest-visible maximum access size to the legacy reg block

2023-01-05 Thread Michael S. Tsirkin
From: Laszlo Ersek The modern ACPI CPU hotplug interface was introduced in the following series (aa1dd39ca307..679dd1a957df), released in v2.7.0: 1 abd49bc2ed2f docs: update ACPI CPU hotplug spec with new protocol 2 16bcab97eb9f pc: piix4/ich9: add 'cpu-hotplug-legacy' property 3 5e1b5d

[PULL 23/51] virtio-mmio: add support for configure interrupt

2023-01-05 Thread Michael S. Tsirkin
From: Cindy Lu Add configure interrupt support in virtio-mmio bus. add function to set configure guest notifier. Signed-off-by: Cindy Lu Message-Id: <20221222070451.936503-10-l...@redhat.com> Acked-by: Jason Wang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virti

[PULL 49/51] tests: acpi: aarch64: Add *.topology tables

2023-01-05 Thread Michael S. Tsirkin
From: Yicong Yang Add *.topology tables for the aarch64's topology test and empty bios-tables-test-allowed-diff.h The disassembled differences between actual and expected PPTT (the table which we actually care about): +/* + * Intel ACPI Component Architecture + * AML/ASL+ Disassembler versio

[PULL 17/51] virtio-pci: decouple the single vector from the interrupt process

2023-01-05 Thread Michael S. Tsirkin
From: Cindy Lu To reuse the interrupt process in configure interrupt Need to decouple the single vector from the interrupt process. We add new function kvm_virtio_pci_vector_use_one and _release_one. These functions are used for the single vector, the whole process will finish in the loop with vq

[PULL 22/51] virtio-net: add support for configure interrupt

2023-01-05 Thread Michael S. Tsirkin
From: Cindy Lu Add functions to support configure interrupt in virtio_net Add the functions to support vhost_net_config_pending and vhost_net_config_mask. Signed-off-by: Cindy Lu Message-Id: <20221222070451.936503-9-l...@redhat.com> Acked-by: Jason Wang Reviewed-by: Michael S. Tsirkin Signed-

[PULL 18/51] vhost: introduce new VhostOps vhost_set_config_call

2023-01-05 Thread Michael S. Tsirkin
From: Cindy Lu This patch introduces new VhostOps vhost_set_config_call. This function allows the qemu to set the config event fd to kernel driver. Signed-off-by: Cindy Lu Message-Id: <20221222070451.936503-5-l...@redhat.com> Acked-by: Jason Wang Reviewed-by: Michael S. Tsirkin Signed-off-by:

[PULL 15/51] virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX

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

[PULL 02/51] virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has it

2023-01-05 Thread Michael S. Tsirkin
From: Eugenio Pérez Status part of the emulated feature. It will follow device model, so we must copy it as long as NIC device model has it set. Signed-off-by: Eugenio Pérez Message-Id: <20221221115015.1400889-3-epere...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsi

[PULL 35/51] include: Include headers where needed

2023-01-05 Thread Michael S. Tsirkin
From: Markus Armbruster A number of headers neglect to include everything they need. They compile only if the headers they need are already included from elsewhere. Fix that. Signed-off-by: Markus Armbruster Reviewed-by: Alistair Francis Message-Id: <20221222120813.727830-3-arm...@redhat.com

[PULL 45/51] hw/acpi/aml-build: Only generate cluster node in PPTT when specified

2023-01-05 Thread Michael S. Tsirkin
From: Yicong Yang Currently we'll always generate a cluster node no matter user has specified '-smp clusters=X' or not. Cluster is an optional level and will participant the building of Linux scheduling domains and only appears on a few platforms. It's unncessary to always build it when it cannot

[PULL 19/51] vhost-vdpa: add support for config interrupt

2023-01-05 Thread Michael S. Tsirkin
From: Cindy Lu Add new call back function in vhost-vdpa, The function vhost_set_config_call can set the event fd to kernel. This function will be called in the vhost_dev_start and vhost_dev_stop Signed-off-by: Cindy Lu Message-Id: <20221222070451.936503-6-l...@redhat.com> Acked-by: Jason Wang

[PULL 43/51] virtio-pci: fix proxy->vector_irqfd leak in virtio_pci_set_guest_notifiers

2023-01-05 Thread Michael S. Tsirkin
From: leixiang proxy->vector_irqfd did not free when kvm_virtio_pci_vector_use or msix_set_vector_notifiers failed in virtio_pci_set_guest_notifiers. Fixes: 7d37d351 Signed-off-by: Lei Xiang Tested-by: Zeng Chi Suggested-by: Xie Ming Message-Id: <20221227081604.806415-1-leixi...@kylinos.cn>

[PULL 34/51] include/hw/virtio: Break inclusion loop

2023-01-05 Thread Michael S. Tsirkin
From: Markus Armbruster hw/virtio/virtio.h and hw/virtio/vhost.h include each other. The former doesn't actually need the latter, so drop that inclusion to break the loop. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Stefano

[PULL 05/51] hw/acpi/Kconfig: Rename ACPI_X86_ICH to ACPI_ICH9

2023-01-05 Thread Michael S. Tsirkin
From: Bernhard Beschow Although the ICH9 ACPI controller may currently be tied to x86 it doesn't have to. Furthermore, the source files this configuration switch manages contain a '9', so this name fits more. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <2022

[PATCH v5] tests/qtest: netdev: test stream and dgram backends

2023-01-05 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- Notes: v5: - disable test_stream_fd and test_dgram_fd on windows as socketpair() is not defined. - enable test_stream_unix_abstract only on linux as "abstract" unix socket parameter is only defined on

[PULL 48/51] tests: acpi: aarch64: Add topology test for aarch64

2023-01-05 Thread Michael S. Tsirkin
From: Yicong Yang Add test for aarch64's ACPI topology building for all the supported levels. Acked-by: Michael S. Tsirkin Reviewed-by: Yanan Wang Tested-by: Yanan Wang Signed-off-by: Yicong Yang Message-Id: <20221229065513.55652-6-yangyic...@huawei.com> Reviewed-by: Michael S. Tsirkin Sign

[PULL 39/51] vdpa: harden the error path if get_iova_range failed

2023-01-05 Thread Michael S. Tsirkin
From: Longpeng We should stop if the GET_IOVA_RANGE ioctl failed. Signed-off-by: Longpeng Message-Id: <20221224114848.3062-3-longpe...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang --- net/vhost-vdpa.c | 8 +++- 1 file changed, 7 inse

[PULL 20/51] virtio: add support for configure interrupt

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

[PULL 14/51] vhost-user: Fix the virtio features negotiation flaw

2023-01-05 Thread Michael S. Tsirkin
From: Hyman Huang(黄勇) This patch aims to fix unexpected negotiation features for vhost-user netdev interface. When openvswitch reconnect Qemu after an unexpected disconnection and Qemu therefore start the vhost_dev, acked_features field in vhost_dev is initialized with value fetched from acked_f

Re: [PATCH] hw/core: Introduce proxy-pic

2023-01-05 Thread Bernhard Beschow
Am 4. Januar 2023 22:22:01 UTC schrieb Mark Cave-Ayland : >On 04/01/2023 19:53, Bernhard Beschow wrote: > >> Having a proxy PIC allows for ISA PICs to be created and wired up in >> southbridges. This is especially useful for PIIX3 for two reasons: >> First, the southbridge doesn't need to care

[PULL 51/51] vhost-scsi: fix memleak of vsc->inflight

2023-01-05 Thread Michael S. Tsirkin
From: Dongli Zhang This is below memleak detected when to quit the qemu-system-x86_64 (with vhost-scsi-pci). (qemu) quit = ==15568==ERROR: LeakSanitizer: detected memory leaks Direct leak of 40 byte(s) in 1 object(s) allocated fro

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

2023-01-05 Thread Michael S. Tsirkin
On Thu, Jan 05, 2023 at 10:00:00AM +0100, Philippe Mathieu-Daudé wrote: > On 5/1/23 08:13, 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: > [...] > > > > > To make things *even more* complicated, the breakage w

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

2023-01-05 Thread Michael S. Tsirkin
On Thu, Jan 05, 2023 at 04:14:20AM -0500, Michael S. Tsirkin wrote: > The following changes since commit cb9c6a8e5ad6a1f0ce164d352e3102df46986e22: > > .gitlab-ci.d/windows: Work-around timeout and OpenGL problems of the MSYS2 > jobs (2023-01-04 18:58:33 +) > > are available in the Git repo

Re: [PULL 50/51] acpi: cpuhp: fix guest-visible maximum access size to the legacy reg block

2023-01-05 Thread Michael S. Tsirkin
On Thu, Jan 05, 2023 at 04:17:06AM -0500, Michael S. Tsirkin wrote: > From: Laszlo Ersek I noticed v2 is forthcoming. dropped now.

[PATCH] MAINTAINERS: update email of Peter Lieven

2023-01-05 Thread Peter Lieven
I will leave KAMP in the next days. Update email to stay reachable. Signed-off-by: Peter Lieven --- MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index b270eb8e5b..995f1156f9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3428,7 +

[PATCH v3] Hexagon (target/hexagon) implement mutability mask for GPRs

2023-01-05 Thread Marco Liebel
Some registers are defined to have immutable bits, this commit will implement that behavior. Signed-off-by: Marco Liebel --- target/hexagon/genptr.c | 44 - tests/tcg/hexagon/Makefile.target | 1 + tests/tcg/hexagon/reg_mut.c | 152 ++ 3 fil

Re: [PATCH 1/5] confidential guest support: Introduce a 'check' class handler

2023-01-05 Thread Philippe Mathieu-Daudé
On 5/1/23 09:46, Thomas Huth wrote: On 04/01/2023 12.51, Cédric Le Goater wrote: From: Cédric Le Goater Some machines have specific requirements to activate confidential guest support. Add a class handler to the confidential guest support interface to let the arch implementation perform extra

[PATCH 4/4] Makefile: explicitly disable -net for our -M virt runs

2023-01-05 Thread Alex Bennée
At some points in the bisect history this stops the default virtio-net complaining when it can't find "efi-virtio.rom". Signed-off-by: Alex Bennée --- Makefile | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6905b8d..a8cae07 100644 --- a/M

[PATCH 1/4] semihosting-tests: add timeout support

2023-01-05 Thread Alex Bennée
If you break semihosting in a way that hangs you need to be able to detect that. Add support for a timeout. Signed-off-by: Alex Bennée --- Makefile | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1296fde..f58b79e 100644 --- a/Makefile +++ b/M

[PATCH 0/4] Some tweaks for semihosting-tests

2023-01-05 Thread Alex Bennée
Hi Peter, I discovered that semihosting syscall support got broken and while preparing to bisect I ran into a few warts. Alex Bennée (4): semihosting-tests: add timeout support Makefile: drop microbit.lds from the sources Makefile: simplify path to QEMU binaries Makef

[PATCH 3/4] Makefile: simplify path to QEMU binaries

2023-01-05 Thread Alex Bennée
We've had the new build layout for a while now. Signed-off-by: Alex Bennée --- Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7b9a5f4..6905b8d 100644 --- a/Makefile +++ b/Makefile @@ -61,10 +61,10 @@ ifdef TIMEOUT SYSTIMEOUT := tim

[PATCH 2/4] Makefile: drop microbit.lds from the sources

2023-01-05 Thread Alex Bennée
Otherwise the compiler will complain about the lds file being included more than once as we include all the dependencies in the compile step. Signed-off-by: Alex Bennée --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f58b79e..7b9a5f4 100

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-05 Thread Jarkko Sakkinen
On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao Peng wrote: > In memory encryption usage, guest memory may be encrypted with special > key and can be accessed only by the guest itself. We call such memory > private memory. It's valueless and sometimes can cause problem to allow > userspace to access

Re: [PATCH] block-backend: fix virtio-scsi assertion failure with blk_drain_noref()

2023-01-05 Thread Stefan Hajnoczi
On Wed, Jan 04, 2023 at 10:37:34PM +0100, Paolo Bonzini wrote: > blk_root_drained_end is not thread-safe too. I started looking at that with > https://www.mail-archive.com/qemu-devel@nongnu.org/msg925670.html; that's > certainly a prerequisite for this patch to be a full fix, but I have not > check

Re: [PATCH 2/5] s390x/pv: Implement CGS check handler

2023-01-05 Thread Thomas Huth
On 04/01/2023 12.51, Cédric Le Goater wrote: From: Cédric Le Goater When a protected VM is started with the maximum number of CPUs (248), the service call providing information on the CPUs requires more buffer space than allocated and QEMU disgracefully aborts : LOADPARM=[] U

[RFC PATCH] target/arm: fix handling of HLT semihosting in system mode

2023-01-05 Thread Alex Bennée
The check semihosting_enabled() wants to know if the guest is currently in user mode. Unlike the other cases the test was inverted causing us to block semihosting calls in non-EL0 modes. Fixes: 19b26317e9 (target/arm: Honour -semihosting-config userspace=on) Signed-off-by: Alex Bennée --- target

Re: [PATCH 3/5] s390x/pv: Check for support on the host

2023-01-05 Thread Thomas Huth
On 04/01/2023 12.51, Cédric Le Goater wrote: From: Cédric Le Goater Support for protected VMs should have been enabled on the host with the kernel parameter 'prot_virt=1'. If the hardware supports the feature, it is reflected under sysfs. Signed-off-by: Cédric Le Goater --- hw/s390x/pv.c |

Re: [RFC PATCH] target/arm: fix handling of HLT semihosting in system mode

2023-01-05 Thread Peter Maydell
On Thu, 5 Jan 2023 at 11:43, Alex Bennée wrote: > > The check semihosting_enabled() wants to know if the guest is > currently in user mode. Unlike the other cases the test was inverted > causing us to block semihosting calls in non-EL0 modes. > > Fixes: 19b26317e9 (target/arm: Honour -semihosting-

Re: [PATCH] block-backend: fix virtio-scsi assertion failure with blk_drain_noref()

2023-01-05 Thread Paolo Bonzini
Il gio 5 gen 2023, 12:35 Stefan Hajnoczi ha scritto: > On Wed, Jan 04, 2023 at 10:37:34PM +0100, Paolo Bonzini wrote: > > blk_root_drained_end is not thread-safe too. I started looking at that > with > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg925670.html; > that's > > certainly a p

Re: [PATCH v7 5/7] mac_newworld: Deprecate mac99 with G5 CPU

2023-01-05 Thread BALATON Zoltan
On Thu, 5 Jan 2023, Philippe Mathieu-Daudé wrote: On 4/1/23 22:59, BALATON Zoltan wrote: Besides resolving the confusing behaviour mentioned in previous commit this might also allow unifying qemu-system-ppc and qemu-system-ppc64 in the future. Signed-off-by: BALATON Zoltan --- hw/ppc/mac_new

Re: [PATCH qemu.git v3 1/8] hw/timer/imx_epit: improve comments

2023-01-05 Thread Peter Maydell
On Thu, 1 Dec 2022 at 15:42, ~axelheider wrote: > > From: Axel Heider > > Fix typos, add background information > > Signed-off-by: Axel Heider Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH qemu.git v3 2/8] hw/timer/imx_epit: cleanup CR defines

2023-01-05 Thread Peter Maydell
On Thu, 1 Dec 2022 at 15:42, ~axelheider wrote: > > From: Axel Heider > > remove unused defines, add needed defines > > Signed-off-by: Axel Heider > --- Reviewed-by: Peter Maydell thanks -- PMM

[PATCH] hw/display/xlnx_dp: fix underflow in xlnx_dp_aux_pop_tx_fifo()

2023-01-05 Thread Qiang Liu
Fixes: 58ac482a66de ("introduce xlnx-dp") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1418 Reported-by: Qiang Liu Signed-off-by: Qiang Liu --- hw/display/xlnx_dp.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c index 407518c870..32

Re: [PATCH qemu.git v3 3/8] hw/timer/imx_epit: define SR_OCIF

2023-01-05 Thread Peter Maydell
On Thu, 1 Dec 2022 at 15:42, ~axelheider wrote: > > From: Axel Heider > > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH qemu.git v3 4/8] hw/timer/imx_epit: update interrupt state on CR write access

2023-01-05 Thread Peter Maydell
On Thu, 1 Dec 2022 at 15:42, ~axelheider wrote: > > From: Axel Heider > > The interrupt state can change due to: > - reset clears both SR.OCIF and CR.OCIE > - write to CR.EN or CR.OCIE > > Signed-off-by: Axel Heider Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v7 7/7] mac_newworld: Document deprecation

2023-01-05 Thread BALATON Zoltan
On Thu, 5 Jan 2023, Philippe Mathieu-Daudé wrote: On 4/1/23 22:59, BALATON Zoltan wrote: Also update PowerMac family docs with some more recent info. Signed-off-by: BALATON Zoltan --- docs/about/deprecated.rst| 7 +++ docs/system/ppc/powermac.rst | 12 2 files changed

Re: [PATCH qemu.git v3 6/8] hw/timer/imx_epit: factor out register write handlers

2023-01-05 Thread Peter Maydell
On Thu, 1 Dec 2022 at 15:42, ~axelheider wrote: > > From: Axel Heider > > Signed-off-by: Axel Heider Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH qemu.git v3 5/8] hw/timer/imx_epit: hard reset initializes CR with 0

2023-01-05 Thread Peter Maydell
On Thu, 1 Dec 2022 at 15:42, ~axelheider wrote: > > From: Axel Heider > > Signed-off-by: Axel Heider > --- > hw/timer/imx_epit.c | 20 ++-- > 1 file changed, 14 insertions(+), 6 deletions(-) Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH qemu.git v3 7/8] hw/timer/imx_epit: remove explicit fields cnt and freq

2023-01-05 Thread Peter Maydell
On Thu, 1 Dec 2022 at 15:42, ~axelheider wrote: > > From: Axel Heider > > The CNT register is a read-only register. There is no need to > store it's value, it can be calculated on demand. > The calculated frequency is needed temporarily only. > > Note that this is a migration compatibility break

Re: [PATCH qemu.git v3 8/8] hw/timer/imx_epit: fix compare timer handling

2023-01-05 Thread Peter Maydell
On Thu, 1 Dec 2022 at 15:42, ~axelheider wrote: > > From: Axel Heider > > - fix #1263 for CR writes > - rework compare time handling > - The compare timer has to run even if CR.OCIEN is not set, > as SR.OCIF must be updated. > - The compare timer fires exactly once when the > compare

Re: [PATCH qemu.git v3 0/8] hw/timer/imx_epit: improve and fix EPIT compare timer

2023-01-05 Thread Peter Maydell
On Thu, 1 Dec 2022 at 15:42, ~axelheider wrote: > > This patch set improves the i.MX EPIT emulation: > - fix #1263 for writes to CR > - ensure SR_OCIF is set properly even if CR_OCIEN is off > - hardware reset initialized CR to 0 > - interrupt state update on CR writes (e.g. software reset) > - re

Re: [PATCH 0/6] target/arm: general cleanups

2023-01-05 Thread Peter Maydell
On Tue, 13 Dec 2022 at 19:08, Fabiano Rosas wrote: > > Hi folks, > > I'm splitting this big series from Claudio from last year into more > manageable chunks (at least for me): > > https://lore.kernel.org/r/20210416162824.25131-1-cfont...@suse.de > > This is the first chunk with only the most trivi

Re: [PATCH 4/5] s390x/pv: Introduce a s390_pv_check() helper for runtime

2023-01-05 Thread Thomas Huth
On 04/01/2023 12.51, Cédric Le Goater wrote: From: Cédric Le Goater If a secure kernel is started in a non-protected VM, the OS will hang during boot without giving a proper error message to the user. Perform the checks on Confidential Guest support at runtime with an helper called from the se

Re: [PATCH 5/5] s390x/pv: Move check on hugepage under s390_pv_guest_check()

2023-01-05 Thread Thomas Huth
On 04/01/2023 12.51, Cédric Le Goater wrote: From: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/s390x/pv.c | 14 +- target/s390x/diag.c | 7 --- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c index 96c0728ec9.

[PATCH v1 4/5] migration/ram: Rely on used_length for uffd_change_protection()

2023-01-05 Thread David Hildenbrand
ram_mig_ram_block_resized() will abort migration (including background snapshots) when resizing a RAMBlock. ram_block_populate_read() will only populate RAM up to used_length, so at least for anonymous memory protecting everything between used_length and max_length won't actually be protected and i

[PATCH v1 0/5] migration/ram: background snapshot fixes and optimiations

2023-01-05 Thread David Hildenbrand
Playing with background snapshots in combination with hugetlb and virtio-mem, I found two issues and some reasonable optimizations (skip unprotecting when unregistering). With virtio-mem (RamDiscardManager), we now won't be allocating unnecessary page tables for unplugged ranges when using uffd-wp

[PATCH v1 5/5] migration/ram: Optimize ram_write_tracking_start() for RamDiscardManager

2023-01-05 Thread David Hildenbrand
ram_block_populate_read() already optimizes for RamDiscardManager. However, ram_write_tracking_start() will still try protecting discarded memory ranges. Let's optimize, because discarded ranges don't map any pages and (1) For anonymous memory, trying to protect using uffd-wp without a mapped

[PATCH v1 1/5] migration/ram: Fix populate_read_range()

2023-01-05 Thread David Hildenbrand
Unfortunately, commit f7b9dcfbcf44 broke populate_read_range(): the loop end condition is very wrong, resulting in that function not populating the full range. Lets' fix that. Fixes: f7b9dcfbcf44 ("migration/ram: Factor out populating pages readable in ram_block_populate_pages()") Cc: qemu-sta...

[PATCH v1 3/5] migration/ram: Don't explicitly unprotect when unregistering uffd-wp

2023-01-05 Thread David Hildenbrand
When unregistering uffd-wp, older kernels before commit f369b07c86143 ("mm/uffd:reset write protection when unregister with wp-mode") won't clear the uffd-wp PTE bit. When re-registering uffd-wp, the previous uffd-wp PTE bits would trigger again. With above commit, the kernel will clear the uffd-wp

[PATCH v1 2/5] migration/ram: Fix error handling in ram_write_tracking_start()

2023-01-05 Thread David Hildenbrand
If something goes wrong during uffd_change_protection(), we would miss to unregister uffd-wp and not release our reference. Fix it by performing the uffd_change_protection(true) last. Note that a uffd_change_protection(false) on the recovery path without a prior uffd_change_protection(false) is fi

  1   2   3   4   5   >