[PATCH for-6.0 9/9] spapr: spapr_drc_attach() cannot fail

2020-11-20 Thread Greg Kurz
All users are passing _abort already. Document the fact that spapr_drc_attach() should only be passed a free DRC, which is supposedly the case if appropriate checking is done earlier. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_drc.h | 8 +++- hw/ppc/spapr.c | 6 +++---

[PATCH for-6.0 4/9] spapr: Set compat mode in spapr_reset_vcpu()

2020-11-20 Thread Greg Kurz
When it comes to resetting the compat mode of the vCPUS, there are two situations to consider: (1) machine reset should set the compat mode back to the machine default, ie. spapr->max_compat_pvr (2) hot plugged vCPUs should set their compat mode to mach the boot vCPU, ie.

[PATCH for-6.0 8/9] spapr: Do TPM proxy hotplug sanity checks at pre-plug

2020-11-20 Thread Greg Kurz
There can be only one TPM proxy at a time. This is currently checked at plug time. But this can be detected at pre-plug in order to error out earlier. This allows to get rid of error handling in the plug handler. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 23 ++- 1 file

[PATCH for-6.0 3/9] spapr: Fix pre-2.10 dummy ICP hack

2020-11-20 Thread Greg Kurz
This hack registers dummy VMState entries of ICPs in order to support migration of old pseries machine types that used to create all smp.max_cpus possible ICPs at machine init. Part of the work is to unregister the dummy entries when plugging an actual vCPU core, and to register them back when

[PATCH for-6.0 7/9] spapr: Do PHB hoplug sanity check at pre-plug

2020-11-20 Thread Greg Kurz
We currently detect that a PHB index is already in use at plug time. But this can be decteted at pre-plug in order to error out earlier. This allows to pass _abort to spapr_drc_attach() and to end up with a plug handler that doesn't need to report errors anymore. Signed-off-by: Greg Kurz ---

[PATCH for-6.0 1/9] spapr: Do PCI device hotplug sanity checks at pre-plug only

2020-11-20 Thread Greg Kurz
The PHB acts as the hotplug handler for PCI devices. It does some sanity checks on DR enablement, PCI bridge chassis numbers and multifunction. These checks are currently performed at plug time, but they would best sit in a pre-plug handler in order to error out as early as possible. Create a

[PATCH for-6.0 5/9] spapr: Simplify error path of spapr_core_plug()

2020-11-20 Thread Greg Kurz
spapr_core_pre_plug() already guarantees that the slot for the given core ID is available. It is thus safe to assume that spapr_find_cpu_slot() returns a slot during plug. Turn the error path into an assertion. It is also safe to assume that no device is attached to the corresponding DRC and that

[PATCH for-6.0 2/9] spapr: Do NVDIMM/PC-DIMM device hotplug sanity checks at pre-plug only

2020-11-20 Thread Greg Kurz
Pre-plug of a memory device, be it an NVDIMM or a PC-DIMM, ensures that the memory slot is available and that addresses don't overlap with existing memory regions. The corresponding DRCs in the LMB and PMEM namespaces are thus necessarily attachable at plug time. Pass _abort to spapr_drc_attach()

[PATCH for-6.0 6/9] spapr: Make PHB placement functions and spapr_pre_plug_phb() return status

2020-11-20 Thread Greg Kurz
Read documentation in "qapi/error.h" and changelog of commit e3fe3988d785 ("error: Document Error API usage rules") for rationale. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr.h | 2 +- hw/ppc/spapr.c | 40 +++- 2 files changed, 24

[PATCH for-6.0 0/9] spapr: Perform hotplug sanity checks at pre-plug

2020-11-20 Thread Greg Kurz
Igor recently suggested that instead of failing in spapr_drc_attach() at plug time we should rather check that the DRC is attachable at pre-plug time. This allows to error out before the hot-plugged device is even realized and to come up with simpler plug callbacks. sPAPR currently supports

Re: [PATCH v2] drivers/virt: vmgenid: add vm generation id driver

2020-11-20 Thread Jann Horn
On Mon, Nov 16, 2020 at 4:35 PM Catangiu, Adrian Costin wrote: > This patch is a driver that exposes a monotonic incremental Virtual > Machine Generation u32 counter via a char-dev FS interface that > provides sync and async VmGen counter updates notifications. It also > provides VmGen counter

[PULL 2/2] qboot: update to latest upstream

2020-11-20 Thread Paolo Bonzini
This also brings in two patches that Debian had to include, qboot_stop_using_inttypes.patch and qboot_no_jump_tables.diff. Reported-by: Michael Tokarev Signed-off-by: Paolo Bonzini Message-Id: <20201120152408.164346-1-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- pc-bios/qboot.rom |

[PULL 1/2] usb: fix kconfig for usb-xhci-sysbus

2020-11-20 Thread Paolo Bonzini
Remove the "default y" for USB_XHCI_SYSBUS because sysbus devices are not user creatable; boards that use them will specify them manually with "imply" or "select" clauses. It would be nice to keep the ability to remove PCIe and USB from microvm, since thos can be disabled on the command line and

[PULL 0/2] Kconfig, qboot changes for 2020-11-20

2020-11-20 Thread Paolo Bonzini
The following changes since commit 7fbd7e710323c8f4c5f6a38a8ae0e6726b5a4599: Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/tracing-pull-request' into staging (2020-11-19 17:08:42 +) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git

Re: [PATCH RFC] vfio: Move the saving of the config space to the right place in VFIO migration

2020-11-20 Thread Alex Williamson
On Fri, 20 Nov 2020 22:05:49 +0800 Shenming Lu wrote: > On 2020/11/20 1:41, Alex Williamson wrote: > > On Thu, 19 Nov 2020 14:13:24 +0530 > > Kirti Wankhede wrote: > > > >> On 11/14/2020 2:47 PM, Shenming Lu wrote: > >>> When running VFIO migration, I found that the restoring of VFIO PCI

Re: [PATCH v2] drivers/virt: vmgenid: add vm generation id driver

2020-11-20 Thread Dmitry Safonov
Hello, +Cc Eric, Adrian On 11/19/20 6:36 PM, Alexander Graf wrote: > On 19.11.20 18:38, Mike Rapoport wrote: >> On Thu, Nov 19, 2020 at 01:51:18PM +0100, Alexander Graf wrote: >>> On 19.11.20 13:02, Christian Borntraeger wrote: On 16.11.20 16:34, Catangiu, Adrian Costin wrote: > -

[PATCH 24/26] MAINTAINERS: Add entry for MIPS Loongson TCG

2020-11-20 Thread Philippe Mathieu-Daudé
Add an entry for the TCG core related to Loongson. Signed-off-by: Philippe Mathieu-Daudé --- Adding Huacai and Jiaxun in case they want to be notified of changes, patch conditional to their individual approval. --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 22/26] target/mips: Extract Toshiba TXx9 translation routines

2020-11-20 Thread Philippe Mathieu-Daudé
Extract 300 lines of the Toshiba TX19/TX39/TX49/TX79 translation routines to 'vendor-tx_translate.c.inc'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 302 +--- target/mips/vendor-tx_translate.c.inc | 315 ++ 2

[PATCH 21/26] target/mips: Make pipeline 1 multiply opcodes generic

2020-11-20 Thread Philippe Mathieu-Daudé
Special2 multiply opcodes are not specific to Toshiba TX79, and are not part of its multimedia extension. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 75 + 1 file changed, 38 insertions(+), 37 deletions(-) diff --git

[PATCH 18/26] target/mips: Extract Loongson SIMD translation routines

2020-11-20 Thread Philippe Mathieu-Daudé
LoongSIMD (formerly LoongMMI in Loongson 2E/F) is the 128-bit SIMD extension from the LoongISA. Extract 600 lines of translation routines to 'vendor-loong-simd_translate.c.inc'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 598 +

[PATCH 10/26] target/mips: Extract the microMIPS ISA helper definitions

2020-11-20 Thread Philippe Mathieu-Daudé
Extract the microMIPS ISA helper definitions to 'isa-micromips_helper.h.inc'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/helper.h | 10 ++ target/mips/isa-micromips_helper.h.inc | 17 + 2 files changed, 19 insertions(+), 8 deletions(-)

[PATCH 25/26] MAINTAINERS: Add entry for MIPS Ingenic Xburst TCG

2020-11-20 Thread Philippe Mathieu-Daudé
Add an entry for the TCG core related to Ingenic Xburst. Signed-off-by: Philippe Mathieu-Daudé --- Adding Craig Janeczek in case he wants to be notified of changes, patch conditional to his approval. --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS

[PATCH 26/26] MAINTAINERS: Add entry for MIPS Toshiba TCG

2020-11-20 Thread Philippe Mathieu-Daudé
Add an entry for the TCG core related to Toshiba TXx9. Signed-off-by: Philippe Mathieu-Daudé --- Adding Fredrik Noring in case he wants to be notified of changes, patch conditional to his approval. --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS

[PATCH 23/26] target/mips: Extract Toshiba TX79 multimedia translation routines

2020-11-20 Thread Philippe Mathieu-Daudé
Extract 600 lines of the the Toshiba TX79 multimedia translation routines to 'vendor-tx-mmi_translate.c.inc'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 567 - target/mips/vendor-tx-mmi_translate.c.inc | 573 ++

[PATCH 16/26] target/mips: Rename lmmi_helper.c as loong-simd_helper.c

2020-11-20 Thread Philippe Mathieu-Daudé
The LoongMMI extension has been renamed LoongSIMD (part of the LoongISA). Rename the helper file accordingly. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/{lmmi_helper.c => vendor-loong-simd_helper.c} | 0 target/mips/meson.build | 2 +- 2 files

[PATCH 06/26] target/mips: Extract DSP helper definitions

2020-11-20 Thread Philippe Mathieu-Daudé
'MIPS DSP' is defined as a Module by MIPS. Extract the helper definitions to 'mod-mips-dsp_helper.h.inc'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/helper.h | 335 + target/mips/mod-mips-dsp_helper.h.inc | 344 ++ 2

[PATCH 15/26] target/mips: Extract NEC Vr54xx translation routines

2020-11-20 Thread Philippe Mathieu-Daudé
Extract the NEC Vr54xx translation routines to 'vendor-vr54xx_translate.c.inc'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 86 + target/mips/vendor-vr54xx_translate.c.inc | 93 +++ 2 files changed, 95

[PATCH 05/26] target/mips: Rename dsp_helper.c as mod-mips-dsp_helper.c

2020-11-20 Thread Philippe Mathieu-Daudé
'MIPS DSP' is defined as a Module by MIPS, rename it as mod-mips-dsp_helper.c. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/{dsp_helper.c => mod-mips-dsp_helper.c} | 0 target/mips/meson.build | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename

[PATCH 17/26] target/mips: Extract Loongson SIMD helper definitions

2020-11-20 Thread Philippe Mathieu-Daudé
Extract the Loongson SIMD helper definitions to 'vendor-loong-simd_helper.h'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/helper.h | 60 +-- target/mips/vendor-loong-simd_helper.h.inc | 69 ++ 2 files changed, 70 insertions(+),

[PATCH 19/26] target/mips: Extract Loongson EXTensions translation routines

2020-11-20 Thread Philippe Mathieu-Daudé
LoongEXTs are general-purpose extensions from the LoongISA. Extract 440 lines of translation routines to 'vendor-loong-lext_translate.c.inc'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 440 +

[PATCH 14/26] target/mips: Extract NEC Vr54xx helper definitions

2020-11-20 Thread Philippe Mathieu-Daudé
Extract the NEC Vr54xx helper definitions to 'vendor-vr54xx_helper.h'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/helper.h | 17 ++--- target/mips/vendor-vr54xx_helper.h.inc | 24 2 files changed, 26 insertions(+), 15

[PATCH 13/26] target/mips: Extract NEC Vr54xx helpers to vendor-vr54xx_helper.c

2020-11-20 Thread Philippe Mathieu-Daudé
Extract NEC Vr54xx helpers from op_helper.c to a new file: 'vendor-vr54xx_helper.c'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/op_helper.c| 118 -- target/mips/vendor-vr54xx_helper.c | 131 + target/mips/meson.build

[PATCH 04/26] target/mips: Extract MSA translation routines

2020-11-20 Thread Philippe Mathieu-Daudé
Extract 2200 lines from the huge translate.c to a new file, 'mod-mips-msa_translate.c.inc'. As there are too many inter- dependencies we don't compile it as another object, but keep including it in the big translate.o. We gain in code maintainability. Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 08/26] target/mips: Extract Multi-Threading helper definitions

2020-11-20 Thread Philippe Mathieu-Daudé
'MIPS MT' is defined as a Module by MIPS. Extract the helper definitions to 'mod-mips-mt_helper.h.inc'. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/helper.h | 24 +-- target/mips/mod-mips-mt_helper.h.inc | 36 2 files

[PATCH 09/26] target/mips: Extract Code Compaction ASE translation routines

2020-11-20 Thread Philippe Mathieu-Daudé
Extract 1200 lines from the huge translate.c to a new file, 'ase-mips16e_translate.c.inc'. As there are too many inter- dependencies we don't compile it as another object, but keep including it in the big translate.o. We gain in code maintainability. Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 02/26] target/mips: Extract MSA helpers to mod-mips-msa_helper.c

2020-11-20 Thread Philippe Mathieu-Daudé
MSA means 'MIPS SIMD Architecture' and is defined as a Module by MIPS. Rename msa_helper.c as mod-mips-msa_helper.c, merge other MSA helpers from op_helper.c. Signed-off-by: Philippe Mathieu-Daudé --- .../{msa_helper.c => mod-mips-msa_helper.c} | 392 + target/mips/op_helper.c

[PATCH 03/26] target/mips: Extract MSA helper definitions

2020-11-20 Thread Philippe Mathieu-Daudé
Keep all MSA-related code altogether. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/helper.h | 437 + target/mips/mod-mips-msa_helper.h.inc | 443 ++ 2 files changed, 446 insertions(+), 434 deletions(-) create mode 100644

[PATCH 01/26] target/mips: Extract FPU helpers to 'fpu_helper.h'

2020-11-20 Thread Philippe Mathieu-Daudé
Extract FPU specific helpers from "internal.h" to "fpu_helper.h". Signed-off-by: Philippe Mathieu-Daudé --- target/mips/fpu_helper.h | 50 ++ target/mips/internal.h | 42 linux-user/mips/cpu_loop.c | 1 +

[PATCH 00/26] target/mips: Explode 60% of the 32K-lines translate.c

2020-11-20 Thread Philippe Mathieu-Daudé
Hi, This series, while boring, helps maintainability. I simply exploded 60% of the huge target/mips/translate.c, reducing it from 32K lines of code to 13500. The small overhead in the diffstat is due to entries added in MAINTAINERS and license boilerplate addition: 20225 insertions(+), 19987

Re: [PATCH v1 1/6] scripts/ci: clean up default args logic a little

2020-11-20 Thread Wainer dos Santos Moschetta
On 11/17/20 2:36 PM, Alex Bennée wrote: This allows us to do: ./scripts/ci/gitlab-pipeline-status -w -b HEAD -p 2961854 to check out own pipeline status of a recently pushed branch. Signed-off-by: Alex Bennée --- scripts/ci/gitlab-pipeline-status | 24 +--- 1 file

Re: [PULL 0/4] docs + qtest patches

2020-11-20 Thread Peter Maydell
On Fri, 20 Nov 2020 at 17:18, Thomas Huth wrote: > > Hi Peter, > > the following changes since commit 7fbd7e710323c8f4c5f6a38a8ae0e6726b5a4599: > > Merge remote-tracking branch > 'remotes/stefanha-gitlab/tags/tracing-pull-request' into staging (2020-11-19 > 17:08:42 +) > > are available

[Bug 1674925] Re: Qemu PPC64 kvm no display if --device virtio-gpu-pci is selected

2020-11-20 Thread Thomas Huth
The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch

[Bug 1619991] Re: Concurrent VMs crash w/ GPU passthrough and multiple disks

2020-11-20 Thread Thomas Huth
The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch

Re: [RFC PATCH 25/27] vhost: Do not commit vhost used idx on vhost_virtqueue_stop

2020-11-20 Thread Eugenio Perez Martin
On Fri, Nov 20, 2020 at 8:12 PM Eugenio Pérez wrote: > > ... if sw lm is enabled > > Signed-off-by: Eugenio Pérez > --- > hw/virtio/vhost.c | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c > index

Re: [RFC PATCH 00/27] vDPA software assisted live migration

2020-11-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201120185105.279030-1-epere...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201120185105.279030-1-epere...@redhat.com Subject: [RFC PATCH 00/27] vDPA software

[Bug 1346784] Re: qemu internal memory areas visible to a guest via /proc/self/maps

2020-11-20 Thread Thomas Huth
I think this had been fixed here: https://git.qemu.org/?p=qemu.git;a=commitdiff;h=d67f4aaae8379b44b3b51ff0 ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [RFC v4 9/9] i386: split cpu accelerators from cpu.c

2020-11-20 Thread Eduardo Habkost
On Fri, Nov 20, 2020 at 07:47:11PM +0100, Claudio Fontana wrote: > On 11/20/20 6:44 PM, Eduardo Habkost wrote: > > On Fri, Nov 20, 2020 at 03:49:09PM +0100, Claudio Fontana wrote: > >> split cpu.c into: > >> > >> cpu.ccpuid and common x86 cpu functionality > >> host-cpu.c host

[Bug 1395217] Re: Networking in qemu 2.0.0 and beyond is not compatible with Open Solaris (Illumos) 5.11

2020-11-20 Thread Thomas Huth
The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch

Re: [PATCH v1 3/6] tests/avocado: clean-up socket directory after run

2020-11-20 Thread Wainer dos Santos Moschetta
On 11/17/20 2:36 PM, Alex Bennée wrote: Previously we were leaving temporary directories behind. While the QEMUMachine does make efforts to clean up after itself the directory belongs to the calling function. We use TemporaryDirectory to wrap this although we explicitly clear the reference in

[RFC PATCH 24/27] vhost: iommu changes

2020-11-20 Thread Eugenio Pérez
Since vhost is now asking for qemu's VA, iommu needs to be bypassed. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index eebfac4455..cb44b9997f 100644 --- a/hw/virtio/vhost.c +++

Re: [RFC PATCH 00/27] vDPA software assisted live migration

2020-11-20 Thread Eugenio Perez Martin
The main intention with this POC/RFC is to serve as a base to implement SW LM in vdpa devices. To implement in vhost-vdpa devices, the high priority is to achieve an interface for vdpa to stop the device without losing its state, i.e., the avail_idx the destination device should start fetching

Re: [PATCH v1 2/6] tests: add prefixes to the bare mkdtemp calls

2020-11-20 Thread Wainer dos Santos Moschetta
On 11/17/20 2:36 PM, Alex Bennée wrote: The first step to debug a thing is to know what created the thing in the first place. Add some prefixes so random tmpdir's have something grep in the code. Yeah, it indeed helps. Signed-off-by: Alex Bennée --- v2 - fix long lines ---

[RFC PATCH 23/27] vhost: unmap qemu's shadow virtqueues on sw live migration

2020-11-20 Thread Eugenio Pérez
Since vhost does not need to access it, it has no sense to keep it mapped. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index f640d4edf0..eebfac4455 100644 --- a/hw/virtio/vhost.c +++

[RFC PATCH 25/27] vhost: Do not commit vhost used idx on vhost_virtqueue_stop

2020-11-20 Thread Eugenio Pérez
... if sw lm is enabled Signed-off-by: Eugenio Pérez --- hw/virtio/vhost.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index cb44b9997f..cf000b979f 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1424,17

[RFC PATCH 19/27] vhost: add vhost_vring_get_buf_rcu

2020-11-20 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-sw-lm-ring.h | 1 + hw/virtio/vhost-sw-lm-ring.c | 29 + 2 files changed, 30 insertions(+) diff --git a/hw/virtio/vhost-sw-lm-ring.h b/hw/virtio/vhost-sw-lm-ring.h index 03257d60c1..429a125558 100644 ---

[RFC PATCH 27/27] vhost: forbid vhost devices logging

2020-11-20 Thread Eugenio Pérez
This is NOT a commit intended for merge, but for test the patchset. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 44a51ccf5e..069e5c915d 100644 --- a/hw/virtio/vhost.c +++

[RFC PATCH 22/27] vhost: Add vhost_virtqueue_memory_map

2020-11-20 Thread Eugenio Pérez
To make it symmetric with _unmap. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost.c | 68 ++- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index eafbbaa751..f640d4edf0 100644 ---

[RFC PATCH 16/27] virtio: Expose virtqueue_alloc_element

2020-11-20 Thread Eugenio Pérez
Specify VirtQueueElement * as return type makes no harm at this moment. Signed-off-by: Eugenio Pérez --- include/hw/virtio/virtio.h | 2 ++ hw/virtio/virtio.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h

[RFC PATCH 14/27] virtio: Remove virtio_queue_get_used_notify_split

2020-11-20 Thread Eugenio Pérez
No more uses beyond this point Signed-off-by: Eugenio Pérez --- include/hw/virtio/virtio.h | 1 - hw/virtio/virtio.c | 14 -- 2 files changed, 15 deletions(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 0a7f5cc63e..79212141a6 100644 ---

[RFC PATCH 26/27] vhost: Add vhost_hdev_can_sw_lm

2020-11-20 Thread Eugenio Pérez
This allows a device to migrate if it meet a few requirements. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index cf000b979f..44a51ccf5e 100644 ---

[RFC PATCH 21/27] vhost: Add vhost_virtqueue_memory_unmap

2020-11-20 Thread Eugenio Pérez
This is not a huge gain but helps in later changes. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 9a3c580dcf..eafbbaa751 100644 ---

[RFC PATCH 10/27] vhost: Allocate shadow vring

2020-11-20 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-sw-lm-ring.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-sw-lm-ring.c b/hw/virtio/vhost-sw-lm-ring.c index cbf53965cd..cd7b5ba772 100644 --- a/hw/virtio/vhost-sw-lm-ring.c +++

[RFC PATCH 12/27] virtio: Add virtio_queue_full

2020-11-20 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- include/hw/virtio/virtio.h | 2 ++ hw/virtio/virtio.c | 15 +-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index b9b8497ea0..0a7f5cc63e 100644 ---

[RFC PATCH 20/27] vhost: Return used buffers

2020-11-20 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-sw-lm-ring.h | 3 +++ hw/virtio/vhost-sw-lm-ring.c | 14 +++ hw/virtio/vhost.c| 46 +--- 3 files changed, 56 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-sw-lm-ring.h

[RFC PATCH 18/27] vhost: add vhost_vring_poll_rcu

2020-11-20 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-sw-lm-ring.h | 2 ++ hw/virtio/vhost-sw-lm-ring.c | 18 ++ 2 files changed, 20 insertions(+) diff --git a/hw/virtio/vhost-sw-lm-ring.h b/hw/virtio/vhost-sw-lm-ring.h index c537500d9e..03257d60c1 100644 ---

[RFC PATCH 09/27] vhost: Route host->guest notification through qemu

2020-11-20 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-sw-lm-ring.c | 3 +++ hw/virtio/vhost.c| 20 2 files changed, 23 insertions(+) diff --git a/hw/virtio/vhost-sw-lm-ring.c b/hw/virtio/vhost-sw-lm-ring.c index 0192e77831..cbf53965cd 100644 ---

[RFC PATCH 08/27] vhost: Add a flag for software assisted Live Migration

2020-11-20 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost.h | 1 + hw/virtio/vhost.c | 17 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 93cc3f1ae3..ef920a8076 100644 ---

[RFC PATCH 17/27] vhost: add vhost_vring_set_notification_rcu

2020-11-20 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-sw-lm-ring.h | 4 hw/virtio/vhost-sw-lm-ring.c | 23 +++ 2 files changed, 27 insertions(+) diff --git a/hw/virtio/vhost-sw-lm-ring.h b/hw/virtio/vhost-sw-lm-ring.h index 29d21feaf4..c537500d9e 100644 ---

[RFC PATCH 15/27] vhost: Do not invalidate signalled used

2020-11-20 Thread Eugenio Pérez
Since we are in control of guest' VQ again, we can trust on it. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 304e0baa61..ac2bc14190 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@

[RFC PATCH 02/27] vhost: Add device callback in vhost_migration_log

2020-11-20 Thread Eugenio Pérez
This allows code to reuse the logic to not to re-enable or re-disable migration mechanisms. Code works the same way as before. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/virtio/vhost.c

[Bug 824074] Re: Provide runtime option to expose the supported list of keymaps for vnc

2020-11-20 Thread Thomas Huth
The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch

[RFC PATCH 07/27] vhost: Route guest->host notification through qemu

2020-11-20 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-sw-lm-ring.h | 26 + include/hw/virtio/vhost.h| 3 ++ hw/virtio/vhost-sw-lm-ring.c | 60 + hw/virtio/vhost.c| 100 +-- hw/virtio/meson.build| 2 +- 5 files

[RFC PATCH 13/27] vhost: Send buffers to device

2020-11-20 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-sw-lm-ring.h | 3 + hw/virtio/vhost-sw-lm-ring.c | 134 +-- hw/virtio/vhost.c| 59 ++- 3 files changed, 189 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-sw-lm-ring.h

[RFC PATCH 00/27] vDPA software assisted live migration

2020-11-20 Thread Eugenio Pérez
This series enable vDPA software assisted live migration for vhost-net devices. This is a new method of vhost devices migration: Instead of relay on vDPA device's dirty logging capability, SW assisted LM intercepts dataplane, forwarding the descriptors between VM and device. In this migration

[RFC PATCH 06/27] virtio: Add virtio_queue_get_used_notify_split

2020-11-20 Thread Eugenio Pérez
This function is just used for a few commits, so SW LM is developed incrementally, and it is deleted after it is useful. For a few commits, only the events (irqfd, eventfd) are forwarded. This series adds descriptors forwarding on top of that. Signed-off-by: Eugenio Pérez ---

[RFC PATCH 11/27] virtio: const-ify all virtio_tswap* functions

2020-11-20 Thread Eugenio Pérez
They do not modify vdev, so these should be const as qemu coding style guideline. Signed-off-by: Eugenio Pérez --- include/hw/virtio/virtio-access.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h

[RFC PATCH 04/27] vhost: add vhost_kernel_set_vring_enable

2020-11-20 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-backend.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c index 222bbcc62d..317f1f96fa 100644 --- a/hw/virtio/vhost-backend.c +++ b/hw/virtio/vhost-backend.c

[RFC PATCH 05/27] vhost: Add hdev->dev.sw_lm_vq_handler

2020-11-20 Thread Eugenio Pérez
Only virtio-net honors it. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost.h | 1 + hw/net/virtio-net.c | 39 --- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index

[PATCH] virtio: reset device on bad guest index in virtio_load()

2020-11-20 Thread 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 notification and

[Bug 1214884] Re: Support VDI (Virtualbox) snapshots

2020-11-20 Thread Thomas Huth
The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch

[RFC PATCH 01/27] vhost: Add vhost_dev_can_log

2020-11-20 Thread Eugenio Pérez
Just syntactic sugar. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 614ccc2bcb..2bd8cdf893 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -61,6 +61,11 @@ bool

[RFC PATCH 03/27] vhost: Move log resize/put to vhost_dev_set_log

2020-11-20 Thread Eugenio Pérez
Software assisted live migration does not allocate vhost log. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 2adb2718c1..9cbd52a7f1 100644 ---

[Bug 1284090] Re: RFE: QMP: report error reason in BLOCK_IO_ERROR message

2020-11-20 Thread Thomas Huth
The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch

Re: [RFC v4 9/9] i386: split cpu accelerators from cpu.c

2020-11-20 Thread Claudio Fontana
On 11/20/20 6:44 PM, Eduardo Habkost wrote: > On Fri, Nov 20, 2020 at 03:49:09PM +0100, Claudio Fontana wrote: >> split cpu.c into: >> >> cpu.ccpuid and common x86 cpu functionality >> host-cpu.c host x86 cpu functions and "host" cpu type >> kvm/cpu.cKVM x86 cpu type >>

[PATCH] virtio: reset device on bad guest index in virtio_load()

2020-11-20 Thread 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 notification and

Re: [PATCH v2 3/8] qnum: QNumValue type for QNum value literals

2020-11-20 Thread Eduardo Habkost
On Fri, Nov 20, 2020 at 06:29:16AM +0100, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Thu, Nov 19, 2020 at 11:24:52AM +0100, Markus Armbruster wrote: > >> Marc-André Lureau writes: > >> > >> > On Tue, Nov 17, 2020 at 6:42 PM Eduardo Habkost > >> > wrote: > >> > > >> >> On

Re: [PATCH v2 4/8] qnum: qnum_value_is_equal() function

2020-11-20 Thread Eduardo Habkost
On Fri, Nov 20, 2020 at 07:52:31AM +0100, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Thu, Nov 19, 2020 at 11:27:40AM +0100, Markus Armbruster wrote: > > [...] > >> > +bool qnum_is_equal(const QObject *x, const QObject *y) > >> > +{ > >> > +const QNum *qnum_x =

Re: [PATCH RFC 0/5] Fix accidental crash in iotest 30

2020-11-20 Thread Vladimir Sementsov-Ogievskiy
20.11.2020 20:22, Kevin Wolf wrote: Am 20.11.2020 um 17:43 hat Vladimir Sementsov-Ogievskiy geschrieben: 20.11.2020 19:36, Kevin Wolf wrote: Am 20.11.2020 um 17:16 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi all! As Peter recently noted, iotest 30 accidentally fails. I found that Qemu

[PATCH v2 1/2] Update linux headers

2020-11-20 Thread Eric Farman
This is a placeholder for a proper run of scripts/update-linux-headers.sh Signed-off-by: Eric Farman --- linux-headers/linux/vfio.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index b92dcc4daf..609099e455 100644 ---

[PATCH v2 0/2] vfio-ccw: Implement request notifier

2020-11-20 Thread Eric Farman
Updated QEMU code for the request notifier, to match version 2 of the kernel code [1]. No changes since the v1/RFC [2], other than including Conny's r-b on patch 2 (Thank you!). This registers the QEMU vfio-ccw code's ability to respond to a request from the kernel to release the device, because

[PATCH v2 2/2] vfio-ccw: Connect the device request notifier

2020-11-20 Thread Eric Farman
Now that the vfio-ccw code has a notifier interface to request that a device be unplugged, let's wire that together. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck --- hw/vfio/ccw.c | 40 1 file changed, 36 insertions(+), 4 deletions(-) diff

Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU

2020-11-20 Thread Eduardo Habkost
On Fri, Nov 20, 2020 at 06:41:35PM +0100, Claudio Fontana wrote: > On 11/20/20 6:19 PM, Eduardo Habkost wrote: > > On Fri, Nov 20, 2020 at 01:13:33PM +0100, Claudio Fontana wrote: > >> On 11/18/20 11:07 PM, Eduardo Habkost wrote: > >>> On Wed, Nov 18, 2020 at 08:13:18PM +0100, Paolo Bonzini wrote:

Re: [PATCH-for-5.2 v2] hw/intc: fix heap-buffer-overflow in rxicu_realize()

2020-11-20 Thread Philippe Mathieu-Daudé
Hi Peter, On 11/20/20 5:41 PM, Peter Maydell wrote: > On Fri, 20 Nov 2020 at 13:44, Peter Maydell wrote: >> >> On Wed, 11 Nov 2020 at 14:18, Chen Qun wrote: >>> >>> When 'j = icu->nr_sense – 1', the 'j < icu->nr_sense' condition is true, >>> then 'j = icu->nr_sense', the'icu->init_sense[j]' has

[PATCH for-6.0 7/8] spapr: Drop "nr_servers" argument of the sPAPR IC activate() operation

2020-11-20 Thread Greg Kurz
This argument isn't used by the backends anymore. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_irq.h | 3 +-- hw/intc/spapr_xive.c | 3 +-- hw/intc/xics_spapr.c | 3 +-- hw/ppc/spapr_irq.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git

[PATCH for-6.0 8/8] spapr: Drop "nr_servers" argument of the sPAPR IC dt() operation

2020-11-20 Thread Greg Kurz
This argument isn't used by the backends anymore. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_irq.h | 6 ++ hw/intc/spapr_xive.c | 4 ++-- hw/intc/xics_spapr.c | 4 ++-- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_irq.c | 5 ++--- 5 files changed, 9

[PATCH for-6.0 2/8] spapr/xive: Introduce spapr_xive_nr_ends()

2020-11-20 Thread Greg Kurz
We're going to kill the "nr_ends" field in a subsequent patch. Prepare ground by using an helper instead of peeking into the sPAPR XIVE structure directly. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr_xive.h | 1 + hw/intc/spapr_xive.c| 23 ++-

[PATCH for-6.0 6/8] spapr/xics: Add "nr-servers" property

2020-11-20 Thread Greg Kurz
The sPAPR ICS device exposes the range of vCPU ids it can handle in the "ibm,interrupt-server-ranges" FDT property. The highest vCPU id, ie. spapr_max_server_number(), is obtained from the machine through the "nr_servers" argument of the generic spapr_irq_dt() call. We want to drop the

[PATCH for-6.0 0/8] spapr: Address the confusion between IPI numbers and vCPU ids

2020-11-20 Thread Greg Kurz
A regression was recently fixed in the sPAPR XIVE code for QEMU 5.2 RC3 [1]. It boiled down to a confusion between IPI numbers and vCPU ids, which happen to be numerically equal in general, but are really different entities that can diverge in some setups. When this happens, we end up

Re: [PATCH v1 4/6] gitlab: move remaining x86 check-tcg targets to gitlab

2020-11-20 Thread Wainer dos Santos Moschetta
On 11/17/20 2:36 PM, Alex Bennée wrote: The GCC check-tcg (user) test in particular was very prone to timing out on Travis. We only actually need to move the some-softmmu builds across as we already have coverage for linux-user. As --enable-debug-tcg does increase the run time somewhat as

[PATCH for-6.0 1/8] spapr/xive: Turn some sanity checks into assertions

2020-11-20 Thread Greg Kurz
The sPAPR XIVE device is created by the machine in spapr_irq_init(). The latter overrides any value provided by the user with -global for the "nr-irqs" and "nr-ends" properties with strictly positive values. It seems reasonable to assume these properties should never be 0, which wouldn't make

  1   2   3   >