[Qemu-devel] [PULL 28/44] spapr/xive: add state synchronization with KVM

2019-05-29 Thread David Gibson
From: Cédric Le Goater This extends the KVM XIVE device backend with 'synchronize_state' methods used to retrieve the state from KVM. The HW state of the sources, the KVM device and the thread interrupt contexts are collected for the monitor usage and also migration. These get operations rely on

[Qemu-devel] [PULL 12/44] target/ppc: Fix vsum2sws

2019-05-29 Thread David Gibson
From: Anton Blanchard A recent cleanup changed the pre zeroing of the result from 64 bit to 32 bit operations: -result.u64[i] = 0; +result.VsrW(i) = 0; This corrupts the result. Fixes: 60594fea298d ("target/ppc: remove various HOST_WORDS_BIGENDIAN hacks in int_helper.c") Signe

[Qemu-devel] [PATCH v12 13/20] gdbstub: Implement read all registers (g pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron Reviewed-by: Alex Bennée --- gdbstub.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index a487e549d1..8a401e6527 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1774,6 +1774,21 @@ static void handle

[Qemu-devel] [PULL 10/44] target/ppc: Fix xxbrq, xxbrw

2019-05-29 Thread David Gibson
From: Anton Blanchard Fix a typo in xxbrq and xxbrw where we put both results into the lower doubleword. Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() helpers for VSR register access") Signed-off-by: Anton Blanchard Message-Id: <20190507004811.29968-3-an...@ozlabs.o

[Qemu-devel] [PULL 18/44] target/ppc: Optimise VSX_LOAD_SCALAR_DS and VSX_VECTOR_LOAD_STORE

2019-05-29 Thread David Gibson
From: Anton Blanchard A few small optimisations: In VSX_LOAD_SCALAR_DS() we can don't need to read the VSR via get_cpu_vsrh(). Split VSX_VECTOR_LOAD_STORE() into two functions. Loads only need to write the VSRs (set_cpu_vsr*()) and stores only need to read the VSRs (get_cpu_vsr*()) Thanks to M

[Qemu-devel] [PULL 26/44] spapr/xive: add KVM support

2019-05-29 Thread David Gibson
From: Cédric Le Goater This introduces a set of helpers when KVM is in use, which create the KVM XIVE device, initialize the interrupt sources at a KVM level and connect the interrupt presenters to the vCPU. They also handle the initialization of the TIMA and the source ESB memory regions of the

[Qemu-devel] [PATCH v12 14/20] gdbstub: Implement file io (F pkt) with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 48 ++-- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 8a401e6527..ea85966b27 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1789,6 +1789,25 @@ static void handle_read_al

[Qemu-devel] [PULL 09/44] target/ppc: Fix xvxsigdp

2019-05-29 Thread David Gibson
From: Anton Blanchard Fix a typo in xvxsigdp where we put both results into the lower doubleword. Fixes: dd977e4f45cb ("target/ppc: Optimize x[sv]xsigdp using deposit_i64()") Signed-off-by: Anton Blanchard Message-Id: <20190507004811.29968-1-an...@ozlabs.org> Signed-off-by: David Gibson --- t

[Qemu-devel] [PULL 29/44] spapr/xive: introduce a VM state change handler

2019-05-29 Thread David Gibson
From: Cédric Le Goater This handler is in charge of stabilizing the flow of event notifications in the XIVE controller before migrating a guest. This is a requirement before transferring the guest EQ pages to a destination. When the VM is stopped, the handler sets the source PQs to PENDING to st

[Qemu-devel] [PULL 25/44] spapr: Print out extra hints when CAS negotiation of interrupt mode fails

2019-05-29 Thread David Gibson
From: Greg Kurz Let's suggest to the user how the machine should be configured to allow the guest to boot successfully. Suggested-by: Satheesh Rajendran Signed-off-by: Greg Kurz Message-Id: <155799221739.527449.14907564571096243745.st...@bahia.lan> Reviewed-by: Satheesh Rajendran Tested-by: S

[Qemu-devel] [PULL 15/44] spapr/xive: fix EQ page addresses above 64GB

2019-05-29 Thread David Gibson
From: Cédric Le Goater The high order bits of the address of the OS event queue is stored in bits [4-31] of word2 of the XIVE END internal structures and the low order bits in word3. This structure is using Big Endian ordering and computing the value requires some simple arithmetic which happens

[Qemu-devel] [PATCH v12 16/20] gdbstub: Implement v commands with new infra

2019-05-29 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 170 +++--- 1 file changed, 110 insertions(+), 60 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 3fd1a1cddb..648191a3b0 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1818,6 +1818,106 @@ static void handl

[Qemu-devel] [PULL 19/44] target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p

2019-05-29 Thread David Gibson
From: Anton Blanchard We were using set_cpu_vsr*() when we should have used get_cpu_vsr*(). Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() helpers for VSR register access") Signed-off-by: Anton Blanchard Message-Id: <20190509104912.6b754dff@kryten> Reviewed-by: Mark

[Qemu-devel] [PULL 44/44] ppc/pnv: add dummy XSCOM registers for PRD initialization

2019-05-29 Thread David Gibson
From: Cédric Le Goater PRD (Processor recovery diagnostics) is a service available on OpenPower systems. The opal-prd daemon initializes the PowerPC Processor through the XSCOM bus and then waits for hardware diagnostic events. Signed-off-by: Cédric Le Goater Message-Id: <20190527071722.31424-1

[Qemu-devel] [PATCH v12 17/20] gdbstub: Implement generic set/query (Q/q pkt) with new infra

2019-05-29 Thread Jon Doron
The generic set/query packets contains implementation for varioius sub-commands which are required for GDB and also additional commands which are QEMU specific. To see which QEMU specific commands are available use the command gdb> maintenance packet qqemu.Supported Currently the only implemented

[Qemu-devel] [PULL 24/44] spapr: Fix phb_placement backwards compatibility

2019-05-29 Thread David Gibson
When we added support for NVLink2 passthrough devices, we changed the phb_placement hook to handle the placement of NVLink2 bridges' specific resources. For compatibility we use a version that doesn't do this allocation for old machine types. However, because of the delay between when the patch

[Qemu-devel] [PULL 21/44] target/ppc: Set PSSCR_EC on cpu halt to prevent spurious wakeup

2019-05-29 Thread David Gibson
From: Suraj Jitindar Singh The processor stop status and control register (PSSCR) is used to control the power saving facilities of the thread. The exit criterion bit (EC) is used to specify whether the thread should be woken by any interrupt (EC == 0) or only an interrupt enabled in the LPCR to

[Qemu-devel] [PATCH v12 20/20] gdbstub: Implement qemu physical memory mode

2019-05-29 Thread Jon Doron
Add a new query/set which changes the memory GDB sees to physical memory only. gdb> maint packet qqemu.PhyMemMode will reply the current phy_mem_mode state (1 for enabled, 0 for disabled) gdb> maint packet Qqemu.PhyMemMode:1 Will make GDB read/write only to physical memory, set to 0 to disable Si

[Qemu-devel] [PULL 35/44] spapr/irq: introduce a spapr_irq_init_device() helper

2019-05-29 Thread David Gibson
From: Cédric Le Goater The way the XICS and the XIVE devices are initialized follows the same pattern. First, try to connect to the KVM device and if not possible fallback on the emulated device, unless a kernel_irqchip is required. The spapr_irq_init_device() routine implements this sequence in

[Qemu-devel] [PULL 23/44] target/ppc: Use vector variable shifts for VSL, VSR, VSRA

2019-05-29 Thread David Gibson
From: Richard Henderson The gvec expanders take care of masking the shift amount against the element width. Signed-off-by: Richard Henderson Message-Id: <20190518191430.21686-2-richard.hender...@linaro.org> Signed-off-by: David Gibson --- target/ppc/helper.h | 12 -- t

[Qemu-devel] [PULL 31/44] spapr/xive: activate KVM support

2019-05-29 Thread David Gibson
From: Cédric Le Goater All is in place for KVM now. State synchronization and migration will come next. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson Message-Id: <20190513084245.25755-8-...@kaod.org> Signed-off-by: David Gibson --- hw/ppc/spapr_irq.c | 9 - 1 file changed

[Qemu-devel] [PATCH 0/5] virtio: fix some issues of "started" and "start_on_kick" flag

2019-05-29 Thread elohimes
From: Xie Yongji We introduced two flags "started" and "start_on_kick" to indicate virtio device's state before. But there still are some problems with them. So we try to fixup them in this patchset. The patch 1 fixes a regression bug that old guest is not able to boot with vhost-user-blk device

[Qemu-devel] [PULL 04/44] target/ppc/kvm: Fix trace typo

2019-05-29 Thread David Gibson
From: Boxuan Li Signed-off-by: Boxuan Li Message-Id: <20190430172842.27369-1-libox...@connect.hku.hk> Signed-off-by: David Gibson --- target/ppc/kvm.c| 2 +- target/ppc/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/kvm.c b/target/ppc/kvm

[Qemu-devel] [PULL 22/44] spapr: Add forgotten capability to migration stream

2019-05-29 Thread David Gibson
spapr machine capabilities are supposed to be sent in the migration stream so that we can sanity check the source and destination have compatible configuration. Unfortunately, when we added the hpt-max-page-size capability, we forgot to add it to the migration state. This means that we can genera

[Qemu-devel] [PULL 36/44] spapr/irq: initialize the IRQ device only once

2019-05-29 Thread David Gibson
From: Cédric Le Goater Add a check to make sure that the routine initializing the emulated IRQ device is called once. We don't have much to test on the XICS side, so we introduce a 'init' boolean under ICSState. Signed-off-by: Cédric Le Goater Message-Id: <20190513084245.25755-13-...@kaod.org>

[Qemu-devel] [PATCH 1/5] virtio: Set "start_on_kick" on virtio_set_features()

2019-05-29 Thread elohimes
From: Xie Yongji The guest feature is not set correctly on virtio_reset() and virtio_init(). So we should not use it to set "start_on_kick" at that point. This patch set "start_on_kick" on virtio_set_features() instead. Signed-off-by: Xie Yongji --- hw/virtio/virtio.c | 25 +++-

[Qemu-devel] [PULL 06/44] hw/ppc/40p: Move the MC146818 RTC to the board where it belongs

2019-05-29 Thread David Gibson
From: Philippe Mathieu-Daudé The MC146818 RTC was incorrectly added to the i82378 chipset in commit a04ff940974a. In the next commit (506b7ddf8893) the PReP machine use the i82378. Since the MC146818 is specific to the PReP machine, move its use there. Fixes: a04ff940974a Signed-off-by: Philippe

[Qemu-devel] [PULL 27/44] spapr/xive: add hcall support when under KVM

2019-05-29 Thread David Gibson
From: Cédric Le Goater XIVE hcalls are all redirected to QEMU as none are on a fast path. When necessary, QEMU invokes KVM through specific ioctls to perform host operations. QEMU should have done the necessary checks before calling KVM and, in case of failure, H_HARDWARE is simply returned. H_I

[Qemu-devel] [PATCH v3 4/4] egl-helpers: add modifier support to egl_dmabuf_import_texture()

2019-05-29 Thread Gerd Hoffmann
Check and use QemuDmaBuf->modifier in egl_dmabuf_import_texture() for dmabuf imports. Signed-off-by: Gerd Hoffmann --- ui/egl-helpers.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index 0c9716067cfb..

[Qemu-devel] [PULL 05/44] hw/ppc/prep: use TYPE_MC146818_RTC instead of a hardcoded string

2019-05-29 Thread David Gibson
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20190505152839.18650-2-phi...@redhat.com> Signed-off-by: David Gibson --- hw/ppc/prep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index b7f459d475..ebee321148

[Qemu-devel] [PATCH 3/5] virtio: Make sure we get correct state of device on handle_aio_output()

2019-05-29 Thread elohimes
From: Xie Yongji We should set the flags: "start_on_kick" and "started" after we call the kick functions (handle_aio_output() and handle_output()). Signed-off-by: Xie Yongji --- hw/virtio/virtio.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/virtio/virtio.c b/

[Qemu-devel] [PULL 32/44] sysbus: add a sysbus_mmio_unmap() helper

2019-05-29 Thread David Gibson
From: Cédric Le Goater This will be used to remove the MMIO regions of the POWER9 XIVE interrupt controller when the sPAPR machine is reseted. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson Message-Id: <20190513084245.25755-9-...@kaod.org> Signed-off-by: David Gibson --- hw/core/s

[Qemu-devel] [PULL 16/44] spapr/xive: print out the EQ page address in the monitor

2019-05-29 Thread David Gibson
From: Cédric Le Goater This proved to be a useful information when debugging issues with OS event queues allocated above 64GB. Signed-off-by: Cédric Le Goater Message-Id: <20190508171946.657-4-...@kaod.org> Reviewed-by: Greg Kurz Signed-off-by: David Gibson --- hw/intc/spapr_xive.c | 5 +++--

[Qemu-devel] [PATCH v3 2/4] vfio/display: set dmabuf modifier field

2019-05-29 Thread Gerd Hoffmann
Fill the new QemuDmaBuf->modifier field properly from plane info. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Acked-by: Alex Williamson --- hw/vfio/display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio/display.c b/hw/vfio/display.c index 2c2d3e5b71d6..a5a608c5b2

[Qemu-devel] [PATCH 5/5] virtio: add "use-started" property

2019-05-29 Thread elohimes
From: Xie Yongji In order to avoid migration issues, we introduce a "use-started" property to the base virtio device to indicate whether "started" and "start_on_kick" flag could be used. This property will be true by default and set to false when machine type <= 4.0. Suggested-by: Greg Kurz Sig

[Qemu-devel] [PULL 43/44] ppc/pnv: introduce new skiboot platform properties

2019-05-29 Thread David Gibson
From: Cédric Le Goater Newer skiboots (after 6.3) support QEMU platforms that have characteristics closer to real OpenPOWER systems. The CPU type is used to define the BMC drivers: Aspeed AST2400 for POWER8 processors and AST2500 for POWER9s. Advertise the new platform property names, "qemu,powe

[Qemu-devel] [PATCH v1 1/2] s390x: Align vector registers to 16 bytes

2019-05-29 Thread David Hildenbrand
11e2bfef7990 ("tcg/i386: Use MOVDQA for TCG_TYPE_V128 load/store") revealed that the vregs are not aligned to 16 bytes. Align them to 16 bytes, to avoid segfault'ing on x86. Signed-off-by: David Hildenbrand --- target/s390x/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [PULL 11/44] target/ppc: Fix vslv and vsrv

2019-05-29 Thread David Gibson
From: Anton Blanchard vslv and vsrv are broken on little endian, we append 00 to the high byte not the low byte. Fix it by using the VsrB() accessor. Signed-off-by: Anton Blanchard Message-Id: <20190507004811.29968-6-an...@ozlabs.org> Signed-off-by: David Gibson --- target/ppc/int_helper.c |

[Qemu-devel] [PATCH v3 0/4] add drm modifier support for dmabufs.

2019-05-29 Thread Gerd Hoffmann
v2: fix build failure with older mesa versions which don't have EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT Gerd Hoffmann (4): console: add dmabuf modifier field. vfio/display: set dmabuf modifier field egl-helpers: add modifier support to egl_get_fd_for_texture(). egl-helpers: add modifier sup

[Qemu-devel] [PULL 41/44] spapr: change default interrupt mode to 'dual'

2019-05-29 Thread David Gibson
From: Cédric Le Goater Now that XIVE support is complete (QEMU emulated and KVM devices), change the pseries machine to advertise both interrupt modes: XICS (P7/P8) and XIVE (P9). The machine default interrupt modes depends on the version. Current settings are: pseries default interrupt m

[Qemu-devel] [PULL 17/44] Fix typo on "info pic" monitor cmd output for xive

2019-05-29 Thread David Gibson
From: Satheesh Rajendran Instead of LISN i.e "Logical Interrupt Source Number" as per Xive PAPR document "info pic" prints as LSIN, let's fix it. Signed-off-by: Satheesh Rajendran Message-Id: <20190509080750.21999-1-sathn...@linux.vnet.ibm.com> Reviewed-by: Greg Kurz Reviewed-by: Cédric Le Goa

[Qemu-devel] [PATCH v3 1/4] console: add dmabuf modifier field.

2019-05-29 Thread Gerd Hoffmann
dmabufs can have a format modifier (DRM_FORMAT_MOD_*) which is used for tiled layouts for example. Add a field to QemuDmaBuf so we can carry around that information. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- include/ui/console.h | 1 + 1 file changed, 1 insertion(+) diff

Re: [Qemu-devel] [PATCH v6 3/3] block/stream: introduce a bottom node

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
28.05.2019 20:33, Max Reitz wrote: > On 06.05.19 17:34, Vladimir Sementsov-Ogievskiy wrote: >> From: Andrey Shinkevich >> >> The bottom node is the intermediate block device that has the base as its >> backing image. It is used instead of the base node while a block stream >> job is running to avo

[Qemu-devel] [PULL 20/44] spapr/xive: Sanity checks of OV5 during CAS

2019-05-29 Thread David Gibson
From: Greg Kurz If a machine is started with ic-mode=xive but the guest only knows about XICS, eg. an RHEL 7.6 guest, the kernel panics. This is expected but a bit unfortunate since the crash doesn't provide much information for the end user to guess what's happening. Detect that during CAS and

[Qemu-devel] [PATCH 2/5] virtio: Migrate the "start_on_kick" flag

2019-05-29 Thread elohimes
From: Xie Yongji We should migrate the "start_on_kick" flag so that we would not miss starting device on kicking at startup after migration. Signed-off-by: Xie Yongji --- hw/virtio/virtio.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/

[Qemu-devel] [PATCH 4/5] virtio: Don't change "started" flag on virtio_vmstate_change()

2019-05-29 Thread elohimes
From: Xie Yongji We will call virtio_set_status() on virtio_vmstate_change(). The "started" flag should not be changed in this case. Otherwise, we may get an incorrect value when we set "started" flag but not set DRIVER_OK in source VM. Signed-off-by: Xie Yongji --- hw/virtio/virtio.c | 10 +++

[Qemu-devel] [PATCH v1 2/2] s390x: Use uint64_t for vector registers

2019-05-29 Thread David Hildenbrand
CPU_DoubleU is primarily used to reinterpret between integer and floats. We don't really need this functionality. So let's just keep it simple and use an uint64_t. Signed-off-by: David Hildenbrand --- linux-user/s390x/signal.c | 4 +- target/s390x/arch_dump.c | 8 +-- target/s390x/cpu.h

[Qemu-devel] [PULL 34/44] spapr: check for the activation of the KVM IRQ device

2019-05-29 Thread David Gibson
From: Cédric Le Goater The activation of the KVM IRQ device depends on the interrupt mode chosen at CAS time by the machine and some methods used at reset or by the migration need to be protected. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson Signed-off-by: Cédric Le Goater Messag

[Qemu-devel] [PATCH v3 3/4] egl-helpers: add modifier support to egl_get_fd_for_texture().

2019-05-29 Thread Gerd Hoffmann
Add modifier parameter to egl_get_fd_for_texture(), to return the used modifier on dmabuf exports. Signed-off-by: Gerd Hoffmann --- include/ui/egl-helpers.h | 3 ++- ui/egl-helpers.c | 5 +++-- ui/spice-display.c | 7 --- 3 files changed, 9 insertions(+), 6 deletions(-) diff -

[Qemu-devel] [PULL 40/44] spapr/xive: fix multiple resets when using the 'dual' interrupt mode

2019-05-29 Thread David Gibson
From: Cédric Le Goater Today, when a reset occurs on a pseries machine using the 'dual' interrupt mode, the KVM devices are released and recreated depending on the interrupt mode selected by CAS. If XIVE is selected, the SysBus memory regions of the SpaprXive model are initialized by the KVM back

[Qemu-devel] [PATCH v1 0/2] s390x: Fix vector register alignment

2019-05-29 Thread David Hildenbrand
Fix the alignment of "vregs". While at it, use an uin64_t as data type. David Hildenbrand (2): s390x: Align vector registers to 16 bytes s390x: Use uint64_t for vector registers linux-user/s390x/signal.c | 4 +- target/s390x/arch_dump.c | 8 +-- target/s390x/cpu.h | 4 +- ta

[Qemu-devel] [PULL 42/44] spapr: Don't migrate the hpt_maxpagesize cap to older machine types

2019-05-29 Thread David Gibson
From: Greg Kurz Commit 0b8c89be7f7b added the hpt_maxpagesize capability to the migration stream. This is okay for new machine types but it breaks backward migration to older QEMUs, which don't expect the extra subsection. Add a compatibility boolean flag to the sPAPR machine class and use it to

[Qemu-devel] [PULL 38/44] spapr/irq: add KVM support to the 'dual' machine

2019-05-29 Thread David Gibson
From: Cédric Le Goater The interrupt mode is chosen by the CAS negotiation process and activated after a reset to take into account the required changes in the machine. This brings new constraints on how the associated KVM IRQ device is initialized. Currently, each model takes care of the initia

Re: [Qemu-devel] [PATCH 0/4] add failover feature for assigned network devices

2019-05-29 Thread Jens Freimann
On Tue, May 28, 2019 at 10:40:42PM -0400, Michael S. Tsirkin wrote: On Tue, May 21, 2019 at 08:49:18PM +0200, Jens Freimann wrote: On Tue, May 21, 2019 at 07:37:19AM -0400, Michael S. Tsirkin wrote: > On Tue, May 21, 2019 at 09:21:57AM +0200, Jens Freimann wrote: > Actually is there a list of de

[Qemu-devel] [PULL 37/44] ppc/xics: fix irq priority in ics_set_irq_type()

2019-05-29 Thread David Gibson
From: Cédric Le Goater Recent commits changed the behavior of ics_set_irq_type() to initialize correctly LSIs at the KVM level. ics_set_irq_type() is also called by the realize routine of the different devices of the machine when initial interrupts are claimed, before the ICSState device is reset

[Qemu-devel] [PULL 39/44] docs: provide documentation on the POWER9 XIVE interrupt controller

2019-05-29 Thread David Gibson
From: Cédric Le Goater This documents the overall XIVE architecture and the XIVE support for sPAPR guest machines (pseries). It also provides documentation on the 'info pic' command. Signed-off-by: Cédric Le Goater Message-Id: <20190521082411.24719-1-...@kaod.org> Reviewed-by: Satheesh Rajendr

[Qemu-devel] [PULL 33/44] spapr: introduce routines to delete the KVM IRQ device

2019-05-29 Thread David Gibson
From: Cédric Le Goater If a new interrupt mode is chosen by CAS, the machine generates a reset to reconfigure. At this point, the connection with the previous KVM device needs to be closed and a new connection needs to opened with the KVM device operating the chosen interrupt mode. New routines

[Qemu-devel] [PULL 30/44] spapr/xive: add migration support for KVM

2019-05-29 Thread David Gibson
From: Cédric Le Goater When the VM is stopped, the VM state handler stabilizes the XIVE IC and marks the EQ pages dirty. These are then transferred to destination before the transfer of the device vmstates starts. The SpaprXive interrupt controller model captures the XIVE internal tables, EAT an

Re: [Qemu-devel] [Qemu-block] [PATCH] pr-manager-helper: fix pr process been killed when reconectting

2019-05-29 Thread Michal Privoznik
On 5/28/19 7:45 PM, Paolo Bonzini wrote: On 28/05/19 15:06, Jie Wang wrote: if pr-helper been killed and qemu send disconnect event to libvirt and libvirt started a new pr-helper process, the new pr-heleper been killed again when qemu is connectting to the new pr-helper, qemu will never send dis

Re: [Qemu-devel] [PATCH v3 2/2] drm/i915/gvt: export migration_version to mdev sysfs for Intel vGPU

2019-05-29 Thread Yan Zhao
On Wed, May 29, 2019 at 11:07:50AM +0800, Zhenyu Wang wrote: > On 2019.05.26 23:44:37 -0400, Yan Zhao wrote: > > This feature implements the migration_version attribute for Intel's vGPU > > mdev devices. > > > > migration_version attribute is rw. > > It's used to check migration compatibility for

Re: [Qemu-devel] [PATCH] linux-user: emulate msgsnd(), msgrcv() and semtimedop()

2019-05-29 Thread Laurent Vivier
On 28/05/2019 21:53, Laurent Vivier wrote: When we have updated kernel headers to 5.2-rc1 we have introduced new syscall numbers that can be not supported by older kernels and fail with ENOSYS while the guest emulation succeeded before because the syscalls were emulated with ipc(). This patch fi

Re: [Qemu-devel] [PATCH v0] qemu-io: add pattern file for write command

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
29.05.2019 9:48, Denis Plotnikov wrote: > The patch allows to provide a pattern file for write > command. There was no similar ability before. > > Signed-off-by: Denis Plotnikov > --- > qemu-io-cmds.c | 58 ++ > 1 file changed, 54 insertions(+),

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-29 Thread Paul Durrant
> [...] > > Guest CPU Cores (Xen): > > -- > > > > X86 > > M: Stefano Stabellini > > M: Anthony Perard > > M: Paul Durrant > > include/hw/xen/io/ring.h > > I see a __XEN_PUBLIC_IO_RING_H__ guard there. Probably > clean-header-guards.pl is confused by the comments at the en

[Qemu-devel] Malta-related files in MAINTAINERS

2019-05-29 Thread Aleksandar Markovic
Hello, Philippe. Currently, we have these two files in Malta MAINTAINERS section: F: hw/mips/mips_malta.c F: tests/acceptance/linux_ssh_mips_malta.py Do we need to add more files, or other Malta-related files naturally belong to some other sections, or are shared by many boards? Yours, Aleksand

Re: [Qemu-devel] [PATCH 1/4] migration: multifd_save_setup always return 0

2019-05-29 Thread Juan Quintela
Wei Yang wrote: > On Tue, May 28, 2019 at 10:11:11AM +0200, Juan Quintela wrote: >>Wei Yang wrote: >>> Signed-off-by: Wei Yang >>> --- >>> migration/migration.c | 7 +-- >>> 1 file changed, 1 insertion(+), 6 deletions(-) >>> >>> diff --git a/migration/migration.c b/migration/migration.c >>>

Re: [Qemu-devel] [PATCH 1/4] migration: multifd_save_setup always return 0

2019-05-29 Thread Juan Quintela
Wei Yang wrote: > On Tue, May 28, 2019 at 10:11:11AM +0200, Juan Quintela wrote: >>Wei Yang wrote: >>> Signed-off-by: Wei Yang >>> --- >>> migration/migration.c | 7 +-- >>> 1 file changed, 1 insertion(+), 6 deletions(-) >>> >>> diff --git a/migration/migration.c b/migration/migration.c >>>

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-29 Thread Bastian Koppelmann
On 5/28/19 8:12 PM, Markus Armbruster wrote: target/tricore/tricore-opcodes.h unintentional. Cheers, Bastian

Re: [Qemu-devel] [Qemu-block] [PATCH] pr-manager-helper: fix pr process been killed when reconectting

2019-05-29 Thread Jie Wang
Hi, Paolo and Michal: Let me add some details about this problem. reappear steps: 1. in Host, execute the following command many times quickly: "ps aux|grep helper|grep -v grep|grep -v qemu-kvm|awk '{print $2}';ps aux|grep helper|grep -v grep|grep -v qemu-kvm|awk '{print $2}'|xargs -n1 kill -

Re: [Qemu-devel] [PATCH v0] qemu-io: add pattern file for write command

2019-05-29 Thread Denis Plotnikov
On 29.05.2019 11:11, Vladimir Sementsov-Ogievskiy wrote: > 29.05.2019 9:48, Denis Plotnikov wrote: >> The patch allows to provide a pattern file for write >> command. There was no similar ability before. >> >> Signed-off-by: Denis Plotnikov >> --- >>qemu-io-cmds.c | 58 ++

[Qemu-devel] [Bug 1830864] [NEW] Assertion `no_aa32 || ({ ARMCPU *cpu_ = (cpu); isar_feature_arm_div(&cpu_->isar); })' failed

2019-05-29 Thread Laszlo Ersek (Red Hat)
Public bug reported: The following assertion: assert(no_aa32 || cpu_isar_feature(arm_div, cpu)); introduced in commit 0f8d06f16c9d ("target/arm: Conditionalize some asserts on aarch32 support", 2018-11-02), fails for me. I intended to launch a 32-bit ARM guest (with KVM acceleration) on my A

[Qemu-devel] [PATCH] riscv: virt: Correct pci "bus-range" encoding

2019-05-29 Thread Bin Meng
The largest pci bus number should be calculated from ECAM size, instead of its base address. Signed-off-by: Bin Meng --- hw/riscv/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index fc4c6b3..d6132d9 100644 --- a/hw/riscv/virt.c +++

[Qemu-devel] [PATCH v1] qemu-io: add pattern file for write command

2019-05-29 Thread Denis Plotnikov
The patch allows to provide a pattern file for write command. There was no similar ability before. Signed-off-by: Denis Plotnikov --- qemu-io-cmds.c | 58 ++ 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/qemu-io-cmds.c b/qemu-io-cm

Re: [Qemu-devel] [PATCH v6] hw/acpi: extract acpi_add_rom_blob()

2019-05-29 Thread Wei Yang
On Tue, May 28, 2019 at 11:01:32PM -0400, Michael S. Tsirkin wrote: >On Tue, Mar 26, 2019 at 10:43:20AM +0800, Wei Yang wrote: >> arm and i386 has almost the same function acpi_add_rom_blob(), except >> giving different FWCfgCallback function. >> >> This patch moves acpi_add_rom_blob() to utils.c

[Qemu-devel] [PATCH v2] linux-user: emulate msgsnd(), msgrcv() and semtimedop()

2019-05-29 Thread Laurent Vivier
When we have updated kernel headers to 5.2-rc1 we have introduced new syscall numbers that can be not supported by older kernels and fail with ENOSYS while the guest emulation succeeded before because the syscalls were emulated with ipc(). This patch fixes the problem by using ipc() if the new sys

Re: [Qemu-devel] [PATCH] hw/i386/pc: check apci hotplug capability before nvdimm's

2019-05-29 Thread Igor Mammedov
On Wed, 29 May 2019 08:32:14 +0800 Wei Yang wrote: > On Tue, May 28, 2019 at 02:26:27PM +0200, Igor Mammedov wrote: > >On Tue, 28 May 2019 09:35:48 +0800 > >Wei Yang wrote: > > > >> On Mon, May 27, 2019 at 02:21:14PM +0200, Igor Mammedov wrote: > >> >On Thu, 11 Apr 2019 15:17:39 +0800 > >> >

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-29 Thread Cornelia Huck
On Tue, 28 May 2019 20:12:24 +0200 Markus Armbruster wrote: > We have a bunch of headers without multiple inclusion guards. Some are > clearly intentional, some look accidental. Too many for me to find out > by examining each of them, so I'm asking their maintainers. > > Why do I ask? I'd lik

Re: [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces

2019-05-29 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 5/23/19 9:58 AM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Allow the caller to restrict the set of interfaces that announces are > > sent on. The default is still to send on all interfaces. > > > > e.g. > > > >

Re: [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces

2019-05-29 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" writes: > > > From: "Dr. David Alan Gilbert" > > > > Allow the caller to restrict the set of interfaces that announces are > > sent on. The default is still to send on all interfaces. > > > > e.g. > > > > { "execu

Re: [Qemu-devel] [PATCH 3/3] block/qcow2-bitmap: rewrite bitmap reopening logic

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
29.05.2019 2:24, John Snow wrote: > > > On 5/23/19 11:47 AM, Vladimir Sementsov-Ogievskiy wrote: >> Current logic >> = >> >> Reopen rw -> ro: >> >> Store bitmaps and release BdrvDirtyBitmap's. >> >> Reopen ro -> rw: >> >> Load bitmap list >> Skip bitmaps which for which we don't have

[Qemu-devel] [PATCH] MAINTAINERS: cover tests/migration/s390x/

2019-05-29 Thread Cornelia Huck
The generic s390 section looks like the best resting place. Signed-off-by: Cornelia Huck --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1f5f8b7a2c37..0be23997e9fe 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -102,6 +102,7 @@ F: pc-bios/s390-c

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-29 Thread Greg Kurz
On Tue, 28 May 2019 20:12:24 +0200 Markus Armbruster wrote: > We have a bunch of headers without multiple inclusion guards. Some are > clearly intentional, some look accidental. Too many for me to find out > by examining each of them, so I'm asking their maintainers. > > Why do I ask? I'd lik

[Qemu-devel] [Bug 1830872] [NEW] AARCH64 to ARMv7 mistranslation in TCG

2019-05-29 Thread Laszlo Ersek (Red Hat)
Public bug reported: The following guest code: https://github.com/tianocore/edk2/blob/3604174718e2afc950c3cc64c64ba5165c8692bd/MdePkg/Library/BaseMemoryLibOptDxe/AArch64/CopyMem.S implements, in hand-optimized aarch64 assembly, the CopyMem() edk2 (EFI Development Kit II) library function. (CopyM

Re: [Qemu-devel] [PATCH v2] linux-user: emulate msgsnd(), msgrcv() and semtimedop()

2019-05-29 Thread Cornelia Huck
On Wed, 29 May 2019 10:48:04 +0200 Laurent Vivier wrote: > When we have updated kernel headers to 5.2-rc1 we have introduced > new syscall numbers that can be not supported by older kernels > and fail with ENOSYS while the guest emulation succeeded before > because the syscalls were emulated with

Re: [Qemu-devel] [Qemu-block] [PATCH] pr-manager-helper: fix pr process been killed when reconectting

2019-05-29 Thread Paolo Bonzini
On 29/05/19 09:33, Michal Privoznik wrote: > On 5/28/19 7:45 PM, Paolo Bonzini wrote: >> On 28/05/19 15:06, Jie Wang wrote: >>> if pr-helper been killed and qemu send disconnect event to libvirt >>> and libvirt started a new pr-helper process, the new pr-heleper >>> been killed again when qemu is c

Re: [Qemu-devel] [Qemu-block] [PATCH] pr-manager-helper: fix pr process been killed when reconectting

2019-05-29 Thread Paolo Bonzini
On 29/05/19 10:37, Jie Wang wrote: > when the problem appeared: > > 1. qemu will initialize pr-helper and connect to it cyclically, but > always failed because no running pr-helper process to connect. > > 2. libvirt will always waiting for connected event, but will never to > start new pr-helper

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-29 Thread Alex Bennée
Markus Armbruster writes: > We have a bunch of headers without multiple inclusion guards. Some are > clearly intentional, some look accidental. Too many for me to find out > by examining each of them, so I'm asking their maintainers. > > Why do I ask? I'd like to mark the intentional ones an

Re: [Qemu-devel] [PATCH] q35: fix mmconfig and PCI0._CRS

2019-05-29 Thread Paolo Bonzini
On 29/05/19 07:11, Marcel Apfelbaum wrote: > I am not saying is a "big" issue since it will probably not affect the > guests at all. > Upgrading QEMU will look like a firmware update or something. Yeah, this happens all the time. This kind of bugfix is generally not versioned. Paolo

Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables

2019-05-29 Thread P J P
Hello Marc, +-- On Thu, 23 May 2019, Marc-André Lureau wrote --+ | I don't see how you could exploit this today. | | QMP parser has MAX_TOKEN_COUNT (2ULL << 20). I see, didn't realise that. I tried to reproduce it and {"error": {"class": "GenericError", "desc": "JSON token count limit exc

Re: [Qemu-devel] [PATCH v0 2/3] qcow2: add compression type processing

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
28.05.2019 17:37, Denis Plotnikov wrote: > With the patch, qcow2 is able to process image compression type > defined in the image header and choose the corresponding method > for clusters compressing. > > Also, it rework the cluster compression code for adding more > compression types. > > Signed

Re: [Qemu-devel] [PATCH v4 2/2] vfio-ccw: support async command subregion

2019-05-29 Thread Cornelia Huck
On Tue, 21 May 2019 16:47:45 -0400 Eric Farman wrote: > On 5/21/19 12:32 PM, Cornelia Huck wrote: > > Why mostly? I'm not sure yet whether we handling multiple requests for > > passthrough devices correctly yet (virtual should be fine.) > > > > Start vs. (start|halt|clear) is fine, as the code

Re: [Qemu-devel] [PATCH] tests/docker: Update the Fedora image to Fedora 30

2019-05-29 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Fedora 30 got released: > > https://fedoramagazine.org/announcing-fedora-30/ > > Signed-off-by: Philippe Mathieu-Daudé Queued to testing/next, thanks. > --- > Based-on: <20190408201203.28924-1-marcandre.lur...@redhat.com> > qxl: fix -Waddress-of-p

Re: [Qemu-devel] [PATCH v3 00/14] tests/vm: serial console autoinstall, misc fixes.

2019-05-29 Thread Alex Bennée
Gerd Hoffmann writes: > On Mon, May 20, 2019 at 02:47:02PM +0200, Gerd Hoffmann wrote: >> This patch series changes the way virtual machines for test builds are >> managed. They are created locally on the developer machine now. The >> installer is booted on the serial console and the scripts

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-29 Thread Anthony PERARD
On Tue, May 28, 2019 at 08:12:24PM +0200, Markus Armbruster wrote: > Just in case: what's a multiple inclusion guard? It's > > #ifndef UNIQUE_GUARD_SYMBOL_H > #define UNIQUE_GUARD_SYMBOL_H > ... > #endif > > with nothing but comments outside the conditional, so that the header >

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-29 Thread David Hildenbrand
> > S390 > M: Richard Henderson > M: David Hildenbrand > target/s390x/helper.h Intentional. Cheers! -- Thanks, David / dhildenb

Re: [Qemu-devel] [PATCH v1 2/2] s390x: Use uint64_t for vector registers

2019-05-29 Thread Cornelia Huck
On Wed, 29 May 2019 09:27:26 +0200 David Hildenbrand wrote: > CPU_DoubleU is primarily used to reinterpret between integer and floats. > We don't really need this functionality. So let's just keep it simple > and use an uint64_t. > > Signed-off-by: David Hildenbrand > --- > linux-user/s390x/si

[Qemu-devel] [PATCH v2 1/2] net/announce: Allow optional list of interfaces

2019-05-29 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow the caller to restrict the set of interfaces that announces are sent on. The default is still to send on all interfaces. e.g. { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "interfaces": ["vn2","vn1"] } }

[Qemu-devel] [PATCH v2 0/2] network announce; interface selection

2019-05-29 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Laine asked for some extra features on the network announce support; this is the first one of them. It allows you to send an announce on a subset of the interfaces. Note since we've still only got one timer, if you start one announce on an interface and then you s

[Qemu-devel] [PATCH v2 2/2] net/announce: Add HMP optional interface list

2019-05-29 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the optional interface list to the HMP command. i.e. All interfaces announce_self Just the named interfaces: announce_self vn1,vn2 Signed-off-by: Dr. David Alan Gilbert --- hmp-commands.hx | 6 -- hmp.c | 38 +++

[Qemu-devel] [PATCH] MAINTAINERS: Change maintership of Xen code under hw/9pfs

2019-05-29 Thread Greg Kurz
Xen folks are the actual maintainers for this. Signed-off-by: Greg Kurz --- MAINTAINERS |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1f5f8b7a2c37..d00380641796 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -411,7 +411,7 @@ M: Paul Durra

Re: [Qemu-devel] hw/s390x/ipl: Dubious use of qdev_reset_all_fn

2019-05-29 Thread Philippe Mathieu-Daudé
On 5/29/19 8:08 AM, Markus Armbruster wrote: > Peter Maydell writes: > >> On Mon, 27 May 2019 at 08:52, Markus Armbruster wrote: >>> >>> Peter Maydell writes: Suggestions for how to restructure reset so this doesn't happen are welcome... "reset follows the bus hierarchy" works we

  1   2   3   >