Re: [Qemu-devel] [PATCH v6 1/4] kvm-all: Pass an error object to kvm_device_access

2017-06-11 Thread Juan Quintela
Eric Auger wrote: > In some circumstances, we don't want to abort if the > kvm_device_access fails. This will be the case during ITS > migration, in case the ITS table save/restore fails because > the guest did not program the vITS correctly. So let's pass an > error object to the function and ret

Re: [Qemu-devel] [RFC v2 5/8] virtio_iommu: Add the iommu regions

2017-06-11 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Eric Auger [mailto:eric.au...@redhat.com] > Sent: Wednesday, June 07, 2017 9:31 PM > To: eric.auger@gmail.com; eric.au...@redhat.com; > peter.mayd...@linaro.org; alex.william...@redhat.com; m...@redhat.com; > qemu-...@nongnu.org; qemu-devel@nongnu.

[Qemu-devel] [PATCH v6 0/2] ppc/spapr: Fix migration of radix guests

2017-06-11 Thread Bharata B Rao
This patchset fixes the migration of sPAPR radix guests. Migration of hash and radix guests individually has been tested on TCG and KVM (P8 and P9 hosts). Changeover from HPT to RPT and vice versa via reboot during migration isn't tested yet since it is possible to test that currently only with TC

[Qemu-devel] [PATCH v6 1/2] spapr: Add a "no HPT" encoding to HTAB migration stream

2017-06-11 Thread Bharata B Rao
Add a "no HPT" encoding (using value -1) to the HTAB migration stream (in the place of HPT size) when the guest doesn't allocate HPT. This will help the target side to match target HPT with the source HPT and thus enable successful migration. Suggested-by: David Gibson Signed-off-by: Bharata B Ra

[Qemu-devel] [PATCH v6 2/2] spapr: Fix migration of Radix guests

2017-06-11 Thread Bharata B Rao
Fix migration of radix guests by ensuring that we issue KVM_PPC_CONFIGURE_V3_MMU for radix case post migration. Reported-by: Nageswara R Sastry Signed-off-by: Bharata B Rao Reviewed-by: Suraj Jitindar Singh --- hw/ppc/spapr.c | 12 1 file changed, 12 insertions(+) diff --git a/hw

Re: [Qemu-devel] [PATCH v2 2/6] migration: let MigrationState be a qdev

2017-06-11 Thread Peter Xu
On Fri, Jun 09, 2017 at 03:39:24PM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > Let the old man "MigrationState" join the object family. Direct benefit > > is that we can start to use all the property features derived from > > current QDev, like: HW_COMPAT_* bits, command line setup f

Re: [Qemu-devel] [PATCH v2 6/6] migration: move skip_section_footers

2017-06-11 Thread Peter Xu
On Fri, Jun 09, 2017 at 05:47:09AM -0500, Eric Blake wrote: > On 06/08/2017 10:49 PM, Peter Xu wrote: > > Move it into MigrationState, with a property binded to it. Same trick is > > s/binded/bound/ Will fix. Thanks Eric. :) > > > played like previous patches. > > > > Signed-off-by: Peter Xu

[Qemu-devel] [RFC 0/2] Parse 'filename' option for RBD/iSCSI

2017-06-11 Thread Jeff Cody
We need to be able to parse the 'filename' option for both rbd and iscsi, because there may exist images in the wild that have json backing files, that specify the filename argument. Marking the series as RFC at least partially for the precedence given to arguments; as written, these patches will

Re: [Qemu-devel] [PATCH 2/3] exec: simplify address_space_get_iotlb_entry

2017-06-11 Thread Peter Xu
On Mon, Jun 12, 2017 at 06:07:04AM +0300, Michael S. Tsirkin wrote: > On Mon, Jun 12, 2017 at 10:34:43AM +0800, Peter Xu wrote: > > On Sun, Jun 11, 2017 at 08:10:15PM +0800, David Gibson wrote: > > > On Sun, Jun 11, 2017 at 01:09:26PM +0300, Michael S. Tsirkin wrote: > > > > On Fri, Jun 09, 2017 at

[Qemu-devel] [RFC 2/2] block/iscsi: enable filename option and parsing

2017-06-11 Thread Jeff Cody
When enabling option parsing and blockdev-add for iscsi, we removed the 'filename' option. Unfortunately, this was a bit optimistic, as previous versions of QEMU allowed the use of the option in backing filenames via json. This means that without parsing this option, we cannot open existing image

[Qemu-devel] [RFC 1/2] block/rbd: enable filename option and parsing

2017-06-11 Thread Jeff Cody
When enabling option parsing and blockdev-add for rbd, we removed the 'filename' option. Unfortunately, this was a bit optimistic, as previous versions of QEMU allowed the use of the option in backing filenames via json. This means that without parsing this option, we cannot open existing images

Re: [Qemu-devel] [PATCH v2 2/4] nvdimm: warn if the backend is not a DAX device

2017-06-11 Thread Michael S. Tsirkin
On Mon, Jun 12, 2017 at 11:18:21AM +0800, Haozhong Zhang wrote: > On 06/08/17 15:51 +0300, Michael S. Tsirkin wrote: > > On Tue, Jun 06, 2017 at 03:22:27PM +0800, Haozhong Zhang wrote: > > > Applications in Linux guest that use device-dax never trigger flush > > > that can be trapped by KVM/QEMU. M

Re: [Qemu-devel] Fwd: [BUG] Failed to compile using gcc7.1

2017-06-11 Thread Philippe Mathieu-Daudé
Hi Tsung-en, On 06/11/2017 04:08 PM, Tsung-en Hsiao wrote: Hi all, I encountered the same problem on gcc 7.1.1 and found Qu's mail in this list from google search. Temporarily fix it by specifying the string length in snprintf directive. Hope this is helpful to other people encountered the same

Re: [Qemu-devel] [PATCH v2 2/4] nvdimm: warn if the backend is not a DAX device

2017-06-11 Thread Haozhong Zhang
On 06/08/17 15:51 +0300, Michael S. Tsirkin wrote: > On Tue, Jun 06, 2017 at 03:22:27PM +0800, Haozhong Zhang wrote: > > Applications in Linux guest that use device-dax never trigger flush > > that can be trapped by KVM/QEMU. Meanwhile, if the host backend is not > > device-dax, QEMU cannot guarant

Re: [Qemu-devel] [PATCH 2/3] exec: simplify address_space_get_iotlb_entry

2017-06-11 Thread Michael S. Tsirkin
On Mon, Jun 12, 2017 at 10:34:43AM +0800, Peter Xu wrote: > On Sun, Jun 11, 2017 at 08:10:15PM +0800, David Gibson wrote: > > On Sun, Jun 11, 2017 at 01:09:26PM +0300, Michael S. Tsirkin wrote: > > > On Fri, Jun 09, 2017 at 09:58:47AM +0800, Peter Xu wrote: > > > > > > The problem is that when I wa

Re: [Qemu-devel] [PATCH 2/3] exec: simplify address_space_get_iotlb_entry

2017-06-11 Thread Peter Xu
On Sun, Jun 11, 2017 at 08:10:15PM +0800, David Gibson wrote: > On Sun, Jun 11, 2017 at 01:09:26PM +0300, Michael S. Tsirkin wrote: > > On Fri, Jun 09, 2017 at 09:58:47AM +0800, Peter Xu wrote: > > > > > The problem is that when I was fixing the problem that vhost had with > > > > > PT (a764040, "e

Re: [Qemu-devel] [PATCH v3 1/4] net/socket: Drop the odd 'default' case and comment

2017-06-11 Thread Mao Zhongyi
Hi, Markus On 06/09/2017 09:22 PM, Markus Armbruster wrote: Mao Zhongyi writes: In the net_socket_fd_init(), the 'default' case and comment is odd. If @fd really was a pty, getsockopt() would fail with ENOTSOCK. If @fd was a socket, but neither SOCK_DGRAM nor SOCK_STREAM. It should not be tre

Re: [Qemu-devel] [PATCH v4 5/7] pci: Replace pci_add_capability() with pci_add_capability2()

2017-06-11 Thread Mao Zhongyi
Hi, Eduardo On 06/09/2017 09:53 PM, Eduardo Habkost wrote: On Fri, Jun 09, 2017 at 07:24:40PM +0800, Mao Zhongyi wrote: After the patch 'Make errp the last parameter of pci_add_capability()', pci_add_capability() and pci_add_capability2() now do exactly the same. So drop the wrapper pci_add_cap

Re: [Qemu-devel] [PATCH 0/3] sun4u: move fw_cfg/NVRAM devices to ebus PCI IO address space

2017-06-11 Thread Fam Zheng
On Sat, 06/10 14:31, Mark Cave-Ayland wrote: > On 10/06/17 14:27, no-re...@patchew.org wrote: > > > Hi, > > > > This series failed build test on s390x host. Please find the details below. > > Well given that it's dependent upon the fw_cfg patchset I posted > earlier, it's probably going to fail

Re: [Qemu-devel] [PATCH v2 3/4] nvdimm: add a boolean option "restrict"

2017-06-11 Thread Haozhong Zhang
On 06/08/17 15:56 +0300, Michael S. Tsirkin wrote: > On Tue, Jun 06, 2017 at 03:22:28PM +0800, Haozhong Zhang wrote: > > If a vNVDIMM device is not backed by a DAX device and its "restrict" > > option is enabled, bit 3 of state flags in its region mapping > > structure will be set, in order to noti

Re: [Qemu-devel] [PATCH] hw/i386: fix nvdimm check error path

2017-06-11 Thread Haozhong Zhang
On 06/09/17 16:16 +0100, Stefan Hajnoczi wrote: > Commit e987c37aee1752177906847630d32477da57e705 ("hw/i386: check if > nvdimm is enabled before plugging") introduced a check to reject nvdimm > hotplug if -machine pc,nvdimm=on was not given. > > This check executes after pc_dimm_memory_plug() has

[Qemu-devel] [PATCH v4 3/7] target-m68k: define ext_opsize

2017-06-11 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/translate.c | 43 --- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index ad4d4ef..049d837 100644 --- a/target/

[Qemu-devel] [PATCH v4 2/7] target-m68k: move FPU helpers to fpu_helper.c

2017-06-11 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- target/m68k/Makefile.objs | 2 +- target/m68k/fpu_helper.c | 112 ++ target/m68k/helper.c | 88 3 files changed, 113 insertions(+), 89 deleti

[Qemu-devel] [PATCH v4 0/7] target-m68k: implement 680x0 FPU

2017-06-11 Thread Laurent Vivier
This series modifies the original ColdFire FPU implementation to use floatx80 instead of float64 internally as this is the native datatype for 680x0. I didn't keep the float64 type for ColdFire, but if someone thinks it's required I can update this series in this way. The series also adds the FPU

[Qemu-devel] [PATCH v4 7/7] target-m68k: add FPCR and FPSR

2017-06-11 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- target/m68k/cpu.c| 2 +- target/m68k/cpu.h| 36 - target/m68k/fpu_helper.c | 118 ++--- target/m68k/helper.c | 20 ++- target/m68k/helper.h | 5 +- target/m68k/qregs.def| 1 + target/m68k/translate.c | 335

[Qemu-devel] [PATCH v4 5/7] target-m68k: use floatx80 internally

2017-06-11 Thread Laurent Vivier
Coldfire uses float64, but 680x0 use floatx80. This patch introduces the use of floatx80 internally and enables 680x0 80bits FPU. Signed-off-by: Laurent Vivier --- target/m68k/cpu.c| 9 +- target/m68k/cpu.h| 6 +- target/m68k/fpu_helper.c | 85 +++ target/m68k/helper.c

[Qemu-devel] [PATCH v4 6/7] target-m68k: define 96bit FP registers for gdb on 680x0

2017-06-11 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- configure| 2 +- gdb-xml/m68k-fp.xml | 21 + target/m68k/helper.c | 45 + 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 gdb-xml/m6

[Qemu-devel] [PATCH v4 1/7] softfloat: define 680x0 specific values

2017-06-11 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- fpu/softfloat-specialize.h | 34 +++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index 100c8a9..de2c5d5 100644 --- a/fpu/soft

[Qemu-devel] [PATCH v4 4/7] target-m68k: move fmove CR to a function

2017-06-11 Thread Laurent Vivier
Move code of fmove to/from control register to a function Signed-off-by: Laurent Vivier --- target/m68k/translate.c | 66 ++--- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 049d

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] qobject: Catch another straggler for use of qdict_put_str()

2017-06-11 Thread Alberto Garcia
On Fri 09 Jun 2017 05:20:17 PM CEST, Eric Blake wrote: > Dan's addition of key-secret improvements in commit 29cf9336 was > developed prior to the addition of QDict scalar insertion macros, > but merged after the general cleanup in commit 46f5ac20. > Patch created mechanically by rerunning: > sp

Re: [Qemu-devel] [PATCH] hw/ppc/prep: Remove superfluous call to soundhw_init()

2017-06-11 Thread Hervé Poussineau
Le 09/06/2017 à 08:53, Thomas Huth a écrit : When using the 40p machine, soundhw_init() is currently called twice, one time from vl.c and one time from ibm_40p_init(). The call in ibm_40p_init() was likely just a copy-and-paste from a old version of the prep machine - but there the call to audio_

[Qemu-devel] Fwd: [BUG] Failed to compile using gcc7.1

2017-06-11 Thread Tsung-en Hsiao
Hi all, I encountered the same problem on gcc 7.1.1 and found Qu's mail in this list from google search. Temporarily fix it by specifying the string length in snprintf directive. Hope this is helpful to other people encountered the same problem. @@ -1,9 +1,7 @@ --- --- a/block/blkdebug.c -

[Qemu-devel] pci_nic_init_nofail() only works on root PCI buses?

2017-06-11 Thread Mark Cave-Ayland
Hi all, Playing around with trying to set up PCI bridges for sun4u, I noticed that I get an assert with the following diff which simply moves the default NIC behind a PCI bridge rather than being directly on the root PCI bus: diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 69f565d..0b1

Re: [Qemu-devel] [PATCH 0/6] fw_cfg: qdev-related tidy-ups

2017-06-11 Thread Mark Cave-Ayland
On 10/06/17 19:15, Philippe Mathieu-Daudé wrote: > Hi Mark, > > Is it possible to reorder the 3rd patch (FW_CFG_ID) first or 2nd in the > series? Mostly for cosmetic :) > > On 06/10/2017 09:30 AM, Mark Cave-Ayland wrote: >> As part of some ongoing sun4u work, I need to be able to wire the fw_cfg

Re: [Qemu-devel] [PATCH 3/3] sun4u: expose NVRAM on ebus PCI IO address space

2017-06-11 Thread Mark Cave-Ayland
On 10/06/17 19:05, Philippe Mathieu-Daudé wrote: > Hi Mark, > > I'm not sure having this patch split from the previous (2/3) really > helps bisecting, I'd rather squash them altogether. > > Either way: > > Reviewed-by: Philippe Mathieu-Daudé > > On 06/10/2017 10:00 AM, Mark Cave-Ayland wrote:

Re: [Qemu-devel] [PATCH 1/3] sun4u: switch to using qdev to instantiate fw_cfg interface

2017-06-11 Thread Mark Cave-Ayland
On 10/06/17 18:55, Philippe Mathieu-Daudé wrote: > Hi Mark, > > On 06/10/2017 10:00 AM, Mark Cave-Ayland wrote: >> Signed-off-by: Mark Cave-Ayland >> --- >> hw/sparc64/sun4u.c | 10 +- >> 1 file changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64

[Qemu-devel] [Bug 1694808] Re: Passthrough USB Host Keyboard doesn't work on Q35 platform on boot-up

2017-06-11 Thread Colin Finck
Same problem with qemu 2.8 from Ubuntu Cloud Archive. Is that enough to consider the bug highly likely in latest upstream version too? I don't have a QEMU build system at hand right now.. ** Changed in: qemu Status: Incomplete => New -- You received this bug notification because you are

Re: [Qemu-devel] [PATCHv5 2/4] pseries: Move CPU compatibility property to machine

2017-06-11 Thread David Gibson
On Fri, Jun 09, 2017 at 03:55:56PM +0200, Greg Kurz wrote: > On Fri, 2 Jun 2017 13:15:05 +1000 > David Gibson wrote: > > > Server class POWER CPUs have a "compat" property, which is used to set the > > backwards compatibility mode for the processor. However, this only makes > > sense for machin

Re: [Qemu-devel] [PATCHv5 0/4] Clean up compatibility mode handling

2017-06-11 Thread David Gibson
On Sat, Jun 10, 2017 at 05:42:45PM +0200, Andrea Bolognani wrote: > On Fri, 2017-06-02 at 13:15 +1000, David Gibson wrote: > > This is a rebased and revised version of my patches revising CPU > > compatiblity mode handling on ppc, last posted in November.  Since > > then, many of the patches have a

Re: [Qemu-devel] [PATCH 2/2] qobject: Catch another straggler for use of qdict_put_str()

2017-06-11 Thread Max Reitz
On 2017-06-09 17:20, Eric Blake wrote: > Dan's addition of key-secret improvements in commit 29cf9336 was > developed prior to the addition of QDict scalar insertion macros, > but merged after the general cleanup in commit 46f5ac20. > Patch created mechanically by rerunning: > spatch --sp-file sc

[Qemu-devel] [PATCH] qemu-nbd: Ignore SIGPIPE

2017-06-11 Thread Max Reitz
qemu proper has done so for 13 years (8a7ddc38a60648257dc0645ab4a05b33d6040063), qemu-img and qemu-io have done so for four years (526eda14a68d5b3596be715505289b541288ef2a). Ignoring this signal is especially important in qemu-nbd because otherwise a client can easily take down the qemu-nbd server

Re: [Qemu-devel] [PATCH v8 2/7] cpu: allocate cpu->trace_dstate in place

2017-06-11 Thread Lluís Vilanova
Emilio G Cota writes: > There's little point in dynamically allocating the bitmap if we > know at compile-time the max number of events we want to support. > Thus, make room in the struct for the bitmap, which will make things > easier later: this paves the way for upcoming changes, in which > we'

Re: [Qemu-devel] [PATCH v7 0/7] trace: [tcg] Optimize per-vCPU tracing states with separate TB caches

2017-06-11 Thread Lluís Vilanova
Emilio G Cota writes: > On Fri, Jan 13, 2017 at 21:48:09 +0100, Lluís Vilanova wrote: > (snip) >> To handle both issues, this series integrates the dynamic tracing event state >> into the TB hashing function, so that vCPUs tracing different events will use >> separate TBs. Note that only events wi

Re: [Qemu-devel] [PATCH 2/3] exec: simplify address_space_get_iotlb_entry

2017-06-11 Thread David Gibson
On Sun, Jun 11, 2017 at 01:09:26PM +0300, Michael S. Tsirkin wrote: > On Fri, Jun 09, 2017 at 09:58:47AM +0800, Peter Xu wrote: > > > > The problem is that when I was fixing the problem that vhost had with > > > > PT (a764040, "exec: abstract address_space_do_translate()"), I did > > > > broke the

Re: [Qemu-devel] [PATCH v4 0/6] spapr/xics: fix migration of older machine types

2017-06-11 Thread David Gibson
On Fri, Jun 09, 2017 at 05:09:13PM +0200, Greg Kurz wrote: > On Fri, 9 Jun 2017 20:28:32 +1000 > David Gibson wrote: > > > On Fri, Jun 09, 2017 at 11:36:31AM +0200, Greg Kurz wrote: > > > On Fri, 9 Jun 2017 12:28:13 +1000 > > > David Gibson wrote: > > > > > > > On Thu, Jun 08, 2017 at 03:42:3

Re: [Qemu-devel] [PATCH] nbd: Fix regression on resiliency to port scan

2017-06-11 Thread Max Reitz
On 2017-06-09 00:26, Eric Blake wrote: > Back in qemu 2.5, qemu-nbd was immune to port probes (a transient > server would not quit, regardless of how many probe connections > came and went, until a connection actually negotiated). But we > broke that in commit ee7d7aa when removing the return valu

[Qemu-devel] Fuzzing event loops

2017-06-11 Thread Stefan Hajnoczi
I wanted to share this idea about fuzzing event loops: https://blog.acolyer.org/2017/06/09/node-fz-fuzzing-the-server-side-event-driven-architecture/ The idea is to expose ordering dependencies and atomicity bugs in event loop callbacks/coroutines by randomly shuffling the order in which fd handl

Re: [Qemu-devel] [PATCH 2/3] exec: simplify address_space_get_iotlb_entry

2017-06-11 Thread Michael S. Tsirkin
On Fri, Jun 09, 2017 at 09:58:47AM +0800, Peter Xu wrote: > > > The problem is that when I was fixing the problem that vhost had with > > > PT (a764040, "exec: abstract address_space_do_translate()"), I did > > > broke the IOTLB translation a bit (it was using page masks). IMHO we > > > need to fix

[Qemu-devel] [PATCH v2] Add chardev-send-break monitor command

2017-06-11 Thread Stefan Fritsch
Sending a break on a serial console can be useful for debugging the guest. But not all chardev backends support sending breaks (only telnet and mux do). The chardev-send-break command allows to send a break even if using other backends. Signed-off-by: Stefan Fritsch Acked-by: Dr. David Alan Gilbe