[Qemu-devel] [PATCH QEMU] target-arm: Add support for SPSR_(ABT|UND|IRQ|FIQ)

2015-10-15 Thread Soren Brinkmann
Signed-off-by: Soren Brinkmann --- Hi, I recently came across some code that caused undefined instruction exceptions when executing instructions 'mrs x11, spsr_abt' and the like. I'm not sure I get the full picture, but it seems QEMU already keeps the state for those SPSR registers and all th

[Qemu-devel] [PATCH 1/3] log: improve performance of qemu_log and qemu_log_mask if disabled

2015-10-15 Thread Denis V. Lunev
The patch is intended to avoid to perform any operation including calculation of log function arguments when the log is not enabled due to various reasons. Functions qemu_log and qemu_log_mask are replaced with variadic macros. Unfortunately the code is not C99 compatible and we can not use portab

[Qemu-devel] [PATCH 3/3] log: adds a timestamp to each log entry

2015-10-15 Thread Denis V. Lunev
From: Pavel Butsykin This patch is written as an addition to the previous one with logging of QPM commands. This information (the moment of the event) is very useful to match guest problems with actions performing by management software. example: 2015-10-14 17:15:25.644 qmp event: { "timesta

[Qemu-devel] [PATCH 0/3] QEMU logging improvements

2015-10-15 Thread Denis V. Lunev
The following is done: - QMP/HMP events are now logged - timestamp is added to the log message - arguments of qemu_log/qemu_log_mask are not calculated now if the log is disabled These patches are sent in the hope that it is not too late for QEMU 2.5. Logging subsystem in QEMU looks rudimentary

[Qemu-devel] [PATCH 2/3] log: report hmp/qmp command and qmp event

2015-10-15 Thread Denis V. Lunev
From: Pavel Butsykin This log would be very welcome for long-term diagnostics of the system in the production. This log is at least necessary to understand what has been happened on the system and to identify issues at higher-level subsystems (libvirt, etc). Signed-off-by: Pavel Butsykin Signed

Re: [Qemu-devel] [PATCH 2/3] ui/curses: Support line graphics chars on -curses mode

2015-10-15 Thread Gerd Hoffmann
On Do, 2015-10-15 at 08:58 +0900, OGAWA Hirofumi wrote: > Gerd Hoffmann writes: > > > On Mi, 2015-10-14 at 20:37 +0900, OGAWA Hirofumi wrote: > >> This converts vga code to curses code in console_write_bh(). > >> > >> With this changes, we can see line graphics (for example, dialog uses) > >> co

[Qemu-devel] [PULL 04/12] qapi: Drop redundant alternate-good test

2015-10-15 Thread Markus Armbruster
From: Eric Blake The alternate-good.json test was already covered by qapi-schema-test.json. As future commits will be tweaking how alternates are laid out, removing the duplicate test now reduces churn. Signed-off-by: Eric Blake Message-Id: <1444710158-8723-4-git-send-email-ebl...@redhat.com>

[Qemu-devel] [PULL 03/12] qapi: Prepare for errors during check()

2015-10-15 Thread Markus Armbruster
From: Eric Blake The next few patches will start migrating error checking from ad hoc parse methods into the QAPISchema*.check() methods. But for an error message to display, we first have to fix the overall 'try' to catch those errors. We also want to enable a few more assertions, such as maki

[Qemu-devel] [PULL 09/12] qapi: Don't use info as witness of implicit object type

2015-10-15 Thread Markus Armbruster
From: Eric Blake A future patch will enable error reporting from the various QAPISchema*.check() methods. But to report an error related to an implicit type, we'll need to associate a location with the type (the same location as the top-level entity that is causing the creation of the implicit t

[Qemu-devel] [PULL 01/12] qapi: Fix regression with '-netdev help'

2015-10-15 Thread Markus Armbruster
From: Eric Blake Commit e36c714e causes 'qemu -netdev help' to dump core, because the call to visit_end_union() is no longer conditional on whether *obj was allocated. Reported by Marc-André Lureau Signed-off-by: Eric Blake Message-Id: <1444861825-19256-1-git-send-email-ebl...@redhat.com> [Com

[Qemu-devel] [PULL 10/12] qapi: Lazy creation of array types

2015-10-15 Thread Markus Armbruster
From: Eric Blake Commit ac88219a had several TODO markers about whether we needed to automatically create the corresponding array type alongside any other type. It turns out that most of the time, we don't! There are a few exceptions: 1) We have a few situations where we use an array type in in

[Qemu-devel] [PULL 05/12] qapi: Move empty-enum to compile-time test

2015-10-15 Thread Markus Armbruster
From: Eric Blake Rather than just asserting that we can parse an empty enum, let's also make sure we can compile it, by including it in qapi-schema-test. Signed-off-by: Eric Blake Message-Id: <1444710158-8723-5-git-send-email-ebl...@redhat.com> Signed-off-by: Markus Armbruster --- tests/Makef

[Qemu-devel] [PULL 08/12] qapi: Drop redundant args-member-array test

2015-10-15 Thread Markus Armbruster
From: Eric Blake qapi-schema-test already ensures that we can correctly compile an array of enums (__org.qemu_x-command), an array of builtins (UserDefNativeListUnion), and an array of structs (again __org.qemu_x-command). That means args-member-array is not adding any additional parse-only test

[Qemu-devel] [PULL 06/12] qapi: Drop redundant returns-int test

2015-10-15 Thread Markus Armbruster
From: Eric Blake qapi-schema-test was already testing that we could have a command returning int, but burned a command name in the whitelist. Merge the redundant positive test returns-int, and pick a name that reduces the whitelist size. Signed-off-by: Eric Blake Message-Id: <1444710158-8723-6-

[Qemu-devel] [PULL 07/12] qapi: Drop redundant flat-union-reverse-define test

2015-10-15 Thread Markus Armbruster
From: Eric Blake As of commit 8c3f8e77, we test compilation of forward references for a struct base type (UserDefOne), flat union base type (UserDefUnionBase), and flat union branch type (UserDefFlatUnion2). The only remaining forward reference being tested for parsing in flat-union-reverse-defin

[Qemu-devel] [PULL 00/04] seccomp branch queue

2015-10-15 Thread Eduardo Otubo
The following changes since commit c49d3411faae8ffaab8f7e5db47405a008411c10: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-10-12' into staging (2015-10-13 10:42:06 +0100) are available in the git repository at: git://github.com/otubo/qemu.git tags/pull-seccom

[Qemu-devel] [PULL 11/12] qapi: Create simple union type member earlier

2015-10-15 Thread Markus Armbruster
From: Eric Blake For simple unions, we were creating the implicit 'type' tag member during the QAPISchemaObjectTypeVariants constructor. This is different from every other implicit QAPISchemaEntity object, which get created by QAPISchema methods. Hoist the creation to the caller (renaming _make_

Re: [Qemu-devel] [PATCH] hw/mips_malta: Fix KVM PC initialisation

2015-10-15 Thread Aurelien Jarno
On 2015-10-12 17:54, James Hogan wrote: > Commit 71c199c81d29 ("mips_malta: provide ememsize env variable to > kernels") changed the meaning of loaderparams.ram_size to be the whole > of RAM rather than just the low part below where the boot code is placed > for KVM, but it didn't update the PC ini

[Qemu-devel] [PULL 02/04] configure: arm/aarch64: allow enable-seccomp

2015-10-15 Thread Eduardo Otubo
From: Andrew Jones This is a revert of ae6e8ef11e6cb, but with a bit of refactoring, and also specifically adding arm/aarch64, rather than all architectures. Currently, libseccomp code appears to also support mips, ppc, and s390. We could therefore allow qemu to enable seccomp for those platforms

[Qemu-devel] [PULL 03/04] Add argument filters to the seccomp sandbox

2015-10-15 Thread Eduardo Otubo
From: Namsun Ch'o Here's the v3 patch. I applied it and compiled QEMU, and it worked fine. Changes so far: v1 - Created argument filters for the madvise, shmget, and shmctl syscalls. v1 -> v2 - Added 5 new madvise flags which were present in the source code but not in the strace which I gen

[Qemu-devel] [PULL 12/12] qapi: Track location that created an implicit type

2015-10-15 Thread Markus Armbruster
From: Eric Blake A future patch will move some error checking from the parser to the various QAPISchema*.check() methods, which run only after parsing completes. It will thus be possible to create a python instance representing an implicit QAPI type that parses fine but will fail validation duri

[Qemu-devel] [PULL 01/04] libseccomp: add cacheflush to whitelist

2015-10-15 Thread Eduardo Otubo
From: Andrew Jones cacheflush is an arm-specific syscall that qemu built for arm uses. Add it to the whitelist. Signed-off-by: Andrew Jones Acked-by: Eduardo Otubo --- qemu-seccomp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index f9

[Qemu-devel] [PULL 04/04] Add syscalls for -runas and -chroot to the seccomp sandbox

2015-10-15 Thread Eduardo Otubo
From: Namsun Ch'o The seccomp sandbox doesn't whitelist setuid, setgid, or setgroups, which are needed for -runas to work. It also doesn't whitelist chroot, which is needed for the -chroot option. Unfortunately, QEMU enables seccomp before it drops privileges or chroots, so without these whitelis

[Qemu-devel] [PULL 00/12] QAPI patches

2015-10-15 Thread Markus Armbruster
The following changes since commit c49d3411faae8ffaab8f7e5db47405a008411c10: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-10-12' into staging (2015-10-13 10:42:06 +0100) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2015-10-15 f

Re: [Qemu-devel] [PATCH 1/1] migration: announce VM's new home just before VM is runnable

2015-10-15 Thread Amit Shah
On (Thu) 15 Oct 2015 [08:36:49], Juan Quintela wrote: > Amit Shah wrote: > > On (Wed) 14 Oct 2015 [17:12:44], Michael S. Tsirkin wrote: > >> On Wed, Oct 14, 2015 at 03:21:15PM +0200, Juan Quintela wrote: > >> > Amit Shah wrote: > >> > > We were announcing the dest host's IP as our new IP a bit to

[Qemu-devel] [PULL 02/12] qapi: Use predicate callback to determine visit filtering

2015-10-15 Thread Markus Armbruster
From: Eric Blake Previously, qapi-types and qapi-visit filtered out implicit objects during visit_object_type() by using 'info' (works since implicit objects do not [yet] have associated info); meanwhile qapi-introspect filtered out all schema types on the first pass by returning a python type fr

Re: [Qemu-devel] [PATCH 2/3] ui/curses: Support line graphics chars on -curses mode

2015-10-15 Thread OGAWA Hirofumi
Gerd Hoffmann writes: >> vga_to_curses[] is filled by curses_setup(). So if no -curses option, I >> think it should have no change to behavior. (BTW, there is no common >> section like kernel in qemu build, right? i.e. no need initializer to >> global value.) > > Ok, curses and gtk can't be acti

Re: [Qemu-devel] [PATCH 1/1] migration: announce VM's new home just before VM is runnable

2015-10-15 Thread Michael S. Tsirkin
On Thu, Oct 15, 2015 at 01:34:10PM +0530, Amit Shah wrote: > On (Thu) 15 Oct 2015 [08:36:49], Juan Quintela wrote: > > Amit Shah wrote: > > > On (Wed) 14 Oct 2015 [17:12:44], Michael S. Tsirkin wrote: > > >> On Wed, Oct 14, 2015 at 03:21:15PM +0200, Juan Quintela wrote: > > >> > Amit Shah wrote:

Re: [Qemu-devel] [PATCH 2/3] ui/curses: Support line graphics chars on -curses mode

2015-10-15 Thread OGAWA Hirofumi
OGAWA Hirofumi writes: >> Ok, curses and gtk can't be active at the same time. But for curses and >> vnc it is possible (qemu -curses -vnc :$display), and you probably get a >> dissorted vga text mode over vnc then. >> >> I think the mapping should happen in the curses code, when curses >> updat

Re: [Qemu-devel] [PATCH v4 2/3] hw/pci: Introduce pci_requester_id()

2015-10-15 Thread Pavel Fedin
Hello! > > diff --git a/stubs/pci.c b/stubs/pci.c > > new file mode 100644 > > index 000..3b13000 > > --- /dev/null > > +++ b/stubs/pci.c > > @@ -0,0 +1,16 @@ > > +/* > > + * QEMU architecture-specific PCI functions > > + * > > + * Copyright (c) 2015 Samsung Electronics Co., Ltd. > > + * Writ

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

2015-10-15 Thread Thomas Huth
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 function. Signed-off-by: Thomas Huth --- hw/displa

Re: [Qemu-devel] [PATCH 2/3] ui/curses: Support line graphics chars on -curses mode

2015-10-15 Thread Gerd Hoffmann
Hi, > From this call paths, graphic_hw_text_update() => console_write_ch() => > ->text_update() path is only used for -curses mode. What do you think? Oh, right, text mode curses update and text mode framebuffer rendering take completely separate code paths. Completely forgot that, I rarely lo

Re: [Qemu-devel] [PATCH 2/3] ui/curses: Support line graphics chars on -curses mode

2015-10-15 Thread Gerd Hoffmann
> > Also you don't need a init function, you can simply init the array with > > c99 initializers: > > > > chtype vga_to_curses[256] = { > > [0x04] = ACS_DIAMOND, > > [ ... ] > > }; > > This is not possible, because ACS_* is not constant (initialized by > reading from termcap or such). Ah,

Re: [Qemu-devel] Connecting netdev to emulated nics.

2015-10-15 Thread Jason Wang
On 10/15/2015 02:36 PM, sai pavan wrote: > Hi, > > I am debugging an issue, where through one of the nics I am not able > to connect to dtcp. > So to dig in deep, i was going thought net.c files, and ended-up > understanding little. > > So can i know how does a netdev connects to nic. > > nd_tabl

Re: [Qemu-devel] [PATCH v2] target-arm: Add MDCR_EL2

2015-10-15 Thread Sergey Fedorov
On 14.10.2015 22:34, Peter Maydell wrote: > On 14 October 2015 at 10:35, Sergey Fedorov wrote: >> On 13.10.2015 20:27, Peter Maydell wrote: >>> On 9 October 2015 at 10:43, Sergey Fedorov wrote: Signed-off-by: Sergey Fedorov --- Changes in v2: * Reset value is simply mad

Re: [Qemu-devel] [PATCH v4] fw_cfg: insert string blobs via qemu cmdline

2015-10-15 Thread Gerd Hoffmann
On Mi, 2015-10-14 at 16:22 +0200, Laszlo Ersek wrote: > Paolo, > > On 09/29/15 18:29, Gabriel L. Somlo wrote: > > Allow users to provide custom fw_cfg blobs with ascii string > > payloads specified directly on the qemu command line. > > > > Suggested-by: Jordan Justen > > Suggested-by: Laszlo Er

Re: [Qemu-devel] [PATCH v7 1/1] block/gluster: add support for multiple gluster backup volfile servers

2015-10-15 Thread Peter Krempa
On Wed, Oct 14, 2015 at 12:36:58 +0530, Prasanna Kumar Kalever wrote: > This patch adds a way to specify multiple volfile servers to the gluster > block backend of QEMU with tcp|rdma transport types and their port numbers. > > Problem: > > Currenly VM Image on gluster volume is specified like thi

Re: [Qemu-devel] [PATCH v4 2/3] hw/pci: Introduce pci_requester_id()

2015-10-15 Thread Michael S. Tsirkin
On Thu, Oct 15, 2015 at 11:54:57AM +0300, Pavel Fedin wrote: > Hello! > > > > diff --git a/stubs/pci.c b/stubs/pci.c > > > new file mode 100644 > > > index 000..3b13000 > > > --- /dev/null > > > +++ b/stubs/pci.c > > > @@ -0,0 +1,16 @@ > > > +/* > > > + * QEMU architecture-specific PCI functi

Re: [Qemu-devel] [PATCH v4 2/3] hw/pci: Introduce pci_requester_id()

2015-10-15 Thread Pavel Fedin
Hello! > Then I realized it's actually the PCI requester ID. > That, in turn, means it can just be a generic PCI API, > e.g. it's also used for assigning pci-x devices. Ok. So, will it be good if i place it in includes/hw/pci.h as static inline, similar to how it was done in v1? Kind regards,

Re: [Qemu-devel] [PATCH 2/3] ui/curses: Support line graphics chars on -curses mode

2015-10-15 Thread OGAWA Hirofumi
Gerd Hoffmann writes: >> (E.g. qemu is going to extend to use this for other purpose?) > > Unlikely. In theory other ui frontends could support vga text mode that > way. But text mode is a dying relic, people use either graphics or a > serial console these days, so I don't expect that to happen

[Qemu-devel] [PATCH v3] ui/curses: Support line graphics chars on -curses mode

2015-10-15 Thread OGAWA Hirofumi
This converts vga code to curses code in console_write_bh(). With this changes, we can see line graphics (for example, dialog uses) correctly. Signed-off-by: OGAWA Hirofumi --- include/ui/console.h |9 ++-- ui/console.c | 13 ui/curses.c | 53 +

Re: [Qemu-devel] [PATCH 2/3] ui/curses: Support line graphics chars on -curses mode

2015-10-15 Thread OGAWA Hirofumi
Gerd Hoffmann writes: >> > Also you don't need a init function, you can simply init the array with >> > c99 initializers: >> > >> > chtype vga_to_curses[256] = { >> > [0x04] = ACS_DIAMOND, >> > [ ... ] >> > }; >> >> This is not possible, because ACS_* is not constant (initialized by >> r

Re: [Qemu-devel] [PATCH v4 2/3] hw/pci: Introduce pci_requester_id()

2015-10-15 Thread Michael S. Tsirkin
On Thu, Oct 15, 2015 at 12:42:06PM +0300, Pavel Fedin wrote: > Hello! > > > Then I realized it's actually the PCI requester ID. > > That, in turn, means it can just be a generic PCI API, > > e.g. it's also used for assigning pci-x devices. > > Ok. So, will it be good if i place it in includes/h

[Qemu-devel] [PATCH v4] ui/curses: Support line graphics chars on -curses mode

2015-10-15 Thread OGAWA Hirofumi
This converts vga code to curses code in console_write_bh(). With this changes, we can see line graphics (for example, dialog uses) correctly. Signed-off-by: OGAWA Hirofumi --- include/ui/console.h |9 ++-- ui/console.c | 13 ui/curses.c | 54 +

[Qemu-devel] [Bug 1494350] Re: QEMU: causes vCPU steal time overflow on live migration

2015-10-15 Thread Markus Breitegger
Hi, I've seen the same issue with debian jessie. Compiled 4.2.3 from kernel.org with "make localyesconfig", no problem any more -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1494350 Title: QEMU:

[Qemu-devel] [PATCH] vmxnet3: Do not fill stats if device is inactive

2015-10-15 Thread Dana Rubin
From: Shmulik Ladkani Guest OS may issue VMXNET3_CMD_GET_STATS even before device was activated (for example in linux, after insmod but prior net-dev open). Accessing shared descriptors prior device activation is illegal as the VMXNET3State structures have not been fully initialized. As a resul

[Qemu-devel] [PATCH v5 0/3] Make KVM/MSI code device-ID-aware

2015-10-15 Thread Pavel Fedin
On ARM architecture ITS (Interrupt Translation Service), additionally to normal MSI data, uses also side-band device IDs. This series prepares the infrastructure to handling them. This small series is actually an extraction from vITS support RFC (https://lists.gnu.org/archive/html/qemu-devel/2015-

[Qemu-devel] [PATCH v5 3/3] kvm: Pass PCI device pointer to MSI routing functions

2015-10-15 Thread Pavel Fedin
In-kernel ITS emulation on ARM64 will require to supply requester IDs. These IDs can now be retrieved from the device pointer using new pci_requester_id() function. This patch adds pci_dev pointer to KVM GSI routing functions and makes callers passing it. x86 architecture does not use requester I

[Qemu-devel] [PATCH v5 2/3] hw/pci: Introduce pci_requester_id()

2015-10-15 Thread Pavel Fedin
For GICv3 ITS implementation we are going to use requester IDs in KVM IRQ routing code. This patch introduces reusable convenient way to obtain this ID from the device pointer. The new function is now used in some places, where the same calculation was used. MemTxAttrs.stream_id also renamed to re

[Qemu-devel] [PATCH v5 1/3] kvm: Make KVM_CAP_SIGNAL_MSI globally available

2015-10-15 Thread Pavel Fedin
This capability is useful to determine whether we can use KVM ITS emulation on ARM Signed-off-by: Pavel Fedin --- include/sysemu/kvm.h | 9 + kvm-all.c| 10 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h

Re: [Qemu-devel] [Bug 1494350] Re: QEMU: causes vCPU steal time overflow on live migration

2015-10-15 Thread Alexandre DERUMIER
>>Hi, Hi >> >>I've seen the same issue with debian jessie. >> >>Compiled 4.2.3 from kernel.org with "make localyesconfig", >>no problem any more host kernel or guest kernel ? - Mail original - De: "Markus Breitegger" <1494...@bugs.launchpad.net> À: "qemu-devel" Envoyé: Jeudi 15 Octobr

Re: [Qemu-devel] [PATCH v6 26/39] blockdev: Allow more options for BB-less BDS tree

2015-10-15 Thread Kevin Wolf
Am 12.10.2015 um 22:00 hat Max Reitz geschrieben: > Most of the options which blockdev_init() parses for both the > BlockBackend and the root BDS are valid for just the root BDS as well > (e.g. read-only). This patch allows specifying these options even if not > creating a BlockBackend. > > Signed

Re: [Qemu-devel] [PATCH v5 3/3] kvm: Pass PCI device pointer to MSI routing functions

2015-10-15 Thread Cornelia Huck
On Thu, 15 Oct 2015 14:05:17 +0300 Pavel Fedin wrote: > In-kernel ITS emulation on ARM64 will require to supply requester IDs. > These IDs can now be retrieved from the device pointer using new > pci_requester_id() function. > > This patch adds pci_dev pointer to KVM GSI routing functions and ma

Re: [Qemu-devel] [PATCH v5 3/3] kvm: Pass PCI device pointer to MSI routing functions

2015-10-15 Thread Pavel Fedin
Hello! > Should the pci_dev be passed to kvm_arch_fixup_msi_route() as well? > Currently, the only implementer of this function (s390x) does not need > it; but it shouldn't hurt? Yes, it shouldn't. I didn't pass it there exactly because of this reason. However, &kroute is also passed to this f

[Qemu-devel] [Bug 1494350] Re: QEMU: causes vCPU steal time overflow on live migration

2015-10-15 Thread Markus Breitegger
Sorry but I think I've pasted my answer to the wrong bugreport. Sorry about that! I'm not using live migration. https://lists.debian.org/debian-kernel/2014/11/msg00093.html but seems something Debian related. Following scenario: Host Ubuntu 14.04 Guest Debian Jessie Debian with 3.16.0-4-amd64

Re: [Qemu-devel] [PATCH 1/3] block: Use bdrv_lookup_bs() instead of bdrv_find_node()

2015-10-15 Thread Alberto Garcia
On Wed 14 Oct 2015 03:16:00 PM CEST, Jeff Cody wrote: > This is a precursor to making bdrv_find_node() static, and internal > to block.c > > To find a BlockDriverState interface, it can be done via blk_by_name(), > bdrv_find_node(), and bdrv_lookup_bs(). The latter can take the place > of the oth

Re: [Qemu-devel] [PATCH 2/3] block: make bdrv_find_node() static

2015-10-15 Thread Alberto Garcia
On Wed 14 Oct 2015 03:16:01 PM CEST, Jeff Cody wrote: > This patch does two things: it moves bdrv_find_node() up before the > first usage in block.c, and it makes the function static so that it > is only internal to block.c. > > Signed-off-by: Jeff Cody Reviewed-by: Alberto Garcia

[Qemu-devel] [PATCH] tests: re-enable vhost-user-test

2015-10-15 Thread marcandre . lureau
From: Marc-André Lureau Commit 7fe34ca9c2e actually disabled vhost-user-test altogether, since CONFIG_VHOST_NET is a per-target config variable. CONFIG_VHOST_NET_USED is the host config, actually unused since 1322629b4f2. But it was set whenever vhost_net was enabled. tests/vhost-user-test is a

[Qemu-devel] [PATCH] arm_gic_kvm: Disable live migration if not supported

2015-10-15 Thread Pavel Fedin
Currently, if the kernel does not have live migration API, the migration will still be attempted, but vGIC save/restore functions will just not do anything. This will result in a broken machine state. This patch fixes the problem by patching vmstate_gic.unmigratable flag in runtine. Signed-off-by

[Qemu-devel] [PATCH 2/2] qga: set file descriptors in qmp_guest_file_open non-blocking on Win32

2015-10-15 Thread Denis V. Lunev
From: Olga Krishtal Set fd non-blocking to avoid common use cases (like reading from a named pipe) from hanging the agent. This was missed in the original code. Restore compatibility with Posix implementation. The patch adds Win32 specific implementation of qemu_set_nonblock. On Windows OS the

[Qemu-devel] [PATCH 1/2] qga: drop hand-made guest_file_toggle_flags helper

2015-10-15 Thread Denis V. Lunev
We'd better use generic qemu_set_nonblock directly. Signed-off-by: Denis V. Lunev Reviewed-by: Yuri Pudgorodskiy Reviewed-by: Eric Blake CC: Michael Roth --- qga/commands-posix.c | 27 ++- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/qga/commands-posi

Re: [Qemu-devel] [PATCH v2 06/22] block: Add "supports_stats" field to BlockStats

2015-10-15 Thread Alberto Garcia
On Tue 13 Oct 2015 05:38:30 PM CEST, Stefan Hajnoczi wrote: >> query-blockstats always returns a BlockDeviceStats structure for each >> BDS, regardless of whether it implements accounting or not. Since the >> field is mandatory there's no way to tell that from the values alone. >> >> This field s

Re: [Qemu-devel] [PATCH v5 2/3] hw/pci: Introduce pci_requester_id()

2015-10-15 Thread Michael S. Tsirkin
On Thu, Oct 15, 2015 at 02:05:16PM +0300, Pavel Fedin wrote: > For GICv3 ITS implementation we are going to use requester IDs in KVM IRQ > routing code. This patch introduces reusable convenient way to obtain this > ID from the device pointer. The new function is now used in some places, > where th

[Qemu-devel] [PATCH v2 0/2] qga: non-blocking fd cleanups

2015-10-15 Thread Denis V. Lunev
This patchset is reincarnation of one patch discussed in the scope of QEMU 2.4 and rejected for that time. Actually we should use non-blocking descriptors in QGA on Windows in guest-file-open exactly like was done for Posix. Changes from v1: - call to qemu_fd_register is moved to a proper place -

Re: [Qemu-devel] [PATCH v5 2/3] hw/pci: Introduce pci_requester_id()

2015-10-15 Thread Pavel Fedin
Hello! > You are merging all this through the KVM tree, right? To tell the truth, i don't know. :) I cc'ed everybody related, but from maintainers only you responded. You could agree, whose tree will take it. Or you could rip the set apart and each maintainer merges own pieces, it doesn't mat

[Qemu-devel] [PATCH v6 1/3] kvm: Make KVM_CAP_SIGNAL_MSI globally available

2015-10-15 Thread Pavel Fedin
This capability is useful to determine whether we can use KVM ITS emulation on ARM Signed-off-by: Pavel Fedin --- include/sysemu/kvm.h | 9 + kvm-all.c| 10 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h

[Qemu-devel] [PATCH v6 2/3] hw/pci: Introduce pci_requester_id()

2015-10-15 Thread Pavel Fedin
For GICv3 ITS implementation we are going to use requester IDs in KVM IRQ routing code. This patch introduces reusable convenient way to obtain this ID from the device pointer. The new function is now used in some places, where the same calculation was used. MemTxAttrs.stream_id also renamed to re

Re: [Qemu-devel] [PATCH] tests: re-enable vhost-user-test

2015-10-15 Thread Marc-André Lureau
nack, CONFIG_VHOST_NET_USED is actually used, my bad. I'll send another patch On Thu, Oct 15, 2015 at 2:07 PM, wrote: > From: Marc-André Lureau > > Commit 7fe34ca9c2e actually disabled vhost-user-test altogether, > since CONFIG_VHOST_NET is a per-target config variable. > > CONFIG_VHOST_NET_USE

[Qemu-devel] [PATCH v6 0/3] Make KVM/MSI code device-ID-aware

2015-10-15 Thread Pavel Fedin
On ARM architecture ITS (Interrupt Translation Service), additionally to normal MSI data, uses also side-band device IDs. This series prepares the infrastructure to handling them. This small series is actually an extraction from vITS support RFC (https://lists.gnu.org/archive/html/qemu-devel/2015-

[Qemu-devel] [PATCH 6/6] qstring: Make conversion from QObject * accept null

2015-10-15 Thread Markus Armbruster
qobject_to_qstring() crashes on null, which is a trap for the unwary. Return null instead, and simplify a few callers. Signed-off-by: Markus Armbruster --- qapi/qmp-input-visitor.c | 6 +++--- qobject/qdict.c | 11 +++ qobject/qstring.c| 4 ++-- 3 files changed, 8 inse

[Qemu-devel] [PATCH 4/6] qfloat qint: Make conversion from QObject * accept null

2015-10-15 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 --- qapi/qmp-input-visitor.c | 28 qobject/qdict.c | 11 +++ qobject/qfloat.c

[Qemu-devel] [PATCH 2/6] qbool: Make conversion from QObject * accept null

2015-10-15 Thread Markus Armbruster
qobject_to_qbool() crashes on null, which is a trap for the unwary. Return null instead, and simplify a few callers. Signed-off-by: Markus Armbruster --- qapi/qmp-input-visitor.c | 6 +++--- qobject/qbool.c | 4 ++-- qobject/qdict.c | 11 +++ 3 files changed, 8 insert

[Qemu-devel] [PATCH 5/6] qlist: Make conversion from QObject * accept null

2015-10-15 Thread Markus Armbruster
qobject_to_qlist() crashes on null, which is a trap for the unwary. Return null instead. Signed-off-by: Markus Armbruster --- qobject/qlist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qobject/qlist.c b/qobject/qlist.c index 1ced0de..298003a 100644 --- a/qobject/qlist.

[Qemu-devel] [PATCH 1/6] qobject: Drop QObject_HEAD

2015-10-15 Thread Markus Armbruster
QObject_HEAD is a macro expanding into the common part of structs that are sub-types of QObject. It's always been just QObject base, and unlikely to change. Drop the macro, because the code is clearer with out it. Signed-off-by: Markus Armbruster --- include/qapi/qmp/qbool.h | 2 +- include/

[Qemu-devel] [PATCH v6 3/3] kvm: Pass PCI device pointer to MSI routing functions

2015-10-15 Thread Pavel Fedin
In-kernel ITS emulation on ARM64 will require to supply requester IDs. These IDs can now be retrieved from the device pointer using new pci_requester_id() function. This patch adds pci_dev pointer to KVM GSI routing functions and makes callers passing it. x86 architecture does not use requester I

[Qemu-devel] [PATCH 3/6] qdict: Make conversion from QObject * accept null

2015-10-15 Thread Markus Armbruster
qobject_to_qdict() crashes on null, which is a trap for the unwary. Return null instead, and simplify a few callers. Signed-off-by: Markus Armbruster --- qga/main.c | 11 +++ qobject/qdict.c | 6 +++--- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/qga/main.c b/qg

[Qemu-devel] [PATCH] tests: re-enable vhost-user-test

2015-10-15 Thread marcandre . lureau
From: Marc-André Lureau Commit 7fe34ca9c2e actually disabled vhost-user-test altogether, since CONFIG_VHOST_NET is a per-target config variable. tests/vhost-user-test is already x86/64 softmmu specific test, in order to enable it correctly, kvm & vhost-net are also conditions. To check that, set

Re: [Qemu-devel] [PULL 1/3] Migration: Generate the completed event only when we complete

2015-10-15 Thread Eric Blake
On 10/15/2015 12:27 AM, Juan Quintela wrote: > From: "Dr. David Alan Gilbert" > > The current migration-completed event is generated a bit too early, > which means that an eager libvirt that's ready to go as soon > as it sees the event ends up racing with the actual end of migration. > > This co

Re: [Qemu-devel] [PATCH 0/3] QEMU logging improvements

2015-10-15 Thread Kashyap Chamarthy
On Thu, Oct 15, 2015 at 10:30:21AM +0300, Denis V. Lunev wrote: > The following is done: > - QMP/HMP events are now logged I applied this patch series locally, and tried to test it the below way: Launch a minimal QEMU instance: $ /home/kashyapc/build/build-qemu-upstream/x86_64-softmmu/qemu-sys

[Qemu-devel] [PATCH 0/6] qobject: Make conversion from QObject * accept null

2015-10-15 Thread Markus Armbruster
The qobject_to_FOO() crash on null, which is a trap for the unwary. Return null instead, and simplify a few callers. Throw in a patch to drop QObject_HEAD. Luiz, I'm happy to take this through my tree, since got a QMP series based on it (to be posted shortly). Markus Armbruster (6): qobject: D

Re: [Qemu-devel] [PATCH v4 3/5] acpi: pc: add fw_cfg device node to ssdt

2015-10-15 Thread Igor Mammedov
On Wed, 14 Oct 2015 13:47:32 -0300 Eduardo Habkost wrote: > On Wed, Oct 14, 2015 at 10:45:00AM +0200, Igor Mammedov wrote: > > On Tue, 13 Oct 2015 16:10:03 -0300 > > Eduardo Habkost wrote: > > > > > On Sat, Oct 10, 2015 at 12:00:16AM -0400, Gabriel L. Somlo wrote: > > > > On Thu, Oct 01, 2015 a

Re: [Qemu-devel] [PULL 1/3] Migration: Generate the completed event only when we complete

2015-10-15 Thread Christian Borntraeger
Am 15.10.2015 um 08:27 schrieb Juan Quintela: > From: "Dr. David Alan Gilbert" > > The current migration-completed event is generated a bit too early, > which means that an eager libvirt that's ready to go as soon > as it sees the event ends up racing with the actual end of migration. > > This c

[Qemu-devel] [PATCH 0/7] Throttle event VSERPORT_CHANGE separately by "id"

2015-10-15 Thread Markus Armbruster
VSERPORT_CHANGE is emitted when the guest opens or closes a virtio-serial port. The event's member "id" identifies the port. When several events arrive quickly, throttling drops all but the last of them. Because of that, a QMP client must assume that *any* port may have changed state when it rec

[Qemu-devel] [PATCH 2/7] monitor: Simplify event throttling

2015-10-15 Thread Markus Armbruster
The event throttling state machine is hard to understand. I'm not sure it's entirely correct. Rewrite it in a more straightforward manner: State 1: No event sent recently (less than evconf->rate ns ago) Invariant: evstate->timer is not pending, evstate->qdict is null On event: send eve

[Qemu-devel] [PATCH 4/7] monitor: Split MonitorQAPIEventConf off MonitorQAPIEventState

2015-10-15 Thread Markus Armbruster
In preparation of turning monitor_qapi_event_state[] into a hash table for finer grained throttling. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- monitor.c | 80 ++- 1 file changed, 38 insertions(+), 42 deletions(-) di

[Qemu-devel] [PATCH 7/7] docs: Document QMP event rate limiting

2015-10-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- docs/qmp-events.txt | 12 docs/qmp-spec.txt | 5 + 2 files changed, 17 insertions(+) diff --git a/docs/qmp-events.txt b/docs/qmp-events.txt index d92cc48..d2f1ce4 100644 --- a/docs/qmp-events.txt +++ b/docs/qmp-events.txt @@ -28,6 +28,8 @@

Re: [Qemu-devel] [PATCH 0/3] QEMU logging improvements

2015-10-15 Thread Pavel Butsykin
On 15.10.2015 17:49, Kashyap Chamarthy wrote: On Thu, Oct 15, 2015 at 10:30:21AM +0300, Denis V. Lunev wrote: The following is done: - QMP/HMP events are now logged I applied this patch series locally, and tried to test it the below way: Launch a minimal QEMU instance: $ /home/kashyapc/

Re: [Qemu-devel] [PATCH 0/7] Throttle event VSERPORT_CHANGE separately by "id"

2015-10-15 Thread Markus Armbruster
Forgot to mention: this is based on my "[PATCH 0/6] qobject: Make conversion from QObject * accept null".

[Qemu-devel] [PATCH 3/7] monitor: Switch from timer_new() to timer_new_ns()

2015-10-15 Thread Markus Armbruster
We don't actually care for the scale, so we can just as well use the simpler interface. Signed-off-by: Markus Armbruster --- monitor.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index ca201fd..baffd76 100644 --- a/monitor.c +++ b/monitor.c @@

Re: [Qemu-devel] [PATCH 3/6] qdict: Make conversion from QObject * accept null

2015-10-15 Thread Eric Blake
On 10/15/2015 08:15 AM, Markus Armbruster wrote: > qobject_to_qdict() crashes on null, which is a trap for the unwary. > Return null instead, and simplify a few callers. > > Signed-off-by: Markus Armbruster > --- > qga/main.c | 11 +++ > qobject/qdict.c | 6 +++--- > 2 files change

Re: [Qemu-devel] [PATCH v2 2/5] qdev: add the HotUnpluggable handler

2015-10-15 Thread Greg Kurz
On Thu, 15 Oct 2015 17:14:36 +0200 Cornelia Huck wrote: > On Mon, 12 Oct 2015 11:00:13 +0200 > Greg Kurz wrote: > > > This handler allows to ask a device instance if it can be hot-unplugged. It > > is to be defined in device classes where hot-unpluggability depends on the > > device state (for

Re: [Qemu-devel] [PATCH v3 27/32] nvdimm: support DSM_CMD_IMPLEMENTED function

2015-10-15 Thread Stefan Hajnoczi
On Wed, Oct 14, 2015 at 10:50:40PM +0800, Xiao Guangrong wrote: > On 10/14/2015 05:40 PM, Stefan Hajnoczi wrote: > >On Sun, Oct 11, 2015 at 11:52:59AM +0800, Xiao Guangrong wrote: > >>+out = (dsm_out *)in; > >>+ > >>+revision = in->arg1; > >>+function = in->arg2; > >>+handle = in->h

Re: [Qemu-devel] [Qemu-block] [PATCH v10 08/10] Implement new driver for block replication

2015-10-15 Thread Stefan Hajnoczi
On Thu, Oct 15, 2015 at 10:19:17AM +0800, Wen Congyang wrote: > On 10/14/2015 10:27 PM, Stefan Hajnoczi wrote: > > On Tue, Oct 13, 2015 at 05:08:17PM +0800, Wen Congyang wrote: > >> On 10/13/2015 12:27 AM, Stefan Hajnoczi wrote: > >>> On Fri, Sep 25, 2015 at 02:17:36PM +0800, Wen Congyang wrote: >

Re: [Qemu-devel] [PATCH v3 27/32] nvdimm: support DSM_CMD_IMPLEMENTED function

2015-10-15 Thread Stefan Hajnoczi
On Wed, Oct 14, 2015 at 10:52:15PM +0800, Xiao Guangrong wrote: > On 10/14/2015 05:41 PM, Stefan Hajnoczi wrote: > >On Sun, Oct 11, 2015 at 11:52:59AM +0800, Xiao Guangrong wrote: > >>+out->len = sizeof(out->status); > > > >out->len is uint16_t, it needs cpu_to_le16(). There may be other > >in

Re: [Qemu-devel] [PATCH v4] fw_cfg: insert string blobs via qemu cmdline

2015-10-15 Thread Laszlo Ersek
On 10/15/15 11:24, Gerd Hoffmann wrote: > On Mi, 2015-10-14 at 16:22 +0200, Laszlo Ersek wrote: >> Paolo, >> >> On 09/29/15 18:29, Gabriel L. Somlo wrote: >>> Allow users to provide custom fw_cfg blobs with ascii string >>> payloads specified directly on the qemu command line. >>> >>> Suggested-by:

Re: [Qemu-devel] [PATCH v2 06/22] block: Add "supports_stats" field to BlockStats

2015-10-15 Thread Stefan Hajnoczi
On Thu, Oct 15, 2015 at 03:06:19PM +0200, Alberto Garcia wrote: > On Tue 13 Oct 2015 05:38:30 PM CEST, Stefan Hajnoczi wrote: > > >> query-blockstats always returns a BlockDeviceStats structure for each > >> BDS, regardless of whether it implements accounting or not. Since the > >> field is mandat

Re: [Qemu-devel] [PATCH] Revert "blockdev: add note that block_job_cb() must be thread-safe"

2015-10-15 Thread Stefan Hajnoczi
On Wed, Oct 14, 2015 at 10:51:27PM -0400, Fam Zheng wrote: > > > - Original Message - > > On Tue, Oct 13, 2015 at 06:16:15PM +0800, Fam Zheng wrote: > > > This reverts commit 723c5d93c51bdb3adbc238ce90195c0864aa6cd5. > > > > > > block_job_cb is called by block_job_completed, which is alw

Re: [Qemu-devel] [PATCH v2 2/5] qdev: add the HotUnpluggable handler

2015-10-15 Thread Cornelia Huck
On Mon, 12 Oct 2015 11:00:13 +0200 Greg Kurz wrote: > This handler allows to ask a device instance if it can be hot-unplugged. It > is to be defined in device classes where hot-unpluggability depends on the > device state (for example, virtio-9p devices cannot be unplugged if the 9p > share is mo

[Qemu-devel] [PATCH] block: fix memory leak in early exit

2015-10-15 Thread Stefan Hajnoczi
The stream block job has two early exit code paths. They do not free s->backing_file_str. Also, the early exits rely on the fact that the coroutine hasn't yielded yet and was launched from the main thread. Therefore the coroutine is guaranteed to be running in the main thread where block_job_com

[Qemu-devel] [PATCH 1/7] monitor: Reduce casting of QAPI event QDict

2015-10-15 Thread Markus Armbruster
Make the variables holding the event QDict instead of QObject. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- monitor.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/monitor.c b/monitor.c index 4f1ba2f..2fa90ca 100644

  1   2   >