Re: [PATCH] linux-user: add option to chroot before emulation

2020-12-08 Thread Laurent Vivier
Le 08/12/2020 à 17:04, Matteo Croce a écrit : > On Tue, Dec 8, 2020 at 9:21 AM Laurent Vivier wrote: >> >> Le 08/12/2020 à 01:17, Matteo Croce a écrit : >>> From: Matteo Croce >>> >>> Add a '-c' option which does a chroot() just before starting the >>> emulation. This is useful when the static QE

Re: [PATCH-for-5.2?] target/mips/translate: Check R6 reserved encoding for Load Linked Word

2020-12-08 Thread Maciej W. Rozycki
On Tue, 8 Dec 2020, Philippe Mathieu-Daudé wrote: > Duh I hit that again, read the patch again, looks correct. I guess > I got confused myself reviewing the offending patch... > So I'm applying this patch to mips-next queue, using > Fixes: d9224450208 ("target-mips: Tighten ISA level checks") Wh

[PATCH 2/4] target/mips: Don't use clock_get_ns() in clock period calculation

2020-12-08 Thread Peter Maydell
Currently the MIPS code uses the old clock_get_ns() API to calculate a time length in nanoseconds: cpu->cp0_count_rate * clock_get_ns(MIPS_CPU(cpu)->clock) This relies on the clock having a period which is an exact number of nanoseconds. Switch to the new clock_ticks_to_ns() function, which does

Re: [PATCH-for-5.2?] target/mips/translate: Check R6 reserved encoding for Load Linked Word

2020-12-08 Thread Philippe Mathieu-Daudé
On Tue, Nov 24, 2020 at 5:15 PM Philippe Mathieu-Daudé wrote: > On 11/24/20 4:59 PM, Richard Henderson wrote: > > On 11/24/20 5:45 AM, Philippe Mathieu-Daudé wrote: > >> Release 6 recoded the 'Load Linked Word' using SPECIAL3 opcode, > >> this opcode (0b11) is now reserved. > >> > >> Ref: A.2

Re: [PATCH] pcie_aer: Fix help message of pcie_aer_inject_error command

2020-12-08 Thread Dr. David Alan Gilbert
* Zenghui Yu (yuzeng...@huawei.com) wrote: > There is an interesting typo in the help message of pcie_aer_inject_error > command. Use 'tlp' instead of 'tlb' to match the PCIe AER term. > > Signed-off-by: Zenghui Yu Queued > --- > hmp-commands.hx | 4 ++-- > 1 file changed, 2 insertions(+), 2 d

Re: [PATCH v2 01/27] migration: Network Failover can't work with a paused guest

2020-12-08 Thread Michael S. Tsirkin
On Thu, Dec 03, 2020 at 12:16:24PM +, Daniel P. Berrangé wrote: > On Thu, Dec 03, 2020 at 07:11:17AM -0500, Michael S. Tsirkin wrote: > > On Thu, Dec 03, 2020 at 11:43:41AM +, Dr. David Alan Gilbert wrote: > > > Another way to solve this would be to remove the unplugging from the > > > mig

Re: [PATCH v4] Fix build with 64 bits time_t

2020-12-08 Thread Michael S. Tsirkin
On Thu, Dec 03, 2020 at 08:58:19PM +0100, Fabrice Fontaine wrote: > time element is deprecated on new input_event structure in kernel's > input.h [1] > > This will avoid the following build failure: > > hw/input/virtio-input-host.c: In function 'virtio_input_host_handle_status': > hw/input/virtio

Re: [PATCH v5 0/4] migration: UFFD write-tracking migration/snapshots

2020-12-08 Thread Peter Xu
On Fri, Dec 04, 2020 at 12:30:59PM +0300, Andrey Gruzdev wrote: > This patch series is a kind of 'rethinking' of Denis Plotnikov's ideas he's > implemented in his series '[PATCH v0 0/4] migration: add background snapshot'. > > Currently the only way to make (external) live VM snapshot is using exi

Re: [PATCH v2 01/27] migration: Network Failover can't work with a paused guest

2020-12-08 Thread Michael S. Tsirkin
On Wed, Dec 02, 2020 at 12:01:21PM +, Daniel P. Berrangé wrote: > On Wed, Dec 02, 2020 at 06:37:46AM -0500, Michael S. Tsirkin wrote: > > On Wed, Dec 02, 2020 at 11:26:39AM +, Daniel P. Berrangé wrote: > > > On Wed, Dec 02, 2020 at 06:19:29AM -0500, Michael S. Tsirkin wrote: > > > > On Wed,

Re: [PATCH v2] ppc/spapr: cleanup -machine pseries,nvdimm=X handling

2020-12-08 Thread Igor Mammedov
On Tue, 8 Dec 2020 14:24:22 -0300 Daniel Henrique Barboza wrote: > On 12/8/20 1:46 PM, Igor Mammedov wrote: > > Since NVDIMM support was introduced on pseries machine, > > it ignored machine's nvdimm=on|off option and effectively > > was always enabled on machines that support NVDIMM. > > Later o

Re: [PATCH-for-5.2?] target/mips/translate: Check R6 reserved encoding for Load Linked Word

2020-12-08 Thread Philippe Mathieu-Daudé
On 12/8/20 7:43 PM, Maciej W. Rozycki wrote: > On Tue, 8 Dec 2020, Philippe Mathieu-Daudé wrote: > >> Duh I hit that again, read the patch again, looks correct. I guess >> I got confused myself reviewing the offending patch... >> So I'm applying this patch to mips-next queue, using >> Fixes: d9224

Re: [PATCH v4 2/2] hw/virtio-pci Added AER capability.

2020-12-08 Thread Michael S. Tsirkin
On Thu, Dec 03, 2020 at 01:07:13PM +0200, and...@daynix.com wrote: > From: Andrew > > Added AER capability for virtio-pci devices. > Also added property for devices, by default AER is disabled. > > Signed-off-by: Andrew Melnychenko > --- > hw/virtio/virtio-pci.c | 16 > hw/vir

[PATCH 1/4] vl: Add an -action option to respond to guest events

2020-12-08 Thread Alejandro Jimenez
Several command line options currently in use are meant to modify the behavior of QEMU in response to certain guest events like: -no-reboot, -no-shutdown, -watchdog-action. These can be grouped into a single option of the form: -action event=action Which can be used to specify the existing optio

[PATCH 3/4] qmp: Allow setting -action parameters on the fly

2020-12-08 Thread Alejandro Jimenez
Add QMP commands to allow for the behaviors specified by the -action event=action command line option to be set at runtime, mimicking the watchdog-set-action QMP command. Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez Reviewed-by: David Edmondson Reviewed-by: Liam Merwick --- qa

[PATCH 0/4] Add a new -action parameter

2020-12-08 Thread Alejandro Jimenez
This is a follow up to the proposal to add a "-no-panicstop" option to QEMU that would allow us to control whether the VM is paused or allowed to continue running without intervention from a management layer when a guest panic occurs. See the inital thread and replies for details: https://lore.k

[PATCH 4/4] qtest/pvpanic: Test panic option that allows VM to continue

2020-12-08 Thread Alejandro Jimenez
Test the scenario where the -action panic=none parameter is used to signal that the VM must continue executing after a guest panic occurs. Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez Reviewed-by: David Edmondson Reviewed-by: Liam Merwick --- tests/qtest/pvpanic-test.c | 26 ++

Re: [PATCH v4 2/2] hw/virtio-pci Added AER capability.

2020-12-08 Thread Andrew Melnichenko
Good point. I'll add checks during initialization. On Tue, Dec 8, 2020 at 8:37 PM Michael S. Tsirkin wrote: > On Thu, Dec 03, 2020 at 01:07:13PM +0200, and...@daynix.com wrote: > > From: Andrew > > > > Added AER capability for virtio-pci devices. > > Also added property for devices, by default

[PATCH 2/4] vl: Add option to avoid stopping VM upon guest panic

2020-12-08 Thread Alejandro Jimenez
The current default action of pausing a guest after a panic event is received leaves the responsibility to resume guest execution to the management layer. The reasons for this behavior are discussed here: https://lore.kernel.org/qemu-devel/52148f88.5000...@redhat.com/ However, in instances like th

Implementing Custom USB HID Device

2020-12-08 Thread Ali Shirvani
Hi all, I want to implement a custom USB HID device in QEMU. I found the `hw/usb/dev-hid.c` in the source tree, but I could not find any further documentation. Would you please guide me how I should proceed? Regards, Ali

[PULL 01/66] vhost-user-scsi: Fix memleaks in vus_proc_req()

2020-12-08 Thread Michael S. Tsirkin
From: Alex Chen The 'elem' is allocated memory in vu_queue_pop(), and its memory should be freed in all error branches after vu_queue_pop(). In addition, in order to free the 'elem' memory outside of while(1) loop, move the definition of 'elem' to the beginning of vus_proc_req(). Reported-by: Eu

[PULL 04/66] memory: Add IOMMU_NOTIFIER_DEVIOTLB_UNMAP IOMMUTLBNotificationType

2020-12-08 Thread Michael S. Tsirkin
From: Eugenio Pérez This allows us to differentiate between regular IOMMU map/unmap events and DEVIOTLB unmap. Doing so, notifiers that only need device IOTLB invalidations will not receive regular IOMMU unmappings. Adapt intel and vhost to use it. Signed-off-by: Eugenio Pérez Reviewed-by: Pet

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

2020-12-08 Thread Michael S. Tsirkin
The following changes since commit 553032db17440f8de011390e5a1cfddd13751b0b: Update version for v5.2.0 release (2020-12-08 15:55:19 +) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to 023e57b93a24

[PULL 03/66] memory: Add IOMMUTLBEvent

2020-12-08 Thread Michael S. Tsirkin
From: Eugenio Pérez This way we can tell between regular IOMMUTLBEntry (entry of IOMMU hardware) and notifications. In the notifications, we set explicitly if it is a MAPs or an UNMAP, instead of trusting in entry permissions to differentiate them. Signed-off-by: Eugenio Pérez Reviewed-by: Pet

[PULL 07/66] virtio: reset device on bad guest index in virtio_load()

2020-12-08 Thread Michael S. Tsirkin
From: John Levon If we find a queue with an inconsistent guest index value, explicitly mark the device as needing a reset - and broken - via virtio_error(). There's at least one driver implementation - the virtio-win NetKVM driver - that is able to handle a VIRTIO_CONFIG_S_NEEDS_RESET notificati

[PULL 05/66] intel_iommu: Skip page walking on device iotlb invalidations

2020-12-08 Thread Michael S. Tsirkin
From: Eugenio Pérez Although they didn't reach the notifier because of the filtering in memory_region_notify_iommu_one, the vt-d was still splitting huge memory invalidations in chunks. Skipping it. This improves performance in case of netperf with vhost-net: * TCP_STREAM: From 1923.6Mbit/s to 2

[PULL 02/66] memory: Rename memory_region_notify_one to memory_region_notify_iommu_one

2020-12-08 Thread Michael S. Tsirkin
From: Eugenio Pérez Previous name didn't reflect the iommu operation. Signed-off-by: Eugenio Pérez Reviewed-by: Peter Xu Reviewed-by: David Gibson Reviewed-by: Juan Quintela Reviewed-by: Eric Auger Acked-by: Jason Wang Message-Id: <20201116165506.31315-2-epere...@redhat.com> Reviewed-by: M

[PULL 06/66] memory: Skip bad range assertion if notifier is DEVIOTLB_UNMAP type

2020-12-08 Thread Michael S. Tsirkin
From: Eugenio Pérez Device IOTLB invalidations can unmap arbitrary ranges, eiter outside of the memory region or even [0, ~0ULL] for all the space. The assertion could be hit by a guest, and rhel7 guest effectively hit it. Signed-off-by: Eugenio Pérez Reviewed-by: Peter Xu Reviewed-by: Juan Qu

[PULL 11/66] acpi: Extract crs build form acpi_build.c

2020-12-08 Thread Michael S. Tsirkin
From: Yubo Miao Extract crs build form acpi_build.c, the function could also be used to build the crs for pxbs for arm. The resources are composed by two parts: 1. The bar space of pci-bridge/pcie-root-ports 2. The resources needed by devices behind PXBs. The base and limit of memory/io are obtai

[PULL 08/66] acpi/gpex: Extract two APIs from acpi_dsdt_add_pci

2020-12-08 Thread Michael S. Tsirkin
From: Yubo Miao Extract two APIs acpi_dsdt_add_pci_route_table and acpi_dsdt_add_pci_osc from acpi_dsdt_add_pci. The first API is used to specify the pci route table and the second API is used to declare the operation system capabilities. These two APIs would be used to specify the pxb-pcie in DS

[PULL 15/66] unit-test: Add testcase for pxb

2020-12-08 Thread Michael S. Tsirkin
From: Yubo Miao Add testcase for pxb to make sure the ACPI table is correct for guest. Signed-off-by: Yubo Miao Signed-off-by: Jiahui Cen Message-Id: <20201119014841.7298-9-cenjia...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-te

[PULL 09/66] fw_cfg: Refactor extra pci roots addition

2020-12-08 Thread Michael S. Tsirkin
From: Jiahui Cen Extract extra pci roots addition from pc machine, which could be used by other machines. In order to make uefi get the extra roots, it is necessary to write extra roots into fw_cfg. And only if the uefi knows there are extra roots, the config spaces of devices behind the root co

[PULL 14/66] unit-test: The files changed.

2020-12-08 Thread Michael S. Tsirkin
From: Yubo Miao The unit-test is seperated into three patches: 1. The files changed and list in bios-tables-test-allowed-diff.h 2. The unit-test 3. The binary file and clear bios-tables-test-allowed-diff.h The ASL diff would also be listed. Sice there are 1000+lines diff, some changes would be o

[PULL 10/66] hw/arm/virt: Write extra pci roots into fw_cfg

2020-12-08 Thread Michael S. Tsirkin
From: Jiahui Cen Add bus property to virt machine for primary PCI root bus and use it to add extra pci roots behind it. Signed-off-by: Jiahui Cen Signed-off-by: Yubo Miao Message-Id: <20201119014841.7298-4-cenjia...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL 18/66] failover: Use always atomics for primary_should_be_hidden

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-4-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/v

[PULL 13/66] acpi: Align the size to 128k

2020-12-08 Thread Michael S. Tsirkin
From: Yubo Miao If table size is changed between virt_acpi_build and virt_acpi_build_update, the table size would not be updated to UEFI, therefore, just align the size to 128kb, which is enough and same with x86. It would warn if 64k is not enough and the align size should be updated. Signed-of

[PULL 19/66] failover: primary bus is only used once, and where it is set

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela Just remove the struct member. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-5-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-net.h | 1 - hw/net/virtio-net.c| 8 2 f

[PULL 12/66] acpi/gpex: Build tables for pxb

2020-12-08 Thread Michael S. Tsirkin
From: Yubo Miao The resources of pxbs are obtained by crs_build and the resources used by pxbs would be moved from the resources defined for host-bridge. The resources for pxb are composed of following two parts: 1. The bar space of the pci-bridge/pcie-root-port behined it 2. The config space of

[PULL 24/66] failover: g_strcmp0() knows how to handle NULL

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-10-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/

[PULL 21/66] failover: Remove external partially_hotplugged property

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela It was only set "once", and with the wrong value. As far as I can see, libvirt still don't use it. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-7-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.

[PULL 29/66] failover: simplify virtio_net_find_primary()

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela a - is_my_primary() never sets one error b - If we return 1, primary_device_id is always set Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-15-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 1

[PULL 17/66] failover: fix indentantion

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela Once there, remove not needed cast. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-3-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c| 33 +++-- softmmu/qdev-monit

[PULL 26/66] failover: remove standby_id variable

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela We can calculate it, and we only use it once anyways. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-12-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-net.h | 1 - hw/net/virtio-net.c

[PULL 31/66] failover: Rename function to hide_device()

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela You should not use pasive. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-17-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/qdev-core.h | 28 +++- hw/core/qdev.c | 4 ++-

[PULL 30/66] failover: should_be_hidden() should take a bool

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela We didn't use at all the -1 value, and we don't really care. It was only used for the cases when this is not the device that we are searching for. And in that case we should not hide the device. Once there, simplify virtio-Snet_primary_should_be_hidden. Signed-off-by: Juan

[PULL 16/66] unit-test: Add the binary file and clear diff.h

2020-12-08 Thread Michael S. Tsirkin
From: Yubo Miao Add the binary file DSDT.pxb and clear bios-tables-test-allowed-diff.h Signed-off-by: Yubo Miao Signed-off-by: Jiahui Cen Message-Id: <20201119014841.7298-10-cenjia...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-t

[PULL 28/66] failover: Remove memory leak

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela Two things, at this point: * n->primary_device_id has to be set, otherwise virtio_net_find_primary don't work. So we have a leak here. * it has to be exactly the same that prim_dev->id because what qdev_find_recursive() does is just compare this two values. So remove t

[PULL 33/66] failover: Rename to failover_find_primary_device()

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela This commit: * Rename them to failover_find_primary_devices() so - it starts with failover_ - it don't connect anything, just find the primary device * Create documentation for the function Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-19-quint...@redhat.

[PULL 20/66] failover: Remove unused parameter

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-6-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/net/virtio-net.c b/

[PULL 38/66] failover: split failover_find_primary_device_id()

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela So we can calculate the device id when we need it. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-24-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 63 +---

[PULL 35/66] failover: simplify qdev_device_add()

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela We don't need to walk the opts by hand. qmp_opt_get() already does that. And then we can remove the functions that did that walk. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-21-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S

[PULL 22/66] failover: qdev_device_add() returns err or dev set

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela Never both. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-8-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/ne

[PULL 37/66] failover: remove failover_find_primary_device() error parameter

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela It can never give one error. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-23-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) dif

[PULL 42/66] failover: Remove primary_dev member

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela Only three uses remained, and we can remove them on that case. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-28-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-net.h | 1 - hw/net/virtio-

[PULL 43/66] hw: add compat machines for 6.0

2020-12-08 Thread Michael S. Tsirkin
From: Cornelia Huck Add 6.0 machine types for arm/i440fx/q35/s390x/spapr. Signed-off-by: Cornelia Huck Message-Id: <20201109173928.1001764-1-coh...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL 39/66] failover: We don't need to cache primary_device_id anymore

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-25-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-net.h | 1 - hw/net/virtio-net.c| 20 ++-- 2 files changed, 10

[PULL 25/66] failover: Remove primary_device_opts

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela It was really only used once, in failover_add_primary(). Just search for it on global opts when it is needed. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-11-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- inclu

[PULL 48/66] libvhost-user: make it a meson subproject

2020-12-08 Thread Michael S. Tsirkin
From: Marc-André Lureau By making libvhost-user a subproject, check it builds standalone (without the global QEMU cflags etc). Note that the library still relies on QEMU include/qemu/atomic.h and linux_headers/. Signed-off-by: Marc-André Lureau Message-Id: <20201125100640.366523-6-marcandre.lu

[PULL 44/66] libvhost-user: replace qemu/bswap.h with glibc endian.h

2020-12-08 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi Message-Id: <20201125100640.366523-2-marcandre.lur...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- contrib/libvhost-user/libvhost-us

[PULL 27/66] failover: Remove primary_device_dict

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela It was only used once. And we have there opts->id, so no need for it. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-13-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-net.h | 1 - hw/net

[PULL 47/66] libvhost-user: drop qemu/osdep.h dependency

2020-12-08 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20201125100640.366523-5-marcandre.lur...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- contrib/libvhost-user/libvhost-user-glib.c | 10 -- 1 file changed, 8 insertions(+), 2 delet

[PULL 45/66] libvhost-user: replace qemu/memfd.h usage

2020-12-08 Thread Michael S. Tsirkin
From: Marc-André Lureau Undo the damage from commit 5f9ff1eff3 ("libvhost-user: Support tracking inflight I/O in shared memory") which introduced glib dependency through osdep.h inclusion. libvhost-user.c tries to stay free from glib usage. Use glibc memfd_create directly when available (assume

[PULL 23/66] failover: Rename bool to failover_primary_hidden

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela You should not use passive naming variables. And once there, be able to search for them. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-9-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-net

[PULL 50/66] libvhost-user: add a simple link test without glib

2020-12-08 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20201125100640.366523-8-marcandre.lur...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- subprojects/libvhost-user/link-test.c | 45 +++ subprojects/libvhost-user/me

[PULL 52/66] contrib/vhost-user-blk: avoid g_return_val_if() input validation

2020-12-08 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Do not validate input with g_return_val_if(). This API is intended for checking programming errors and is compiled out with -DG_DISABLE_CHECKS. Use an explicit if statement for input validation so it cannot accidentally be compiled out. Suggested-by: Markus Armbruster Sig

[PULL 53/66] contrib/vhost-user-gpu: avoid g_return_val_if() input validation

2020-12-08 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Do not validate input with g_return_val_if(). This API is intended for checking programming errors and is compiled out with -DG_DISABLE_CHECKS. Use an explicit if statement for input validation so it cannot accidentally be compiled out. Suggested-by: Markus Armbruster Sig

[PULL 32/66] failover: virtio_net_connect_failover_devices() does nothing

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela It just calls virtio_net_find_primary(), so just update the callers. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-18-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 17 ++--- 1 f

[PULL 51/66] .gitlab-ci: add build-libvhost-user

2020-12-08 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20201125100640.366523-9-marcandre.lur...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- .gitlab-ci.yml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/.gitlab-ci.yml b/.gi

[PULL 56/66] hw/i386/pc: add max combined fw size as machine configuration option

2020-12-08 Thread Michael S. Tsirkin
From: Erich-McMillan At Hewlett Packard Inc. we have a need for increased fw size to enable testing of our custom fw. Rebase v6 patch to d73c46e4 Signed-off-by: Erich McMillan Message-Id: <20201208155338.14-1-erich.mcmil...@hp.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Ts

[PULL 55/66] block/export: avoid g_return_val_if() input validation

2020-12-08 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Do not validate input with g_return_val_if(). This API is intended for checking programming errors and is compiled out with -DG_DISABLE_CHECKS. Use an explicit if statement for input validation so it cannot accidentally be compiled out. Suggested-by: Markus Armbruster Sig

[PULL 49/66] libvhost-user: check memfd API

2020-12-08 Thread Michael S. Tsirkin
From: Marc-André Lureau Do not compile potentially panicking code, instead check memfd API is present during configure time. Signed-off-by: Marc-André Lureau Message-Id: <20201125100640.366523-7-marcandre.lur...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL 34/66] failover: simplify qdev_device_add() failover case

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela Just put allthe logic inside the same if. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-20-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- softmmu/qdev-monitor.c | 11 ++- 1 file changed, 6 insertions(+),

[PULL 58/66] x86: acpi: introduce AcpiPmInfo::smi_on_cpu_unplug

2020-12-08 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20201207140739.3829993-4-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-bu

[PULL 64/66] pcie_aer: Fix help message of pcie_aer_inject_error command

2020-12-08 Thread Michael S. Tsirkin
From: Zenghui Yu There is an interesting typo in the help message of pcie_aer_inject_error command. Use 'tlp' instead of 'tlb' to match the PCIe AER term. Signed-off-by: Zenghui Yu Message-Id: <20201204030953.837-1-yuzeng...@huawei.com> Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Michael

[PULL 65/66] hw/virtio-pci Added counter for pcie capabilities offsets.

2020-12-08 Thread Michael S. Tsirkin
From: Andrew Removed hardcoded offset for ats. Added cap offset counter for future capabilities like AER. Signed-off-by: Andrew Melnychenko Message-Id: <20201203110713.204938-2-and...@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 4

[PULL 54/66] contrib/vhost-user-input: avoid g_return_val_if() input validation

2020-12-08 Thread Michael S. Tsirkin
From: Stefan Hajnoczi Do not validate input with g_return_val_if(). This API is intended for checking programming errors and is compiled out with -DG_DISABLE_CHECKS. Use an explicit if statement for input validation so it cannot accidentally be compiled out. Suggested-by: Markus Armbruster Sig

[PULL 36/66] failover: make sure that id always exist

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela We check that it exist at device creation time, so we don't have to check anywhere else. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-22-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c| 3

[RFC v9 03/32] accel/tcg: rename tcg-cpus functions to match module name

2020-12-08 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/tcg/tcg-cpus-icount.c | 24 ++-- accel/tcg/tcg-cpus-icount.h | 6 +-- accel/tcg/tcg-cpus-mttcg.c | 10 ++--- accel/tcg/tcg-cpus-rr.c | 74 ++-

[PULL 66/66] hw/virtio-pci Added AER capability.

2020-12-08 Thread Michael S. Tsirkin
From: Andrew Added AER capability for virtio-pci devices. Also added property for devices, by default AER is disabled. Signed-off-by: Andrew Melnychenko Message-Id: <20201203110713.204938-3-and...@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vir

[PULL 62/66] x86: ich9: factor out "guest_cpu_hotplug_features"

2020-12-08 Thread Michael S. Tsirkin
From: Igor Mammedov it will be reused by next patch to check validity of unplug feature. Signed-off-by: Igor Mammedov Message-Id: <20201207140739.3829993-8-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/isa/lpc_ich9.c | 8 ++-- 1 file change

[PULL 40/66] failover: Caller of this two functions already have primary_dev

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela Pass it as an argument. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-26-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 27 ++- 1 file changed, 14 insertions(+), 13 d

[RFC v9 11/32] tcg: cpu_exec_{enter,exit} helpers

2020-12-08 Thread Claudio Fontana
From: Eduardo Habkost Move invocation of CPUClass.cpu_exec_*() to separate helpers, to make it easier to refactor that code later. Signed-off-by: Eduardo Habkost Signed-off-by: Claudio Fontana --- accel/tcg/cpu-exec.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions

[PULL 63/66] x86: ich9: let firmware negotiate 'CPU hot-unplug with SMI' feature

2020-12-08 Thread Michael S. Tsirkin
From: Igor Mammedov Keep CPU hotunplug with SMI disabled on 5.2 and older and enable it by default on newer machine types. Signed-off-by: Igor Mammedov Message-Id: <20201207140739.3829993-9-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/pc.

[PULL 60/66] x86: acpi: let the firmware handle pending "CPU remove" events in SMM

2020-12-08 Thread Michael S. Tsirkin
From: Igor Mammedov if firmware and QEMU negotiated CPU hotunplug support, generate _EJ0 method so that it will mark CPU for removal by firmware and pass control to it by triggering SMI. Signed-off-by: Igor Mammedov Message-Id: <20201207140739.3829993-6-imamm...@redhat.com> Reviewed-by: Michael

[PULL 46/66] libvhost-user: remove qemu/compiler.h usage

2020-12-08 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20201125100640.366523-4-marcandre.lur...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- contrib/libvhost-user/libvhost-user.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) dif

[RFC v9 14/32] cpu: Remove unnecessary noop methods

2020-12-08 Thread Claudio Fontana
From: Eduardo Habkost Signed-off-by: Eduardo Habkost Signed-off-by: Claudio Fontana --- hw/core/cpu.c | 13 - 1 file changed, 13 deletions(-) diff --git a/hw/core/cpu.c b/hw/core/cpu.c index 576fa1d7ba..994a12cb35 100644 --- a/hw/core/cpu.c +++ b/hw/core/cpu.c @@ -199,15 +199,6 @@

[PULL 41/66] failover: simplify failover_unplug_primary

2020-12-08 Thread Michael S. Tsirkin
From: Juan Quintela We can calculate device just once. Signed-off-by: Juan Quintela Message-Id: <20201118083748.1328-27-quint...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 25 ++--- 1 file changed, 10 insertions

[PULL 57/66] acpi: cpuhp: introduce 'firmware performs eject' status/control bits

2020-12-08 Thread Michael S. Tsirkin
From: Igor Mammedov Adds bit #4 to status/control field of CPU hotplug MMIO interface. New bit will be used OSPM to mark CPUs as pending for removal by firmware, when it calls _EJ0 method on CPU device node. Later on, when firmware sees this bit set, it will perform CPU eject which will clear bit

Re: Plugin Register Accesses

2020-12-08 Thread Aaron Lindsay via
On Dec 08 17:56, Alex Bennée wrote: > Aaron Lindsay writes: > > On Dec 08 12:17, Alex Bennée wrote: > >> Aaron Lindsay writes: > >> Memory is a little trickier because you can't know at any point if a > >> given virtual address is actually mapped to real memory. The safest way > >> would be

[RFC v9 02/32] accel/tcg: split tcg_start_vcpu_thread

2020-12-08 Thread Claudio Fontana
after the initial split into 3 tcg variants, we proceed to also split tcg_start_vcpu_thread. We actually split it in 2 this time, since the icount variant just uses the round robin function. Suggested-by: Richard Henderson Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- acce

[RFC v9 21/32] cpu: Move debug_excp_handler to tcg_ops

2020-12-08 Thread Claudio Fontana
From: Eduardo Habkost Signed-off-by: Eduardo Habkost Signed-off-by: Claudio Fontana --- accel/tcg/cpu-exec.c | 4 ++-- include/hw/core/cpu.h | 2 -- include/hw/core/tcg-cpu-ops.h | 2 ++ target/arm/cpu.c | 2 +- target/i386/tcg-cpu.c | 2 +- target/lm32/cp

[PULL 59/66] tests/acpi: allow expected files change

2020-12-08 Thread Michael S. Tsirkin
From: Igor Mammedov Change that will be introduced by following patch: @@ -557,6 +557,7 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x0001) CINS, 1, CRMV, 1, CEJ0, 1, +CEJF, 1, Offset (0

[RFC v9 00/22] i386 cleanup

2020-12-08 Thread Claudio Fontana
v8 -> v9: move additional methods to CPUClass->tcg_ops do_unaligned_access, transaction_failed and do_interrupt. do_interrupt is a bit tricky, as the same code is reused (albeit not usually directly) for KVM under certain odd conditions. Change arm, as the only user of do_interrupt callback for

[RFC v9 04/32] i386: move kvm accel files into kvm/

2020-12-08 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- MAINTAINERS | 2 +- hw/i386/fw_cfg.c | 2 +- hw/i386/intel_iommu.c| 2 +- hw/i386/kvm/apic.c | 2 +- hw/i386/kvm/clock.c | 2 +- hw/i386/microvm.c

[PULL 61/66] tests/acpi: update expected files

2020-12-08 Thread Michael S. Tsirkin
From: Igor Mammedov update expected files with following change: @@ -557,6 +557,7 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x0001) CINS, 1, CRMV, 1, CEJ0, 1, +CEJF, 1, Offset (0x05),

[RFC v9 27/32] accel: replace struct CpusAccel with AccelOpsClass

2020-12-08 Thread Claudio Fontana
centralize the registration of the cpus.c module accelerator operations in accel/accel-softmmu.c Signed-off-by: Claudio Fontana --- MAINTAINERS | 3 ++- accel/accel-common.c | 11 + accel/accel-softmmu.c| 43 +++--- accel/acce

[RFC v9 30/32] cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn

2020-12-08 Thread Claudio Fontana
move the call to the accel_cpu_interface method to the general cpu_exec_realizefn from target/i386, so it does not need to be called for every target explicitly as we enable more targets. Signed-off-by: Claudio Fontana --- cpu.c | 5 + target/i386/cpu.c | 15 --- 2 f

[RFC v9 05/32] i386: move whpx accel files into whpx/

2020-12-08 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- MAINTAINERS | 5 + target/i386/meson.build | 5 + target/i386/whpx/meson.build | 4 target/i386/{ => whpx}/whp-dispatch.h | 0 target/i386/{ => whpx}/whpx-all.c | 0 target/i386/{ => whpx}/whpx-cp

[RFC v9 06/32] i386: move hax accel files into hax/

2020-12-08 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- MAINTAINERS | 2 +- target/i386/{ => hax}/hax-all.c | 0 target/i386/{ => hax}/hax-cpus.c | 0 target/i386/{ => hax}/hax-cpus.h | 0 target/i386/{ => hax}/hax-i386.h | 6 +++--- target/i386/{ => hax}/hax-interface.h

[RFC v9 01/32] accel/tcg: split CpusAccel into three TCG variants

2020-12-08 Thread Claudio Fontana
split up the CpusAccel tcg_cpus into three TCG variants: tcg_cpus_rr (single threaded, round robin cpus) tcg_cpus_icount (same as rr, but with instruction counting enabled) tcg_cpus_mttcg (multi-threaded cpus) Suggested-by: Richard Henderson Signed-off-by: Claudio Fontana Reviewed-by: Richard H

[RFC v9 07/32] i386: hvf: remove stale MAINTAINERS entry for old hvf stubs

2020-12-08 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Roman Bolshakov --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 448593c904..f53f2678d8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -444,7 +444,6 @@ M: Cameron Esfahani M: Roman Bolshakov W: https

<    1   2   3   4   5   >