[Qemu-devel] [PATCH for-2.8 v4 6/6] xlnx-zynqmp: Set the number of priority queues

2016-07-28 Thread Alistair Francis
Set the ZynqMP number of priority queues to 2. Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- hw/arm/xlnx-zynqmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 23c7199..0d86ba3 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw

Re: [Qemu-devel] [PATCH] linux-user: Use correct alignment for long long on i386 guests

2016-07-28 Thread Laurent Vivier
Le 28/07/2016 à 13:57, Peter Maydell a écrit : > For i386, the ABI specifies that 'long long' (8 byte values) > need only be 4 aligned, but we were requiring them to be > 8-aligned. This meant we were laying out the target_epoll_event > structure wrongly. Add a suitable ifdef to abitypes.h to > s

Re: [Qemu-devel] [PATCH] linux-user: Use correct alignment for long long on i386 guests

2016-07-28 Thread Laurent Vivier
Le 28/07/2016 à 13:57, Peter Maydell a écrit : > For i386, the ABI specifies that 'long long' (8 byte values) > need only be 4 aligned, but we were requiring them to be > 8-aligned. This meant we were laying out the target_epoll_event > structure wrongly. Add a suitable ifdef to abitypes.h to > s

Re: [Qemu-devel] [PATCH] linux-user: Use correct alignment for long long on i386 guests

2016-07-28 Thread Peter Maydell
On 28 July 2016 at 20:19, Laurent Vivier wrote: > Why the following program from commit > > c2e3dee linux-user: Define target alignment size > > int main(void) > { > printf("alignof(short) %ld\n", __alignof__(short)); > printf("alignof(int) %ld\n", __alignof__(int)); > printf("alig

Re: [Qemu-devel] [PATCH] linux-user: Use correct alignment for long long on i386 guests

2016-07-28 Thread Peter Maydell
On 28 July 2016 at 21:36, Laurent Vivier wrote: > > > Le 28/07/2016 à 13:57, Peter Maydell a écrit : >> For i386, the ABI specifies that 'long long' (8 byte values) >> need only be 4 aligned, but we were requiring them to be >> 8-aligned. This meant we were laying out the target_epoll_event >> str

[Qemu-devel] [PATCH] optionrom: fix detection of -Wa,-32

2016-07-28 Thread Sean Bruno
http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg04839.html If there is any way this can be pulled in, we FreeBSD nerds would appreciate it. sean signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 0/2] convert device initialization functions

2016-07-28 Thread Michael S. Tsirkin
On Tue, May 17, 2016 at 06:18:45PM +0800, Wei Jiangang wrote: > The first had been reviewed. > The second had been posted last month, but no feedback. > They're similar, so resend them together. > > Wei Jiangang (2): > hw/pci-bridge: Convert pxb initialization functions to Error > apb: convert

Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno gets preserved

2016-07-28 Thread Eric Blake
On 07/28/2016 09:29 AM, Halil Pasic wrote: >> You mean va_start, not start_va. And actually, C11 is clear that errno >> is unspecified after library functions (but not macros) that don't >> explicitly state otherwise. Since va_start() is a macro and not a >> library function, that means va_start

Re: [Qemu-devel] [PATCH v2 03/37] qga: free the whole blacklist

2016-07-28 Thread Eric Blake
On 07/28/2016 08:37 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Free the list, not just the elements. > > Signed-off-by: Marc-André Lureau > --- > qga/main.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/qga/main.c b/qga/main.c > ind

Re: [Qemu-devel] [PATCH v2 04/37] qga: free remaining leaking state

2016-07-28 Thread Eric Blake
On 07/28/2016 08:37 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > qga/guest-agent-command-state.c | 7 +++ > qga/guest-agent-core.h | 1 + > qga/main.c | 6 ++ > 3 files changed, 14 insertions(

Re: [Qemu-devel] [PATCH] Update ancient copyright string in QEMU -version output

2016-07-28 Thread Eric Blake
On 07/28/2016 09:24 AM, Peter Maydell wrote: > Currently the -version command line argument prints a string ending > with "Copyright (c) 2003-2008 Fabrice Bellard". This is now some > eight years out of date; abstract it out of the several places that > print the string and update it to: > > Copy

Re: [Qemu-devel] [PATCH v2 03/37] qga: free the whole blacklist

2016-07-28 Thread Marc-André Lureau
- Original Message - > On 07/28/2016 08:37 AM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Free the list, not just the elements. > > > > Signed-off-by: Marc-André Lureau > > --- > > qga/main.c | 8 ++-- > > 1 file changed, 2 insertions(+), 6 deletions(-

Re: [Qemu-devel] [PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info

2016-07-28 Thread Michael S. Tsirkin
On Thu, Jul 28, 2016 at 07:50:52AM +, Li, Liang Z wrote: > > > } > > > > > > +static void update_free_pages_stats(struct virtio_balloon *vb, > > > > why _stats? > > Will change. > > > > + max_pfn = get_max_pfn(); > > > + mutex_lock(&vb->balloon_lock); > > > + while (pfn < max_pfn) { > > > +

Re: [Qemu-devel] [PATCH v2 03/37] qga: free the whole blacklist

2016-07-28 Thread Eric Blake
On 07/28/2016 03:36 PM, Marc-André Lureau wrote: >>> +g_list_foreach(config->blacklist, (GFunc)g_free, NULL); >> >> What an ugly cast - undefined behavior according to C. But it happens to >> work on all ABI that we support (calling a unary function as cast to >> appear as a binary function si

Re: [Qemu-devel] [PATCH v2 11/37] tests: fix small leak in test-io-channel-command

2016-07-28 Thread Eric Blake
On 07/28/2016 08:37 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > srcfifo && dstfifo must be freed in error case, however unlink() may > delete a file from a different context. Instead, use mkdtemp()/rmdir() > for the temporary files. > > Signed-off-by: Marc-André Lureau

Re: [Qemu-devel] [PATCH v2 19/37] char: disconnect peer when qemu_chr_free()

2016-07-28 Thread Eric Blake
On 07/28/2016 08:37 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > chr_disconnect callback is used to cleanup server socket peer. This > removes some leaks when the chardev is freed. > > Signed-off-by: Marc-André Lureau > --- > qemu-char.c | 1 + > 1 file changed, 1 inser

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process

2016-07-28 Thread Michael S. Tsirkin
On Thu, Jul 28, 2016 at 06:36:18AM +, Li, Liang Z wrote: > > > > This ends up doing a 1MB kmalloc() right? That seems a _bit_ big. > > > > How big was the pfn buffer before? > > > > > > Yes, it is if the max pfn is more than 32GB. > > > The size of the pfn buffer use before is 256*4 = 1024 Byt

Re: [Qemu-devel] [PATCH v2 00/37] Various memory leak fixes

2016-07-28 Thread Eric Blake
On 07/28/2016 08:37 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > Thanks to AddressSanitizer (ASAN), I found a number of direct leaks > worth fixing. Note that there are probably many indirect leaks left (I > am adding some here), I haven't investigated much yet.

[Qemu-devel] [Bug 1590796] Re: 2.6.0 Windows 7 install hangs on splash screen, works ok with 2.5.1

2016-07-28 Thread tkr
*** This bug is a duplicate of bug 1581936 *** https://bugs.launchpad.net/bugs/1581936 ** This bug has been marked a duplicate of bug 1581936 Frozen Windows 7 VMs with VGA CVE-2016-3712 fix (2.6.0 and 2.5.1.1) -- You received this bug notification because you are a member of qemu- devel-m

Re: [Qemu-devel] [PATCH 03/32] ppc: Move classic fp ops out of translate.c

2016-07-28 Thread Benjamin Herrenschmidt
On Thu, 2016-07-28 at 21:32 +0530, Richard Henderson wrote: > For the benefit of Peter's ./scripts/clean-includes and friends, > please name these with *.inc.c, like in tcg/*/. Ok. David merged the series in for-2.8 but I will send a subsequent patch to fix them up. Cheers, Ben.

Re: [Qemu-devel] [PATCH 09/32] ppc: Make float_invalid_op_excp() pass the return address

2016-07-28 Thread Benjamin Herrenschmidt
On Thu, 2016-07-28 at 21:36 +0530, Richard Henderson wrote: > On 07/27/2016 03:51 AM, Benjamin Herrenschmidt wrote: > > > > +/* GETPC() works here because this is inline */ > > +raise_exception_err_ra(env, POWERPC_EXCP_PROGRAM, > > +   POWERP

Re: [Qemu-devel] [PATCH v2 20/37] char: free MuxDriver when closing

2016-07-28 Thread Eric Blake
On 07/28/2016 08:37 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Similarly to other chr_close callbacks, free char type specific data. > > Signed-off-by: Marc-André Lureau > --- > qemu-char.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/qemu-char.c

Re: [Qemu-devel] [PATCH v2 32/37] bus: simplify name handling

2016-07-28 Thread Eric Blake
On 07/28/2016 08:38 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Simplify a bit the code by using g_strdup_printf() and store it in a > non-const value so casting is no longer needed, and ownership is > clearer. > > Signed-off-by: Marc-André Lureau > --- > hw/core/bus.c

Re: [Qemu-devel] [PATCH 09/32] ppc: Make float_invalid_op_excp() pass the return address

2016-07-28 Thread Benjamin Herrenschmidt
On Fri, 2016-07-29 at 07:57 +1000, Benjamin Herrenschmidt wrote: > On Thu, 2016-07-28 at 21:36 +0530, Richard Henderson wrote: > > > > On 07/27/2016 03:51 AM, Benjamin Herrenschmidt wrote: > > > > > > > > > +/* GETPC() works here because this is inline */ > > > +raise_exc

Re: [Qemu-devel] [PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process

2016-07-28 Thread Michael S. Tsirkin
On Thu, Jul 28, 2016 at 03:30:09AM +, Li, Liang Z wrote: > > Subject: Re: [PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate > > process > > > > On Wed, Jul 27, 2016 at 09:03:21AM -0700, Dave Hansen wrote: > > > On 07/26/2016 06:23 PM, Liang Li wrote: > > > > + vb->pfn_limit

Re: [Qemu-devel] [PATCH v2 33/37] tests: add qtest_add_data_func_full

2016-07-28 Thread Eric Blake
On 07/28/2016 08:38 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Allows to specify a destroy function for the test data. "Allows to" is not idiomatic English. Alternatives that sound better are "Allows $who to specify" (most simply, "Allows one to"), or "Allows specifying

Re: [Qemu-devel] [PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process

2016-07-28 Thread Michael S. Tsirkin
On Thu, Jul 28, 2016 at 03:06:37AM +, Li, Liang Z wrote: > > > + * VIRTIO_BALLOON_PFNS_LIMIT is used to limit the size of page bitmap > > > + * to prevent a very large page bitmap, there are two reasons for this: > > > + * 1) to save memory. > > > + * 2) allocate a large bitmap may fail. > > >

Re: [Qemu-devel] [PATCH v2 37/37] tests: fix postcopy-test leaks

2016-07-28 Thread Eric Blake
On 07/28/2016 08:38 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > A few strings are allocated and never freed. > > Signed-off-by: Marc-André Lureau > --- > tests/postcopy-test.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake -- Eri

Re: [Qemu-devel] [PATCH v2 34/37] tests: pc-cpu-test leaks fixes

2016-07-28 Thread Eric Blake
On 07/28/2016 08:38 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The path is allocated and should be freed. > > The qmp response should be unref, but then 'machine' must be duplicated. > > Use a destroy function for the PCTestData. > > Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH] ppc: Some FPU helper functions must be inline

2016-07-28 Thread Benjamin Herrenschmidt
float_invalid_op_excp() and float_check_status() must be inline due to their use of GETPC(). Use __attribute__((__always_inline__)) to enforce it Signed-off-by: Benjamin Herrenschmidt --- target-ppc/fpu_helper.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target-p

[Qemu-devel] [PULL 0/1] Ide patches

2016-07-28 Thread John Snow
The following changes since commit 21a21b853a1bb606358af61e738abfb9aecbd720: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-07-27 18:18:21 +0100) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/ide-pull-request for y

[Qemu-devel] [PULL 1/1] ide: fix halted IO segfault at reset

2016-07-28 Thread John Snow
If one attempts to perform a system_reset after a failed IO request that causes the VM to enter a paused state, QEMU will segfault trying to free up the pending IO requests. These requests have already been completed and freed, though, so all we need to do is NULL them before we enter the paused s

[Qemu-devel] target-ppc: SPR_BOOKE_ESR not set on FP exceptions

2016-07-28 Thread alarson
The target-ppc/excp_helper.c:powerpc_excp() case POWERPC_EXCP_FP fails to set "env->spr[SPR_BOOKE_ESR] = ESR_FP;". I can submit a patch for that, or anyone can add it, but I notice that in the other cases where SPR_BOOKE_ESR is set, the "msr" is ALSO set. Since the "msr" is used to initialize SRR

Re: [Qemu-devel] VFIO mdev with vIOMMU

2016-07-28 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Thursday, July 28, 2016 11:42 PM > > On Thu, 28 Jul 2016 10:15:24 + > "Tian, Kevin" wrote: > > > Hi, Alex, > > > > Along with recent enhancement on virtual IOMMU (vIOMMU) in Qemu, I'm > > thinking whether there is any issue

Re: [Qemu-devel] [PATCH] linux-user: Use correct alignment for long long on i386 guests

2016-07-28 Thread Laurent Vivier
Le 28/07/2016 à 13:57, Peter Maydell a écrit : > For i386, the ABI specifies that 'long long' (8 byte values) > need only be 4 aligned, but we were requiring them to be > 8-aligned. This meant we were laying out the target_epoll_event > structure wrongly. Add a suitable ifdef to abitypes.h to > s

Re: [Qemu-devel] [PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process

2016-07-28 Thread Li, Liang Z
> On Thu, Jul 28, 2016 at 03:06:37AM +, Li, Liang Z wrote: > > > > + * VIRTIO_BALLOON_PFNS_LIMIT is used to limit the size of page > > > > +bitmap > > > > + * to prevent a very large page bitmap, there are two reasons for this: > > > > + * 1) to save memory. > > > > + * 2) allocate a large bitm

Re: [Qemu-devel] [PATCH COLO-Frame v17 00/34] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-07-28 Thread Hailiang Zhang
On 2016/7/29 3:07, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: This is the 17th version of COLO FT feature. Here is only COLO frame part, you can get the whole codes from github: https://github.com/coloft/qemu/commits/colo-v3.0-periodic-mode Migration

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process

2016-07-28 Thread Li, Liang Z
> On Thu, Jul 28, 2016 at 06:36:18AM +, Li, Liang Z wrote: > > > > > This ends up doing a 1MB kmalloc() right? That seems a _bit_ big. > > > > > How big was the pfn buffer before? > > > > > > > > Yes, it is if the max pfn is more than 32GB. > > > > The size of the pfn buffer use before is 256*

Re: [Qemu-devel] [PATCH 28/32] ppc: Avoid double translation for lvx/lvxl/stvx/stvxl

2016-07-28 Thread Richard Henderson
On 07/27/2016 03:51 AM, Benjamin Herrenschmidt wrote: -tcg_gen_andi_tl(EA, EA, ~0xf);\ -/* We only need to swap high and low halves. gen_qemu_ld64 does necessary \ - 64-bit byteswap already. */\

Re: [Qemu-devel] [PATCH COLO-Frame v17 00/34] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-07-28 Thread Changlong Xie
On 07/29/2016 08:41 AM, Hailiang Zhang wrote: On 2016/7/29 3:07, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: This is the 17th version of COLO FT feature. Here is only COLO frame part, you can get the whole codes from github: https://github.com/coloft/q

Re: [Qemu-devel] [PATCH COLO-Frame v17 00/34] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-07-28 Thread Hailiang Zhang
On 2016/7/29 8:55, Changlong Xie wrote: On 07/29/2016 08:41 AM, Hailiang Zhang wrote: On 2016/7/29 3:07, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: This is the 17th version of COLO FT feature. Here is only COLO frame part, you can get the whole codes

Re: [Qemu-devel] [PATCH v2 4/8] target-ppc: add vabsdu[b, h, w] instructions

2016-07-28 Thread Richard Henderson
On 07/28/2016 11:44 PM, Nikunj A Dadhania wrote: From: Sandipan Das Adds following instructions: vabsdub: Vector Absolute Difference Unsigned Byte vabsduh: Vector Absolute Difference Unsigned Halfword vabsduw: Vector Absolute Difference Unsigned Word Signed-off-by: Sandipan Das [ use ISA300

Re: [Qemu-devel] [PATCH v2 5/8] target-ppc: add vcmpnez[b, h, w][.] instructions

2016-07-28 Thread Richard Henderson
On 07/28/2016 11:44 PM, Nikunj A Dadhania wrote: From: Swapnil Bokade Adds following instructions: vcmpnezb[.]: Vector Compare Not Equal or Zero Byte vcmpnezh[.]: Vector Compare Not Equal or Zero Halfword vcmpnezw[.]: Vector Compare Not Equal or Zero Word Signed-off-by: Swapnil Bokade [ coll

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-07-28 Thread Shannon Zhao
On 2016/7/29 0:38, Wei Huang wrote: > This patch adds a pmu=[on/off] option to enable/disable vpmu support > in guest vm. There are several reasons to justify this option. First > vpmu can be problematic for cross-migration between different SoC as > perf counters is architecture-dependent. It is

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process

2016-07-28 Thread Li, Liang Z
> > > On Wed, Jul 27, 2016 at 09:03:21AM -0700, Dave Hansen wrote: > > > > On 07/26/2016 06:23 PM, Liang Li wrote: > > > > > + vb->pfn_limit = VIRTIO_BALLOON_PFNS_LIMIT; > > > > > + vb->pfn_limit = min(vb->pfn_limit, get_max_pfn()); > > > > > + vb->bmap_len = ALIGN(vb->pfn_limit, BITS_P

Re: [Qemu-devel] [PATCH 1/6] palmetto-bmc: add a "silicon-rev" property at the soc level

2016-07-28 Thread Andrew Jeffery
On Thu, 2016-07-28 at 09:51 +0200, Cédric Le Goater wrote: > On 07/28/2016 04:14 AM, Andrew Jeffery wrote: > > > > On Wed, 2016-07-27 at 18:46 +0200, Cédric Le Goater wrote: > > > > > > The SCU controler holds the board revision number in its 0x7C > > > register. Let's use an alias to link a "sil

Re: [Qemu-devel] [PATCH] util/qemu-sockets: revert Yoda Conditions to normal

2016-07-28 Thread Cao jin
On 07/28/2016 11:32 PM, Eric Blake wrote: On 07/28/2016 04:50 AM, Cao jin wrote: Follow CODING_STYLE Cc: Daniel P. Berrange Cc: Gerd Hoffmann Cc: Paolo Bonzini Signed-off-by: Cao jin --- util/qemu-sockets.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) Daniel P. Be

[Qemu-devel] [PATCH v2] util/qemu-sockets: revert Yoda Conditions to normal

2016-07-28 Thread Cao jin
Follow CODING_STYLE Cc: Daniel P. Berrange Cc: Gerd Hoffmann Cc: Paolo Bonzini Cc: Eric Blake Signed-off-by: Cao jin --- util/qemu-sockets.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) v2 changelog: 1. fix to Eric's comments. diff --git a/util/qemu-sockets.c b/util/q

Re: [Qemu-devel] [PATCH 28/32] ppc: Avoid double translation for lvx/lvxl/stvx/stvxl

2016-07-28 Thread Benjamin Herrenschmidt
On Fri, 2016-07-29 at 06:19 +0530, Richard Henderson wrote: > This, I'm not so keen on. > > (1) The helper, since it writes to registers controlled by tcg, must be  > described to clobber all registers.  Which will noticeably increase memory  > traffic to ENV.  For instance, you won't be able to h

Re: [Qemu-devel] [PULL 3/4] cputlb: Fix for self-modifying writes across page boundaries

2016-07-28 Thread TeLeMan
On Sat, Jul 9, 2016 at 4:38 AM, Richard Henderson wrote: > From: Samuel Damashek > > As it currently stands, QEMU does not properly handle self-modifying code > when the write is unaligned and crosses a page boundary. The procedure > for handling a write to the current translation block is to wri

[Qemu-devel] [PULL 00/41] pc, pci, virtio: cleanups, fixes

2016-07-28 Thread Michael S. Tsirkin
The following changes since commit 2d2e632ad00d11867c6c5625605b1fbc022dd62f: Update version for v2.7.0-rc0 release (2016-07-22 15:32:42 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to f077f889

[Qemu-devel] [PULL 02/41] hw/pcie-root-port: Fix PCIe root port initialization

2016-07-28 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Specify the root port interrupt pin as part of the init process for cases when msi/msix are not enabled. Fixes "hw/pci/pci.c:196:23: runtime error: shift exponent -1 is negative" warning from clang's sanitizer. Reported-by: Peter Maydell Signed-off-by: Marcel Apfelbaum

[Qemu-devel] [PULL 03/41] hw/pxb: declare pxb devices as not hot-pluggable

2016-07-28 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Prevent future issues when hotplug will work for devices attached to pxbs. Suggested-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum Tested-by: Laszlo Ersek Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci-bridge/pci_expander_bridge.c |

[Qemu-devel] [PULL 04/41] hw/acpi: fix a DSDT table issue when a pxb is present.

2016-07-28 Thread Michael S. Tsirkin
From: Marcel Apfelbaum PXBs do not support hotplug so they don't have a PCNT function. Since the PXB's PCI root-bus is a child bus of bus 0, the build_dsdt code will add a call to the corresponding PCNT function. Fix this by skipping the PCNT call for the above case. While at it skip also PCIe c

[Qemu-devel] [PULL 01/41] pcie: fix link active status bit migration

2016-07-28 Thread Michael S. Tsirkin
We changed link status register in pci express endpoint capability over time. Specifically, commit b2101eae63ea57b571cee4a9075a4287d24ba4a4 ("pcie: Set the "link active" in the link status register") set data link layer link active bit in this register without adding compatibility to old machine t

[Qemu-devel] [PULL 09/41] hw/virtio-pci: fix virtio behaviour

2016-07-28 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Enable transitional virtio devices by default. Enable virtio-1.0 for devices plugged into PCIe ports (Root ports or Downstream ports). Using the virtio-1 mode will remove the limitation of the number of devices that can be attached to a machine by removing the need for the

[Qemu-devel] [PULL 05/41] acpi: refactor pxb crs computation

2016-07-28 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Instead of always passing both IO and MEM ranges when computing CRS ranges, define a new CrsRangeSet structure that include them both. This is done before introducing a third type of range, 64-bit MEM, so it will be easier to pass them all around. Reviewed-by: Igor Mammed

[Qemu-devel] [PULL 07/41] hw/pci-bridge: Convert pxb initialization functions to Error

2016-07-28 Thread Michael S. Tsirkin
From: Wei Jiangang Firstly, convert pxb_dev_init_common() to Error and rename it to pxb_dev_realize_common(). Actually, pxb_register_bus() is converted as well. And then, convert pxb_dev_initfn() and pxb_pcie_dev_initfn() to Error, rename them to pxb_dev_realize() and pxb_pcie_dev_realize() resp

[Qemu-devel] [PULL 11/41] misc: indentation

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/vhost_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index f92d3f8..3677a82 100644 --- a/hw/

[Qemu-devel] [PULL 06/41] hw/apci: handle 64-bit MMIO regions correctly

2016-07-28 Thread Michael S. Tsirkin
From: Marcel Apfelbaum In build_crs(), the calculation and merging of the ranges already happens in 64-bit, but the entry boundaries are silently truncated to 32-bit in the call to aml_dword_memory(). Fix it by handling the 64-bit MMIO ranges separately. This fixes 64-bit BARs behind PXBs. Repo

[Qemu-devel] [PULL 08/41] apb: convert init to realize

2016-07-28 Thread Michael S. Tsirkin
From: Wei Jiangang Convert a device model where initialization obviously can't fail, make it implement realize() rather than init(). Signed-off-by: Wei Jiangang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Markus Armbruster --- hw/pci-host/apb.c | 5 ++---

[Qemu-devel] [PULL 12/41] vhost-user: minor simplification

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Shorten the code and make it more clear by using the specialized function g_str_has_prefix(). Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- net/vhost-user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-

[Qemu-devel] [PULL 10/41] virtio: check vring descriptor buffer length

2016-07-28 Thread Michael S. Tsirkin
From: Prasad J Pandit virtio back end uses set of buffers to facilitate I/O operations. An infinite loop unfolds in virtqueue_pop() if a buffer was of zero size. Add check to avoid it. Reported-by: Li Qiang Signed-off-by: Prasad J Pandit Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael

[Qemu-devel] [PULL 15/41] vhost: make vhost_log_put() idempotent

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Although not strictly required, it is nice to have vhost_log_put() safely callable multiple times. Clear dev->log* when calling vhost_log_put() to make the function idempotent. This also simplifies a bit the caller work. Signed-off-by: Marc-André Lureau Reviewed-by: Mic

[Qemu-devel] [PULL 14/41] vhost: don't assume opaque is a fd, use backend cleanup

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau vhost-dev opaque isn't necessarily an fd, it can be a chardev when using vhost-user. Goto fail, so vhost_backend_cleanup() is called to handle backend cleanup appropriately. vhost_set_backend_type() should never fail, use an assert(). Signed-off-by: Marc-André Lureau Re

[Qemu-devel] [PULL 13/41] vhost-user: disconnect on HUP

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau In some cases, qemu_chr_fe_read_all() on HUP event doesn't raise CHR_EVENT_CLOSED because the read/recv function returns -1 on disconnected peers (for example with tch_chr_recv, an ECONNRESET errno overwritten as EIO). It is simpler to explicitely disconnect on HUP, risin

[Qemu-devel] [PULL 32/41] vhost: add assert() to check runtime behaviour

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau All these functions must be called only after the backend is connected. They are called from virtio-net.c, after either virtio or link status change. The check for nc->peer->link_down should ensure vhost_net_{start,stop}() are always called between vhost_user_{start,stop}

[Qemu-devel] [PULL 18/41] vhost: make vhost_dev_cleanup() idempotent

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau It is called on multiple code path, so make it safe to call several times (note: I don't remember a reproducer here, but a function called 'cleanup' should probably be idempotent in my book) Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by:

[Qemu-devel] [PULL 22/41] vhost: add missing VHOST_OPS_DEBUG

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Add missing VHOST_OPS_DEBUG() logs, for completeness. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/vir

[Qemu-devel] [PULL 16/41] vhost: assert the log was cleaned up

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Make sure the log was released on cleanup, or it will leak (the alternative is to call vhost_log_put() unconditionally, but it may hide some dev state issues). Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/vi

[Qemu-devel] [PULL 34/41] char: add and use tcp_chr_wait_connected

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Add a chr_wait_connected for the tcp backend, and use it in the open_socket() function. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- qemu-char.c | 63 ++--

[Qemu-devel] [PULL 21/41] vhost: do not assert() on vhost_ops failure

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Calling a vhost operation may fail, for example with disconnected vhost-user backend, but qemu shouldn't abort in this case. Log an error instead, except on error and cleanup code paths where it can be mostly ignored. Let's use a VHOST_OPS_DEBUG macro to easily disable t

[Qemu-devel] [PULL 17/41] vhost: fix cleanup on not fully initialized device

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau If vhost_dev_init() failed, caller may still call vhost_dev_cleanup() later. However, vhost_dev_cleanup() tries to remove the device from the list even if it wasn't yet added, which may lead to crashes. Similarly for the memory listener. Signed-off-by: Marc-André Lureau

[Qemu-devel] [PULL 20/41] vhost: fix calling vhost_dev_cleanup() after vhost_dev_init()

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau vhost_net_init() calls vhost_dev_init() and in case of failure, calls vhost_dev_cleanup() directly. However, the structure is already partially cleaned on error. Calling vhost_dev_cleanup() again will call vhost_virtqueue_cleanup() on already clean queues, and causing pote

[Qemu-devel] [PULL 31/41] vhost-net: vhost_migration_done is vhost-user specific

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Either the callback is mandatory to implement, in which case an assert() is more appropriate, or it's not and we can't tell much whether the function should fail or not (given it's name, I guess it should silently success by default). Instead, make the implementation manda

[Qemu-devel] [PULL 19/41] vhost-net: always call vhost_dev_cleanup() on failure

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau vhost_dev_init(), calling vhost backend initialization, should be cleaned up after failure too. Call vhost_dev_cleanup() in all failure cases. First, it needs to zero-alloc the struct to avoid the initial garbage. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S.

[Qemu-devel] [PULL 37/41] tests: fix vhost-user-test leak

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Spotted by valgrind. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 46d0588..27b

[Qemu-devel] [PULL 23/41] vhost: use error_report() instead of fprintf(stderr, ...)

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Let's use qemu proper error reporting API, this ensures the error is reported at the right place (stderr or monitor), with a conventional format. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost.c |

[Qemu-devel] [PULL 33/41] char: add chr_wait_connected callback

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau A function to wait on the backend to be connected, to be used in the following patches. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/sysemu/char.h | 8 qemu-char.c | 9 + 2 fi

[Qemu-devel] [PULL 24/41] qemu-char: fix qemu_chr_fe_set_msgfds() crash when disconnected

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Calling qemu_chr_fe_set_msgfds() on unconnected socket leads to crash since s->ioc is NULL in this case. Return an error earlier instead. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- qemu-char.c | 10 ++

[Qemu-devel] [PULL 28/41] vhost-user: keep vhost_net after a disconnection

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Many code paths assume get_vhost_net() returns non-null. Keep VhostUserState.vhost_net after a successful vhost_net_init(), instead of freeing it in vhost_net_cleanup(). VhostUserState.vhost_net is thus freed before after being recreated or on final vhost_user_cleanup()

Re: [Qemu-devel] [PATCH 3/3] ppc/pnv: Add skeletton PowerNV platform

2016-07-28 Thread David Gibson
On Thu, Jul 28, 2016 at 07:27:02PM +0200, Cédric Le Goater wrote: > Hello, > > On 07/26/2016 08:23 AM, David Gibson wrote: > > On Mon, Jul 25, 2016 at 04:24:43PM +0200, Cédric Le Goater wrote: > >> From: Benjamin Herrenschmidt > >> > >> No devices yet, not even an interrupt controller, just to ge

[Qemu-devel] [PULL 25/41] vhost-user: call set_msgfds unconditionally

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau It is fine to call set_msgfds() with 0 fd, and ensures any previous fd array is cleared. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[Qemu-devel] [PULL 39/41] vhost: add vhost_net_set_backend()

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Not all vhost-user backends support ops->vhost_net_set_backend(). It is a nicer to provide an assert/error than to crash trying to call. Furthermore, it improves a bit the code by hiding vhost_ops details. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin

Re: [Qemu-devel] [PATCH 28/32] ppc: Avoid double translation for lvx/lvxl/stvx/stvxl

2016-07-28 Thread David Gibson
On Fri, Jul 29, 2016 at 12:13:01PM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2016-07-29 at 06:19 +0530, Richard Henderson wrote: > > This, I'm not so keen on. > > > > (1) The helper, since it writes to registers controlled by tcg, must be  > > described to clobber all registers.  Which will n

[Qemu-devel] [PULL 29/41] vhost-user: add get_vhost_net() assertions

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Add a few assertions to be more explicit about the runtime behaviour after the previous patch: get_vhost_net() is non-null after net_vhost_user_init(). Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/net/vhost_

[Qemu-devel] [PULL 41/41] mptsas: Fix a migration compatible issue

2016-07-28 Thread Michael S. Tsirkin
From: Cao jin My previous commit 2e2aa316 removed internal flag msi_in_use, which exists in vmstate, use VMSTATE_UNUSED for migration compatibility. Reported-by: Amit Shah Suggested-by: Amit Shah Cc: Markus Armbruster Cc: Marcel Apfelbaum Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Amit S

[Qemu-devel] [PULL 26/41] vhost-user: check qemu_chr_fe_set_msgfds() return value

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Check qemu_chr_fe_set_msgfds() for errors, to make sure the message to be sent is correct. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deleti

[Qemu-devel] [PULL 30/41] Revert "vhost-net: do not crash if backend is not present"

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Now that get_vhost_net() returns non-null after a successful vhost_net_init(), we no longer need to check this case. This reverts commit ecd34898596c60f79886061618dd7e01001113ad. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

Re: [Qemu-devel] [PATCH v6 00/33] vhost-user reconnect fixes

2016-07-28 Thread Michael S. Tsirkin
On Wed, Jul 27, 2016 at 01:14:54AM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > Since 'vhost-user: simple reconnection support' has been merged, it is > possible to disconnect and reconnect a vhost-user backend. However, > many code paths in qemu may trigger as

[Qemu-devel] [PULL 27/41] vhost-user: check vhost_user_{read, write}() return value

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau The vhost-user code is quite inconsistent with error handling. Instead of ignoring some return values of read/write and silently going on with invalid state (invalid read for example), break the code flow when the error happened. Signed-off-by: Marc-André Lureau Reviewed

[Qemu-devel] [PULL 36/41] tests: plug some leaks in virtio-net-test

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Found thanks to valgrind. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/virtio-net-test.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/virtio-net-test.c b/tests/vi

Re: [Qemu-devel] [PATCH] ppc: Some FPU helper functions must be inline

2016-07-28 Thread David Gibson
On Fri, Jul 29, 2016 at 08:33:45AM +1000, Benjamin Herrenschmidt wrote: > float_invalid_op_excp() and float_check_status() must be inline > due to their use of GETPC(). > > Use __attribute__((__always_inline__)) to enforce it > > Signed-off-by: Benjamin Herrenschmidt Do you want me to fold this

[Qemu-devel] [PULL 35/41] vhost-user: wait until backend init is completed

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau The chardev waits for an initial connection before starting qemu, and vhost-user should wait for the backend negotiation to be completed before starting qemu too. vhost-user is started in the net_vhost_user_event callback, which is synchronously called after the socket is

[Qemu-devel] [PULL 38/41] vhost-user: add error report in vhost_user_write()

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau Similar to vhost_user_read() error report, it is useful to have early error report. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 13 ++--- 1 file changed, 10 insertions(+), 3 de

[Qemu-devel] [PULL 40/41] vhost: do not update last avail idx on get_vring_base() failure

2016-07-28 Thread Michael S. Tsirkin
From: Marc-André Lureau The state.num value will probably be 0 in this case, but that doesn't make sense to update. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [Qemu-devel] [PATCH v5] virtio-crypto: Add virtio crypto device specification

2016-07-28 Thread Gonglei (Arei)
Hi Xin, Thanks for your comments firstly... Regards, -Gonglei > -Original Message- > From: Zeng, Xin [mailto:xin.z...@intel.com] > Sent: Thursday, July 28, 2016 1:29 PM > To: Gonglei (Arei); Michael S. Tsirkin > Cc: qemu-devel@nongnu.org; virtio-...@lists.oasis-open.org; Ola Liljedahl;

Re: [Qemu-devel] [PATCH v1 4/8] target-ppc: add vabsdu[b, h, w] instructions

2016-07-28 Thread David Gibson
On Thu, Jul 28, 2016 at 06:22:05PM +0530, Richard Henderson wrote: > On 07/28/2016 12:19 PM, Nikunj A Dadhania wrote: > > +r->element[i] = abs(a->element[i] - b->element[i]); \ > > +} \ > > +} > > + > > +/* VA

Re: [Qemu-devel] [PATCH] ppc: Some FPU helper functions must be inline

2016-07-28 Thread Benjamin Herrenschmidt
On Fri, 2016-07-29 at 12:44 +1000, David Gibson wrote: > On Fri, Jul 29, 2016 at 08:33:45AM +1000, Benjamin Herrenschmidt > wrote: > > > > float_invalid_op_excp() and float_check_status() must be inline > > due to their use of GETPC(). > > > > Use __attribute__((__always_inline__)) to enforce it

Re: [Qemu-devel] [PATCH 28/32] ppc: Avoid double translation for lvx/lvxl/stvx/stvxl

2016-07-28 Thread Benjamin Herrenschmidt
On Fri, 2016-07-29 at 13:34 +1000, David Gibson wrote: >  > What should I do with this in the short term?  Leave it in > ppc-for-2.8, or remove it for now pending possible changes? I think I'm still measuring a performance improvement with this, I'll test a bit more and will get back to you. It w

<    1   2   3   4   >