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

2016-07-28 Thread David Gibson
On Thu, Jul 28, 2016 at 06:32:27PM -0500, alar...@ddci.com wrote: > 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, Ok, please do. > or anyone can add it, but I notice that in the other cases

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

2016-07-28 Thread David Gibson
On Fri, Jul 29, 2016 at 02:37:07PM +1000, Benjamin Herrenschmidt wrote: > 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

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

2016-07-28 Thread Michael S. Tsirkin
On Thu, Jul 28, 2016 at 05:28:33AM +, Zeng, Xin wrote: > On Thursday, July 28, 2016 10:51 AM Gonglei (Arei) Wrote: > > > > Changes from v4: > > > > - introduce crypto services into virtio crypto device. The services > > > >currently defined are CIPHER, MAC, HASH, AEAD, KDF, ASYM, > > >

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

2016-07-28 Thread David Gibson
On Fri, Jul 29, 2016 at 09:53:14AM +0530, Richard Henderson wrote: > On Jul 29, 2016 09:16, David Gibson > da...@gibson.dropbear.id.au wrote: > So, I noticed this and was also concerned, but I more or less > convinced myself that it would still work, by the magic of 2's > complement, as long

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 14:40 +1000, Benjamin Herrenschmidt wrote: > 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

[Qemu-devel] [PULL 0/6] ppc-for-2.7 queue 20160729

2016-07-28 Thread David Gibson
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: git://github.com/dgibson/qemu.git tags/ppc-for-2.7-20160729

[Qemu-devel] [PULL 3/6] test: port postcopy test to ppc64

2016-07-28 Thread David Gibson
From: "lviv...@redhat.com" As userfaultfd syscall is available on powerpc, migration postcopy can be used. This patch adds the support needed to test this on powerpc, instead of using a bootsector to run code to modify memory, we use a FORTH script in "boot-command"

[Qemu-devel] [PULL 5/6] spapr: Prevent boot CPU core removal

2016-07-28 Thread David Gibson
From: Bharata B Rao Boot CPU is assumed to be always present in QEMU code. So until that assumptions are gone, deny removal request. In another words, QEMU won't support boot CPU core hot-unplug. Signed-off-by: Bharata B Rao [dwg: Tweaked

Re: [Qemu-devel] [PATCH v2 0/8] POWER9 TCG enablements - part2

2016-07-28 Thread David Gibson
On Thu, Jul 28, 2016 at 11:44:10PM +0530, Nikunj A Dadhania wrote: > This series contains 11 new instructions for POWER9 described in ISA3.0. > > Patches: > 01-02: Changes following instructions: > divd[u][o][.]: Divide Doubleword Signed/Unsigned > divw[u][o][.]: Divide Word

[Qemu-devel] [PULL 4/6] ppc: Fix fault PC reporting for lve*/stve* VMX instructions

2016-07-28 Thread David Gibson
From: Benjamin Herrenschmidt We forgot to do gen_update_nip() for these like we do with other helpers. Fix this, but in a more efficient way by passing the RA to the accessors instead so the overhead is only taken on faults. Signed-off-by: Benjamin Herrenschmidt

[Qemu-devel] [PULL 6/6] tests: add drive_del-test to ppc/ppc64

2016-07-28 Thread David Gibson
From: Laurent Vivier Signed-off-by: Laurent Vivier Signed-off-by: David Gibson --- tests/Makefile.include | 2 ++ tests/drive_del-test.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PULL 2/6] Revert "spapr: Ensure CPU cores are added contiguously and removed in LIFO order"

2016-07-28 Thread David Gibson
This reverts commit 5cbc64de25973e9129c5a7897734a06ac64b9aff. Now that we have stable cpu_index values for pseries-2.7 (and future) machine types, we can now safely allow hotplug and unplug in any order. Conflicts: hw/ppc/spapr_cpu_core.c Some conflicts on revert due to some small

Re: [Qemu-devel] [PATCH] tests: add drive_del-test to ppc/ppc64

2016-07-28 Thread David Gibson
On Thu, Jul 28, 2016 at 05:18:09PM +0200, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > tests/Makefile.include | 2 ++ > tests/drive_del-test.c | 3 ++- > 2 files changed, 4 insertions(+), 1 deletion(-) Applied to ppc-for-2.7, thanks. > > diff --git

[Qemu-devel] [PULL 1/6] spapr: init CPUState->cpu_index with index relative to core-id

2016-07-28 Thread David Gibson
From: Igor Mammedov It will enshure that cpu_index for a given cpu stays the same regardless of the order cpus has been created/deleted and so it would be possible to migrate QEMU instance with out of order created CPU. Signed-off-by: Igor Mammedov

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 09:46 +0530, Richard Henderson wrote: >  > But that doesn't yet make the leap to 128-bit types in tcg. > I was going to raise that topic during the 2.8 cycle, since as a > consequence I want to drop support for 32-bit hosts, at least for 64- > bit guests, and maybe entirely.

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

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 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]); \ > > +} \ > > +} > > + > > +/*

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

[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

[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

[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

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

[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

[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.

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

[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

[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

[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

[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.

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

[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

[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

[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

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

[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

[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

[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

[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

[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,

[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é

[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

[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

[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.

[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-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:

[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

[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

[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

[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

[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().

[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:

[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

[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

[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.

[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(-)

[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

[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

[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.

[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

[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

[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

[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

[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

[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

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

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

[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

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 ---

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

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,

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

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

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:

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

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:

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] [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

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] [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

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 >

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

[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

[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

[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

[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

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. > >

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

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 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

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 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 */ > > > +

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é

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

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, > > +   

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.

[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-

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

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

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

  1   2   3   4   >