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

2015-10-14 Thread Juan Quintela
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 too soon -- if >> > > there were errors detected after this announ

[Qemu-devel] Connecting netdev to emulated nics.

2015-10-14 Thread sai pavan
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_table[] has some pointers for netdev devices. Where are this act

[Qemu-devel] [PULL 2/3] migration: announce VM's new home just before VM is runnable

2015-10-14 Thread Juan Quintela
From: Amit Shah We were announcing the dest host's IP as our new IP a bit too soon -- if there were errors detected after this announcement was done, the migration is failed and the VM could continue running on the src host -- causing problems later. Move around the qemu_announce_self() call so

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

2015-10-14 Thread 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 corresponds to RH bug: https://bugzilla.redhat.com/show_bug.c

[Qemu-devel] [PULL 0/3] Migration pull

2015-10-14 Thread Juan Quintela
Hi Peter This is a pull request with the small fixes from the list, please apply. Later, Juan 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 av

[Qemu-devel] [PULL 3/3] migration: fix deadlock

2015-10-14 Thread Juan Quintela
From: "Denis V. Lunev" Release qemu global mutex before call synchronize_rcu(). synchronize_rcu() waiting for all readers to finish their critical sections. There is at least one critical section in which we try to get QGM (critical section is in address_space_rw() and prepare_mmio_access() is tr

Re: [Qemu-devel] [PATCH v2] qapi: Fix regression with '-netdev ?'

2015-10-14 Thread Markus Armbruster
Eric Blake writes: > Commit e36c714e causes 'qemu -netdev ?' 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 > --- > v2: don't depend on unreleased patches > > scripts/

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

2015-10-14 Thread Amit Shah
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 too soon -- if > > > there were errors detected after this announcement was done, the > >

Re: [Qemu-devel] [PATCH 09/12] qga: guest exec functionality

2015-10-14 Thread Michael Roth
Quoting Eric Blake (2015-10-14 17:38:56) > On 10/14/2015 02:08 PM, Michael Roth wrote: > > From: Yuri Pudgorodskiy > > > > Guest-exec rewriten in platform-independant style with glib spawn. > > s/rewriten/rewritten/ > s/independant/independent/ > > > > > Child process is spawn asynchroneously

[Qemu-devel] [RESEND PATCH v3] i386: keep cpu_model field in MachineState uptodate

2015-10-14 Thread Zhu Guihua
Update cpu_model in MachineState for i386, so that the field can be used for cpu hotplug, instead of using a static variable. This patch is rebased on the latest master. Signed-off-by: Zhu Guihua Reviewed-by: Eduardo Habkost --- v3: -use PCMachineState in pc_cpus_init() instead MachineState v

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

2015-10-14 Thread Fam Zheng
- 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 always called in > > a main loop bottom half in existing block jobs. So we d

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

2015-10-14 Thread Wen Congyang
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: +/* start backup job now */ +bdrv_op_unblock(s

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

2015-10-14 Thread Jason Wang
On 10/14/2015 10:12 PM, 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 too soon -- if >>> there were errors detected after this announcement was done, the >>> migration i

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

2015-10-14 Thread Jason Wang
On 10/14/2015 08:07 PM, Amit Shah wrote: > We were announcing the dest host's IP as our new IP a bit too soon -- if > there were errors detected after this announcement was done, the > migration is failed and the VM could continue running on the src host -- > causing problems later. > > Move arou

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

2015-10-14 Thread Xiao Guangrong
On 10/15/2015 01:06 AM, Eduardo Habkost wrote: 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: static void dsm_write(void *opaque, hwaddr addr,

Re: [Qemu-devel] [PATCH] net: don't set native endianness

2015-10-14 Thread Jason Wang
On 10/14/2015 05:26 PM, Michael S. Tsirkin wrote: > commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991 > vhost-net: tell tap backend about the vnet endianness > makes vhost net always try to set LE - even if that matches the > native endian-ness. > > This makes it fail on older kernels on x86 wi

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

2015-10-14 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 | 11 ++- ui/curses.c | 43 +++ 2 f

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

2015-10-14 Thread OGAWA Hirofumi
OGAWA Hirofumi writes: > 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) >>> correctly. >> >> But it breaks line gra

Re: [Qemu-devel] [RFC 0/3] improve/fix -curses mode

2015-10-14 Thread OGAWA Hirofumi
Markus Armbruster writes: > Copying maintainer. You can use scripts/get_maintainer.pl to find > maintainers yourself. Ah, I was missing to use it. Thanks. > OGAWA Hirofumi writes: > >> Hi, >> >> This patchset is to improve/fix -curses mode. But this patchset is >> tested only on linux, so RFC

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

2015-10-14 Thread OGAWA Hirofumi
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) >> correctly. > > But it breaks line graphics in vga text mode on gtk I sus

[Qemu-devel] [PATCH v4 09/13] target-arm: Add ARMMMUFaultInfo

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Introduce ARMMMUFaultInfo to propagate MMU Fault information across the MMU translation code path. This is in preparation for adding Stage-2 translation. No functional changes. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c| 32 -

[Qemu-devel] [PATCH v4 13/13] target-arm: Add support for S1 + S2 MMU translations

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 44 +--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 69e24e1..9d70ef2 100644 --- a/target-arm/helper.c

[Qemu-devel] [PATCH v4 10/13] target-arm: Add S2 translation to 64bit S1 PTWs

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add support for applying S2 translation to 64bit S1 page-table walks. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c| 50 -- target-arm/op_helper.c | 4 ++-- 2 files changed, 50 insertions(+), 4 deletions(

[Qemu-devel] [PATCH v4 12/13] target-arm: Route S2 MMU faults to EL2

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/op_helper.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index d4715f4..2ccd1c9 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_hel

[Qemu-devel] [PATCH v4 07/13] target-arm: Add support for S2 page-table protection bits

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 41 + 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 8530f7e..d1ffcdf 100644 --- a/target-arm/helper.c +++

[Qemu-devel] [PATCH v4 11/13] target-arm: Add S2 translation to 32bit S1 PTWs

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add support for applying S2 translation to 32bit S1 page-table walks. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 7

[Qemu-devel] [PATCH v4 08/13] target-arm: Avoid inline for get_phys_addr

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Avoid inline for get_phys_addr() to prepare for future recursive use. Reviewed-by: Peter Maydell Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target-arm/helper.c b/target

[Qemu-devel] [PATCH v4 06/13] target-arm: Add computation of starting level for S2 PTW

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" The starting level for S2 pagetable walks is computed differently from the S1 starting level. Implement the S2 variant. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c| 117 +++-- target-arm/internals.h | 25 ++

[Qemu-devel] [PATCH v4 02/13] target-arm: lpae: Make t0sz and t1sz signed integers

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Make t0sz and t1sz signed integers to match tsz and to make it easier to implement support for AArch32 negative t0sz. t1sz is changed for consistensy. No functional change. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 4 ++-- 1 file changed, 2 insertion

[Qemu-devel] [PATCH v4 05/13] target-arm: lpae: Rename granule_sz to stride

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Rename granule_sz to stride to better match the reference manuals. No functional change. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/target-arm/helper.c

[Qemu-devel] [PATCH v4 03/13] target-arm: Add support for AArch32 S2 negative t0sz

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add support for AArch32 S2 negative t0sz. In preparation for using 40bit IPAs on AArch32. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.c index 4e19838.

[Qemu-devel] [PATCH v4 01/13] target-arm: Add HPFAR_EL2

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Reviewed-by: Alex Bennée Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h| 1 + target-arm/helper.c | 12 2 files changed, 13 insertions(+) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 493f9d0..aaace9b 100644 --- a/target-arm/cpu.h ++

[Qemu-devel] [PATCH v4 04/13] target-arm: lpae: Replace tsz with computed inputsize

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Remove the tsz variable and introduce inputsize. This simplifies the code a little and makes it easier to compare with the reference manuals. No functional change. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 22 +++--- 1 file changed, 1

[Qemu-devel] [PATCH v4 00/13] arm: Steps towards EL2 support round 5

2015-10-14 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Hi, Another round of patches towards EL2 support. This one adds partial support for 2-stage MMU. The AArch32/ARMv7 support is untested. Some of the details of error reporting are intentionally missing, I was thinking to add those incrementally as they get quite involve

Re: [Qemu-devel] [PATCH 09/12] qga: guest exec functionality

2015-10-14 Thread Eric Blake
On 10/14/2015 02:08 PM, Michael Roth wrote: > From: Yuri Pudgorodskiy > > Guest-exec rewriten in platform-independant style with glib spawn. s/rewriten/rewritten/ s/independant/independent/ > > Child process is spawn asynchroneously and exit status can later s/asynchroneously/asynchronously/

[Qemu-devel] [PATCH v2] qapi: Fix regression with '-netdev ?'

2015-10-14 Thread Eric Blake
Commit e36c714e causes 'qemu -netdev ?' 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 --- v2: don't depend on unreleased patches scripts/qapi-visit.py | 4 +++- 1 file changed,

Re: [Qemu-devel] [PATCH] qapi: Fix regression with '-netdev ?'

2015-10-14 Thread Eric Blake
On 10/14/2015 10:30 AM, Eric Blake wrote: > Commit e36c714e causes 'qemu -netdev ?' 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 > --- > scripts/qapi-visit.py | 4 +++

[Qemu-devel] Memcpy behavior inside a VM

2015-10-14 Thread Shesha Sreenivasamurthy
Hi, I'm profiling memcpy and seeing strange behavior (for me at least) and wanted to see if some one has an idea what may be happening. My set up is as follows: I have a Ubuntu 12.04 Linux host running 3.2.0-23 kernel. It has a four 10-core dual-hyper-threaded CPU with 128GB RAM. I have instant

Re: [Qemu-devel] [PATCH] target-*: Advance pc after recognizing a breakpoint

2015-10-14 Thread Richard Henderson
On 10/15/2015 06:34 AM, Peter Maydell wrote: This is still the same cryptic comment we have in the targets which do do this. Can we have something that is a bit more explanatory about what is going on and why we need to do this, please? Suggestions? (Also explaining what the number you need t

Re: [Qemu-devel] [PATCH v2 07/21] qemu-char: convert pipe backend to data-driven creation

2015-10-14 Thread Eric Blake
On 10/14/2015 09:54 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > qemu-char.c | 37 + > 1 file changed, 21 insertions(+), 16 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization l

Re: [Qemu-devel] [PATCH v2 14/21] qemu-char: convert braille backend to data-driven creation

2015-10-14 Thread Eric Blake
On 10/14/2015 09:54 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > backends/baum.c | 16 +++- > include/sysemu/char.h | 3 --- > qemu-char.c | 4 +--- > stubs/Makefile.objs | 1 - > stubs/chr-baum-init.c | 7 --- > 5 files changed, 12 inserti

Re: [Qemu-devel] [PATCH v2 06/21] qemu-char: convert parallel backend to data-driven creation

2015-10-14 Thread Eric Blake
On 10/14/2015 09:54 AM, Paolo Bonzini wrote: > Conversion to Error * brings better error messages; before: > > qemu-system-x86_64: -chardev id=serial,backend=parallel,path=vl.c: Failed > to create chardev > > After: > > qemu-system-x86_64: -chardev id=serial,backend=parallel,path=vl.c:

Re: [Qemu-devel] [PATCH v3 5/9] target-arm: Add ARMMMUFaultInfo

2015-10-14 Thread Edgar E. Iglesias
On Wed, Oct 14, 2015 at 02:00:17PM +0100, Alex Bennée wrote: > > Edgar E. Iglesias writes: > > > On Wed, Oct 07, 2015 at 05:24:27PM +0100, Alex Bennée wrote: > >> > >> Edgar E. Iglesias writes: > >> > >> > From: "Edgar E. Iglesias" > >> > > >> > Introduce ARMMMUFaultInfo to propagate MMU Fau

[Qemu-devel] [PATCH 01/12] build: qemu-ga: add 'qemu-ga' build target for w32

2015-10-14 Thread Michael Roth
Currently POSIX builds rely on 'qemu-ga' target to do qga-only distributable build. On w32, as with most standalone binary targets, we rely on 'qemu-ga.exe' target. Unlike with POSIX, qemu-ga for w32 has a number of related targets such as VSS DLL and MSI package. We can do the full distributable

[Qemu-devel] [PATCH 04/12] qga: do not override configuration verbosity

2015-10-14 Thread Michael Roth
From: Marc-André Lureau Move the default verbosity settings before loading the configuration file, or it will overwrite it. Found thanks to writing qga tests :) Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth Signed-off-by: Michael Roth --- qga/main.c | 4 ++-- 1 file changed, 2 i

[Qemu-devel] [PATCH 06/12] glib-compat: add 2.38/2.40/2.46 asserts

2015-10-14 Thread Michael Roth
From: Marc-André Lureau Those are mostly useful for writing tests. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana Signed-off-by: Michael Roth --- include/glib-compat.h | 61 +++ 1 file changed, 61 insertions(+) diff --git a/incl

[Qemu-devel] [PATCH 03/12] qga: add QGA_CONF environment variable

2015-10-14 Thread Michael Roth
From: Marc-André Lureau Having a environment variable allows to override default configuration path, useful for testing. Note that this can't easily be an argument, since loading config is done before parsing the arguments. Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth Signed-off-

[Qemu-devel] [PATCH 07/12] tests: add a local test for guest agent

2015-10-14 Thread Michael Roth
From: Marc-André Lureau Add some local guest agent tests, as it is better than nothing, only when CONFIG_POSIX (using unix sockets). With the QGA_TEST_SIDE_EFFECTING environment variable, it will include tests with side effects, such as freezing/thawing the FS or changing the time. (a better te

[Qemu-devel] [PATCH 08/12] qga: drop guest_file_init helper and replace it with static initializers

2015-10-14 Thread Michael Roth
From: "Denis V. Lunev" This just makes code shorter and better. Signed-off-by: Denis V. Lunev Signed-off-by: Yuri Pudgorodskiy Reviewed-by: Michael Roth Signed-off-by: Denis V. Lunev Signed-off-by: Michael Roth --- qga/commands-posix.c | 10 +++--- qga/commands-win32.c | 10 +++---

[Qemu-devel] [PATCH 05/12] qtest: add a few fd-level qmp helpers

2015-10-14 Thread Michael Roth
From: Marc-André Lureau Add a few functions to interact with qmp via a simple fd. Signed-off-by: Marc-André Lureau Reviewed-by: Michael Roth Signed-off-by: Michael Roth --- tests/libqtest.c | 45 + tests/libqtest.h | 7 +++ 2 files changed, 48

[Qemu-devel] [PATCH 12/12] qga: guest-exec simple stdin/stdout/stderr redirection

2015-10-14 Thread Michael Roth
From: Yuri Pudgorodskiy Implemented with base64-encoded strings in qga json protocol. Glib portable GIOChannel is used for data I/O. Optinal stdin parameter of guest-exec command is now used as stdin content for spawned subprocess. If capture-output bool flag is specified, guest-exec redirects

[Qemu-devel] [PATCH 11/12] qga: handle G_IO_STATUS_AGAIN in ga_channel_write_all()

2015-10-14 Thread Michael Roth
From: Yuri Pudgorodskiy glib may return G_IO_STATUS_AGAIN which is actually not an error. Also fixed a bug when on incomplete write buf pointer was not adjusted. Signed-off-by: Yuri Pudgorodskiy Signed-off-by: Denis V. Lunev Reviewed-by: Michael Roth Signed-off-by: Michael Roth --- qga/chan

[Qemu-devel] [PATCH 10/12] qga: handle possible SIGPIPE in guest-file-write

2015-10-14 Thread Michael Roth
From: "Denis V. Lunev" qemu-ga should not exit on guest-file-write to pipe without read end but proper error code should be returned. The behavior of the spawned process should be default thus SIGPIPE processing should be reset to default after fork() but before exec(). Signed-off-by: Denis V. L

[Qemu-devel] [PATCH 09/12] qga: guest exec functionality

2015-10-14 Thread Michael Roth
From: Yuri Pudgorodskiy Guest-exec rewriten in platform-independant style with glib spawn. Child process is spawn asynchroneously and exit status can later be picked up by guest-exec-status command. stdin/stdout/stderr of the child now is redirected to /dev/null Later we will add ability to spe

[Qemu-devel] [PULL 00/12] qemu-ga patch queue

2015-10-14 Thread Michael Roth
Hi Peter, Please note that 'glib-compat: add 2.38/2.40/2.46 asserts' is also in Marc-André's recent ivshmem PULL. The 2 versions of the patches are identical, but let me know if you'd prefer a re-send/re-base later. The following changes since commit c49d3411faae8ffaab8f7e5db47405a008411c10: M

[Qemu-devel] [PATCH 02/12] qga: Use g_new() & friends where that makes obvious sense

2015-10-14 Thread Michael Roth
From: Markus Armbruster g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with siz

Re: [Qemu-devel] [PATCH v3 3/9] target-arm: Add support for S2 page-table protection bits

2015-10-14 Thread Peter Maydell
On 14 October 2015 at 13:45, Alex Bennée wrote: > While looking I noticed we probably extract more than we need into attrs > considering the tableattrs is snarfed earlier. Maybe we should only do: > > attrs = extract64(descriptor, 2, 10) > | (extract64(descriptor, 52, 7) << 10)

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

2015-10-14 Thread Peter Maydell
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 made zero >>> >>> target-arm/cpu.h| 1 + >>> tar

Re: [Qemu-devel] [PATCH] target-*: Advance pc after recognizing a breakpoint

2015-10-14 Thread Peter Maydell
On 13 October 2015 at 23:10, Richard Henderson wrote: > Some targets already had this within their logic, but make sure > it's present for all targets. > > Signed-off-by: Richard Henderson > --- > target-alpha/translate.c | 3 +++ > target-cris/translate.c | 3 +++ > target-i386/trans

Re: [Qemu-devel] [PATCH] Add mp-affinity property for ARM CPU class

2015-10-14 Thread Peter Maydell
On 14 October 2015 at 07:52, Pavel Fedin wrote: > P.S. By the way, what about GICv3 data format? Are you going to > review this part and do something with it? This would also advance > Shlomo's work i think. It's in my queue of things to look at at some point, but so are a great many other thing

Re: [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-14 Thread Peter Lieven
Am 08.10.2015 um 18:44 schrieb John Snow: > > On 10/08/2015 08:06 AM, Peter Lieven wrote: >> Hi all, >> >> short summary from my side. The whole thing seems to get complicated, >> let me explain why: >> >> 1) During review I found that the code in ide_atapi_cmd_reply_end can't >> work correctly if

Re: [Qemu-devel] [PATCH v2 5/5] xlnx-ep108: Connect the SPI Flash

2015-10-14 Thread Alistair Francis
On Thu, Oct 8, 2015 at 4:30 PM, Alistair Francis wrote: > On Wed, Oct 7, 2015 at 5:01 PM, Peter Crosthwaite > wrote: >> On Wed, Oct 7, 2015 at 2:34 PM, Alistair Francis >> wrote: >>> Connect the sst25wf080 SPI flash to the EP108 board. >>> >>> Signed-off-by: Alistair Francis >>> --- >>> V2: >>>

Re: [Qemu-devel] [PATCH v2 5/5] xlnx-ep108: Connect the SPI Flash

2015-10-14 Thread Peter Crosthwaite
On Thu, Oct 8, 2015 at 4:30 PM, Alistair Francis wrote: > On Wed, Oct 7, 2015 at 5:01 PM, Peter Crosthwaite > wrote: >> On Wed, Oct 7, 2015 at 2:34 PM, Alistair Francis >> wrote: >>> Connect the sst25wf080 SPI flash to the EP108 board. >>> >>> Signed-off-by: Alistair Francis >>> --- >>> V2: >>>

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-14 Thread Dan Williams
On Tue, Oct 13, 2015 at 9:03 PM, Xiao Guangrong wrote: >> Label-less DIMMs are tested as part of the unit test [1] and the >> "memmap=nn!ss" kernel parameter that registers a persistent-memory >> address range without a DIMM. What error do you see when label >> support is disabled? >> >> [1]: htt

Re: [Qemu-devel] [PATCH v1 00/15] data-driven device registers

2015-10-14 Thread Alistair Francis
Ping^2 On Thu, Aug 27, 2015 at 2:47 PM, Alistair Francis wrote: > Ping! > > On Wed, Jul 29, 2015 at 1:24 PM, Alistair Francis > wrote: >> From Peter: >> Hi All. This is a new scheme I've come up with handling device registers in a >> data driven way. My motivation for this is to factor out a lot

[Qemu-devel] [PATCH v2] taget-ppc: Fix read access to IBAT registers higher than IBAT3

2015-10-14 Thread Julio Guerra
Fix the index used to read the IBAT's vector which results in IBAT0..3 instead of IBAT4..N. The bug appeared by saving/restoring contexts including IBATs values. Signed-off-by: Julio Guerra --- target-ppc/translate_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targe

Re: [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-14 Thread John Snow
On 10/14/2015 02:19 PM, Peter Lieven wrote: > Am 08.10.2015 um 18:44 schrieb John Snow: >> >> On 10/08/2015 08:06 AM, Peter Lieven wrote: >>> Hi all, >>> >>> short summary from my side. The whole thing seems to get complicated, >>> let me explain why: >>> >>> 1) During review I found that the cod

Re: [Qemu-devel] [Qemu-block] [PATCH 3/3] block: use bdrv_lookup_bs() over blk_by_name() for BDS only results

2015-10-14 Thread Jeff Cody
On Wed, Oct 14, 2015 at 08:05:34PM +0200, Max Reitz wrote: > On 14.10.2015 15:16, Jeff Cody wrote: > > 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 other two, in the instances where we a

Re: [Qemu-devel] [Qemu-block] [PATCH 3/3] block: use bdrv_lookup_bs() over blk_by_name() for BDS only results

2015-10-14 Thread Max Reitz
On 14.10.2015 15:16, Jeff Cody wrote: > 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 other two, in the instances where we are only concerned with the > BlockDriverState. > > In much of the

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

2015-10-14 Thread Jeff Cody
On Wed, Oct 14, 2015 at 07:34:43PM +0200, Max Reitz wrote: > On 14.10.2015 19:29, Max Reitz wrote: > > On 14.10.2015 15:16, 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 bl

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

2015-10-14 Thread Max Reitz
On 14.10.2015 15:16, 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 > --- > block.c | 30 +++

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

2015-10-14 Thread Max Reitz
On 14.10.2015 19:29, Max Reitz wrote: > On 14.10.2015 15:16, 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

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

2015-10-14 Thread Max Reitz
On 14.10.2015 15:16, 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 other two, in the i

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

2015-10-14 Thread Eduardo Habkost
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: > >> static void dsm_write(void *opaque, hwaddr addr, > >>uint64_t val, unsigned size) > >> {

Re: [Qemu-devel] [PATCH 14/21] qemu-char: convert braille backend to data-driven creation

2015-10-14 Thread Paolo Bonzini
On 14/10/2015 18:34, Samuel Thibault wrote: > Paolo Bonzini, le Wed 14 Oct 2015 17:51:51 +0200, a écrit : >> >> >> On 12/10/2015 17:41, Samuel Thibault wrote: >>> Eric Blake, le Mon 12 Oct 2015 09:30:12 -0600, a écrit : Also, I assume that brlapi_perror() adds additional information to

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

2015-10-14 Thread Eduardo Habkost
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 at 01:33:50PM +0200, Igor Mammedov wrote: [...] > > > > > >> +if (!pc

Re: [Qemu-devel] [RFC 0/3] improve/fix -curses mode

2015-10-14 Thread Markus Armbruster
Copying maintainer. You can use scripts/get_maintainer.pl to find maintainers yourself. OGAWA Hirofumi writes: > Hi, > > This patchset is to improve/fix -curses mode. But this patchset is > tested only on linux, so RFC. (BTW, tested with xterm/gnome-terminal on > linux) > > ui/curses: Fix m

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

2015-10-14 Thread Michael S. Tsirkin
On Wed, Oct 14, 2015 at 06:06:37PM +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. > > Since requester ID is an architecture-specific thi

Re: [Qemu-devel] [PATCH 14/21] qemu-char: convert braille backend to data-driven creation

2015-10-14 Thread Samuel Thibault
Paolo Bonzini, le Wed 14 Oct 2015 17:51:51 +0200, a écrit : > > > On 12/10/2015 17:41, Samuel Thibault wrote: > > Eric Blake, le Mon 12 Oct 2015 09:30:12 -0600, a écrit : > >> Also, I assume that brlapi_perror() adds additional information to > >> the error message it prints, such as conversion

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

2015-10-14 Thread Eduardo Habkost
On Wed, Oct 14, 2015 at 08:06:36AM +0300, Michael S. Tsirkin wrote: > On Tue, Oct 13, 2015 at 07:43:00PM -0300, Eduardo Habkost wrote: > > On Wed, Oct 14, 2015 at 12:18:10AM +0300, Michael S. Tsirkin wrote: > > > On Tue, Oct 13, 2015 at 04:10:03PM -0300, Eduardo Habkost wrote: > > > > One of the th

[Qemu-devel] [PATCH] qapi: Fix regression with '-netdev ?'

2015-10-14 Thread Eric Blake
Commit e36c714e causes 'qemu -netdev ?' 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 --- scripts/qapi-visit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --

[Qemu-devel] [PATCH v2 06/21] qemu-char: convert parallel backend to data-driven creation

2015-10-14 Thread Paolo Bonzini
Conversion to Error * brings better error messages; before: qemu-system-x86_64: -chardev id=serial,backend=parallel,path=vl.c: Failed to create chardev After: qemu-system-x86_64: -chardev id=serial,backend=parallel,path=vl.c: not a parallel port: Inappropriate ioctl for device Signed-

Re: [Qemu-devel] [PULL v2 16/20] qapi: Consistent generated code: prefer common indentation

2015-10-14 Thread Eric Blake
On 10/14/2015 10:01 AM, Marc-André Lureau wrote: > Hi, > > This patch introduces a regression: > > $ x86_64-softmmu/qemu-system-x86_64 -netdev ? > > Program received signal SIGSEGV, Segmentation fault. > 0x55a0bc0f in visit_type_NetClientOptions (v=0x564e19e0, > obj=0x56510438, n

Re: [Qemu-devel] [PATCH V2 3/5] virtio-blk: disable scsi passthrough by default

2015-10-14 Thread Paolo Bonzini
On 14/10/2015 12:29, Cornelia Huck wrote: > Do we want to change anything for 2.5 about the default? > > Currently, we still default scsi to true, and you have to disable it > explicitly if you want to use virtio-1 compliant virtio-blk devices > (which is a bit annoying, as scsi passthrough is n

Re: [Qemu-devel] [PATCH v2 00/21] qemu-char: refactoring of chardev creation

2015-10-14 Thread Eric Blake
On 10/14/2015 09:54 AM, Paolo Bonzini wrote: > This series rewrites chardev creation to use a new ->create > member of the CharDriver struct, and to always signal errors > via Error*. > > The advantage is that backend-specific creation functions need > not be exported anymore for qemu-char.c's usa

Re: [Qemu-devel] [PATCH] libseccomp: add cacheflush to whitelist

2015-10-14 Thread Markus Armbruster
Andrew Jones writes: > On Wed, Oct 14, 2015 at 04:58:13PM +0200, Eduardo Otubo wrote: >> On Wed, Oct 14, 2015 at 03=25=00PM +0200, Markus Armbruster wrote: >> > Andrew Jones writes: >> > >> > > On Wed, Oct 14, 2015 at 11:03:37AM +0200, Eduardo Otubo wrote: >> > >> On Tue, Sep 29, 2015 at 11=39=

Re: [Qemu-devel] [PATCH] target-arm: Fix "no 64-bit EL2" assumption in arm_excp_unmasked()

2015-10-14 Thread Edgar E. Iglesias
On Thu, Oct 08, 2015 at 07:08:49PM +0100, Peter Maydell wrote: > The code in arm_excp_unmasked() suppresses the ability of PSTATE.AIF > to mask exceptions from a lower EL targeting EL2 or EL3 if the > CPU is 64-bit. This is correct for a target of EL3, but not correct > for targeting EL2. Further,

Re: [Qemu-devel] [RFC PATCH] qapi: Rename simple union's generated tag member to type

2015-10-14 Thread Markus Armbruster
Eric Blake writes: > On 10/08/2015 06:26 AM, Markus Armbruster wrote: >> Struct and union type members are generally named alike in QMP and C, >> except for a simple union's implicit tag member, which is "type" in >> QMP, and "kind" in C. Can't change QMP, so rename it in C. >> >> Since the imp

Re: [Qemu-devel] [PATCH 14/21] qemu-char: convert braille backend to data-driven creation

2015-10-14 Thread Eric Blake
On 10/14/2015 09:51 AM, Paolo Bonzini wrote: > > > On 12/10/2015 17:41, Samuel Thibault wrote: >> Eric Blake, le Mon 12 Oct 2015 09:30:12 -0600, a écrit : >>> Also, I assume that brlapi_perror() adds additional information to >>> the error message it prints, such as conversion of a brlapi-specif

[Qemu-devel] [PATCH v5 2/4] pcie: Add support for Single Root I/O Virtualization (SR/IOV)

2015-10-14 Thread Knut Omang
This patch provides the building blocks for creating an SR/IOV PCIe Extended Capability header and register/unregister SR/IOV Virtual Functions. Signed-off-by: Knut Omang --- hw/pci/Makefile.objs| 2 +- hw/pci/pci.c| 102 - hw/pci/pcie.c |

Re: [Qemu-devel] [PULL v2 16/20] qapi: Consistent generated code: prefer common indentation

2015-10-14 Thread Marc-André Lureau
Hi, This patch introduces a regression: $ x86_64-softmmu/qemu-system-x86_64 -netdev ? Program received signal SIGSEGV, Segmentation fault. 0x55a0bc0f in visit_type_NetClientOptions (v=0x564e19e0, obj=0x56510438, name=0x55af7041 "opts", errp=0x7fffd450) at qapi-visit.c:690

[Qemu-devel] [PATCH v2 00/21] qemu-char: refactoring of chardev creation

2015-10-14 Thread Paolo Bonzini
This series rewrites chardev creation to use a new ->create member of the CharDriver struct, and to always signal errors via Error*. The advantage is that backend-specific creation functions need not be exported anymore for qemu-char.c's usage, and hence do not need stubs anymore. Paolo Bonzini (

[Qemu-devel] [PATCH v2 07/21] qemu-char: convert pipe backend to data-driven creation

2015-10-14 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qemu-char.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index ff7722f..47db98f 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1078,18 +1078,17 @@ static CharDriverState *qemu

[Qemu-devel] [PATCH v2 14/21] qemu-char: convert braille backend to data-driven creation

2015-10-14 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- backends/baum.c | 16 +++- include/sysemu/char.h | 3 --- qemu-char.c | 4 +--- stubs/Makefile.objs | 1 - stubs/chr-baum-init.c | 7 --- 5 files changed, 12 insertions(+), 19 deletions(-) delete mode 100644 stubs/chr-baum-in

[Qemu-devel] [PATCH v5 1/4] pci: Make use of the devfn property when registering new devices

2015-10-14 Thread Knut Omang
Without this, the devfn argument to pci_create_*() does not affect the assigned devfn. Needed to support (VF_STRIDE,VF_OFFSET) values other than (1,1) for SR/IOV. Signed-off-by: Knut Omang Reviewed-by: Marcel Apfelbaum --- hw/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[Qemu-devel] [PATCH v5 4/4] pcie: A few minor fixes (type+code simplify)

2015-10-14 Thread Knut Omang
- Fix comment typo in pcie_cap_slot_write_config - Simplify code in pcie_cap_slot_hot_unplug_request_cb. Signed-off-by: Knut Omang --- hw/pci/pcie.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 774b9ed..ba49c0f 100644 --- a/hw/pci

[Qemu-devel] [Bug 1031920] Re: Linux user gdbserver does not respond to remote `Ctrl-C' interrupts

2015-10-14 Thread thierry bultel
I have encountered that issue recently, and started some analysis. The issue is due to the fact that in qemu, gdbstub no longer reads the communication channel once the debugged process is resumed with "cont". Another way to say that, is that communication with gdb is only possible once the pro

Re: [Qemu-devel] [PATCH] doc/rcu: fix g_free_rcu() usage example

2015-10-14 Thread Paolo Bonzini
On 14/10/2015 17:46, Sergey Fedorov wrote: > The first argument of g_free_rcu() is a pointer to a structure. But > foo_reclaim is used as a function name in the previous example along > with &foo as a pointer to the structure being reclaimed. Make the > example consistent with the previous one.

[Qemu-devel] [PATCH v5 3/4] pcie: Add some SR/IOV API documentation in docs/pcie_sriov.txt

2015-10-14 Thread Knut Omang
Add a small intro + minimal documentation for how to implement SR/IOV support for an emulated device. Signed-off-by: Knut Omang --- docs/pcie_sriov.txt | 115 1 file changed, 115 insertions(+) create mode 100644 docs/pcie_sriov.txt diff --gi

[Qemu-devel] [PATCH v5 0/4] pcie: Add support for Single Root I/O Virtualization

2015-10-14 Thread Knut Omang
This patch set implements generic support for SR/IOV as an extension to the core PCIe functionality, similar to the way other capabilities such as AER is implemented. There is no implementation of any device that provides SR/IOV support included, but I have implemented a test example which can be

  1   2   3   >