Re: [Qemu-devel] arm mptimer implementation - why prescaler is multiply by 10?

2015-10-29 Thread Krzeminski, Marcin (Nokia - PL/Wroclaw)
From: EXT Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] Sent: Tuesday, October 27, 2015 7:23 PM To: Peter Maydell Cc: Dmitry Osipenko ; Krzeminski, Marcin (Nokia - PL/Wroclaw) ; qemu-devel@nongnu.org Subject: Re: arm mptimer implementation - why prescaler is multiply by 10? On Tue, O

Re: [Qemu-devel] [PATCH] scripts/text2pod.pl: Escape left brace

2015-10-29 Thread Michael Tokarev
09.10.2015 09:42, Fam Zheng wrote: > Latest perl now deprecates "{" literal in regex and print warnings like > "unescaped left brace in regex is deprecated". Add escapes to keep it > happy. Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [PATCH 1/3] hw/acpi/aml-build: remove useless glib version check

2015-10-29 Thread Michael Tokarev
12.10.2015 16:31, Marc-André Lureau wrote: > to qemu-trivial > > On Mon, Oct 12, 2015 at 12:54 PM, wrote: >> From: Marc-André Lureau >> >> 2.22 is the minimum version required Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [PATCH] gdbstub: Fix buffer overflows in gdb_handle_packet()

2015-10-29 Thread Michael Tokarev
13.10.2015 10:38, Kevin Wolf wrote: > Some places in gdb_handle_packet() can get an arbitrary length (most > times directly from the client) and either didn't check it at all or > checked against the wrong value, potentially causing buffer overflows. Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [PATCH] hw/display/tcx: Remove superfluous OBJECT() typecasts

2015-10-29 Thread Michael Tokarev
15.10.2015 11:54, Thomas Huth wrote: > The tcx_initfn() function is already supplied with an > Object *obj pointer, so there is no need to cast the > state pointer back to an Object pointer all over the > place. And while we're at it, also remove the superfluous > "return;" statement in this functi

Re: [Qemu-devel] [PATCH] scripts/text2pod.pl: Escape left brace

2015-10-29 Thread Michael Tokarev
29.10.2015 10:25, Michael Tokarev wrote: > 09.10.2015 09:42, Fam Zheng wrote: >> Latest perl now deprecates "{" literal in regex and print warnings like >> "unescaped left brace in regex is deprecated". Add escapes to keep it >> happy. > > Applied to -trivial, thank you! Noticed your v2 without

[Qemu-devel] [PATCH] target-i386: enable cflushopt/clwb/pcommit instructions

2015-10-29 Thread Xiao Guangrong
These instructions are used by NVDIMM drivers and the specification locates at: https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf There instructions are available on Skylake Server Signed-off-by: Xiao Guangrong --- target-i386/cpu.c | 8 +--- target-i386/cpu.h | 3

Re: [Qemu-devel] [PATCH] piix: fix resource leak reported by Coverity

2015-10-29 Thread Michael Tokarev
14.09.2015 13:40, zhanghailiang wrote: > config_fd should be closed before return, or there will > be a resource leak error. > > Signed-off-by: zhanghailiang > --- > hw/pci-host/piix.c | 11 +++ > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/hw/pci-host/piix.c b/hw/p

Re: [Qemu-devel] [PATCH] maint: Ignore ivshmem binaries

2015-10-29 Thread Michael Tokarev
26.10.2015 23:27, Eric Blake wrote: > Commit a75eb03b added ivshmem-client and ivshmem-server binaries, > but did not mark them for exclusion in .gitignore. Applied to -trivial. > Yes, I know that these only show up in 'git status' as dirty if you > do an in-tree build, and that we prefer VPATH b

Re: [Qemu-devel] [PATCH] fix bad indentation in pcie_cap_slot_write_config()

2015-10-29 Thread Michael Tokarev
25.10.2015 11:23, Cao jin wrote: > bad indentation conflicts with CODING_STYLE doc I don't like patches which just change coding style. It is often agreed that when you fix some code you can also fix indentation of surrounding code, but just fixing coding style isn't very productive. Yet I'm appl

Re: [Qemu-devel] [PATCH] tests: ignore test-qga

2015-10-29 Thread Michael Tokarev
20.10.2015 22:41, Eric Blake wrote: > Commit 62c39b30 added a new test, but did not mark it for > exclusion in .gitignore. Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [PATCH] target-alpha: fix uninitialized variable

2015-10-29 Thread Michael Tokarev
19.10.2015 17:08, Paolo Bonzini wrote: > I am not sure why the compiler does not catch it. There is no > semantic change since gen_excp returns EXIT_NORETURN, but the > old code is wrong. Applied to -trivial. Indeed it's interesting why gcc can't catch it, might be due to unlikely() (which smell

Re: [Qemu-devel] [PATCH] xen: fix invalid assertion

2015-10-29 Thread Michael Tokarev
19.10.2015 17:08, Paolo Bonzini wrote: > Asserting "true" is not that useful. > -default: assert(1); > +default: abort(); Blah :) Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [PATCH v2 0/4] Small optimizations for code using g_malloc0 + memset/memcpy

2015-10-29 Thread Michael Tokarev
09.10.2015 18:56, Thomas Huth wrote: > There are a couple of spots in the QEMU code which use g_malloc0, > directly followed by a memset or memcpy which fill the whole > allocated buffer. In this case it either does not make sense to > zero the buffer via g_malloc0 first (so g_malloc should be used

Re: [Qemu-devel] [PATCH] fix bad indentation in pcie_cap_slot_write_config()

2015-10-29 Thread Cao jin
Thanks Michael. and I am sorry if it bothered you. Maybe it can be avoid to have a clear definition of "trivial" to direct the newbies like me:P On 10/29/2015 03:45 PM, Michael Tokarev wrote: 25.10.2015 11:23, Cao jin wrote: bad indentation conflicts with CODING_STYLE doc I don't like patch

Re: [Qemu-devel] [PATCH] bt: fix use of uninitialized variable seqlen

2015-10-29 Thread Michael Tokarev
19.10.2015 17:08, Paolo Bonzini wrote: > sdp_svc_match, sdp_attr_match and sdp_svc_attr_match read the last > argument. The only sensible way to change the code is to make that last > argument "len" instead of "seqlen" which is the length of a subsequence > in the previous "if" branch. A fun case

Re: [Qemu-devel] [PATCH] fix bad indentation in pcie_cap_slot_write_config()

2015-10-29 Thread Michael Tokarev
29.10.2015 10:57, Cao jin wrote: > Thanks Michael. and I am sorry if it bothered you. There's nothing to worry about, really. > Maybe it can be avoid to have a clear definition of "trivial" to direct the > newbies like me:P It is a general common sense maybe, I dunno. There's lot of code which

Re: [Qemu-devel] [PATCH][TRIVIAL] spice: fix checking for surface bpp match

2015-10-29 Thread Michael Tokarev
22.09.2015 10:41, Michael Tokarev wrote: > 17.09.2015 19:18, Léo Grange wrote: >> Ping, as I had no feedback about this small patch. >> Please tell me if I need to do anything else. > > Hello! > > I've seen initial version of your patch, thought it isn't exactly trivial ;), > and hoped someone wi

Re: [Qemu-devel] How to specify the full block driver tree on the CLI ?

2015-10-29 Thread Kevin Wolf
Am 29.10.2015 um 00:58 hat Daniel P. Berrange geschrieben: > As previously mentioned, I'm working on support for LUKS full disk > encryption in QEMU. I have a simple driver implemented that works > on top of plain files. eg I can launch qemu-io thus: > > $ qemu-io /home/berrange/VirtualMachines/d

[Qemu-devel] [PATCH 2/2] Revert "Introduce cpu_clean_all_dirty"

2015-10-29 Thread Liang Li
This reverts commit de9d61e83d43be9069e6646fa9d57a3f47779d28. Now 'cpu_clean_all_dirty' is useless, we can revert the related code. Conflicts: include/sysemu/kvm.h --- cpus.c| 9 - include/sysemu/cpus.h | 1 - include/sysemu/kvm.h | 8 kvm-all.c

[Qemu-devel] [PATCH 1/2] kvmclock: use a light weight interface to update env->tsc.

2015-10-29 Thread Liang Li
The commit 317b0a6d8 fixed an issue which caused by the outdated env->tsc value, but the fix lead to cpu_synchronize_all_states called twice during live migration. The cpu_synchronize_all_states takes about 130us for a VM which has 4 vcpus, it's a bit expensive. This patch use a light weight inter

[Qemu-devel] [PATCH 0/2] Optimze the env->tsc update operation

2015-10-29 Thread Liang Li
This patch aims for reducing the live migration downtime. It updates the env->tsc value when stopping kvmclock with a ligth weight interface, rather than using 'cpu_synchronize_all_states', which takes more time. For a VM with 4 CPUs, this path can help to reduce the VM downtime about 100us. Lian

Re: [Qemu-devel] How to specify the full block driver tree on the CLI ?

2015-10-29 Thread Daniel P. Berrange
On Thu, Oct 29, 2015 at 09:11:15AM +0100, Kevin Wolf wrote: > Am 29.10.2015 um 00:58 hat Daniel P. Berrange geschrieben: > > As previously mentioned, I'm working on support for LUKS full disk > > encryption in QEMU. I have a simple driver implemented that works > > on top of plain files. eg I can l

[Qemu-devel] [RESEND 2/2] Revert "Introduce cpu_clean_all_dirty"

2015-10-29 Thread Liang Li
This reverts commit de9d61e83d43be9069e6646fa9d57a3f47779d28. Now 'cpu_clean_all_dirty' is useless, we can revert the related code. Conflicts: include/sysemu/kvm.h --- cpus.c| 9 - include/sysemu/cpus.h | 1 - include/sysemu/kvm.h | 8 kvm-all.c

[Qemu-devel] [RESEND 1/2] kvmclock: use a light weight interface to update env->tsc.

2015-10-29 Thread Liang Li
The commit 317b0a6d8 fixed an issue which caused by the outdated env->tsc value, but the fix lead to cpu_synchronize_all_states called twice during live migration. The cpu_synchronize_all_states takes about 130us for a VM which has 4 vcpus, it's a bit expensive. This patch use a light weight inter

[Qemu-devel] [RESEND 0/2] Optimze the env->tsc update operation

2015-10-29 Thread Liang Li
This patch aims for reducing the live migration downtime. It updates the env->tsc value when stopping kvmclock with a ligth weight interface, rather than using 'cpu_synchronize_all_states', which takes more time. For a VM with 4 CPUs, this path can help to reduce the VM downtime about 100us. Lian

Re: [Qemu-devel] [PATCH v3 4/5] xlnx-zynqmp: Connect the SPI devices

2015-10-29 Thread Frederic Konrad
On 29/10/2015 03:00, Peter Crosthwaite wrote: > On Wed, Oct 28, 2015 at 10:32 AM, Alistair Francis < > alistair.fran...@xilinx.com> wrote: > >> Connect the Xilinx SPI device to the ZynqMP model. >> >> > "devices" > > >> Signed-off-by: Alistair Francis >> --- >> V3: >> - Expose the SPI Bus as part

Re: [Qemu-devel] [PATCH] fix bad indentation in pcie_cap_slot_write_config()

2015-10-29 Thread Cao jin
On 10/29/2015 04:07 PM, Michael Tokarev wrote: It is a general common sense maybe, I dunno. There's lot of code which does not comply with the coding styles, and at the very least, when you change just that without actually changing the code, git blame stops working, showing your non- change

Re: [Qemu-devel] How to specify the full block driver tree on the CLI ?

2015-10-29 Thread Kevin Wolf
Am 29.10.2015 um 09:15 hat Daniel P. Berrange geschrieben: > On Thu, Oct 29, 2015 at 09:11:15AM +0100, Kevin Wolf wrote: > > In qemu proper, you can use a dot syntax for -drive instead: > > > > qemu-system-x86_64 -drive \ > > driver=luks,\ > > secret=x,\ > > file.driver=file,\ > >

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-29 Thread Lan Tianyu
On 2015年10月29日 14:58, Alexander Duyck wrote: > > Your code was having to do a bunch of shuffling in order to get things > set up so that you could bring the interface back up. I would argue > that it may actually be faster at least on the bring-up to just drop the > old rings and start over since

Re: [Qemu-devel] [PATCH v3 8/9] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-29 Thread Roman Kagan
On Wed, Oct 28, 2015 at 06:41:45PM +0100, Paolo Bonzini wrote: > Hi Andrey, > > just one question. Is kvm_arch_set_irq actually needed? I think > everything should work fine without it. Can you check? If so, I can > remove it myself and revert the patch that introduced the hook. While Andrey

Re: [Qemu-devel] [PATCH v3 8/9] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-29 Thread Andrey Smetanin
On 10/28/2015 08:41 PM, Paolo Bonzini wrote: Hi Andrey, just one question. Is kvm_arch_set_irq actually needed? I think everything should work fine without it. Can you check? If so, I can remove it myself and revert the patch that introduced the hook. Hi Paolo, I have checked that Hyper-

Re: [Qemu-devel] [PATCH v3 0/5] linux-user: manage SOCK_PACKET socket type

2015-10-29 Thread Laurent Vivier
Le 29/10/2015 00:12, Peter Maydell a écrit : > On 28 October 2015 at 20:40, Laurent Vivier wrote: >> This is obsolete, but if we want to use dhcp with some distros (like debian >> ppc 8.2 jessie), we need it. >> >> bind() uses an interface name instead an interface index, and socket() >> needs n

Re: [Qemu-devel] [PATCH] exec: silence hugetlbfs warning under qtest

2015-10-29 Thread Michael S. Tsirkin
On Tue, Oct 27, 2015 at 05:29:43PM +0100, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > vhost-user-test prints a warning. A test should not need to run on > hugetlbfs, let's silence the warning under qtest. Unfortunately, the > condition can't check on qtest_enabled() or qtest_

Re: [Qemu-devel] [PATCH][TRIVIAL] spice: fix checking for surface bpp match

2015-10-29 Thread Gerd Hoffmann
On Do, 2015-10-29 at 11:10 +0300, Michael Tokarev wrote: > 22.09.2015 10:41, Michael Tokarev wrote: > > 17.09.2015 19:18, Léo Grange wrote: > >> Ping, as I had no feedback about this small patch. > >> Please tell me if I need to do anything else. > > > > Hello! > > > > I've seen initial version o

Re: [Qemu-devel] [PATCH v3 2/6] e1000: Trivial implementation of various MAC registers

2015-10-29 Thread Leonid Bloch
On Thu, Oct 29, 2015 at 5:04 AM, Jason Wang wrote: > > > On 10/28/2015 11:31 PM, Leonid Bloch wrote: >> These registers appear in Intel's specs, but were not implemented. >> These registers are now implemented trivially, i.e. they are initiated >> with zero values, and if they are RW, they can be

[Qemu-devel] [PULL 00/16] virtio, pc, memory: fixes+features for 2.5

2015-10-29 Thread Michael S. Tsirkin
The following changes since commit 496fedddce9a575111df4f912fb9e361037531ed: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2015-10-28 15:08:36 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_ups

[Qemu-devel] [PULL 01/16] vhost-user: cleanup struct size math

2015-10-29 Thread Michael S. Tsirkin
We are using local msg structures everywhere, use them for sizeof as well. Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 0aa8e0d..dce4dd3 1006

[Qemu-devel] [PULL 02/16] vhost-user: cleanup msg size math

2015-10-29 Thread Michael S. Tsirkin
We are sending msg fields, use sizeof on these and not on local variables which happen to have a matching type. Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c i

[Qemu-devel] [PULL 04/16] pc: memhp: do not emit inserting event for coldplugged DIMMs

2015-10-29 Thread Michael S. Tsirkin
From: Igor Mammedov currently acpi_memory_plug_cb() sets is_inserting for cold- and hot-plugged DIMMs as result ASL MHPD.MSCN() method issues device check even for every coldplugged DIMM. There isn't much harm in it but if we try to unplug such DIMM, OSPM will issue device check intstead of devic

[Qemu-devel] [PULL 03/16] vhost-user-test: fix up rhel6 build

2015-10-29 Thread Michael S. Tsirkin
Build on RHEL6 fails: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42875 Apparently unnamed unions couldn't use C99 named field initializers. Let's just name the payload union field. Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-test.c | 18 +- 1 file changed, 9 insert

[Qemu-devel] [PULL 07/16] virtio: switch to virtio_map

2015-10-29 Thread Michael S. Tsirkin
Drop use of the deprecated virtio_map_sg in virtio core. Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- hw/virtio/virtio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 943b990..4621570 100644 --- a/hw/virti

[Qemu-devel] [PULL 05/16] mmap-alloc: fix error handling

2015-10-29 Thread Michael S. Tsirkin
Existing callers are checking for MAP_FAILED, so we should return that on error. Reported-by: Paolo Bonzini Signed-off-by: Michael S. Tsirkin --- util/mmap-alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c index 1394269..c37acb

[Qemu-devel] [PULL 06/16] virtio: introduce virtio_map

2015-10-29 Thread Michael S. Tsirkin
virtio_map_sg currently fails if one of the entries it's mapping is contigious in GPA but not HVA address space. Introduce virtio_map which handles this by splitting sg entries. This new API generally turns out to be a good idea since it's harder to misuse: at least in one case the existing one w

[Qemu-devel] [PULL 15/16] remove function during multi-function hot-add

2015-10-29 Thread Michael S. Tsirkin
From: Cao jin In case user want to cancel the hot-add operation, should roll back, device_del the added function that still don`t work. Signed-off-by: Cao jin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pcie.c | 23 ++- 1 file changed, 18

[Qemu-devel] [PULL 10/16] virtio-scsi: convert to virtqueue_map

2015-10-29 Thread Michael S. Tsirkin
Note: virtqueue_map already validates input so virtio-scsi does not have to. Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- hw/scsi/virtio-scsi.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c

[Qemu-devel] [PULL 09/16] virtio-serial: convert to virtio_map

2015-10-29 Thread Michael S. Tsirkin
This also fixes a minor bug: -virtqueue_map_sg(port->elem.out_sg, port->elem.out_addr, - port->elem.out_num, 1); is wrong: out_sg is not written so should not be marked dirty. Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- hw/cha

[Qemu-devel] [PULL 13/16] Revert "memhp: extend address auto assignment to support gaps"

2015-10-29 Thread Michael S. Tsirkin
This reverts commit df0acded19ec4b826aa095cfc19d341bd66fafd3. There's no point to it now that the only user has been reverted. Signed-off-by: Michael S. Tsirkin --- include/hw/mem/pc-dimm.h | 7 +++ hw/i386/pc.c | 3 +-- hw/mem/pc-dimm.c | 15 ++- hw/ppc/sp

[Qemu-devel] [PULL 11/16] virtio: drop virtqueue_map_sg

2015-10-29 Thread Michael S. Tsirkin
Deprecated in favor of virtqueue_map. Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- include/hw/virtio/virtio.h | 2 -- hw/virtio/virtio.c | 7 --- 2 files changed, 9 deletions(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 9d9abb4..

Re: [Qemu-devel] proposal: new qemu-arm mailing list

2015-10-29 Thread Sergey Fedorov
On 27.10.2015 14:02, Edgar E. Iglesias wrote: > On Tue, Oct 27, 2015 at 10:15:32AM +, Peter Maydell wrote: >> Hi; it's been suggested to me that it would be helpful to have a >> qemu-arm mailing list, along the lines of the existing qemu-ppc >> and qemu-block lists. The idea would be to get peo

[Qemu-devel] [PULL 08/16] virtio-blk: convert to virtqueue_map

2015-10-29 Thread Michael S. Tsirkin
Drop deprecated use of virtqueue_map_sg. Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- hw/block/virtio-blk.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 8beb26b..3e230de 100644 --- a/hw/block/virt

[Qemu-devel] [PULL 12/16] Revert "pc: memhp: force gaps between DIMM's GPA"

2015-10-29 Thread Michael S. Tsirkin
This reverts commit aa8580cddf011e8cedcf87f7a0fdea7549fc4704. As described in http://article.gmane.org/gmane.comp.emulators.qemu/371432 that commit causes linux guests to crash on memory hot-unplug. The original problem it's trying to solve has now been addressed within virtio. Signed-off-by: Mi

[Qemu-devel] [PATCH 1/2] checkpatch: Eliminate false positive in case of comma-space-square bracket

2015-10-29 Thread Leonid Bloch
Previously, an error was printed in cases such as: { [1] = 5, [2] = 6 } The space passed OK after a curly brace, but not after a comma. Now, a space before a square bracket is allowed, if a comma comes before it. Signed-off-by: Leonid Bloch --- scripts/checkpatch.pl | 4 +++- 1 file changed, 3 i

[Qemu-devel] [PATCH 2/2] checkpatch: Eliminate false positive in case of space before square bracket in a definition

2015-10-29 Thread Leonid Bloch
Now, macro definition such as "#define abc(x) [x] = y" should pass without an error. Signed-off-by: Leonid Bloch --- scripts/checkpatch.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 455d94b..e7d9cce 100755 --- a/scripts/checkpatch.pl

[Qemu-devel] [PULL 14/16] tests/vhost-user-bridge: add vhost-user bridge application

2015-10-29 Thread Michael S. Tsirkin
From: Victor Kaplansky The test existing in QEMU for vhost-user feature is good for testing the management protocol, but does not allow actual traffic. This patch proposes Vhost-User Bridge application, which can serve the QEMU community as a comprehensive test by running real internet traffic by

Re: [Qemu-devel] [PULL] Advance pc after recognizing a breakpoint

2015-10-29 Thread Peter Maydell
On 28 October 2015 at 18:01, Richard Henderson wrote: > Just the one patch in this set. > > > r~ > > > The following changes since commit 496fedddce9a575111df4f912fb9e361037531ed: > > Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into > staging (2015-10-28 15:08:36 +

[Qemu-devel] [PULL 16/16] enable multi-function hot-add

2015-10-29 Thread Michael S. Tsirkin
From: Cao jin Enable PCIe device multi-function hot-add, just ensure function 0 is added last, then driver will get the notification to scan the slot. Signed-off-by: Cao jin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pci.h | 1 + hw/pci/pci.c

[Qemu-devel] [PATCH 0/2] checkpatch: Fixing two cases of false positives in checkpatch.pl

2015-10-29 Thread Leonid Bloch
This series addresses two cases where errors were printed if whitespaces appeared in front of a square bracket in places where there should be no problem with such placements (please see messages of individual commits). Leonid Bloch (2): checkpatch: Eliminate false positive in case of comma-spac

Re: [Qemu-devel] [PATCH v3 8/9] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-29 Thread Paolo Bonzini
On 29/10/2015 09:45, Roman Kagan wrote: > While Andrey is testing it, I'd like to ask similar question re. MSI: > why is there a "shortcut" for KVM_IRQ_ROUTING_MSI case (which we > basically modelled after) when it would probably get handled through > ->set handler in irqfd_inject() too? Because

Re: [Qemu-devel] [PATCH v3 2/6] e1000: Trivial implementation of various MAC registers

2015-10-29 Thread Jason Wang
On 10/29/2015 05:33 PM, Leonid Bloch wrote: > On Thu, Oct 29, 2015 at 5:04 AM, Jason Wang wrote: >> >> On 10/28/2015 11:31 PM, Leonid Bloch wrote: >>> These registers appear in Intel's specs, but were not implemented. >>> These registers are now implemented trivially, i.e. they are initiated >>>

[Qemu-devel] [PATCH] vhost user: fix documentation of log atomic elements

2015-10-29 Thread Victor Kaplansky
Current implementation in hw/virtio/vhost.c accesses the log by 32-bit wide chunks in host native bit and byte endianness. Accessing the log by 8-bit wide chunks, as the spec suggests, will be broken on big-endian hosts. This commit changes the spec to match the implementation. Signed-off-by: Vic

Re: [Qemu-devel] [PATCH v3 2/6] e1000: Trivial implementation of various MAC registers

2015-10-29 Thread Leonid Bloch
On Thu, Oct 29, 2015 at 12:01 PM, Jason Wang wrote: > > > On 10/29/2015 05:33 PM, Leonid Bloch wrote: >> On Thu, Oct 29, 2015 at 5:04 AM, Jason Wang wrote: >>> >>> On 10/28/2015 11:31 PM, Leonid Bloch wrote: These registers appear in Intel's specs, but were not implemented. These regist

Re: [Qemu-devel] [PATCH 1/2] dataplane: simplify indirect descriptor read

2015-10-29 Thread Igor Mammedov
On Wed, 28 Oct 2015 17:48:02 +0200 "Michael S. Tsirkin" wrote: > Use address_space_read to make sure we handle the case of an indirect > descriptor crossing DIMM boundary correctly. > > Signed-off-by: Michael S. Tsirkin > --- > > Warning: compile-tested only. > > hw/virtio/dataplane/vring.c

Re: [Qemu-devel] [PATCH 1/2] dataplane: simplify indirect descriptor read

2015-10-29 Thread Igor Mammedov
On Wed, 28 Oct 2015 17:48:02 +0200 "Michael S. Tsirkin" wrote: > Use address_space_read to make sure we handle the case of an indirect > descriptor crossing DIMM boundary correctly. > > Signed-off-by: Michael S. Tsirkin Tested-by: Igor Mammedov > --- > > Warning: compile-tested only. > > h

Re: [Qemu-devel] [PATCH 2/2] dataplane: support non-contigious s/g

2015-10-29 Thread Igor Mammedov
On Wed, 28 Oct 2015 17:48:04 +0200 "Michael S. Tsirkin" wrote: > bring_map currently fails if one of the entries it's mapping is > contigious in GPA but not HVA address space. Introduce a mapped_len > parameter so it can handle this, returning the actual mapped length. > > This will still fail

Re: [Qemu-devel] [PATCH 1/2] Revert "pc: memhp: force gaps between DIMM's GPA"

2015-10-29 Thread Igor Mammedov
On Wed, 28 Oct 2015 18:57:00 +0200 "Michael S. Tsirkin" wrote: > This reverts commit aa8580cddf011e8cedcf87f7a0fdea7549fc4704. > > As described in > http://article.gmane.org/gmane.comp.emulators.qemu/371432 > that commit causes linux guests to crash on memory hot-unplug. > > The original proble

Re: [Qemu-devel] [PATCH 2/2] Revert "memhp: extend address auto assignment to support gaps"

2015-10-29 Thread Igor Mammedov
On Wed, 28 Oct 2015 18:57:03 +0200 "Michael S. Tsirkin" wrote: > This reverts commit df0acded19ec4b826aa095cfc19d341bd66fafd3. > > There's no point to it now that the only user has been reverted. > > Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov > --- > include/hw/mem/pc-dimm

Re: [Qemu-devel] [PULL 00/16] virtio, pc, memory: fixes+features for 2.5

2015-10-29 Thread Peter Maydell
On 29 October 2015 at 09:39, Michael S. Tsirkin wrote: > The following changes since commit 496fedddce9a575111df4f912fb9e361037531ed: > > Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into > staging (2015-10-28 15:08:36 +) > > are available in the git repository at:

[Qemu-devel] [PATCH] monitor: Plug memory leak on QMP error

2015-10-29 Thread Markus Armbruster
Leak introduced in commit 8a4f501..710aec9, v2.4.0. Signed-off-by: Markus Armbruster --- monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/monitor.c b/monitor.c index 301a143..c59e85b 100644 --- a/monitor.c +++ b/monitor.c @@ -3862,6 +3862,7 @@ static void handle_qmp_command(JSONMess

Re: [Qemu-devel] [PATCH] qemu-iotests: fix cleanup of background processes

2015-10-29 Thread Jeff Cody
On Wed, Oct 28, 2015 at 10:08:42PM -0600, Eric Blake wrote: > On 10/28/2015 07:15 PM, Jeff Cody wrote: > > Commit 934659c switched the iotests to run qemu and qemu-nbd from a bash > > subshell, in order to catch segfaults. Unfortunately, this means the > > process PID cannot be captured via '$!'.

Re: [Qemu-devel] [PATCH 28/34] block: Introduce bs->explicit_options

2015-10-29 Thread Kevin Wolf
Am 15.05.2015 um 19:47 hat Max Reitz geschrieben: > 3) In bdrv_open(): > The QDict is just the one given to bdrv_open(). > > 3a) bdrv_open() call from bdrv_append_temp_snapshot(): > "file.driver" and "file.filename" are set, and these are the only > options in the whole QDict. Well... I'd argue th

[Qemu-devel] [PATCH v2 0/1] qemu-iotests: fix cleanup of background processes

2015-10-29 Thread Jeff Cody
Changes from v1: * use 'read' instead of 'cat' (thanks Eric) * quote variable in variable test (thanks Eric) Jeff Cody (1): qemu-iotests: fix cleanup of background processes tests/qemu-iotests/common.config | 14 -- tests/qemu-iotests/common.qemu | 17 +++-- tests/qe

[Qemu-devel] [PATCH V3] hw/virtio: Add PCIe capability to virtio devices

2015-10-29 Thread Marcel Apfelbaum
The virtio devices are converted to PCI-Express if they are plugged into a PCI-Express bus and the 'modern' protocol is enabled. Devices plugged directly into the Root Complex as Integrated Endpoints remain PCI. Signed-off-by: Marcel Apfelbaum --- v2 -> v3: - Addressed Michael S. Tsirkin's comm

[Qemu-devel] [PATCH v2 1/1] qemu-iotests: fix cleanup of background processes

2015-10-29 Thread Jeff Cody
Commit 934659c switched the iotests to run qemu and qemu-nbd from a bash subshell, in order to catch segfaults. Unfortunately, this means the process PID cannot be captured via '$!'. We stopped killing qemu and qemu-nbd processes, leaving a lot of orphaned, running qemu processes after executing i

Re: [Qemu-devel] [PATCH] migration: Introduce migration_in_completion()

2015-10-29 Thread Juan Quintela
Pavel Fedin wrote: > Hello! > >> Power people have a similar problem with its hashed page tables, they >> integrated their own save_live implementation because they are too big >> for the last stage. You can look there for inspiration. > > I examined their code. Interesting, and, indeed, it ope

Re: [Qemu-devel] [PATCH] vhost user: fix documentation of log atomic elements

2015-10-29 Thread Victor Kaplansky
After looking into linux driver code at hw/virtio/vhost.c, I see that the driver does what spec says. Thus spec the should remain as is, and QEMU need to be fixed on big-endian machines by changing the code in hw/virtio/vhost.c --Victor - Original Message - From: "Victor Kaplansky" To: q

[Qemu-devel] [PATCH 0/4] json-streamer: Fix up code to limit nesting and size

2015-10-29 Thread Markus Armbruster
We limit nesting depth and input size to defend against input triggering excessive heap or stack memory use (commit 29c75dd json-streamer: limit the maximum recursion depth and maximum token count). This limiting is flawed in multiple ways. Fix it up some. Not yet fixed: this JSON parser is an a

[Qemu-devel] [PATCH 4/4] json-streamer: Limit number of tokens in addition to total size

2015-10-29 Thread Markus Armbruster
Commit 29c75dd "json-streamer: limit the maximum recursion depth and maximum token count" attempts to guard against excessive heap usage by limiting total token size (it says "token count", but that's a lie). Total token size is a rather imprecise predictor of heap usage: many small tokens use mor

[Qemu-devel] [PATCH 1/4] json-streamer: Apply nesting limit more sanely

2015-10-29 Thread Markus Armbruster
The nesting limit from commit 29c75dd "json-streamer: limit the maximum recursion depth and maximum token count" applies separately to braces and brackets. This makes no sense. Apply it to their sum, because that's actually a measure of recursion depth. Signed-off-by: Markus Armbruster --- qob

[Qemu-devel] [PATCH 2/4] json-streamer: Don't crash when input exceeds nesting limit

2015-10-29 Thread Markus Armbruster
We limit nesting depth and input size to defend against input triggering excessive heap or stack memory use (commit 29c75dd json-streamer: limit the maximum recursion depth and maximum token count). However, when the nesting limit is exceeded, parser_context_peek_token()'s assertion fails. Broken

[Qemu-devel] [PATCH 3/4] check-qjson: Add test for JSON nesting depth limit

2015-10-29 Thread Markus Armbruster
This would have prevented the regression mentioned in the previous commit. Signed-off-by: Markus Armbruster --- tests/check-qjson.c | 29 + 1 file changed, 29 insertions(+) diff --git a/tests/check-qjson.c b/tests/check-qjson.c index 1cfffa5..2579d79 100644 --- a/tes

[Qemu-devel] [PATCH 0/2] Don't allow snapshots if the overlay has parent nodes

2015-10-29 Thread Alberto Garcia
There are several sanity checks for the 'blockdev-snapshot' command, but none covers the use of a file BDS as the overlay node. { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'dr

[Qemu-devel] [PATCH 2/2] block: test 'blockdev-snapshot' using a file BDS as the overlay

2015-10-29 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/qemu-iotests/085 | 12 +++- tests/qemu-iotests/085.out | 4 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085 index 9484117..ccde2ae 100755 --- a/tests/qemu-iotests/085 +++ b/tes

[Qemu-devel] [PATCH 1/2] block: Don't allow snapshots if the overlay has parent nodes

2015-10-29 Thread Alberto Garcia
This addresses scenarios where the overlay node of the 'blockdev-snapshot' parameter is a child of an existing node, such as this one: { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'driver': 'f

Re: [Qemu-devel] [PULL v2 00/14] QMP and QObject patches

2015-10-29 Thread Markus Armbruster
Eric Blake writes: > On 10/28/2015 09:07 AM, Peter Maydell wrote: > >>> glib: add compatibility interface for g_hash_table_add() >>> monitor: Turn monitor_qapi_event_state[] into a hash table > >> >> CCqga/commands-posix.o >> In file included from /Users/pm215/src/qemu-for-merg

Re: [Qemu-devel] [PATCH] migration: Introduce migration_in_completion()

2015-10-29 Thread Pavel Fedin
Hello! > ok, your problem here is that you modify ram. Could you take a look at > how vhost manage this? It is done at migration_bitmap_sync(), and it > just marks the pages that are dirty. Hm, interesting... I see it hooks into memory_region_sync_dirty_bitmap(). Sorry for maybe lame questio

Re: [Qemu-devel] [PATCH v2] pc: memhp: enforce minimal 128Mb alignment for pc-dimm

2015-10-29 Thread Igor Mammedov
On Tue, 27 Oct 2015 14:36:35 -0200 Eduardo Habkost wrote: > On Tue, Oct 27, 2015 at 10:14:56AM +0100, Igor Mammedov wrote: > > On Tue, 27 Oct 2015 10:53:08 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Oct 27, 2015 at 09:48:37AM +0100, Igor Mammedov wrote: > > > > On Tue, 27 Oct 2015

Re: [Qemu-devel] [PULL v2 11/14] glib: add compatibility interface for g_hash_table_add()

2015-10-29 Thread Markus Armbruster
Markus Armbruster writes: > The next commit will use it. > > Signed-off-by: Markus Armbruster > Reviewed-by: Eric Blake > --- > include/glib-compat.h | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/include/glib-compat.h b/include/glib-compat.h > index fb25f43..6d13b5f 100644 >

Re: [Qemu-devel] [PATCH v5 28/33] nvdimm acpi: support Get Namespace Label Size function

2015-10-29 Thread Stefan Hajnoczi
On Thu, Oct 29, 2015 at 10:16:14AM +0800, Xiao Guangrong wrote: > > > On 10/29/2015 12:41 AM, Stefan Hajnoczi wrote: > >On Wed, Oct 28, 2015 at 10:26:26PM +, Xiao Guangrong wrote: > >>+struct nvdimm_func_in_get_label_data { > >>+uint32_t offset; /* the offset in the namespace label data a

Re: [Qemu-devel] proposal: new qemu-arm mailing list

2015-10-29 Thread Peter Maydell
On 27 October 2015 at 10:15, Peter Maydell wrote: > Hi; it's been suggested to me that it would be helpful to have a > qemu-arm mailing list, along the lines of the existing qemu-ppc > and qemu-block lists. The idea would be to get people to cc the > list with their ARM related patches, so it woul

Re: [Qemu-devel] [PATCH 01/11] trace: fix documentation

2015-10-29 Thread Christian Borntraeger
Am 28.10.2015 um 16:15 schrieb Denis V. Lunev: > On 10/26/2015 11:05 PM, Christian Borntraeger wrote: >> Am 26.10.2015 um 18:10 schrieb Denis V. Lunev: >>> From: Paolo Bonzini >>> >>> Mention the ftrace backend too. >>> >>> Signed-off-by: Paolo Bonzini >>> Signed-off-by: Denis V. Lunev >>> Revie

[Qemu-devel] [PATCH v2 2/8] hw/arm/virt-acpi-build: Add GPIO controller in ACPI DSDT table

2015-10-29 Thread Shannon Zhao
Add GPIO controller in ACPI DSDT table. It can be used for gpio event. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 1aaff1f.

[Qemu-devel] [PATCH v2 0/8] Add system_powerdown support on ARM for ACPI and DT

2015-10-29 Thread Shannon Zhao
ACPI SPEC 5.0 defines GPIO-signaled ACPI Events for Hardware-reduced platforms(like ARM). It uses GPIO pin to trigger an event to the guest. For QEMU, here we add PL061 GPIO controller and use PIN 3 for system_powerdown, reserving PIN 0, 1, 2 for PCI hotplug, CPU hotplug and memory hotplug. This p

[Qemu-devel] [PATCH v2 1/8] hw/arm/virt: Add a GPIO controller

2015-10-29 Thread Shannon Zhao
ACPI 5.0 supports GPIO-signaled ACPI Events. This can be used for powerdown, hotplug evnets. Add a GPIO controller in machine virt, to support powerdown, maybe can be used for cpu hotplug. And here we use pl061. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/arm/virt.c |

[Qemu-devel] [PATCH v2 4/8] hw/acpi/aml-build: Add GPIO Connection Descriptor

2015-10-29 Thread Shannon Zhao
Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/acpi/aml-build.c | 61 + include/hw/acpi/aml-build.h | 20 +++ 2 files changed, 81 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 0d4b324..2

[Qemu-devel] [PATCH v2 3/8] hw/arm/virt-acpi-build: Add power button device in ACPI DSDT table

2015-10-29 Thread Shannon Zhao
Add power button device in ACPI DSDT table. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index ffb9b91..80ce51c 100644 --- a/hw/arm/virt

Re: [Qemu-devel] [PATCH] monitor: Plug memory leak on QMP error

2015-10-29 Thread Eric Blake
On 10/29/2015 05:15 AM, Markus Armbruster wrote: > Leak introduced in commit 8a4f501..710aec9, v2.4.0. > > Signed-off-by: Markus Armbruster > --- > monitor.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Eric Blake > > diff --git a/monitor.c b/monitor.c > index 301a143..c59e85b 100644

[Qemu-devel] [PATCH v2 6/8] hw/arm/virt-acpi-build: Add _E03 for Power Button

2015-10-29 Thread Shannon Zhao
Here GPIO pin 3 is used for Power Button, add _E03 in ACPI DSDT table. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 80ce51c..54f88

[Qemu-devel] [PULL v3 04/14] qfloat qint: Make conversion from QObject * accept null

2015-10-29 Thread Markus Armbruster
qobject_to_qfloat() and qobject_to_qint() crash on null, which is a trap for the unwary. Return null instead, and simplify a few callers. Signed-off-by: Markus Armbruster Message-Id: <1444918537-18107-5-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Luiz Capitulino ---

[Qemu-devel] [PATCH v2 8/8] hw/arm/virt: Add gpio-keys node for Poweroff using DT

2015-10-29 Thread Shannon Zhao
Add a gpio-keys node. This is used for Poweroff for the systems which use DT not ACPI. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/arm/virt.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 6f1b9d6..75a3a5c 100644 --- a

  1   2   3   >