Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 15:24, Phil Dennis-Jordan wrote: > --- > target/i386/cpu.c | 1 + > target/i386/cpu.h | 4 > target/i386/kvm.c | 40 > 3 files changed, 37 insertions(+), 8 deletions(-) > > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > index a

Re: [Qemu-devel] [PATCH v2] hw/arm/virt-acpi - reserve ECAM space as PNP0C02 device

2017-01-18 Thread Igor Mammedov
On Tue, 17 Jan 2017 10:56:53 + Peter Maydell wrote: > On 17 January 2017 at 09:49, Andrew Jones wrote: > > In some cases the problem we're solving with the compat guards is > > a bit hypothetical, but, IMHO, nonetheless a good practice. While > > we may be sure that AAVMF and Linux will be f

Re: [Qemu-devel] [PATCH] numa: access CPU's node id via property in hmp_info_numa()

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 03:48:45PM +0100, Igor Mammedov wrote: > Move vcpu's assocciated numa_node field out of generic CPUState > into inherited classes that actually care about cpu<->numa mapping > and make monitor 'info numa' get vcpu's assocciated node id via > node-id property. > It allows to

Re: [Qemu-devel] [PATCH v9 04/11] msix: check msix_init's return value

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 02:29:19PM +0800, Cao jin wrote: > > > On 01/18/2017 12:01 AM, Michael S. Tsirkin wrote: > > On Tue, Jan 17, 2017 at 02:50:38PM +0800, Cao jin wrote: > >> forget to cc maintainers in this new patch > >> > >> On 01/17/2017 02:18 PM, Cao jin wrote: > >>> Doesn't do it for me

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 04:05:59PM +0100, Paolo Bonzini wrote: > > > On 18/01/2017 15:24, Phil Dennis-Jordan wrote: > > --- > > target/i386/cpu.c | 1 + > > target/i386/cpu.h | 4 > > target/i386/kvm.c | 40 > > 3 files changed, 37 insertions(+), 8

Re: [Qemu-devel] [PATCH 08/16] qed: introduce qed_aio_start_io and qed_aio_next_io_cb

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:23PM +0100, Paolo Bonzini wrote: > qed_aio_start_io and qed_aio_next_io will not have to acquire/release > the AioContext, while qed_aio_next_io_cb will. Split the functionality > and gain a little type-safety in the process. > > Signed-off-by: Paolo Bonzini > --- >

Re: [Qemu-devel] [PATCH 09/16] aio: push aio_context_acquire/release down to dispatching

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:24PM +0100, Paolo Bonzini wrote: > The AioContext data structures are now protected by list_lock and/or > they are walked with FOREACH_RCU primitives. There is no need anymore > to acquire the AioContext for the entire duration of aio_dispatch. > Instead, just acquire

Re: [Qemu-devel] [PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate process

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 04:56:58AM +, Li, Liang Z wrote: > > > - virtqueue_add_outbuf(vq, &sg, 1, vb, GFP_KERNEL); > > > - virtqueue_kick(vq); > > > +static void do_set_resp_bitmap(struct virtio_balloon *vb, > > > + unsigned long base_pfn, int pages) > > > > > > - /* When host has read

Re: [Qemu-devel] [PATCH 06/16] nbd: do not block on partial reply header reads

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:21PM +0100, Paolo Bonzini wrote: > @@ -65,54 +67,34 @@ static void nbd_teardown_connection(BlockDriverState *bs) > client->ioc = NULL; > } > > -static void nbd_reply_ready(void *opaque) > +static void nbd_read_reply_entry(void *opaque) Please use coroutine_fn.

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v6 kernel 2/5] virtio-balloon: define new feature bit and head struct

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 01:55:12AM +, Li, Liang Z wrote: > > Sent: Wednesday, January 18, 2017 3:11 AM > > To: Li, Liang Z > > Cc: k...@vger.kernel.org; virtio-...@lists.oasis-open.org; qemu- > > de...@nongnu.org; linux...@kvack.org; linux-ker...@vger.kernel.org; > > virtualizat...@lists.linux-

Re: [Qemu-devel] [PATCH 07/16] coroutine-lock: reschedule coroutine on the AioContext it was running on

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:22PM +0100, Paolo Bonzini wrote: > As a small step towards the introduction of multiqueue, we want > coroutines to remain on the same AioContext that started them, > unless they are moved explicitly with e.g. aio_co_schedule. This patch > avoids that coroutines switch

Re: [Qemu-devel] [PATCH v6 kernel 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 11:09:30AM +0100, David Hildenbrand wrote: > Am 21.12.2016 um 07:52 schrieb Liang Li: > > This patch set contains two parts of changes to the virtio-balloon. > > > > One is the change for speeding up the inflating & deflating process, > > the main idea of this optimization

Re: [Qemu-devel] [PATCH v2] gdbstub.c: fix GDB connection segfault caused by empty machines

2017-01-18 Thread Yang Ziyue
Got it. Thanks! 2017-01-18 10:13 GMT+08:00 Fam Zheng : > On Wed, 01/18 09:34, Yang Ziyue wrote: >> Oops seems I forgot to check the patch before submitting. Sorry for that. >> The new patch is tagged as v3 now, but I'm not sure whether it should >> be tagged as v2 since the origin v2 failed. Is th

Re: [Qemu-devel] [PATCH 01/16] aio: introduce aio_co_schedule and aio_co_wake

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 15:33, Stefan Hajnoczi wrote: > On Fri, Jan 13, 2017 at 02:17:16PM +0100, Paolo Bonzini wrote: >> +static void co_schedule_bh_cb(void *opaque) >> +{ >> +AioContext *ctx = opaque; >> +QSLIST_HEAD(, Coroutine) straight, reversed; >> + >> +QSLIST_MOVE_ATOMIC(&reversed, &ctx

Re: [Qemu-devel] [PATCH 10/16] block: explicitly acquire aiocontext in timers that need it

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:25PM +0100, Paolo Bonzini wrote: > diff --git a/block/null.c b/block/null.c > index b300390..356209a 100644 > --- a/block/null.c > +++ b/block/null.c > @@ -141,7 +141,11 @@ static void null_bh_cb(void *opaque) > static void null_timer_cb(void *opaque) > { > Null

Re: [Qemu-devel] [PATCH v6 wave 2 2/3] hw/isa/lpc_ich9: add broadcast SMI feature

2017-01-18 Thread Laszlo Ersek
On 01/18/17 13:38, Igor Mammedov wrote: > On Wed, 18 Jan 2017 11:23:48 +0100 > Laszlo Ersek wrote: > >> On 01/18/17 11:19, Laszlo Ersek wrote: >>> On 01/18/17 11:03, Igor Mammedov wrote: On Tue, 17 Jan 2017 19:53:21 +0100 Laszlo Ersek wrote: >> >> [snip] >> > This is the c

Re: [Qemu-devel] [PATCH 11/16] block: explicitly acquire aiocontext in callbacks that need it

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:26PM +0100, Paolo Bonzini wrote: > This covers both file descriptor callbacks and polling callbacks, > since they execute related code. > > Signed-off-by: Paolo Bonzini > --- > aio-posix.c | 7 --- > aio-win32.c | 6 -- > block/curl.c

Re: [Qemu-devel] [PATCH 12/16] block: explicitly acquire aiocontext in bottom halves that need it

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:27PM +0100, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > async.c | 4 ++-- > block/archipelago.c | 3 +++ > block/blkdebug.c | 9 + > block/blkreplay.c | 2 +- > block/block-backend.c | 6 ++ > block/curl.c

Re: [Qemu-devel] [PATCH v2] hw/arm/virt-acpi - reserve ECAM space as PNP0C02 device

2017-01-18 Thread Laszlo Ersek
On 01/18/17 16:18, Igor Mammedov wrote: > On Tue, 17 Jan 2017 10:56:53 + > Peter Maydell wrote: > >> On 17 January 2017 at 09:49, Andrew Jones wrote: >>> In some cases the problem we're solving with the compat guards is >>> a bit hypothetical, but, IMHO, nonetheless a good practice. While >>

[Qemu-devel] [Bug 1655708] Re: target/ppc/int_helper.c:2806: strange expression ?

2017-01-18 Thread Thomas Huth
Patch has been posted to the mailing list: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg02008.html ** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchp

Re: [Qemu-devel] [PATCH 13/16] block: explicitly acquire aiocontext in aio callbacks that need it

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:28PM +0100, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block/archipelago.c| 3 --- > block/block-backend.c | 7 --- > block/curl.c | 2 +- > block/io.c | 6 +- > block/iscsi.c | 3 --- > block/linux-ai

Re: [Qemu-devel] [PATCH 14/16] aio-posix: partially inline aio_dispatch into aio_poll

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:29PM +0100, Paolo Bonzini wrote: > This patch prepares for the removal of unnecessary lockcnt inc/dec pairs. > Extract the dispatching loop for file descriptor handlers into a new > function aio_dispatch_handlers, and then inline aio_dispatch into > aio_poll. > > aio_

Re: [Qemu-devel] [PATCH 15/16] async: remove unnecessary inc/dec pairs

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:30PM +0100, Paolo Bonzini wrote: > Pull the increment/decrement pair out of aio_bh_poll and into the > callers. > > Signed-off-by: Paolo Bonzini > --- > aio-posix.c | 8 +++- > aio-win32.c | 8 > async.c | 12 ++-- > 3 files changed, 13 in

Re: [Qemu-devel] [PATCH 16/16] block: document fields protected by AioContext lock

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:31PM +0100, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > include/block/block_int.h | 64 > +- > include/sysemu/block-backend.h | 14 ++--- > 2 files changed, 49 insertions(+), 29 deletions(-) Reviewed-

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Phil Dennis-Jordan
Thanks for the comments Paulo and Eduardo, On 18 January 2017 at 16:05, Paolo Bonzini wrote: > > > +DEFINE_PROP_BOOL("vmware-tsc-apic-clocks", X86CPU, > vmware_clock_rates, false), > > Maybe just vmware-cpuid-freq instead? Whatever the choice, please make > the bool field in struct X86CPU co

[Qemu-devel] [PATCH v2 15/25] monitor: suspend when running async and client has no async

2017-01-18 Thread Marc-André Lureau
When the client doesn't support 'async' capability, let's suspend the monitor until the on-going async command completes. That way, the client will be able to use -async commands, but will get only in order reply: (t won't be able to do concurrent commands. In this case, the 'id' field isn't mandat

Re: [Qemu-devel] [PATCH 00/16] aio_context_acquire/release pushdown, part 2

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:15PM +0100, Paolo Bonzini wrote: > hw/block/virtio-blk.c | 19 +++- > hw/scsi/scsi-bus.c | 2 + > hw/scsi/scsi-disk.c| 15 +++ > hw/scsi/scsi-generic.c | 20 +++- > hw/scsi/virtio-scsi.c | 6 ++ Are all the othe

Re: [Qemu-devel] [PATCH 00/16] aio_context_acquire/release pushdown, part 2

2017-01-18 Thread Stefan Hajnoczi
On Fri, Jan 13, 2017 at 02:17:15PM +0100, Paolo Bonzini wrote: > This series pushes down aio_context_acquire/release to the point > where we can actually reason on using different fine-grained mutexes. > > The main infrastructure is introduced in patch 1. The new API aio_co_wake > starts a corout

[Qemu-devel] [PATCH v2 21/25] console: graphic_hw_update return true if async

2017-01-18 Thread Marc-André Lureau
qxl_render_update() returns true if the update is deferred. Let the caller know if the update is immediate or async. Signed-off-by: Marc-André Lureau --- hw/display/qxl.h| 2 +- include/ui/console.h| 3 ++- hw/display/qxl-render.c | 5 +++-- hw/display/qxl.c| 8

[Qemu-devel] [PATCH v2 01/25] tests: start generic qemu-qmp tests

2017-01-18 Thread Marc-André Lureau
These 2 tests exhibited two qmp bugs that were fixed in 2.7 (series from commit e64c75a9752c5d0fd64eb2e684c656a5ea7d03c6 to commit 1382d4abdf9619985e4078e37e49e487cea9935e) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrange Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster S

[Qemu-devel] [PATCH v2 03/25] qmp: teach qmp_dispatch() to take a pre-filled QDict

2017-01-18 Thread Marc-André Lureau
Give an optional qdict for the dispatch call to be used for the reply. The qemu monitor has the request "id" pre-filled, simplifying the code a bit. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- include/qapi/qmp/dispatch.h | 2 +- monitor.c | 26 +++

[Qemu-devel] [PATCH v2 04/25] qmp: use a return callback for the command reply

2017-01-18 Thread Marc-André Lureau
Introduce QmpDispatchReturn, a callback called when a command reply is ready to be sent. Future patches will extend the context to enable async replies. Currently, all qmp commands reply in the calling context (they are all sync). QmpReturn and associated functions are used internally for the sync

[Qemu-devel] [PATCH v2 25/25] qmp: move json-message-parser and check to QmpClient

2017-01-18 Thread Marc-André Lureau
Clean up qmp_dispatch usage to have consistant checks between qga & qemu, and simplify QmpClient/parser_feed usage. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/dispatch.h | 13 +++- monitor.c | 140 qapi/qmp-dispatch.c

[Qemu-devel] kvmclock in wrong compat macro?

2017-01-18 Thread Dr. David Alan Gilbert
Hi Marcelo, In commit 6053a86 'kvmclock: reduce kvmclock differences on migration' you add a 'x-mach-use-reliable-get-clock' and a compatibility entry that turns it off; if I'm reading it right though it got merged after 2.8.0 was released but the entry has gone into PC_COMPAT_2_7 where I guess

[Qemu-devel] [PATCH v2 20/25] qapi: improve 'screendump' documentation

2017-01-18 Thread Marc-André Lureau
The command dumps the console 0, and it doesn't have to be VGA. Signed-off-by: Marc-André Lureau --- qapi-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index 42b2c645c5..2e7c96c122 100644 --- a/qapi-schema.json +++ b/qapi-sche

[Qemu-devel] [PATCH v2 07/25] qmp: introduce async command type

2017-01-18 Thread Marc-André Lureau
Qemu used to have command types, but it was removed in 42a502a7a60632234f0dd5028924926a7eac6c94. Add it back, and add a new type of command, QmpCommandFuncAsync: they can return later thanks to QmpReturn. This commit introduces the new types and register functions. Signed-off-by: Marc-André Lureau

[Qemu-devel] [Bug 639651] Re: DRIVER_IRQL_NOT_LESS_OR_EQUAL booting WIndows XP with Synaptics driver installed

2017-01-18 Thread Thomas Huth
QEMU 0.12 is pretty much outdated nowadays ... can you still reproduce this problem with the latest version of QEMU, or can we close this ticket nowadays? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which

[Qemu-devel] [PATCH v2 00/25] qmp: add async command type

2017-01-18 Thread Marc-André Lureau
Hi, One of initial design goals of QMP was to have "asynchronous command completion" (http://wiki.qemu.org/Features/QAPI). Unfortunately, that goal was not fully achieved, and some broken bits left were removed progressively until commit 65207c59d that removed async command support. Note that qmp

[Qemu-devel] [PATCH v2 11/25] scripts: learn 'async' qapi commands

2017-01-18 Thread Marc-André Lureau
Commands with the 'async' key will be registered as async type (see related commit), and will allow a synchronous (in scope callback) or asynchronous return (when ready, in idle etc) by keeping the given QmpReturn and calling qmp_return function later. Ex: { 'command': 'foo-async, 'data': {'

[Qemu-devel] [PATCH v2 24/25] qtest: add /qemu-qmp/screendump test

2017-01-18 Thread Marc-André Lureau
Check that screendump works with and without client async support. Signed-off-by: Marc-André Lureau --- tests/qmp-test.c | 53 + 1 file changed, 53 insertions(+) diff --git a/tests/qmp-test.c b/tests/qmp-test.c index f383d5d6f6..22b7315ca7 100

[Qemu-devel] [Bug 640213] Re: QEMU does not communicate properly with GDB with a 64 bit guest

2017-01-18 Thread Thomas Huth
Can you still reproduce this problem with the latest version of QEMU, or can we close this ticket nowadays? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.n

[Qemu-devel] [PATCH v2 02/25] tests: change /0.15/* tests to /qmp/*

2017-01-18 Thread Marc-André Lureau
Presumably 0.15 was the version it was first introduced, but qmp keeps evolving. There is no point in having that version as test prefix, 'qmp' makes more sense here. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- tests/test-qmp-commands.c | 10 +- 1 file changed, 5 insert

[Qemu-devel] [PATCH v2 0/6] qapi-related cleanups

2017-01-18 Thread Eric Blake
This is a subset of my earlier post "Rip out dynamic JSON parsing"[1], hence the v2 marking. It focuses only on the patches that are worth having whether or not we decide that ripping out dynamic JSON is the way to go (code cleanups and testsuite improvements). I've rebased it to the current mast

[Qemu-devel] [Bug 641118] Re: NetBSD guest only supports network without ACPI

2017-01-18 Thread Thomas Huth
Can you still reproduce this problem with the latest version of QEMU, or can we close this ticket nowadays? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.n

[Qemu-devel] [PATCH v2 05/25] qmp: add QmpClient

2017-01-18 Thread Marc-André Lureau
Add a new QmpClient structure holding the dispatch return callback and the list of pending QmpReturns. When a client disconnects, call qmp_client_destroy(). This will remove all pending returns from the client list, and prevent a reply from being sent later: new clients will only receive reply the

[Qemu-devel] [PATCH v2 13/25] monitor: add 'async' capability

2017-01-18 Thread Marc-André Lureau
Declare that the server supports async. Check if the client supports it: the following patch will suspend the qmp monitor if an async command is ongoing but the client doesn't support async. Signed-off-by: Marc-André Lureau --- qapi-schema.json| 16 ++-- include/qapi/qmp

[Qemu-devel] [PATCH v2 12/25] tests: add dispatch async tests

2017-01-18 Thread Marc-André Lureau
Add a few tests to check: - async dispatch - async command without "id" failure - destroying the client with pending requests Signed-off-by: Marc-André Lureau --- tests/test-qmp-commands.c | 132 tests/qapi-schema/qapi-schema-test.json | 6 ++ tes

[Qemu-devel] [PATCH v2 3/6] qlist: Add convenience helpers for wrapped appends

2017-01-18 Thread Eric Blake
Similar to the qdict additions of the previous patch, although this time there are not as many clients. Signed-off-by: Eric Blake --- include/qapi/qmp/qlist.h | 8 tests/check-qdict.c | 10 +- tests/check-qlist.c | 2 +- 3 files changed, 14 insertions(+), 6 deletions

Re: [Qemu-devel] [PATCH v2 01/25] tests: start generic qemu-qmp tests

2017-01-18 Thread Marc-André Lureau
- Original Message - > These 2 tests exhibited two qmp bugs that were fixed in 2.7 > (series from commit e64c75a9752c5d0fd64eb2e684c656a5ea7d03c6 to > commit 1382d4abdf9619985e4078e37e49e487cea9935e) Sorry, it was actually in 2.8 > > Signed-off-by: Marc-André Lureau > Reviewed-by: Dan

[Qemu-devel] [PATCH v2 22/25] console: add graphic_hw_update_done()

2017-01-18 Thread Marc-André Lureau
Add a function to be called when an async graphic update is done. Signed-off-by: Marc-André Lureau --- include/ui/console.h| 1 + hw/display/qxl-render.c | 9 +++-- ui/console.c| 4 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/ui/console.h b/in

[Qemu-devel] [PATCH v2 06/25] qmp: add qmp_return_is_cancelled()

2017-01-18 Thread Marc-André Lureau
If the client is gone, no need to return. The async handler can use this information to avoid unnecessary work and exit earlier. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/dispatch.h | 8 qapi/qmp-dispatch.c | 10 ++ 2 files changed, 18 insertions(+) diff --

[Qemu-devel] [PATCH v2 5/6] test-qga: Actually test 0xff sync bytes

2017-01-18 Thread Eric Blake
Commit 62c39b3 introduced test-qga, and at face value, appears to be testing the 'guest-sync' behavior that is recommended for guests in sending 0xff to QGA to force the parser to reset. But this aspect of the test has never actually done anything: the qmp_fd() call chain converts its string argum

[Qemu-devel] [PATCH v2 23/25] console: make screendump async

2017-01-18 Thread Marc-André Lureau
Make screendump async to provide correct screendumps. HMP doesn't have async support, so it has to remain sync to avoid potential races. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1230527 Signed-off-by: Marc-André Lureau --- qapi-schema.json | 5 +++- include/ui/console.h | 1 +

[Qemu-devel] [PATCH v2 08/25] qapi: ignore top-level 'id' field

2017-01-18 Thread Marc-André Lureau
'id' is documented as part of qmp-spec, it is valid at top-level entry. The following patch copies the 'id' to the reply, without touching the original request (which should eventually be const later) so it must pass the check function without error. Signed-off-by: Marc-André Lureau --- qapi/qm

[Qemu-devel] [PATCH v2 2/6] qdict: Add convenience helpers for wrapped puts

2017-01-18 Thread Eric Blake
Quite a few users of qdict_put() were manually wrapping a non-QObject. We can make such call-sites shorter, by providing common macros to do the tedious work. Also shorten nearby qdict_put_obj(,,QOBJECT()) sequences. Signed-off-by: Eric Blake Reviewed-by: Alberto Garcia --- v2: rebase to curr

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 17:16, Phil Dennis-Jordan wrote: > On 18 January 2017 at 17:10, Paolo Bonzini wrote: >> You enable vmware-cpuid-freq unconditionally. But then you actually >> publish 0x4010 only if INVTSC is set. > Right, got it, thanks. What about the Hyper-V conflict? That will be > vastly

Re: [Qemu-devel] [PATCH 1/2] linux-user: fix settime old value location

2017-01-18 Thread Pranith Kumar
On Wed, Jan 18, 2017 at 11:20 AM, Peter Maydell wrote: > > I reviewed this when Marc sent it back in November, > but this resend doesn't seem to have addressed any > of that. > Sorry about that. I seem to have missed the reviews last time. I'll update and resend them. Thanks, -- Pranith

[Qemu-devel] [PATCH v2 10/25] qmp: check that async command have an 'id'

2017-01-18 Thread Marc-André Lureau
The async support mandates that request have an 'id' (see documentation in following patch). Signed-off-by: Marc-André Lureau --- qapi/qmp-dispatch.c | 5 + 1 file changed, 5 insertions(+) diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index b6b0aed1b8..76c7402ac8 100644 --- a/qapi/

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Phil Dennis-Jordan
On 18 January 2017 at 17:10, Paolo Bonzini wrote: > You enable vmware-cpuid-freq unconditionally. But then you actually > publish 0x4010 only if INVTSC is set. Right, got it, thanks. What about the Hyper-V conflict? That will be vastly more probable if the option is on by default. Don't publ

[Qemu-devel] [PATCH v2 09/25] qmp: take 'id' from request

2017-01-18 Thread Marc-André Lureau
Copy 'id' from request to reply dict. This can be done earlier, such as done currently by the monitor (because the qemu monitor.c may reply directly without qmp_dispatch), but is now done as well in qmp_dispatch() as convenience for other users such as QGA and tests. Later patches will remove "id"

Re: [Qemu-devel] [PATCH 2/2] vl: Print warning when a default config file is loaded

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 05:04:45PM +0100, Markus Armbruster wrote: > Eduardo Habkost writes: > > > In case there were options set in the default config file, print > > a warning so users can update their scripts. > > Can you explain why you don't warn on an empty qemu.conf? I didnt't want to sh

Re: [Qemu-devel] [PATCH 00/16] aio_context_acquire/release pushdown, part 2

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 17:02, Stefan Hajnoczi wrote: > On Fri, Jan 13, 2017 at 02:17:15PM +0100, Paolo Bonzini wrote: >> hw/block/virtio-blk.c | 19 +++- >> hw/scsi/scsi-bus.c | 2 + >> hw/scsi/scsi-disk.c| 15 +++ >> hw/scsi/scsi-generic.c | 20 +++- >> hw/s

[Qemu-devel] [PATCH v2 14/25] monitor: add !qmp pre-conditions

2017-01-18 Thread Marc-André Lureau
It's not always obvious whether a function is meant to be used only with HMP or QMP. Add a few pre-conditions to document this aspect and eventually catch run-time bugs. Signed-off-by: Marc-André Lureau --- monitor.c | 47 +-- 1 file changed, 45 insert

[Qemu-devel] [PATCH v2] hw/misc: add a TMP42{1,2,3} device model

2017-01-18 Thread Cédric Le Goater
Largely inspired by the TMP105 temperature sensor, here is a model for the TMP42{1,2,3} temperature sensors. Specs can be found here : http://www.ti.com/lit/gpn/tmp421 Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley --- Changes since v1: - simplified tmp421_tx() as tmp421

[Qemu-devel] [PATCH v2 1/6] pci: Use struct instead of QDict to pass back parameters

2017-01-18 Thread Eric Blake
It's simpler to just use a C struct than it is to bundle things into a QDict in one function just to pull them back out in the caller. Plus, doing this gets rid of one more user of dynamic JSON through qobject_from_jsonf(). Signed-off-by: Eric Blake Acked-by: Michael S. Tsirkin --- hw/pci/pcie

Re: [Qemu-devel] [PATCH v6 wave 2 2/3] hw/isa/lpc_ich9: add broadcast SMI feature

2017-01-18 Thread Igor Mammedov
On Wed, 18 Jan 2017 16:42:27 +0100 Laszlo Ersek wrote: > On 01/18/17 13:38, Igor Mammedov wrote: > > On Wed, 18 Jan 2017 11:23:48 +0100 > > Laszlo Ersek wrote: > > > >> On 01/18/17 11:19, Laszlo Ersek wrote: > >>> On 01/18/17 11:03, Igor Mammedov wrote: > On Tue, 17 Jan 2017 19:53:

[Qemu-devel] [PATCH v2 16/25] qmp: update qmp-spec about async capability

2017-01-18 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- docs/qmp-spec.txt | 48 +--- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/docs/qmp-spec.txt b/docs/qmp-spec.txt index f8b5356015..b45c0700b6 100644 --- a/docs/qmp-spec.txt +++ b/docs/qmp-spec.txt @@

[Qemu-devel] [PATCH v2 6/6] qapi: Promote blockdev-change-medium arguments to QAPI type

2017-01-18 Thread Eric Blake
Having a named rather than anonymous C type will make it easier to improve the testsuite in a later patch. No semantic change, to any of the existing code or to the introspection output. Signed-off-by: Eric Blake --- v2: rebase to master --- qapi/block-core.json | 11 ++- 1 file changed

Re: [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioContexts

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 15:58, Stefan Hajnoczi wrote: > On Fri, Jan 13, 2017 at 02:17:20PM +0100, Paolo Bonzini wrote: >> /** >> + * qio_channel_set_aio_context: >> + * @ioc: the channel object >> + * @ctx: the #AioContext to set the handlers on >> + * >> + * Request that qio_channel_yield() sets I/O hand

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Phil Dennis-Jordan
Thanks for the comments Paulo and Eduardo, On 18 January 2017 at 16:05, Paolo Bonzini wrote: > > > +DEFINE_PROP_BOOL("vmware-tsc-apic-clocks", X86CPU, > vmware_clock_rates, false), > > Maybe just vmware-cpuid-freq instead? Whatever the choice, please make > the bool field in struct X86CPU co

[Qemu-devel] [PATCH v2 4/6] fdc-test: Avoid deprecated 'change' command

2017-01-18 Thread Eric Blake
Use the preferred blockdev-change-medium command instead. Signed-off-by: Eric Blake Reviewed-by: John Snow --- tests/fdc-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/fdc-test.c b/tests/fdc-test.c index 738c6b4..f5ff68d 100644 --- a/tests/fdc-test.c +++ b

Re: [Qemu-devel] [PATCH 06/16] nbd: do not block on partial reply header reads

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 16:24, Stefan Hajnoczi wrote: > On Fri, Jan 13, 2017 at 02:17:21PM +0100, Paolo Bonzini wrote: >> @@ -65,54 +67,34 @@ static void nbd_teardown_connection(BlockDriverState *bs) >> client->ioc = NULL; >> } >> >> -static void nbd_reply_ready(void *opaque) >> +static void nbd_re

Re: [Qemu-devel] [PATCH 10/16] block: explicitly acquire aiocontext in timers that need it

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 16:43, Stefan Hajnoczi wrote: > On Fri, Jan 13, 2017 at 02:17:25PM +0100, Paolo Bonzini wrote: >> diff --git a/block/null.c b/block/null.c >> index b300390..356209a 100644 >> --- a/block/null.c >> +++ b/block/null.c >> @@ -141,7 +141,11 @@ static void null_bh_cb(void *opaque) >> st

Re: [Qemu-devel] [PATCH 2/2] vl: Print warning when a default config file is loaded

2017-01-18 Thread Markus Armbruster
Eduardo Habkost writes: > In case there were options set in the default config file, print > a warning so users can update their scripts. Can you explain why you don't warn on an empty qemu.conf? > If somebody wants to keep the config file as-is, avoid the > warning and use a command-line that

Re: [Qemu-devel] [Qemu-stable] Data corruption in Qemu 2.7.1

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 17:19, Fabian Grünbichler wrote: > Jan 18 17:07:51 ubuntu kernel: sd 2:0:0:0: [sda] tag#109 FAILED Result: > hostbyte=DID_OK driverbyte=DRIVER_SENSE > Jan 18 17:07:51 ubuntu kernel: sd 2:0:0:0: [sda] tag#109 Sense Key : Illegal > Request [current] > Jan 18 17:07:51 ubuntu kernel:

[Qemu-devel] [PATCH 2/2] aspeed: add a watchdog controller

2017-01-18 Thread Cédric Le Goater
This enables reboot of a guest from U-Boot and Linux. Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley --- hw/arm/aspeed_soc.c | 13 + include/hw/arm/aspeed_soc.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c inde

[Qemu-devel] [PATCH v2 17/25] qtest: add qtest-timeout

2017-01-18 Thread Marc-André Lureau
This command allows to test async behavior. It is only registered when qtest is enabled. See the schema documentation for more details. Signed-off-by: Marc-André Lureau --- qapi-schema.json | 22 ++ qtest.c | 48 2 fil

[Qemu-devel] [PATCH 1/2] wdt: Add Aspeed watchdog device model

2017-01-18 Thread Cédric Le Goater
From: Joel Stanley The Aspeed SoC includes a set of watchdog timers using 32-bit decrement counters, which can be based either on the APB clock or a 1 MHz clock. The watchdog timer is designed to prevent system deadlock and, in general, it should be restarted before timeout. When a timeout occur

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 12:45:54PM +0100, Phil Dennis-Jordan wrote: > About 2 years ago, Reza Jelveh submitted essentially this same patch: > https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg05832.html > > It adds the reset register defined in ACPI 2.0 to the x86 FADT, which fixes > reboo

[Qemu-devel] [PATCH v2 19/25] tests: add tests for async and non-async clients

2017-01-18 Thread Marc-André Lureau
Add two tests to check async and non-async client behaviour: - an async client can see out of order replies - an non-async client has commands processed in order Signed-off-by: Marc-André Lureau --- tests/qmp-test.c | 59 1 file changed, 5

Re: [Qemu-devel] [PATCH v2 1/6] pci: Use struct instead of QDict to pass back parameters

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 10:16:48AM -0600, Eric Blake wrote: > It's simpler to just use a C struct than it is to bundle things > into a QDict in one function just to pull them back out in the > caller. Plus, doing this gets rid of one more user of dynamic > JSON through qobject_from_jsonf(). > > S

Re: [Qemu-devel] [PATCH 00/16] aio_context_acquire/release pushdown, part 2

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 17:03, Stefan Hajnoczi wrote: > On Fri, Jan 13, 2017 at 02:17:15PM +0100, Paolo Bonzini wrote: >> This series pushes down aio_context_acquire/release to the point >> where we can actually reason on using different fine-grained mutexes. >> >> The main infrastructure is introduced in

[Qemu-devel] [PATCH v2 18/25] qtest: add qtest_init_qmp_caps()

2017-01-18 Thread Marc-André Lureau
Add a function to specify the qmp capabilities content. Signed-off-by: Marc-André Lureau --- tests/libqtest.h | 9 + tests/libqtest.c | 13 +++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/libqtest.h b/tests/libqtest.h index 90f182e1d8..e7ab509d1a 1006

Re: [Qemu-devel] [PATCH v3] hw/core/null-machine: Add the possibility to instantiate a CPU and RAM

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 01:44:50PM +0100, Thomas Huth wrote: > Sometimes it is useful to have just a machine with CPU and RAM, without > any further hardware in it, e.g. if you just want to do some instruction > debugging for TCG with a remote GDB attached to QEMU, or run some embedded > code with

[Qemu-devel] [PATCH 0/2] Aspeed watchdog controller model

2017-01-18 Thread Cédric Le Goater
Hello, The Aspeed SoC includes a set of watchdog timers using 32-bit decrement counters. This patchset provides a model for this controller and adds the first watchdog to the Aspeed SoC model. A second watchdog exists and is used on real HW to boot from a second flash module containing a golden im

Re: [Qemu-devel] [PATCH] numa: access CPU's node id via property in hmp_info_numa()

2017-01-18 Thread Igor Mammedov
On Wed, 18 Jan 2017 13:19:45 -0200 Eduardo Habkost wrote: > On Wed, Jan 18, 2017 at 03:48:45PM +0100, Igor Mammedov wrote: > > Move vcpu's assocciated numa_node field out of generic CPUState > > into inherited classes that actually care about cpu<->numa mapping > > and make monitor 'info numa' ge

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Paolo Bonzini
On 18/01/2017 17:02, Phil Dennis-Jordan wrote: > > One issue is that the TSC frequency can change, for example on > migration. Telling the guest about the TSC frequency makes little sense > if it can change. > > That makes sense. Darwin can't handle changing TSC frequencies in any

Re: [Qemu-devel] [Qemu-block] Question: any suggestions about zero-filled image grow of raw format files ?

2017-01-18 Thread Max Reitz
On 16.01.2017 07:20, fuweiwei (C) wrote: > Dear all: > > > > I have a question. In qemu-kvm platforms, raw format virtual images have > several preallocation options, > > such as thin (sparse, no preallocation), falloc and full (zero-filled > preallocation). However, if one resize > > a full-

[Qemu-devel] [RFC 02/13] pc: cleanup: move smbios_set_cpuid() into pc_build_smbios()

2017-01-18 Thread Igor Mammedov
move smbios_set_cpuid() close to the rest of smbios init code where it belongs to instead of calling it from pc_cpus_init(). Signed-off-by: Igor Mammedov --- PS: it would allow to cleanup pc_new_cpu() in followup patch --- hw/i386/pc.c | 17 + 1 file changed, 9 insertions(+),

[Qemu-devel] [RFC 01/13] numa: access CPU's node id via property in hmp_info_numa()

2017-01-18 Thread Igor Mammedov
Move vcpu's assocciated numa_node field out of generic CPUState into inherited classes that actually care about cpu<->numa mapping and make monitor 'info numa' get vcpu's assocciated node id via node-id property. It allows to drop implicit node id intialization in numa_post_machine_init() and would

Re: [Qemu-devel] [PATCH 1/2] linux-user: fix settime old value location

2017-01-18 Thread Peter Maydell
On 18 January 2017 at 15:02, Pranith Kumar wrote: > From: Marc-André Lureau > > old_value is the 4th argument of timer_settime(), not the 2nd. > > Signed-off-by: Marc-André Lureau > Signed-off-by: Pranith Kumar > --- > linux-user/syscall.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-

[Qemu-devel] [RFC 07/13] pc: pass apic_id to pc_find_cpu_slot() directly so lookup could be done without CPU object

2017-01-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index ed41046..f8ea635 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1776,13 +1776,12 @@ static int pc_apic_cmp(const void *a, const vo

Re: [Qemu-devel] [PATCH v2] hw/arm/virt-acpi - reserve ECAM space as PNP0C02 device

2017-01-18 Thread Ard Biesheuvel
On 18 January 2017 at 15:55, Laszlo Ersek wrote: > On 01/18/17 16:18, Igor Mammedov wrote: >> On Tue, 17 Jan 2017 10:56:53 + >> Peter Maydell wrote: >> >>> On 17 January 2017 at 09:49, Andrew Jones wrote: In some cases the problem we're solving with the compat guards is a bit hypot

[Qemu-devel] [RFC 05/13] pc: move pcms->possible_cpus init out of pc_cpus_init()

2017-01-18 Thread Igor Mammedov
possible_cpus could be initialized earlier then cpu objects, i.e. when -smp is parsed so move init code to possible_cpu_arch_ids() interface func and do initialization on the first call. it should help later with making -numa cpu/-smp parsing a machine state properties. Signed-off-by: Igor Mammed

Re: [Qemu-devel] [PATCH 2/2] linux-user: fix tcg/mmap test

2017-01-18 Thread Peter Maydell
On 18 January 2017 at 15:02, Pranith Kumar wrote: > From: Marc-André Lureau > > tests/tcg/mmap test fails with values other than default target page > size. When creating a map beyond EOF, extra anonymous pages are added up > to the target page boundary. Currently, this operation is performed onl

[Qemu-devel] [RFC 00/13] numa: add '-numa cpu' option

2017-01-18 Thread Igor Mammedov
Series introduces a new CLI option to allow mapping cpus to numa nodes using public properties [socket|core|thread]-ids instead of internal cpu-index and moving cpu<->node mapping from global bitmaps to PCMachineState struct. It focuses on PC in RFC version to see if approach is suitable in gener

Re: [Qemu-devel] [PATCH 05/16] io: make qio_channel_yield aware of AioContexts

2017-01-18 Thread Eric Blake
On 01/18/2017 10:43 AM, Paolo Bonzini wrote: > By the way, v2 will have a better comment on how to use the API: > > + * You can move a #QIOChannel from an #AioContext to another even if s/from an/from one/ > + * I/O handlers are set for a coroutine. However, #QIOChannel provides > + * no synchr

Re: [Qemu-devel] [PATCH] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-18 Thread Eduardo Habkost
On Wed, Jan 18, 2017 at 05:04:27PM +0100, Phil Dennis-Jordan wrote: > Thanks for the comments Paulo and Eduardo, > > On 18 January 2017 at 16:05, Paolo Bonzini wrote: > > > > > +DEFINE_PROP_BOOL("vmware-tsc-apic-clocks", X86CPU, > > vmware_clock_rates, false), > > > > Maybe just vmware-cpuid-

Re: [Qemu-devel] [PATCH v2 1/6] Add cfgend parameter for ARM CPU selection.

2017-01-18 Thread Eduardo Habkost
On Tue, Jan 17, 2017 at 11:52:24AM +, Peter Maydell wrote: > On 12 January 2017 at 14:28, Julian Brown wrote: > > On Wed, 11 Jan 2017 12:35:52 + > > Julian Brown wrote: > > > >> I'm a little confused, I think -- these changes seemed to be necessary > >> to allow the parsing of the command

[Qemu-devel] [RFC 06/13] pc: calculate topology only once when possible_cpus is initialised

2017-01-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/boards.h | 1 + hw/i386/pc.c| 25 + 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index ac891a8..6364617 100644 --- a/include/hw/boards.h +++ b/include/hw/boar

<    1   2   3   4   >