Re: [Qemu-devel] [PATCH 3/6] tests/tcg/linux-test.c: include definitions for getrusage()

2017-08-02 Thread Philippe Mathieu-Daudé
On Wed, Aug 2, 2017 at 6:28 PM, Philippe Mathieu-Daudé wrote: > Hi Cleber, > > On 08/02/2017 05:15 PM, Cleber Rosa wrote: >> >> A include for is missing, and prevents >> tests/tcg/linux-test from compiling. > > > getrusage() I presume, don't know if worth adding in commit

Re: [Qemu-devel] [PATCH for-2.10 2/3] target/mips: Drop redundant gen_io_start/stop()

2017-08-02 Thread Philippe Mathieu-Daudé
On 08/02/2017 06:59 AM, James Hogan wrote: DMTC0 CP0_Cause does a redundant gen_io_start() and gen_io_end() pair, even though this is done for all DMTC0 operations outside of the switch statement. Remove these redundant calls. Fixes: 5dc5d9f055c5 ("mips: more fixes to the MIPS interrupt glue

Re: [Qemu-devel] [Qemu-arm] [PATCH 01/15] target/arm: Use MMUAccessType enum rather than int

2017-08-02 Thread Philippe Mathieu-Daudé
On 08/02/2017 01:43 PM, Peter Maydell wrote: In the ARM get_phys_addr() code, switch to using the MMUAccessType enum and its MMU_* values rather than int and literal 0/1/2. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé ---

Re: [Qemu-devel] [PATCH 1/6] tests/tcg/test_path.c: include utils/bufferiszero.c

2017-08-02 Thread Cleber Rosa
On 08/02/2017 05:36 PM, Philippe Mathieu-Daudé wrote: > Hi Cleber, > > On 08/02/2017 05:15 PM, Cleber Rosa wrote: >> Which contains one specific function used by iov.c. >> >> Without this, "make -C tests/tcg test_path" (and consequently >> "make -C tests/tcg" or simply "make test") fails quite

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-08-02 Thread Richard Henderson
On 08/02/2017 03:00 PM, Anatol Pomozov wrote: > What ELF specification says about it? Does it tell a loader to load > only PT_LOAD segments? Yes. In https://refspecs.linuxfoundation.org/ there is a link to "System V ABI Edition 4.1", which AFAIK is the latest version of the ELF "gABI" spec.

Re: [Qemu-devel] [PATCH 3/6] tests/tcg/linux-test.c: include definitions for getrusage()

2017-08-02 Thread Philippe Mathieu-Daudé
Hi Cleber, On 08/02/2017 05:15 PM, Cleber Rosa wrote: A include for is missing, and prevents tests/tcg/linux-test from compiling. getrusage() I presume, don't know if worth adding in commit message. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé

Re: [Qemu-devel] [Qemu-arm] [PATCH 12/15] target/arm: Don't calculate lr in arm_v7m_cpu_do_interrupt() until needed

2017-08-02 Thread Philippe Mathieu-Daudé
On 08/02/2017 01:43 PM, Peter Maydell wrote: Move the code in arm_v7m_cpu_do_interrupt() that calculates the magic LR value down to when we're actually going to use it. Having the calculation and use so far apart makes the code a little harder to understand than it needs to be. Signed-off-by:

Re: [Qemu-devel] [Qemu-arm] [PATCH 13/15] target/arm: Create and use new function arm_v7m_is_handler_mode()

2017-08-02 Thread Philippe Mathieu-Daudé
On 08/02/2017 01:43 PM, Peter Maydell wrote: Add a utility function for testing whether the CPU is in Handler mode; this is just a check whether v7m.exception is non-zero, but we do it in several places and it makes the code a bit easier to read to not have to mentally figure out what the test

Re: [Qemu-devel] How to make ELF headers/symbol sections available for multiboot?

2017-08-02 Thread Anatol Pomozov
Hello Richard Thank you for this useful information. I still learning about ELF and a lot of things are still unclear for me. On Mon, Jul 31, 2017 at 11:20 AM, Richard Henderson wrote: > On 07/31/2017 10:21 AM, Anatol Pomozov wrote: >> ELF sections info is needed for an OS to

[Qemu-devel] [PATCH] libqtest: Fix typo in comments

2017-08-02 Thread Eric Blake
s/continuosly/continuously/ Signed-off-by: Eric Blake --- tests/libqtest.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/libqtest.h b/tests/libqtest.h index 38bc1e9953..3ae570927a 100644 --- a/tests/libqtest.h +++ b/tests/libqtest.h @@

Re: [Qemu-devel] [PATCH for-2.10 0/5] tests: acpi: make sure FADT is compared to reference table

2017-08-02 Thread Michael S. Tsirkin
On Wed, Aug 02, 2017 at 09:51:22AM +0200, Igor Mammedov wrote: > On Wed, 2 Aug 2017 00:14:18 +0300 > "Michael S. Tsirkin" wrote: > > > On Mon, Jul 31, 2017 at 05:40:47PM +0200, Igor Mammedov wrote: > > > While refactoring i386/FADT generation to build_append_int_noprefix()

[Qemu-devel] [PATCH 6/6] tests/tcg/test-i386-fprem.c: compilation fix for -Werror=unused-const-variable=

2017-08-02 Thread Cleber Rosa
A clean up of unused code to make the compiler happy. Signed-off-by: Cleber Rosa --- tests/tcg/test-i386-fprem.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/test-i386-fprem.c index f70363d..1dceda0 100644 ---

Re: [Qemu-devel] [PATCH for-2.10?] test-qga: Kill broken and dead QGA_TEST_SIDE_EFFECTING code

2017-08-02 Thread Eric Blake
On 08/02/2017 03:19 PM, Eric Blake wrote: > Back when the test was introduced, in commit 62c39b307, the > test was set up to run qemu-ga directly on the host performing > the test, and defaults to limiting itself to safe commands. At > the time, it was envisioned that setting

Re: [Qemu-devel] [Qemu-arm] [PATCH 14/15] armv7m_nvic.h: Move from include/hw/arm to include/hw/intc

2017-08-02 Thread Philippe Mathieu-Daudé
On 08/02/2017 01:44 PM, Peter Maydell wrote: The armv7m_nvic.h header file was accidentally placed in include/hw/arm; move it to include/hw/intc to match where its corresponding .c file lives. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PATCH v3 0/2] ERC cleanup and CRW bugfix

2017-08-02 Thread Dong Jia Shi
This series is trying to: 1. clear up ERC related code 2. bugfix for channel path related CRW generation Change log -- v2->v3: Added Halil's R-B on both patches. Patch #1: Added ERC "installed parameters restored". v1->v2: Patch #1: Add all ERCs. Commit message update. Patch #2:

Re: [Qemu-devel] [PATCH v2 1/2] build-sys: add --disable-vhost-user

2017-08-02 Thread Michael S. Tsirkin
On Fri, Jul 28, 2017 at 04:13:08PM +0200, Marc-André Lureau wrote: > Learn to compile out vhost-user. Keep it enabled by default on > non-win32, that is assumed to be POSIX. Fail if trying to enable it on > win32. > > When trying to make a vhost-user netdev, it gives the following error: > >

Re: [Qemu-devel] [PATCH] docs/pcie.txt: Replace ioh3420 with pcie-root-port

2017-08-02 Thread Michael S. Tsirkin
On Wed, Aug 02, 2017 at 06:51:13PM +0300, Marcel Apfelbaum wrote: > Do not mention ioh3420 in the "how to" doc. > The device still works and can be used by already > existing setups, but no need to be mentioned. > > Suggested-by: Andrew Jones > Signed-off-by: Marcel Apfelbaum

Re: [Qemu-devel] [PATCH] test-qga: Kill broken and dead QGA_TEST_SIDE_EFFECTING code

2017-08-02 Thread Marc-André Lureau
- Original Message - > Back when the test was introduced, in commit 62c39b307, the > test was set up to run qemu-ga directly on the host performing > the test, and defaults to limiting itself to safe commands. At > the time, it was envisioned that setting QGA_TEST_SIDE_EFFECTING > in

[Qemu-devel] [PULL 1/2] slirp: fill error when failing to initialize user network

2017-08-02 Thread Samuel Thibault
From: Hervé Poussineau With "-netdev user,id=net0,dns=1.2.3.4" error was: qemu-system-i386: -netdev user,id=net0,dns=1.2.3.4: Device 'user' could not be initialized Error is now: qemu-system-i386: -netdev user,id=net0,dns=1.2.3.4: DNS doesn't belong to network

[Qemu-devel] [PULL 2/2] slirp: check len against dhcp options array end

2017-08-02 Thread Samuel Thibault
From: Prasad J Pandit While parsing dhcp options string in 'dhcp_decode', if an options' length 'len' appeared towards the end of 'bp_vend' array, ensuing read could lead to an OOB memory access issue. Add check to avoid it. This is CVE-2017-11434. Reported-by: Reno

[Qemu-devel] [PATCH v3 2/2] s390x/css: generate solicited crw for rchp completion signaling

2017-08-02 Thread Dong Jia Shi
A successful completion of rchp should signal a solicited channel path initialized CRW (channel report word), while the current implementation always generates an un-solicited one. Let's fix this. Reported-by: Halil Pasic Signed-off-by: Dong Jia Shi

[Qemu-devel] [PATCH v3 1/2] s390x/css: use macro for event-information pending error recover code

2017-08-02 Thread Dong Jia Shi
Let's use a macro for the ERC (error recover code) when generating a Channel Subsystem Event-information pending CRW (channel report word). While we are at it, let's also add all other ERCs. Signed-off-by: Dong Jia Shi Reviewed-by: Halil Pasic

Re: [Qemu-devel] [PATCH 1/6] tests/tcg/test_path.c: include utils/bufferiszero.c

2017-08-02 Thread Philippe Mathieu-Daudé
Hi Cleber, On 08/02/2017 05:15 PM, Cleber Rosa wrote: Which contains one specific function used by iov.c. Without this, "make -C tests/tcg test_path" (and consequently "make -C tests/tcg" or simply "make test") fails quite early. Signed-off-by: Cleber Rosa ---

Re: [Qemu-devel] [PATCH 03/15] target/arm: Consolidate PMSA handling in get_phys_addr()

2017-08-02 Thread Philippe Mathieu-Daudé
On 08/02/2017 01:43 PM, Peter Maydell wrote: Currently get_phys_addr() has PMSAv7 handling before the "is translation disabled?" check, and then PMSAv5 after it. Tidy this up by making the PMSAv5 code handle the "MPU disabled" case itself, so that we have all the PMSA code in one place. This

[Qemu-devel] [PULL 1/2] slirp: fill error when failing to initialize user network

2017-08-02 Thread Samuel Thibault
From: Hervé Poussineau With "-netdev user,id=net0,dns=1.2.3.4" error was: qemu-system-i386: -netdev user,id=net0,dns=1.2.3.4: Device 'user' could not be initialized Error is now: qemu-system-i386: -netdev user,id=net0,dns=1.2.3.4: DNS doesn't belong to network

Re: [Qemu-devel] [PULL 2/2] slirp: check len against dhcp options array end

2017-08-02 Thread Samuel Thibault
Samuel Thibault, on jeu. 03 août 2017 00:26:07 +0200, wrote: > From: Prasad J Pandit > > While parsing dhcp options string in 'dhcp_decode', if an options' > length 'len' appeared towards the end of 'bp_vend' array, ensuing > read could lead to an OOB memory access issue.

Re: [Qemu-devel] [PATCH] firmware: add const to bin_attribute structures

2017-08-02 Thread Michael S. Tsirkin
On Wed, Aug 02, 2017 at 02:11:35PM +0530, Bhumika Goyal wrote: > Add const to bin_attribute structures as they are only passed to the > functions sysfs_{remove/create}_bin_file. The arguments passed are of > type const, so declare the structures to be const. > > Done using Coccinelle. > > @m

Re: [Qemu-devel] [PATCH] cpu: don't allow negative core id

2017-08-02 Thread Eduardo Habkost
On Wed, Aug 02, 2017 at 03:50:36PM +0200, Laurent Vivier wrote: > On 02/08/2017 15:42, Philippe Mathieu-Daudé wrote: > > Hi Laurent, > > > > On Wed, Aug 2, 2017 at 7:32 AM, Laurent Vivier wrote: > >> With pseries machine type a negative core-id is not managed properly: > >>

[Qemu-devel] [PULL 0/2] slirp updates

2017-08-02 Thread Samuel Thibault
warning: redirection vers https://people.debian.org/~sthibault/qemu.git/ The following changes since commit aaaec6acad7cf97372d48c1b09126a09697519c8: Update version for v2.10.0-rc1 release (2017-08-02 16:36:32 +0100) are available in the git repository at:

[Qemu-devel] [PULL 2/2] slirp: check len against dhcp options array end

2017-08-02 Thread Samuel Thibault
From: Prasad J Pandit While parsing dhcp options string in 'dhcp_decode', if an options' length 'len' appeared towards the end of 'bp_vend' array, ensuing read could lead to an OOB memory access issue. Add check to avoid it. Reported-by: Reno Robert

[Qemu-devel] [PULL 0/2] slirp updates

2017-08-02 Thread Samuel Thibault
warning: redirection vers https://people.debian.org/~sthibault/qemu.git/ The following changes since commit aaaec6acad7cf97372d48c1b09126a09697519c8: Update version for v2.10.0-rc1 release (2017-08-02 16:36:32 +0100) are available in the git repository at:

Re: [Qemu-devel] [PULL 02/17] cpu_physical_memory_sync_dirty_bitmap: Fix alignment check

2017-08-02 Thread Paolo Bonzini
On 01/08/2017 20:04, Dr. David Alan Gilbert wrote: > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> On 1 August 2017 at 17:17, Paolo Bonzini wrote: >>> From: "Dr. David Alan Gilbert" >>> >>> This code has an optimised, word aligned version, and a

Re: [Qemu-devel] [RFC 17/29] migration: rebuild channel on source

2017-08-02 Thread Peter Xu
On Tue, Aug 01, 2017 at 11:59:07AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > This patch detects the "resume" flag of migration command, rebuild the > > channels only if the flag is set. > > > > Signed-off-by: Peter Xu > > --- > >

Re: [Qemu-devel] [for-2.11 PATCH 26/26] spapr: add hotplug hooks for PHB hotplug

2017-08-02 Thread Greg Kurz
On Wed, 2 Aug 2017 12:39:12 +1000 David Gibson wrote: > On Tue, Aug 01, 2017 at 05:30:46PM +0200, Greg Kurz wrote: > > On Fri, 28 Jul 2017 14:24:03 +1000 > > David Gibson wrote: > > > > > On Thu, Jul 27, 2017 at 07:09:55PM +0200, Greg

Re: [Qemu-devel] [PATCH] migration: fix small leaks

2017-08-02 Thread Peter Xu
On Tue, Aug 01, 2017 at 05:04:18PM +0100, Marc-André Lureau wrote: > Spotted thanks to valgrind and tests/device-introspect-test: > > ==11711== 1 bytes in 1 blocks are definitely lost in loss record 6 of 14,537 > ==11711==at 0x4C2EB6B: malloc (vg_replace_malloc.c:299) > ==11711==by

Re: [Qemu-devel] [RFC 19/29] migration: let dst listen on port always

2017-08-02 Thread Peter Xu
On Tue, Aug 01, 2017 at 11:56:10AM +0100, Daniel P. Berrange wrote: > On Fri, Jul 28, 2017 at 04:06:28PM +0800, Peter Xu wrote: > > Signed-off-by: Peter Xu > > --- > > migration/exec.c | 2 +- > > migration/fd.c | 2 +- > > migration/socket.c | 4 ++-- > > 3 files

Re: [Qemu-devel] [PATCH] migration: fix small leaks

2017-08-02 Thread Juan Quintela
Marc-André Lureau wrote: > Spotted thanks to valgrind and tests/device-introspect-test: > > ==11711== 1 bytes in 1 blocks are definitely lost in loss record 6 of 14,537 > ==11711==at 0x4C2EB6B: malloc (vg_replace_malloc.c:299) > ==11711==by 0x1E0CDBD8:

Re: [Qemu-devel] [PATCH] vfio/pci-quirks: Set non-zero GMS memory size for IGD

2017-08-02 Thread Dmitry Fleytman
> On 2 Aug 2017, at 24:24 AM, Alex Williamson > wrote: > > On Fri, 28 Jul 2017 08:22:45 +0300 > Dmitry Fleytman > wrote: > >>> On 28 Jul 2017, at 07:51 AM, Zhang, Xiong Y wrote: >>> > On 26

Re: [Qemu-devel] [RFC 18/29] migration: new state "postcopy-recover"

2017-08-02 Thread Peter Xu
On Tue, Aug 01, 2017 at 12:36:22PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: [...] > > @@ -2043,9 +2054,32 @@ static bool postcopy_pause(MigrationState *s) > > qemu_sem_wait(>postcopy_pause_sem); > > } > > > > -

[Qemu-devel] [PATCH] target-i386 : reduce rtc 0x70 access vm-exit time

2017-08-02 Thread Peng Hao
some versions of windows guest access rtc frequently because of rtc as system tick.guest access rtc like this: write register index to 0x70, then write or read data from 0x71. writing 0x70 port is just as index and do nothing else. So writing 0x70 is not necessory to exit to userspace every

Re: [Qemu-devel] [PATCH for-2.10 0/5] tests: acpi: make sure FADT is compared to reference table

2017-08-02 Thread Igor Mammedov
On Wed, 2 Aug 2017 00:14:18 +0300 "Michael S. Tsirkin" wrote: > On Mon, Jul 31, 2017 at 05:40:47PM +0200, Igor Mammedov wrote: > > While refactoring i386/FADT generation to build_append_int_noprefix() > > > > and testing it, It turned out that FADT is only tested

Re: [Qemu-devel] [for-2.10 PATCH] spapr_drc: fix realize and unrealize

2017-08-02 Thread Greg Kurz
On Fri, 28 Jul 2017 14:27:45 +1000 David Gibson wrote: > On Thu, Jul 27, 2017 at 03:50:37PM -0500, Michael Roth wrote: > > Quoting Greg Kurz (2017-07-27 08:45:47) > > > If object_property_add_alias() returns an error in realize(), we should > > > propagate it to

Re: [Qemu-devel] [ANNOUNCE] QEMU 2.10.0-rc1 is now available

2017-08-02 Thread Michael Roth
Quoting Michael Roth (2017-08-02 14:25:48) > Hello, > > On behalf of the QEMU Team, I'd like to announce the availability of the > second release candidate for the QEMU 2.10 release. This release is meant > for testing purposes and should not be used in a production environment. > >

[Qemu-devel] [PATCH 1/6] tests/tcg/test_path.c: include utils/bufferiszero.c

2017-08-02 Thread Cleber Rosa
Which contains one specific function used by iov.c. Without this, "make -C tests/tcg test_path" (and consequently "make -C tests/tcg" or simply "make test") fails quite early. Signed-off-by: Cleber Rosa --- tests/tcg/test_path.c | 1 + 1 file changed, 1 insertion(+) diff

[Qemu-devel] [PATCH 3/6] tests/tcg/linux-test.c: include definitions for getrusage()

2017-08-02 Thread Cleber Rosa
A include for is missing, and prevents tests/tcg/linux-test from compiling. Signed-off-by: Cleber Rosa --- tests/tcg/linux-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c index 1c6c013..15c9d7f 100644 ---

[Qemu-devel] [PATCH 2/6] tests/tcg/linux-test.c: remove unused include of "qemu/cutils.h"

2017-08-02 Thread Cleber Rosa
Building tests/tcg/linux-test is not currently possible because $(QEMU_INCLUDES) is not being passed to $(CC_I386). But, since it's not really used, instead of adding the $(QEMU_INCLUDES), let's remove the "qemu/ctuils.h" include instead. Signed-off-by: Cleber Rosa ---

[Qemu-devel] [PATCH] test-qga: Kill broken and dead QGA_TEST_SIDE_EFFECTING code

2017-08-02 Thread Eric Blake
Back when the test was introduced, in commit 62c39b307, the test was set up to run qemu-ga directly on the host performing the test, and defaults to limiting itself to safe commands. At the time, it was envisioned that setting QGA_TEST_SIDE_EFFECTING in the environment could cover a few more

Re: [Qemu-devel] [PATCH] ppc: fix double-free in cpu_post_load()

2017-08-02 Thread Philippe Mathieu-Daudé
On 08/02/2017 02:34 PM, Greg Kurz wrote: When running nested with KVM PR, ppc_set_compat() fails and QEMU crashes because of "double free or corruption (!prev)". The crash happens because error_report_err() has already called error_free(). Signed-off-by: Greg Kurz

[Qemu-devel] [ANNOUNCE] QEMU 2.10.0-rc1 is now available

2017-08-02 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the second release candidate for the QEMU 2.10 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-2.10.0-rc1.tar.xz

[Qemu-devel] [PATCH 0/6] Enable building and running tcg tests on i386

2017-08-02 Thread Cleber Rosa
The primary motivation of this patch series is to get "make -C tests/tcg", on i386, to run. Having all of the individual i386 tcg tests passing is beyond the scope of this patch series, though. The secondary motivation is to gather feedback on the status of the tcg tests. If you have strong

Re: [Qemu-devel] [PATCH] target-mips: apply CP0.PageMask before writing into TLB entry

2017-08-02 Thread Philippe Mathieu-Daudé
Hi Leon, On 08/02/2017 10:58 AM, Yongbok Kim wrote: From: Leon Alrae PFN0 and PFN1 have to be masked out with PageMask_Mask. Signed-off-by: Leon Alrae Reviewed-by: Yongbok Kim [Yongbok Kim: Added commit message]

[Qemu-devel] [PATCH 5/6] tests/tcg/test-i386-fprem.c: compilation fix for -Werror=strict-prototype

2017-08-02 Thread Cleber Rosa
A trivial fix to make the compiler happy. Signed-off-by: Cleber Rosa --- tests/tcg/test-i386-fprem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/test-i386-fprem.c index 1a71623..f70363d 100644 ---

[Qemu-devel] [PATCH 4/6] tests/tcg/test-i386-fprem: build with $(QEMU_CFLAGS)

2017-08-02 Thread Cleber Rosa
So that glib.h can be found. Signed-off-by: Cleber Rosa --- tests/tcg/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index 89e3342..c946fde 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -98,7

Re: [Qemu-devel] [RFC 19/29] migration: let dst listen on port always

2017-08-02 Thread Daniel P. Berrange
On Wed, Aug 02, 2017 at 03:02:24PM +0800, Peter Xu wrote: > On Tue, Aug 01, 2017 at 11:56:10AM +0100, Daniel P. Berrange wrote: > > On Fri, Jul 28, 2017 at 04:06:28PM +0800, Peter Xu wrote: > > > Signed-off-by: Peter Xu > > > --- > > > migration/exec.c | 2 +- > > >

Re: [Qemu-devel] [PATCH 2/2] io: fix qio_channel_socket_accept err handling

2017-08-02 Thread Peter Xu
On Wed, Aug 02, 2017 at 10:30:20AM +0100, Daniel P. Berrange wrote: > On Wed, Aug 02, 2017 at 11:25:21AM +0800, Peter Xu wrote: > > When accept failed, we should setup errp with the reason. More > > importantly, the caller may assume errp be non-NULL when error happens, > > and not setting the

Re: [Qemu-devel] [PATCH 2/3] block: skip implicit nodes in snapshots, blockjobs

2017-08-02 Thread Stefan Hajnoczi
On Tue, Aug 01, 2017 at 04:49:06PM +0300, Manos Pitsidianakis wrote: > diff --git a/block.c b/block.c > index 886a457ab0..9ebdba28b0 100644 > --- a/block.c > +++ b/block.c > @@ -4947,3 +4947,20 @@ bool bdrv_can_store_new_dirty_bitmap(BlockDriverState > *bs, const char *name, > > return

Re: [Qemu-devel] [PATCH v3 4/7] block: convert ThrottleGroup to object with QOM

2017-08-02 Thread Stefan Hajnoczi
On Tue, Aug 01, 2017 at 07:49:33PM +0300, Manos Pitsidianakis wrote: > On Tue, Aug 01, 2017 at 04:47:03PM +0100, Stefan Hajnoczi wrote: > > On Mon, Jul 31, 2017 at 12:54:40PM +0300, Manos Pitsidianakis wrote: > > > ThrottleGroup is converted to an object. This will allow the future > > > throttle

Re: [Qemu-devel] [RFC] block-insert-node and block-job-delete

2017-08-02 Thread Stefan Hajnoczi
On Fri, Jul 28, 2017 at 01:55:38PM +0200, Kevin Wolf wrote: > Am 28.07.2017 um 00:09 hat John Snow geschrieben: > > On 07/26/2017 02:23 PM, Manos Pitsidianakis wrote: > > > On Wed, Jul 26, 2017 at 04:12:21PM +0100, Stefan Hajnoczi wrote: > > > > On Wed, Jul 26, 2017 at 05:19:24PM +0300, Manos

Re: [Qemu-devel] [PATCH 1/2] migration: fix comment disorder in RAMState

2017-08-02 Thread Juan Quintela
Peter Xu wrote: > Comments for "migration_dirty_pages" and "bitmap_mutex" are switched. > Fix it. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 1/3] block: add options parameter to bdrv_new_open_driver()

2017-08-02 Thread Stefan Hajnoczi
On Tue, Aug 01, 2017 at 04:49:05PM +0300, Manos Pitsidianakis wrote: > diff --git a/block.c b/block.c > index 37e72b7a96..886a457ab0 100644 > --- a/block.c > +++ b/block.c > @@ -1149,16 +1149,26 @@ free_and_fail: > return ret; > } > > +/* > + * If options is not NULL it is cloned (which

[Qemu-devel] [PATCH for-2.10 2/3] target/mips: Drop redundant gen_io_start/stop()

2017-08-02 Thread James Hogan
DMTC0 CP0_Cause does a redundant gen_io_start() and gen_io_end() pair, even though this is done for all DMTC0 operations outside of the switch statement. Remove these redundant calls. Fixes: 5dc5d9f055c5 ("mips: more fixes to the MIPS interrupt glue logic") Signed-off-by: James Hogan

Re: [Qemu-devel] [PULL 00/10] pc, acpi, virtio: fixes, test speedup for rc1

2017-08-02 Thread Peter Maydell
On 1 August 2017 at 22:37, Michael S. Tsirkin wrote: > The following changes since commit 7d48cf8102a10e4a54333811bafb5eb566509268: > > Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' > into staging (2017-08-01 14:33:56 +0100) > > are available in the

Re: [Qemu-devel] [PATCH v3 4/7] block: convert ThrottleGroup to object with QOM

2017-08-02 Thread Manos Pitsidianakis
On Wed, Aug 02, 2017 at 11:39:22AM +0100, Stefan Hajnoczi wrote: On Tue, Aug 01, 2017 at 07:49:33PM +0300, Manos Pitsidianakis wrote: On Tue, Aug 01, 2017 at 04:47:03PM +0100, Stefan Hajnoczi wrote: > On Mon, Jul 31, 2017 at 12:54:40PM +0300, Manos Pitsidianakis wrote: > > ThrottleGroup is

Re: [Qemu-devel] [PATCH 2/2] io: fix qio_channel_socket_accept err handling

2017-08-02 Thread Juan Quintela
Peter Xu wrote: > When accept failed, we should setup errp with the reason. More > importantly, the caller may assume errp be non-NULL when error happens, > and not setting the errp may crash QEMU. > > At the same time, move the trace_qio_channel_socket_accept_fail() after >

[Qemu-devel] [PATCH for-2.10 0/3] target/mips: Fix fallout from indirect branch optimisation

2017-08-02 Thread James Hogan
Primarily patch 1 fixes some fallout from the recent indirect branch optimisations in v2.10.0-rc0, where interrupt handling may be delayed after interrupts are enabled until it is too late. Patch 2 and 3 then fix a couple of other loosely related issues spotted in the process or in testing.

[Qemu-devel] [PATCH for-2.10 3/3] target/mips: Fix RDHWR CC with icount

2017-08-02 Thread James Hogan
RDHWR CC reads the CPU timer like MFC0 CP0_Count, so with icount enabled it must set can_do_io while it calls the helper to avoid the "Bad icount read" error. It should also break out of the translation loop to ensure that timer interrupts are immediately handled. Fixes: 2e70f6efa8b9 ("Add

Re: [Qemu-devel] [PATCH 3/3] block: remove legacy I/O throttling

2017-08-02 Thread Stefan Hajnoczi
On Tue, Aug 01, 2017 at 04:49:07PM +0300, Manos Pitsidianakis wrote: > diff --git a/block.c b/block.c > index 9ebdba28b0..c6aad25286 100644 > --- a/block.c > +++ b/block.c > @@ -1975,6 +1975,7 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState > *child_bs, > child = g_new(BdrvChild, 1); >

Re: [Qemu-devel] [PATCH] migration: fix small leaks

2017-08-02 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Spotted thanks to valgrind and tests/device-introspect-test: > > ==11711== 1 bytes in 1 blocks are definitely lost in loss record 6 of 14,537 > ==11711==at 0x4C2EB6B: malloc (vg_replace_malloc.c:299) > ==11711==by 0x1E0CDBD8:

Re: [Qemu-devel] [PATCH 3/3] block: remove legacy I/O throttling

2017-08-02 Thread Kevin Wolf
Am 02.08.2017 um 12:07 hat Stefan Hajnoczi geschrieben: > On Tue, Aug 01, 2017 at 04:49:07PM +0300, Manos Pitsidianakis wrote: > > diff --git a/block.c b/block.c > > index 9ebdba28b0..c6aad25286 100644 > > --- a/block.c > > +++ b/block.c > > @@ -1975,6 +1975,7 @@ BdrvChild

[Qemu-devel] [PATCH] cpu: don't allow negative core id

2017-08-02 Thread Laurent Vivier
With pseries machine type a negative core-id is not managed properly: -1 gives an inaccurate error message ("core -1 already populated"), -2 crashes QEMU (core dump) As it seems a negative value is invalid for any architecture, instead of checking this in spapr_core_pre_plug() I think it's better

Re: [Qemu-devel] [RFC 19/29] migration: let dst listen on port always

2017-08-02 Thread Peter Xu
On Wed, Aug 02, 2017 at 10:26:48AM +0100, Daniel P. Berrange wrote: > On Wed, Aug 02, 2017 at 03:02:24PM +0800, Peter Xu wrote: > > On Tue, Aug 01, 2017 at 11:56:10AM +0100, Daniel P. Berrange wrote: > > > On Fri, Jul 28, 2017 at 04:06:28PM +0800, Peter Xu wrote: > > > > Signed-off-by: Peter Xu

Re: [Qemu-devel] [PATCH] watchdog: wdt_aspeed: Add support for the reset width register

2017-08-02 Thread Andrew Jeffery
On Tue, 2017-08-01 at 09:21 +0200, Cédric Le Goater wrote: > On 08/01/2017 03:04 AM, Andrew Jeffery wrote: > > The reset width register controls how the pulse on the SoC's WDTRST{1,2} > > pins behaves. A pulse is emitted if the external reset bit is set in > > WDT_CTRL. WDT_RESET_WIDTH requires

Re: [Qemu-devel] [RFC 16/29] qmp: hmp: add migrate "resume" option

2017-08-02 Thread Daniel P. Berrange
On Wed, Aug 02, 2017 at 01:56:46PM +0800, Peter Xu wrote: > On Tue, Aug 01, 2017 at 12:03:48PM +0100, Daniel P. Berrange wrote: > > On Fri, Jul 28, 2017 at 04:06:25PM +0800, Peter Xu wrote: > > > It will be used when we want to resume one paused migration. > > > > > > Signed-off-by: Peter Xu

[Qemu-devel] [PATCH v2 1/2] migration: fix comment disorder in RAMState

2017-08-02 Thread Peter Xu
Comments for "migration_dirty_pages" and "bitmap_mutex" are switched. Fix it. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Peter Xu --- migration/ram.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [Qemu-devel] [PATCH v2 2/2] s390x/css: generate solicited crw for rchp completion signaling

2017-08-02 Thread Cornelia Huck
On Tue, 1 Aug 2017 17:16:37 +0200 Halil Pasic wrote: > On 08/01/2017 09:57 AM, Dong Jia Shi wrote: > [..] > > --- a/hw/s390x/css.c > > +++ b/hw/s390x/css.c > > @@ -1745,10 +1745,10 @@ int css_do_rchp(uint8_t cssid, uint8_t chpid) > > } > > > > /* We don't

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-08-02 Thread Peter Maydell
On 2 August 2017 at 12:04, Stefan Hajnoczi wrote: > On Tue, Aug 01, 2017 at 02:54:29PM +0100, Peter Maydell wrote: >> and I don't need the TCG engine to be a library to do that... > > You do need TCG APIs if you want TCG-level instrumentation, tuning > options, callbacks,

[Qemu-devel] [PATCH v2 0/2] migration: fixes for 2.10

2017-08-02 Thread Peter Xu
v2: - patch 2: move trace_*() after error_setg_errno(). [Dan] Two patches isolated from the postcopy recovery series, which may be good for 2.10. Peter Xu (2): migration: fix comment disorder in RAMState io: fix qio_channel_socket_accept err handling io/channel-socket.c | 3 ++-

[Qemu-devel] [PATCH v2 2/2] io: fix qio_channel_socket_accept err handling

2017-08-02 Thread Peter Xu
When accept failed, we should setup errp with the reason. More importantly, the caller may assume errp be non-NULL when error happens, and not setting the errp may crash QEMU. At the same time, move the trace_qio_channel_socket_accept_fail() after the if check on EINTR. Two reasons: 1. when

Re: [Qemu-devel] [PATCH v2 2/2] io: fix qio_channel_socket_accept err handling

2017-08-02 Thread Daniel P. Berrange
On Wed, Aug 02, 2017 at 05:41:20PM +0800, Peter Xu wrote: > When accept failed, we should setup errp with the reason. More > importantly, the caller may assume errp be non-NULL when error happens, > and not setting the errp may crash QEMU. > > At the same time, move the

Re: [Qemu-devel] [PATCH v2 1/2] s390x/css: use macro for event-information pending error recover code

2017-08-02 Thread Cornelia Huck
On Wed, 2 Aug 2017 09:15:18 +0800 Dong Jia Shi wrote: > * Halil Pasic [2017-08-01 17:24:10 +0200]: > > > > > > > On 08/01/2017 09:57 AM, Dong Jia Shi wrote: > > > Let's use a macro for the ERC (error recover code) when generating a > >

[Qemu-devel] [PATCH for-2.10 1/3] target/mips: Use BS_EXCP where interrupts are expected

2017-08-02 Thread James Hogan
Commit e350d8ca3ac7 ("target/mips: optimize indirect branches") made indirect branches able to directly find the next TB and jump straight to it without breaking out of translated code and going around the main execution loop. This breaks the assumption in target/mips/translate.c that BS_STOP is

Re: [Qemu-devel] [PATCH v2 0/2] migration: fixes for 2.10

2017-08-02 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > v2: > - patch 2: move trace_*() after error_setg_errno(). [Dan] > > Two patches isolated from the postcopy recovery series, which may be > good for 2.10. Queued > Peter Xu (2): > migration: fix comment disorder in RAMState > io: fix

Re: [Qemu-devel] [PATCH 1/1] qemu-iotests/109: Fix lock race condition

2017-08-02 Thread Kevin Wolf
Am 01.08.2017 um 23:31 hat Cleber Rosa geschrieben: > A race condition is currently present between the clean up attempt of > the QEMU process and the execution of qemu-img. The actual (bad) > output is: > > -Warning: Image size mismatch! > -Images are identical. > +qemu-img: Could not open

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-08-02 Thread Stefan Hajnoczi
On Tue, Aug 01, 2017 at 02:54:29PM +0100, Peter Maydell wrote: > On 1 August 2017 at 14:48, Stefan Hajnoczi wrote: > > Thanks for sharing the requirements. A stable API is necessary for > > providing these features. > > > > We're essentially talking about libqemu. That means

Re: [Qemu-devel] [PATCH 00/13] instrument: Add basic event instrumentation

2017-08-02 Thread Stefan Hajnoczi
On Fri, Jul 28, 2017 at 07:21:04PM +0300, Lluís Vilanova wrote: > Stefan Hajnoczi writes: > > > On Thu, Jul 27, 2017 at 11:40:17AM +0100, Peter Maydell wrote: > >> On 27 July 2017 at 11:32, Stefan Hajnoczi wrote: > >> > On Wed, Jul 26, 2017 at 03:44:39PM +0300, Lluís

Re: [Qemu-devel] [PATCH 4/6] hw/block: Fix the return type

2017-08-02 Thread Mao Zhongyi
Hi On 08/01/2017 10:29 PM, Markus Armbruster wrote: Stefan Hajnoczi writes: On Wed, Jul 26, 2017 at 08:02:53PM +0800, Mao Zhongyi wrote: When the function no success value to transmit, it usually make the function return void. It has turned out not to be a success,

Re: [Qemu-devel] [PATCH 3/3] block: remove legacy I/O throttling

2017-08-02 Thread Manos Pitsidianakis
On Wed, Aug 02, 2017 at 11:07:24AM +0100, Stefan Hajnoczi wrote: On Tue, Aug 01, 2017 at 04:49:07PM +0300, Manos Pitsidianakis wrote: diff --git a/block.c b/block.c index 9ebdba28b0..c6aad25286 100644 --- a/block.c +++ b/block.c @@ -1975,6 +1975,7 @@ BdrvChild

Re: [Qemu-devel] [PATCH] ppc: fix double-free in cpu_post_load()

2017-08-02 Thread David Gibson
On Wed, Aug 02, 2017 at 07:34:16PM +0200, Greg Kurz wrote: > When running nested with KVM PR, ppc_set_compat() fails and QEMU crashes > because of "double free or corruption (!prev)". The crash happens because > error_report_err() has already called error_free(). > > Signed-off-by: Greg Kurz

Re: [Qemu-devel] [PATCH v3 5/5] docs: update documentation considering PCIE-PCI bridge

2017-08-02 Thread Laine Stump
On 08/02/2017 01:58 PM, Marcel Apfelbaum wrote: > On 02/08/2017 19:26, Michael S. Tsirkin wrote: >> On Wed, Aug 02, 2017 at 06:36:29PM +0300, Marcel Apfelbaum wrote: Can dmi-pci support shpc? why doesn't it? For compatibility? >>> >>> I don't know why, but the fact that it doesn't

Re: [Qemu-devel] [PATCH] libqtest: Fix typo in comments

2017-08-02 Thread Jeff Cody
On Wed, Aug 02, 2017 at 08:08:33PM -0500, Eric Blake wrote: > s/continuosly/continuously/ > > Signed-off-by: Eric Blake Hardly seems like a trivial patch like this should need an R-b, but what the heck: Reviewed-by: Jeff Cody > --- > tests/libqtest.h |

Re: [Qemu-devel] [PATCH] virtio: Mark virtio-device as non-user-creatable

2017-08-02 Thread Halil Pasic
On 08/02/2017 01:01 AM, Eduardo Habkost wrote: > TYPE_VIRTIO_DEVICE devices are already not usable with -device > and device_add, but they are reported as user-creatable on > "-device help" and through monitor interfaces. I've tried -device virtio-rng on s390x and from what I see, it seems we

Re: [Qemu-devel] [PATCH v3 2/6] seccomp: add obsolete argument to command line

2017-08-02 Thread Daniel P. Berrange
On Wed, Aug 02, 2017 at 01:33:56PM +0100, Daniel P. Berrange wrote: > On Fri, Jul 28, 2017 at 02:10:36PM +0200, Eduardo Otubo wrote: > > This patch introduces the argument [,obsolete=allow] to the `-sandbox on' > > option. It allows Qemu to run safely on old system that still relies on > > old

Re: [Qemu-devel] [PATCH v2 4/4] maint: Include bug-reporting info in --help output.

2017-08-02 Thread Daniel P. Berrange
On Fri, Jul 28, 2017 at 11:47:08AM -0500, Eric Blake wrote: > These days, many programs are including a bug-reporting address, > or better yet, a link to the project web site, at the tail of > their --help output. However, we were not very consistent at > doing so: only qemu-nbd and qemu-qa

Re: [Qemu-devel] Where is the VM live migration code?

2017-08-02 Thread Dr. David Alan Gilbert
* Aditya Bhardwaj (adityaf...@gmail.com) wrote: > My lab setup is: 3 HP Servers each of 4 GB RAM. Server 1 and Server 2: > installed with Virtualization using KVM on Redhat 6.5 System. On top of > this I am using libvirtd for managing virtual machines. NFS server is > installed on Server 3 for

Re: [Qemu-devel] [PATCH for-2.10 3/5] tests: acpi: rename test_acpi_tables()/test_dst_table() to reflect its usage

2017-08-02 Thread Marcel Apfelbaum
On 31/07/2017 18:40, Igor Mammedov wrote: Main purpose of test_dst_table() is loading a table from QEMU with checking that checksum in header matches actual one, rename it reflect main action it performs. Likewise test_acpi_tables() name is to broad, while the function only loads tables

Re: [Qemu-devel] [PATCH for-2.10 4/5] tests: acpi: add comments to fetch_rsdt_referenced_tables/data->tables usage

2017-08-02 Thread Marcel Apfelbaum
On 31/07/2017 18:40, Igor Mammedov wrote: Signed-off-by: Igor Mammedov --- tests/bios-tables-test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index ed32e9a..a2a90d7 100644 --- a/tests/bios-tables-test.c +++

Re: [Qemu-devel] [PATCH v6 2/7] qemu.py: fix is_running() return before first launch()

2017-08-02 Thread Stefan Hajnoczi
On Tue, Aug 01, 2017 at 02:56:55PM +0200, Amador Pahim wrote: > On Tue, Aug 1, 2017 at 12:50 PM, Eduardo Habkost wrote: > > On Tue, Aug 01, 2017 at 11:09:25AM +0100, Stefan Hajnoczi wrote: > >> On Mon, Jul 31, 2017 at 10:51:05AM +0200, Amador Pahim wrote: > >> > is_running()

[Qemu-devel] [PATCH] firmware: add const to bin_attribute structures

2017-08-02 Thread Bhumika Goyal
Add const to bin_attribute structures as they are only passed to the functions sysfs_{remove/create}_bin_file. The arguments passed are of type const, so declare the structures to be const. Done using Coccinelle. @m disable optional_qualifier@ identifier s; position p; @@ static struct

Re: [Qemu-devel] Where is the VM live migration code?

2017-08-02 Thread Eric Blake
On 08/02/2017 07:18 AM, Daniel P. Berrange wrote: > On Wed, Aug 02, 2017 at 04:25:08PM +0530, Aditya Bhardwaj wrote: >> My lab setup is: 3 HP Servers each of 4 GB RAM. Server 1 and Server 2: >> installed with Virtualization using KVM on Redhat 6.5 System. On top of >> this I am using libvirtd for

Re: [Qemu-devel] [PATCH v3 2/6] seccomp: add obsolete argument to command line

2017-08-02 Thread Daniel P. Berrange
On Fri, Jul 28, 2017 at 02:10:36PM +0200, Eduardo Otubo wrote: > This patch introduces the argument [,obsolete=allow] to the `-sandbox on' > option. It allows Qemu to run safely on old system that still relies on > old system calls. > > Signed-off-by: Eduardo Otubo > --- >

  1   2   >