[Qemu-devel] how to get the default cpu for a softmmu

2016-10-14 Thread Dennis Luehring
i can get a list of all supported CPUs by using the -cpu ? commandline but which CPU is selected if i don't give the -cpu parameter on normal qemu start of a softmmu?

Re: [Qemu-devel] [PATCH] eepro100: Fix memory leak and simplify code for VMStateDescription

2016-10-14 Thread Stefan Weil
On 10/14/16 10:25, Dr. David Alan Gilbert wrote: * Stefan Weil (s...@weilnetz.de) wrote: Instead of allocating a VMStateDescription for each NIC instance, the code now uses a single constant VMStateDescription for all instances. That implies that the name field is always the same. Doesn't

Re: [Qemu-devel] [Qemu-block] [PATCH] rbd: make the code better readable

2016-10-14 Thread 李秀波
JohnSnow 写到: > > >On 10/14/2016 05:51 AM, Xiubo Li wrote: >> Make it a bit clear and better readable. >> > >Suggestion: "Make it clearer and more readable." > Yes, see the next version. >> >> if (qemu_rbd_set_auth(cluster, secretid, errp) < 0) { >>

[Qemu-devel] [PATCH v3 0/3] Split cpu_exec_init() into an init and a realize part

2016-10-14 Thread Laurent Vivier
Since commit 42ecaba ("target-i386: Call cpu_exec_init() on realize"), , commit 6dd0f83 ("target-ppc: Move cpu_exec_init() call to realize function"), and commit c6644fc ("s390x/cpu: Get rid of side effects when creating a vcpu"), cpu_exec_init() has been moved to realize function for some

[Qemu-devel] [PATCH v3 3/3] exec: call cpu_exec_exit() from a CPU unrealize common function

2016-10-14 Thread Laurent Vivier
As cpu_exec_exit() mirrors the cpu_exec_realizefn(), rename it as cpu_exec_unrealizefn(). Create and register a cpu_common_unrealizefn() function for the CPU device class and call cpu_exec_unrealizefn() from this function. Remove cpu_exec_exit() from cpu_common_finalize() (which mirrors init,

[Qemu-devel] [PATCH v3 2/3] exec: rename cpu_exec_init() as cpu_exec_realizefn()

2016-10-14 Thread Laurent Vivier
Modify all CPUs to call it from XXX_cpu_realizefn() function. Remove all the cannot_destroy_with_object_finalize_yet as unsafe references have been moved to cpu_exec_realizefn(). (tested with QOM command provided by commit 4c315c27) for arm: Setting of cpu->mp_affinity is moved from

[Qemu-devel] [PATCH v3 1/3] exec: split cpu_exec_init()

2016-10-14 Thread Laurent Vivier
Put in cpu_exec_initfn() what initializes the CPU, and let in cpu_exec_init() what adds it to the environment. As cpu_exec_initfn() is called by all XX_cpu_initfn() call it directly in cpu_common_initfn(). cpu_exec_init() is now a realize function, it will be renamed to cpu_exec_realizefn() and

[Qemu-devel] [Bug 1319100] Re: qemu-arm-static bug in signal handling causes mono and java to hang

2016-10-14 Thread Bug Watch Updater
** Changed in: qemu-kvm (Debian) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1319100 Title: qemu-arm-static bug in signal handling causes mono and java

Re: [Qemu-devel] [PATCH 1/2] KVM: page track: add a new notifier type: track_flush_slot

2016-10-14 Thread Neo Jia
On Fri, Oct 14, 2016 at 10:51:24AM -0600, Alex Williamson wrote: > On Fri, 14 Oct 2016 09:35:45 -0700 > Neo Jia wrote: > > > On Fri, Oct 14, 2016 at 08:46:01AM -0600, Alex Williamson wrote: > > > On Fri, 14 Oct 2016 08:41:58 -0600 > > > Alex Williamson

Re: [Qemu-devel] [PATCH v2 3/4] fdc: Move qdev properties to FloppyDrive

2016-10-14 Thread John Snow
On 09/30/2016 03:39 PM, Kevin Wolf wrote: This makes the FloppyDrive qdev object actually useful: Now that it has all properties that don't belong to the controller, you can actually use '-device floppy' and get a working result. Command line semantics is consistent with CD-ROM drives: By

Re: [Qemu-devel] [PATCH v2 2/4] fdc: Add a floppy drive qdev

2016-10-14 Thread John Snow
On 09/30/2016 03:39 PM, Kevin Wolf wrote: Floppy controllers automatically create two floppy drive devices in qdev now. (They always created two drives, but managed them only internally.) Is this commit message out-of-phase now? Signed-off-by: Kevin Wolf ---

Re: [Qemu-devel] [PATCH] trace: fix group name generation

2016-10-14 Thread Greg Kurz
On Fri, 14 Oct 2016 16:31:01 -0500 Eric Blake wrote: > On 10/14/2016 04:26 PM, Greg Kurz wrote: > > Since commit "80dd5c4918ab trace: introduce a formal group name for trace > > events", tracetool generates C variable names and macro definitions out > > of the path to the

Re: [Qemu-devel] [PATCH v4 3/6] tests: move QVirtioBus pointer into QVirtioDevice

2016-10-14 Thread Greg Kurz
On Fri, 14 Oct 2016 10:58:52 +0200 Laurent Vivier wrote: > This allows to not have to pass bus and device for every virtio functions. > > Signed-off-by: Laurent Vivier > --- Reviewed-by: Greg Kurz > tests/libqos/virtio-mmio.c | 1 +

Re: [Qemu-devel] [PATCH] trace: fix group name generation

2016-10-14 Thread Eric Blake
On 10/14/2016 04:26 PM, Greg Kurz wrote: > Since commit "80dd5c4918ab trace: introduce a formal group name for trace > events", tracetool generates C variable names and macro definitions out > of the path to the trace-events-all file. > > The current code takes care of turning '/' and '-'

Re: [Qemu-devel] [PATCH v2 1/4] fdc: Add a floppy qbus

2016-10-14 Thread John Snow
On 09/30/2016 03:39 PM, Kevin Wolf wrote: This adds a qbus to the floppy controller that should contain the floppy drives eventually. At the moment it just exists and is empty. Not unlike myself. Signed-off-by: Kevin Wolf --- hw/block/fdc.c | 40

[Qemu-devel] [PATCH] trace: fix group name generation

2016-10-14 Thread Greg Kurz
Since commit "80dd5c4918ab trace: introduce a formal group name for trace events", tracetool generates C variable names and macro definitions out of the path to the trace-events-all file. The current code takes care of turning '/' and '-' characters into underscores so that the resulting names

Re: [Qemu-devel] [PATCHv2 0/2] dma-helpers: explicitly pass alignment into DMA helpers

2016-10-14 Thread John Snow
On 10/14/2016 07:41 AM, Mark Cave-Ayland wrote: This is a follow-up to the thread at https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg01396.html which introduces an explicit alignment to the DMA helpers to facilitate conversion of the macio controller over to use the now byte-aligned

[Qemu-devel] invtsc + migration + TSC scaling

2016-10-14 Thread Eduardo Habkost
I have been wondering: should we allow live migration with the invtsc flag enabled, if TSC scaling is available on the destination? For reference, this is what the Intel SDM says about invtsc: The time stamp counter in newer processors may support an enhancement, referred to as invariant

Re: [Qemu-devel] [PATCH v4 5/6] tests: use qtest_pc_boot()/qtest_shutdown() in virtio tests

2016-10-14 Thread Greg Kurz
On Fri, 14 Oct 2016 10:58:54 +0200 Laurent Vivier wrote: > This patch replaces calls to qtest_start() and qtest_end() by > calls to qtest_pc_boot() and qtest_shutdown(). > > This allows to initialize memory allocator and PCI interface > functions. This will ease to enable

Re: [Qemu-devel] [PATCH v6 26/35] tests: add atomic_add-bench

2016-10-14 Thread Emilio G. Cota
On Tue, Oct 11, 2016 at 14:40:52 -0500, Richard Henderson wrote: > From: "Emilio G. Cota" > > With this microbenchmark we can measure the overhead of emulating atomic > instructions with a configurable degree of contention. > > The benchmark spawns $n threads, each performing $o

Re: [Qemu-devel] [PATCH v4 4/6] tests: rename target_big_endian() as qvirtio_is_big_endian()

2016-10-14 Thread Greg Kurz
On Fri, 14 Oct 2016 10:58:53 +0200 Laurent Vivier wrote: > Move the definition to libqos/virtio.h as it must be used > only with virtio functions. > > Add a QVirtioDevice parameter as it will be needed to > know if the virtio device is using virtio 1.0 specification > and

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v6 2/2] migration: migrate QTAILQ

2016-10-14 Thread Jianjun Duan
On 10/14/2016 11:39 AM, Paolo Bonzini wrote: > >>> Another possibility is a macro like >>> >>> #define field_at_offset(base, offset, type) \ >>>((type) (((char *) (base)) + (offset))) >>> >>> so that you can do >>> >>>*field_at_offset(void **, elm, (entry) + QTAILQ_NEXT_OFFSET) = NULL;

Re: [Qemu-devel] [PATCH] Fix build for less common build directories names

2016-10-14 Thread Stefan Weil
On 10/14/16 12:01, Stefan Hajnoczi wrote: dirname should only contain QEMU source tree subdirectory paths (e.g. hw/net). How did you get a comma in there? I tried an out-of-tree build in a directory called 'a,b' but it doesn't trigger the issue. I'd like to understand how to reproduce the

Re: [Qemu-devel] [PATCH] target-i386: Don't cpu->migratable field when filtering features

2016-10-14 Thread Eduardo Habkost
On Fri, Oct 14, 2016 at 02:36:52PM -0500, Eric Blake wrote: > On 10/14/2016 02:28 PM, Eduardo Habkost wrote: > > Subject line is missing a word; perhaps s/don't/don't read/ Changed to: "target-i386: Don't use cpu->migratable when filtering features". > > > When explicitly enabling unmigratable

Re: [Qemu-devel] [PATCH] target-i386: Don't cpu->migratable field when filtering features

2016-10-14 Thread Eric Blake
On 10/14/2016 02:28 PM, Eduardo Habkost wrote: Subject line is missing a word; perhaps s/don't/don't read/ > When explicitly enabling unmigratable flags using "-cpu host" > (e.g. "-cpu host,+invtsc"), the requested feature won't be > enabled because cpu->migratable is true by default. > > This

Re: [Qemu-devel] bug introduced by "block: Move throttling fields from BDS to BB"

2016-10-14 Thread Paolo Bonzini
On 14/10/2016 16:11, Paolo Bonzini wrote: > -ThrottleGroup *tg = container_of(blk_bs(blk)->throttle_state, > - ThrottleGroup, ts); > +BlockBackendPublic *blkp = blk_get_public(blk); > +ThrottleGroup *tg = container_of(blkp->throttle_state,

Re: [Qemu-devel] [Qemu-block] [PATCH] rbd: make the code better readable

2016-10-14 Thread John Snow
On 10/14/2016 05:51 AM, Xiubo Li wrote: Make it a bit clear and better readable. Suggestion: "Make it clearer and more readable." Signed-off-by: Xiubo Li --- block/rbd.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff

[Qemu-devel] [PATCH] target-i386: Don't cpu->migratable field when filtering features

2016-10-14 Thread Eduardo Habkost
When explicitly enabling unmigratable flags using "-cpu host" (e.g. "-cpu host,+invtsc"), the requested feature won't be enabled because cpu->migratable is true by default. This is inconsistent with all other CPU models, which don't have the "migratable" option, making "+invtsc" work without the

[Qemu-devel] [PATCH v7 13/16] nbd: Refactor conversion to errno to silence checkpatch

2016-10-14 Thread Eric Blake
Checkpatch complains that 'return EINVAL' is usually wrong (since we tend to favor 'return -EINVAL'). But it is a false positive for nbd_errno_to_system_errno(). Since NBD may add future defined wire values, refactor the code to keep checkpatch happy. Signed-off-by: Eric Blake

Re: [Qemu-devel] Provide safe_syscall for s390x

2016-10-14 Thread Michael Tokarev
Hi. This commit: c9bc3437a905b660561a26cd4ecc64579843267b Author: Richard Henderson Date: Tue Jun 21 17:32:12 2016 -0700 linux-user: Provide safe_syscall for s390x does not build on debian unstable porterbox for s390x, with the following error message:

Re: [Qemu-devel] [PATCH 07/11] spapr: add hotplug interrupt machine options

2016-10-14 Thread Michael Roth
Quoting Bharata B Rao (2016-10-14 03:37:32) > On Wed, Oct 12, 2016 at 06:13:55PM -0500, Michael Roth wrote: > > This adds machine options of the form: > > > > -machine pseries,legacy-hotplug-events=true > > -machine pseries,legacy-hotplug-events=false > > > > to denote whether or not we wish

Re: [Qemu-devel] [PATCH 07/11] spapr: add hotplug interrupt machine options

2016-10-14 Thread Michael Roth
Quoting David Gibson (2016-10-13 23:38:19) > On Wed, Oct 12, 2016 at 06:13:55PM -0500, Michael Roth wrote: > > This adds machine options of the form: > > > > -machine pseries,legacy-hotplug-events=true > > -machine pseries,legacy-hotplug-events=false > > > > to denote whether or not we wish

Re: [Qemu-devel] [PATCH 08/11] spapr_events: add support for dedicated hotplug event source

2016-10-14 Thread Michael Roth
Quoting Bharata B Rao (2016-10-14 03:46:20) > On Wed, Oct 12, 2016 at 06:13:56PM -0500, Michael Roth wrote: > > Hotplug events were previously delivered using an EPOW interrupt > > and were queued by linux guests into a circular buffer. For traditional > > EPOW events like shutdown/resets, this

Re: [Qemu-devel] [PATCH 09/11] spapr: Add DRC count indexed hotplug identifier type

2016-10-14 Thread Michael Roth
Quoting David Gibson (2016-10-13 23:59:37) > On Wed, Oct 12, 2016 at 06:13:57PM -0500, Michael Roth wrote: > > From: Bharata B Rao > > > > Add support for DRC count indexed hotplug ID type which is primarily > > needed for memory hot unplug. This type allows for

Re: [Qemu-devel] How to get the guest virtual address when the guest program is executed?

2016-10-14 Thread Lluís Vilanova
Peter Maydell writes: > On 14 October 2016 at 10:21, 凌英剑 wrote: >> I've been trying to get GVA when the memory access instruction is >> executed,so I traced a function tcg_qemu_tb_exec() and I found the address >> used by ld/st operations is HVA. >> I would like to know

[Qemu-devel] [PATCH v7 11/16] nbd: Less allocation during NBD_OPT_LIST

2016-10-14 Thread Eric Blake
Since we know that the maximum name we are willing to accept is small enough to stack-allocate, rework the iteration over NBD_OPT_LIST responses to reuse a stack buffer rather than allocating every time. Furthermore, we don't even have to allocate if we know the server's length doesn't match what

Re: [Qemu-devel] [PATCH 08/11] spapr_events: add support for dedicated hotplug event source

2016-10-14 Thread Michael Roth
Quoting David Gibson (2016-10-13 23:56:43) > On Wed, Oct 12, 2016 at 06:13:56PM -0500, Michael Roth wrote: > > Hotplug events were previously delivered using an EPOW interrupt > > and were queued by linux guests into a circular buffer. For traditional > > EPOW events like shutdown/resets, this

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v6 2/2] migration: migrate QTAILQ

2016-10-14 Thread Paolo Bonzini
> > Another possibility is a macro like > > > > #define field_at_offset(base, offset, type) \ > >((type) (((char *) (base)) + (offset))) > > > > so that you can do > > > >*field_at_offset(void **, elm, (entry) + QTAILQ_NEXT_OFFSET) = NULL; > >*field_at_offset(void ***, elm, (entry)

Re: [Qemu-devel] [PATCH 07/22] qcow2-bitmap: introduce auto-loading bitmaps

2016-10-14 Thread Vladimir Sementsov-Ogievskiy
On 01.10.2016 19:26, Max Reitz wrote: On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: Auto loading bitmaps are bitmaps in Qcow2, with AUTO flag set. They are ... +goto fail; +} + +/* loop is safe because next entry offset is calculated after conversion to Should it

Re: [Qemu-devel] [PATCH 01/11] spapr_ovec: initial implementation of option vector helpers

2016-10-14 Thread Michael Roth
Quoting David Gibson (2016-10-13 21:39:19) > On Wed, Oct 12, 2016 at 06:13:49PM -0500, Michael Roth wrote: > > PAPR guests advertise their capabilities to the platform by passing > > an ibm,architecture-vec structure via an > > ibm,client-architecture-support hcall as described by LoPAPR v11, > >

[Qemu-devel] [PATCH v7 16/16] nbd: Implement NBD_CMD_WRITE_ZEROES on client

2016-10-14 Thread Eric Blake
Upstream NBD protocol recently added the ability to efficiently write zeroes without having to send the zeroes over the wire, along with a flag to control whether the client wants a hole. The generic block code takes care of falling back to the obvious write of lots of zeroes if we return

[Qemu-devel] [PATCH v7 15/16] nbd: Implement NBD_CMD_WRITE_ZEROES on server

2016-10-14 Thread Eric Blake
Upstream NBD protocol recently added the ability to efficiently write zeroes without having to send the zeroes over the wire, along with a flag to control whether the client wants to allow a hole. Note that when it comes to requiring full allocation, vs. permitting optimizations, the NBD spec

[Qemu-devel] [PATCH v7 12/16] nbd: Support shorter handshake

2016-10-14 Thread Eric Blake
The NBD Protocol allows the server and client to mutually agree on a shorter handshake (omit the 124 bytes of reserved 0), via the server advertising NBD_FLAG_NO_ZEROES and the client acknowledging with NBD_FLAG_C_NO_ZEROES (only possible in newstyle, whether or not it is fixed newstyle). It

[Qemu-devel] [PATCH v7 10/16] nbd: Let client skip portions of server reply

2016-10-14 Thread Eric Blake
The server has a nice helper function nbd_negotiate_drop_sync() which lets it easily ignore fluff from the client (such as the payload to an unknown option request). We can't quite make it common, since it depends on nbd_negotiate_read() which handles coroutine magic, but we can copy the idea

[Qemu-devel] [PATCH v7 14/16] nbd: Improve server handling of shutdown requests

2016-10-14 Thread Eric Blake
NBD commit 6d34500b clarified how clients and servers are supposed to behave before closing a connection. It added NBD_REP_ERR_SHUTDOWN (for the server to announce it is about to go away during option haggling, so the client should quit sending NBD_OPT_* other than NBD_OPT_ABORT) and ESHUTDOWN

[Qemu-devel] [PATCH v7 06/16] nbd: Share common reply-sending code in server

2016-10-14 Thread Eric Blake
Rather than open-coding NBD_REP_SERVER, reuse the code we already have by adding a length parameter. Additionally, the refactoring will make adding NBD_OPT_GO in a later patch easier. Signed-off-by: Eric Blake --- v6: improve (and add) function comments v5: no change v4: no

[Qemu-devel] [PATCH v7 09/16] nbd: Let server know when client gives up negotiation

2016-10-14 Thread Eric Blake
The NBD spec says that a client should send NBD_OPT_ABORT rather than just dropping the connection, if the client doesn't like something the server sent during option negotiation. This is a best-effort attempt only, and can only be done in places where we know the server is still in sync with

[Qemu-devel] [PATCH v7 04/16] nbd: Rename NbdClientSession to NBDClientSession

2016-10-14 Thread Eric Blake
It's better to use consistent capitalization of the namespace used for NBD functions; we have more instances of NBD* than Nbd*. Signed-off-by: Eric Blake --- v6: new patch --- block/nbd-client.h | 6 +++--- block/nbd-client.c | 26 +- block/nbd.c

[Qemu-devel] [PATCH v7 08/16] nbd: Share common option-sending code in client

2016-10-14 Thread Eric Blake
Rather than open-coding each option request, it's easier to have common helper functions do the work. That in turn requires having convenient packed types for handling option requests and replies. Signed-off-by: Eric Blake --- v6: comment and formatting tweaks v5: no change

[Qemu-devel] [PATCH v7 02/16] nbd: Treat flags vs. command type as separate fields

2016-10-14 Thread Eric Blake
Current upstream NBD documents that requests have a 16-bit flags, followed by a 16-bit type integer; although older versions mentioned only a 32-bit field with masking to find flags. Since the protocol is in network order (big-endian over the wire), the ABI is unchanged; but dealing with the

[Qemu-devel] [PATCH v7 07/16] nbd: Send message along with server NBD_REP_ERR errors

2016-10-14 Thread Eric Blake
The NBD Protocol allows us to send human-readable messages along with any NBD_REP_ERR error during option negotiation; make use of this fact for clients that know what to do with our message. Signed-off-by: Eric Blake --- v6: tweak comments, fix indentation v5: don't leak

[Qemu-devel] [PATCH v7 03/16] nbd: Rename NBDRequest to NBDRequestData

2016-10-14 Thread Eric Blake
We have both 'struct NBDRequest' and 'struct nbd_request'; making it confusing to see which does what. Furthermore, we want to rename nbd_request to align with our normal CamelCase naming conventions. So, rename the struct which is used to associate the data received during request callbacks,

[Qemu-devel] [PATCH v7 01/16] nbd: Add qemu-nbd -D for human-readable description

2016-10-14 Thread Eric Blake
The NBD protocol allows servers to advertise a human-readable description alongside an export name during NBD_OPT_LIST. Add an option to pass through the user's string to the NBD client. Doing this also makes it easier to test commit 200650d4, which is the client counterpart of receiving the

[Qemu-devel] [PATCH v7 00/16] nbd: efficient write zeroes

2016-10-14 Thread Eric Blake
Also available as a tag at: git fetch git://repo.or.cz/qemu/ericb.git nbd-zero-v7 v5 was here, but missed 2.7 freeze: https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg04053.html Since then, I've rebased the series, and the bulk of the changes were to use consistent NBDFoo CamelCase

[Qemu-devel] [PATCH v7 05/16] nbd: Rename struct nbd_request and nbd_reply

2016-10-14 Thread Eric Blake
Our coding convention prefers CamelCase names, and we already have other existing structs with NBDFoo naming. Let's be consistent, before later patches add even more structs. Signed-off-by: Eric Blake --- v6: new patch --- block/nbd-client.h | 2 +- include/block/nbd.h |

Re: [Qemu-devel] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1

2016-10-14 Thread John Snow
On 10/13/2016 06:56 PM, John Snow wrote: This is a follow-up to patches 1-6 of: [PATCH v2 00/11] blockjobs: Fix transactional race condition That series started trying to refactor blockjobs with the goal of internalizing BlockJob state as a side effect of having gone through the effort of

Re: [Qemu-devel] [PATCH] target-arm/translate.c: fix movs pc, lr exception return on ARMv7

2016-10-14 Thread Peter Maydell
On 14 October 2016 at 16:13, Alex Bennée wrote: > I suspect we need to audit all calls to store_reg that might involve the > PC to ensure "interworking" branches are correctly handled. Also I'm not > quite sure how the code worked before 9b6a3e as the store_reg path >

Re: [Qemu-devel] How to compile qemu with openssl

2016-10-14 Thread Peter Maydell
On 14 October 2016 at 16:07, Fam Zheng wrote: > If you are adding a feature to QEMU instead of experimenting, you should > modify > ./configure to add a new pair of "--enable-" and "--disable-" options. > For example, refer to how the "--enable-libiscsi" pair is handled

Re: [Qemu-devel] [PATCH] target-arm/translate.c: fix movs pc, lr exception return on ARMv7

2016-10-14 Thread Peter Maydell
On 14 October 2016 at 16:13, Alex Bennée wrote: > This was broken by the fix for 9b6a3ea7a699594162ed3d11e4e04b98568dc5c0. > Specifically a movs pc,lr in the kernels ret_fast_syscall returning to > some thumb mode user space code but store_reg unconditionally aligned > the

Re: [Qemu-devel] How to get the guest virtual address when the guest program is executed?

2016-10-14 Thread Peter Maydell
On 14 October 2016 at 10:21, 凌英剑 wrote: > I've been trying to get GVA when the memory access instruction is > executed,so I traced a function tcg_qemu_tb_exec() and I found the address > used by ld/st operations is HVA. > I would like to know how can I transform HVA to

Re: [Qemu-devel] [Qemu-ppc] [PULL 0/4] ppc patches for qemu-2.7 stable branch

2016-10-14 Thread Peter Maydell
On 14 October 2016 at 09:27, Greg Kurz wrote: > On Fri, 14 Oct 2016 09:28:35 +1100 > David Gibson wrote: > >> On Thu, Oct 13, 2016 at 12:57:19PM +0100, Peter Maydell wrote: >> > On 13 October 2016 at 12:54, Peter Maydell >>

Re: [Qemu-devel] [PATCH 1/7] blockjobs: hide internal jobs from management API

2016-10-14 Thread John Snow
On 10/14/2016 08:58 AM, Kevin Wolf wrote: Am 14.10.2016 um 00:56 hat John Snow geschrieben: If jobs are not created directly by the user, do not allow them to be seen by the user/management utility. At the moment, 'internal' jobs are those that do not have an ID. As of this patch it is

Re: [Qemu-devel] [PULL 27/27] target-arm: Correctly handle 'sub pc, pc, 1' for ARMv6

2016-10-14 Thread Peter Maydell
On 14 October 2016 at 07:44, Alex Bennée wrote: > > Peter Maydell writes: > >> In the ARM v6 architecture, 'sub pc, pc, 1' is not an interworking >> branch, so the computed new value is written to r15 as a normal >> value. The architecture says

Re: [Qemu-devel] [PATCH v2 03/20] target-ppc: move back cpu_exec_init() to init

2016-10-14 Thread Laurent Vivier
On 14/10/2016 16:49, Bharata B Rao wrote: > On Fri, Oct 14, 2016 at 03:07:51PM +1100, David Gibson wrote: >> On Thu, Oct 13, 2016 at 06:24:45PM +0200, Laurent Vivier wrote: >>> We have now the cpu_exec_realize() in realize, >>> so the init part must be in init. >>> >>> As cpu_exec_unrealize() is

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v6 2/2] migration: migrate QTAILQ

2016-10-14 Thread Jianjun Duan
On 10/14/2016 10:04 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> >> >> On 10/14/2016 03:44 AM, Dr. David Alan Gilbert wrote: >>> * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: Currently we cannot directly transfer a QTAILQ instance because of the

Re: [Qemu-devel] [QEMU PATCH v6 1/2] migration: extend VMStateInfo

2016-10-14 Thread Jianjun Duan
On 10/14/2016 02:23 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> Current migration code cannot handle some data structures such as >> QTAILQ in qemu/queue.h. Here we extend the signatures of put/get >> in VMStateInfo so that customized handling is

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v6 2/2] migration: migrate QTAILQ

2016-10-14 Thread Dr. David Alan Gilbert
* Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > > > On 10/14/2016 03:44 AM, Dr. David Alan Gilbert wrote: > > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > >> Currently we cannot directly transfer a QTAILQ instance because of the > >> limitation in the migration code. Here we introduce

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v6 2/2] migration: migrate QTAILQ

2016-10-14 Thread Jianjun Duan
On 10/14/2016 03:44 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> Currently we cannot directly transfer a QTAILQ instance because of the >> limitation in the migration code. Here we introduce an approach to >> transfer such structures. We created

Re: [Qemu-devel] [PATCH 1/2] KVM: page track: add a new notifier type: track_flush_slot

2016-10-14 Thread Alex Williamson
On Fri, 14 Oct 2016 09:35:45 -0700 Neo Jia wrote: > On Fri, Oct 14, 2016 at 08:46:01AM -0600, Alex Williamson wrote: > > On Fri, 14 Oct 2016 08:41:58 -0600 > > Alex Williamson wrote: > > > > > On Fri, 14 Oct 2016 18:37:45 +0800 > > > Jike Song

Re: [Qemu-devel] [PATCH v4 2/6] tests: don't check if qtest_spapr_boot() returns NULL

2016-10-14 Thread Greg Kurz
On Fri, 14 Oct 2016 10:58:51 +0200 Laurent Vivier wrote: > qtest_spapr_boot()/qtest_pc_boot()/qtest_boot() call qtest_vboot() > and qtest_vboot() calls g_malloc(), > and g_malloc() never fails: > if memory allocation fails, the application is terminated. > And even if

Re: [Qemu-devel] [Qemu-block] [PATCH] hw/block/nvme: Simplify if-statements a little bit

2016-10-14 Thread Stefan Hajnoczi
On Wed, Oct 12, 2016 at 05:18:40PM +0200, Thomas Huth wrote: > The condition '!A || (A && B)' is equivalent to '!A || B'. > > Buglink: https://bugs.launchpad.net/qemu/+bug/1464611 > Signed-off-by: Thomas Huth > --- > hw/block/nvme.c | 4 ++-- > 1 file changed, 2

Re: [Qemu-devel] Async savevm using userfaultfd(2)

2016-10-14 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 04:27:19PM +0200, Andrea Arcangeli wrote: > I would suggest not to implement mprotect+sigsegv because maintaining > both APIs would be messy but mostly because mprotect cannot really > work for all cases and it would risk to fail at any time with > -ENOMEM. postcopy live

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v6 2/2] migration: migrate QTAILQ

2016-10-14 Thread Jianjun Duan
I need to double check my code. My build passed and migration test also succeeded. On 10/14/2016 04:07 AM, Paolo Bonzini wrote: > > > On 14/10/2016 12:44, Dr. David Alan Gilbert wrote: +#define QTAILQ_RAW_INSERT_TAIL(head, elm, entry) do { \ +

Re: [Qemu-devel] [PATCH 1/2] KVM: page track: add a new notifier type: track_flush_slot

2016-10-14 Thread Neo Jia
On Fri, Oct 14, 2016 at 08:46:01AM -0600, Alex Williamson wrote: > On Fri, 14 Oct 2016 08:41:58 -0600 > Alex Williamson wrote: > > > On Fri, 14 Oct 2016 18:37:45 +0800 > > Jike Song wrote: > > > > > On 10/11/2016 05:47 PM, Paolo Bonzini wrote:

Re: [Qemu-devel] MTTCG memory ordering

2016-10-14 Thread Stefan Hajnoczi
On Wed, Oct 12, 2016 at 10:58:43AM +0200, Stefan Hajnoczi wrote: > I was curious about the status of your MTTCG GSoC work: > > I saw your fence series which implements the noop memory barrier/fence > instructions on various architectures, but I wasn't sure if that also > covers the case where a

Re: [Qemu-devel] [Qemu-block] [PATCH v5 1/1] block: improve error handling in raw_open

2016-10-14 Thread Halil Pasic
On 10/14/2016 05:59 PM, Stefan Hajnoczi wrote: > On Tue, Oct 11, 2016 at 04:12:35PM +0200, Halil Pasic wrote: >> > Make raw_open for POSIX more consistent in handling errors by setting >> > the error object also when qemu_open fails. The error object was set >> > generally set in case of errors,

Re: [Qemu-devel] [PATCH v4 1/6] tests: fix memory leak in virtio-scsi-test

2016-10-14 Thread Greg Kurz
On Fri, 14 Oct 2016 10:58:50 +0200 Laurent Vivier wrote: > vs is allocated in qvirtio_scsi_pci_init() and never freed. > > Signed-off-by: Laurent Vivier > --- Reviewed-by: Greg Kurz > tests/virtio-scsi-test.c | 1 + > 1 file changed,

Re: [Qemu-devel] [PATCH] char.h: misc doc fix

2016-10-14 Thread Stefan Hajnoczi
On Tue, Oct 11, 2016 at 07:20:12PM +0400, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau > --- > include/sysemu/char.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc

[Qemu-devel] [PULL 2/4] tests/docker: test-build script

2016-10-14 Thread Fam Zheng
From: Alex Bennée Much like test-quick but only builds. This is useful for some of the build targets like ThreadSanitizer that don't yet pass "make check". Signed-off-by: Alex Bennée Message-Id: <20161011161625.9070-3-alex.ben...@linaro.org>

Re: [Qemu-devel] [Qemu-block] [PATCH v3] block: Remove "options" indirection from blockdev-add

2016-10-14 Thread Stefan Hajnoczi
On Tue, Oct 11, 2016 at 03:27:04PM +0200, Kevin Wolf wrote: > Now that QAPI supports boxed types, we can have unions at the top level > of a command, so let's put our real options directly there for > blockdev-add instead of having a single "options" dict that contains the > real arguments. > >

Re: [Qemu-devel] [PATCH 5/7] Blockjobs: Internalize user_pause logic

2016-10-14 Thread Kevin Wolf
Am 14.10.2016 um 00:57 hat John Snow geschrieben: > BlockJobs will begin hiding their state in preparation for some > refactorings anyway, so let's internalize the user_pause mechanism > instead of leaving it to callers to correctly manage. > > Signed-off-by: John Snow

Re: [Qemu-devel] [PATCH 0/2] virtio: cosmetic tweaks

2016-10-14 Thread Stefan Hajnoczi
On Tue, Oct 11, 2016 at 11:22:02AM +0200, Ladi Prosek wrote: > Just a trivial couple of patches addressing minor style issues. > > Enforcing the correct order of operations (pop, unpop, push, rewind) with an > assert, > which was another potential change discussed previously, would add a >

Re: [Qemu-devel] [Qemu-block] [PATCH v5 1/1] block: improve error handling in raw_open

2016-10-14 Thread Stefan Hajnoczi
On Tue, Oct 11, 2016 at 04:12:35PM +0200, Halil Pasic wrote: > Make raw_open for POSIX more consistent in handling errors by setting > the error object also when qemu_open fails. The error object was set > generally set in case of errors, but I guess this case was overlooked. > Do the same for

Re: [Qemu-devel] [PATCH v2] target-mips: Fix Loongson pandn instruction.

2016-10-14 Thread Yongbok Kim
On 14/10/2016 03:46, Heiher wrote: > From: Heiher > > pandn FD, FS, FT > Operation: FD = ((NOT FS) AND FT) > > Signed-off-by: Heiher > Signed-off-by: Fuxin Zhang > --- > target-mips/translate.c | 5 - > 1 file changed, 4

[Qemu-devel] [PULL 15/15] docs/xbzrle: correction

2016-10-14 Thread Juan Quintela
From: Cao jin 1. Default cache size is 64MB. 2. Semantics correction. Signed-off-by: Cao jin Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- docs/xbzrle.txt | 4 ++-- 1 file changed, 2

Re: [Qemu-devel] [PATCH] vfio: fix duplicate function call

2016-10-14 Thread Alex Williamson
On Fri, 14 Oct 2016 19:16:59 +0800 Cao jin wrote: > When vfio device is reset(encounter FLR, or bus reset), if need to do > bus reset(vfio_pci_hot_reset_one is called), vfio_pci_pre_reset & > vfio_pci_post_reset will be called twice. > > Signed-off-by: Cao jin

Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in nfs

2016-10-14 Thread Stefan Hajnoczi
On Mon, Oct 10, 2016 at 10:39:30AM +0530, Ashijeet Acharya wrote: > Hi all, > > I was working on trying to add blockdev-add compatibility for the nfs > block driver but before that runtime options need to be separated into > various options rather than just a simple "filename" option. > > I have

[Qemu-devel] [PULL 14/15] migrate: move max-bandwidth and downtime-limit to migrate_set_parameter

2016-10-14 Thread Juan Quintela
From: Ashijeet Acharya Mark the old commands 'migrate_set_speed' and 'migrate_set_downtime' as deprecated. Move max-bandwidth and downtime-limit into migrate-set-parameters for setting maximum migration speed and expected downtime limit parameters respectively. Change

Re: [Qemu-devel] [PATCH 6/7] blockjobs: split interface into public/private, Part 1

2016-10-14 Thread Kevin Wolf
Am 14.10.2016 um 00:57 hat John Snow geschrieben: > To make it a little more obvious which functions are intended to be > public interface and which are intended to be for use only by jobs > themselves, split the interface into "public" and "private" files. > > Convert blockjobs (e.g.

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: fix failed qemu-img command return zero exit code defeat

2016-10-14 Thread Kevin Wolf
Am 14.10.2016 um 17:39 hat Stefan Hajnoczi geschrieben: > On Mon, Oct 10, 2016 at 11:07:09AM +0800, Xu Tian wrote: > > If backing file can not open when do image rebase, flag 'ret' not > > assign a non-zero value, then qemu-img process exit with code zero. > > Assign value '-1' to flag 'ret' after

Re: [Qemu-devel] [PATCH 7/7] blockjobs: fix documentation

2016-10-14 Thread Kevin Wolf
Am 14.10.2016 um 00:57 hat John Snow geschrieben: > (Trivial) > > Fix wrong function names in documentation. > > Signed-off-by: John Snow Reviewed-by: Kevin Wolf

[Qemu-devel] [PULL 3/4] tests/docker: make test-mingw honour TARGET_LIST

2016-10-14 Thread Fam Zheng
From: Alex Bennée The other builders honour this variable, so should the mingw build. Signed-off-by: Alex Bennée Message-Id: <20161011161625.9070-4-alex.ben...@linaro.org> Signed-off-by: Fam Zheng --- tests/docker/test-mingw |

[Qemu-devel] [PULL 13/15] migration: Fix seg with missing port

2016-10-14 Thread Juan Quintela
From: "Dr. David Alan Gilbert" The command : migrate tcp:localhost: currently segs; fix it so it now says: error parsing address 'localhost:' and the same for -incoming. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrange

Re: [Qemu-devel] [PATCH 4/7] blockjob: centralize QMP event emissions

2016-10-14 Thread Kevin Wolf
Am 14.10.2016 um 00:56 hat John Snow geschrieben: > There's no reason to leave this to blockdev; we can do it in blockjobs > directly and get rid of an extra callback for most users. > > All non-internal events, even those created outside of QMP, will > consistently emit events. > >

[Qemu-devel] [PULL 0/4] Docker testing patches

2016-10-14 Thread Fam Zheng
The following changes since commit c16fe84f07a9d3a04c11ce8a139e13a092b384c2: docker: Build in a clean directory (2016-10-02 09:47:23 +0800) are available in the git repository at: g...@github.com:famz/qemu tags/for-upstream for you to fetch changes up to

[Qemu-devel] [PULL 11/15] RAMBlocks: Store page size

2016-10-14 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Store the page size in each RAMBlock, we need it later. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- exec.c

[Qemu-devel] [PULL 12/15] migration/postcopy: Explicitly disallow huge pages

2016-10-14 Thread Juan Quintela
From: "Dr. David Alan Gilbert" At the moment postcopy will fail as soon as qemu tries to register userfault on the RAMBlock pages that are backed by hugepages. However, the kernel is going to get userfault support for hugepage at some point, and we've not got the rest of the

[Qemu-devel] [PULL 10/15] Postcopy vs xbzrle: Don't send xbzrle pages once in postcopy [for 2.8]

2016-10-14 Thread Juan Quintela
From: "Dr. David Alan Gilbert" xbzrle relies on reading pages that have already been sent to the destination and then applying the modifications; we can't do that in postcopy because the destination may well have modified the page already or the page has been discarded. I

[Qemu-devel] [PULL 06/15] migrate: Fix cpu-throttle-increment regression in HMP

2016-10-14 Thread Juan Quintela
From: Eric Blake Commit 69ef1f3 accidentally broke migrate_set_parameter's ability to set the cpu-throttle-increment to anything other than the default, because it forgot to parse the user's string into an integer. CC: qemu-sta...@nongnu.org Signed-off-by: Eric Blake

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img: fix failed qemu-img command return zero exit code defeat

2016-10-14 Thread Stefan Hajnoczi
On Mon, Oct 10, 2016 at 11:07:09AM +0800, Xu Tian wrote: > If backing file can not open when do image rebase, flag 'ret' not > assign a non-zero value, then qemu-img process exit with code zero. > Assign value '-1' to flag 'ret' after report error message to fix > this defeat. I suggest rewording

  1   2   3   >