[Qemu-devel] [PATCH v7 09/11] Dump: add qmp command "query-dump"

2016-02-15 Thread Peter Xu
When dump-guest-memory is requested with detach flag, after its return, user could query its status using "query-dump" command (with no argument). The result contains: - status: current dump status - completed: bytes written in the latest dump - total: bytes to write in the latest dump >From

Re: [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU.

2016-02-15 Thread Neo Jia
On Tue, Feb 16, 2016 at 07:40:47AM +, Tian, Kevin wrote: > > From: Neo Jia [mailto:c...@nvidia.com] > > Sent: Tuesday, February 16, 2016 3:37 PM > > > > On Tue, Feb 16, 2016 at 07:27:09AM +, Tian, Kevin wrote: > > > > From: Neo Jia [mailto:c...@nvidia.com] > > > > Sent: Tuesday, February

[Qemu-devel] [PATCH v7 08/11] DumpState: adding total_size and written_size fields

2016-02-15 Thread Peter Xu
Here, total_size is the size in bytes to be dumped (raw data, which means before compression), while written_size are bytes handled (raw size too). Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c| 32

[Qemu-devel] [PATCH v7 07/11] dump-guest-memory: add "detach" support

2016-02-15 Thread Peter Xu
If "detach" is provided, one thread is created to do the dump work, while main thread will return immediately. For each GuestPhysBlock, adding one more field "mr" to points to MemoryRegion that it belongs, also ref the mr before use. Signed-off-by: Peter Xu Reviewed-by: Fam

[Qemu-devel] [PATCH v7 11/11] dump-guest-memory: add qmp event DUMP_COMPLETED

2016-02-15 Thread Peter Xu
One new QMP event DUMP_COMPLETED is added. When a dump finishes, one DUMP_COMPLETED event will occur to notify the user. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- docs/qmp-events.txt | 18 ++ dump.c | 18

[Qemu-devel] [PATCH v7 10/11] Dump: add hmp command "info dump"

2016-02-15 Thread Peter Xu
It will calculate percentage of finished work from completed and total. Signed-off-by: Peter Xu --- hmp-commands-info.hx | 14 ++ hmp.c| 17 + hmp.h| 1 + 3 files changed, 32 insertions(+) diff --git

[Qemu-devel] [PATCH v7 06/11] dump-guest-memory: disable dump when in INMIGRATE state

2016-02-15 Thread Peter Xu
Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c | 5 + 1 file changed, 5 insertions(+) diff --git a/dump.c b/dump.c index fed84a6..923e3a5 100644 --- a/dump.c +++ b/dump.c @@ -1654,6 +1654,11 @@ void qmp_dump_guest_memory(bool paging, const

[Qemu-devel] [PATCH v7 05/11] dump-guest-memory: introduce dump_process() helper function.

2016-02-15 Thread Peter Xu
No functional change. Cleanup only. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c| 31 +-- include/sysemu/dump.h | 3 +++ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/dump.c

[Qemu-devel] [PATCH v7 02/11] dump-guest-memory: add "detach" flag for QMP/HMP interfaces.

2016-02-15 Thread Peter Xu
This patch only adds the interfaces, but does not implement them. "detach" parameter is made optional, to make sure that all the old dump-guest-memory requests will still be able to work. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c |

[Qemu-devel] [PATCH v7 03/11] dump-guest-memory: using static DumpState, add DumpStatus

2016-02-15 Thread Peter Xu
Instead of malloc/free each time for DumpState, make it static. Added DumpStatus to show status for dump. This is to be used for detached dump. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c| 21 -

[Qemu-devel] [PATCH v7 04/11] dump-guest-memory: add dump_in_progress() helper function

2016-02-15 Thread Peter Xu
For now, it has no effect. It will be used in dump detach support. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c| 13 + include/qemu-common.h | 4 qmp.c | 14 ++ 3 files changed, 31

[Qemu-devel] [PATCH v7 00/11] Add basic "detach" support for dump-guest-memory

2016-02-15 Thread Peter Xu
Changes from v6: - patch 9: fix leak of local_err due to patch switch.. [Fam] - patch 10: assert "result" before use [Fam] - patch 11: add Fam's reviewed-by. For older patch, please refers to v6 series: https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg01299.html Peter Xu (11):

[Qemu-devel] [PATCH v7 01/11] dump-guest-memory: cleanup: removing dump_{error|cleanup}().

2016-02-15 Thread Peter Xu
It might be a little bit confusing and error prone to do dump_cleanup() in these two functions. A better way is to do dump_cleanup() before dump finish, no matter whether dump has succeeded or not. Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c |

Re: [Qemu-devel] [PULL v2 22/45] ipmi: introduce a struct ipmi_sdr_compact

2016-02-15 Thread Paolo Bonzini
On 06/02/2016 20:13, Michael S. Tsirkin wrote: > > -if (sdr[7] > MAX_SENSORS) { > +if (sdr->sensor_owner_number > MAX_SENSORS) { This is another off-by-one, it should have been >=. Same for all these occurrences later in the same file: hw/ipmi/ipmi_bmc_sim.c:if ((cmd[2]

Re: [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU.

2016-02-15 Thread Tian, Kevin
> From: Neo Jia [mailto:c...@nvidia.com] > Sent: Tuesday, February 16, 2016 3:37 PM > > On Tue, Feb 16, 2016 at 07:27:09AM +, Tian, Kevin wrote: > > > From: Neo Jia [mailto:c...@nvidia.com] > > > Sent: Tuesday, February 16, 2016 3:13 PM > > > > > > On Tue, Feb 16, 2016 at 06:49:30AM +,

Re: [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU.

2016-02-15 Thread Tian, Kevin
> From: Neo Jia [mailto:c...@nvidia.com] > Sent: Tuesday, February 16, 2016 3:13 PM > > On Tue, Feb 16, 2016 at 06:49:30AM +, Tian, Kevin wrote: > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > Sent: Thursday, February 04, 2016 3:33 AM > > > > > > On Wed, 2016-02-03 at

Re: [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU.

2016-02-15 Thread Neo Jia
On Tue, Feb 16, 2016 at 07:27:09AM +, Tian, Kevin wrote: > > From: Neo Jia [mailto:c...@nvidia.com] > > Sent: Tuesday, February 16, 2016 3:13 PM > > > > On Tue, Feb 16, 2016 at 06:49:30AM +, Tian, Kevin wrote: > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > > Sent:

Re: [Qemu-devel] [PATCH 5/8] virtio-blk: fix "disabled data plane" mode

2016-02-15 Thread Fam Zheng
On Sun, 02/14 18:17, Paolo Bonzini wrote: > In disabled mode, virtio-blk dataplane seems to be enabled, but flow > actually goes through the normal virtio path. This patch simplifies a bit > the handling of disabled mode. In disabled mode, virtio_blk_handle_output > might be called even if

Re: [Qemu-devel] [PATCH 3/8] virtio: add AioContext-specific function for host notifiers

2016-02-15 Thread Fam Zheng
On Sun, 02/14 18:17, Paolo Bonzini wrote: > This is used to register ioeventfd with a dataplane thread. > > Signed-off-by: Paolo Bonzini > --- > hw/virtio/virtio.c | 16 > include/hw/virtio/virtio.h | 2 ++ > 2 files changed, 18 insertions(+) > >

Re: [Qemu-devel] [PATCH 4/8] virtio: export vring_notify as virtio_should_notify

2016-02-15 Thread Fam Zheng
On Sun, 02/14 18:17, Paolo Bonzini wrote: > Virtio dataplane needs to trigger the irq manually through the > guest notifier. Export virtio_should_notify so that it can be > used around event_notifier_set. > > Signed-off-by: Paolo Bonzini > --- > hw/virtio/virtio.c

Re: [Qemu-devel] [PATCH v6 10/11] Dump: add hmp command "info dump"

2016-02-15 Thread Peter Xu
On Tue, Feb 16, 2016 at 02:46:15PM +0800, Fam Zheng wrote: > On Wed, 12/09 10:42, Peter Xu wrote: > > + > > +void hmp_info_dump(Monitor *mon, const QDict *qdict) > > +{ > > +DumpQueryResult *result = qmp_query_dump(NULL); > > If something goes wrong, it is probably better to pass in local_err

Re: [Qemu-devel] [PATCH 2/8] vring: make vring_enable_notification return void

2016-02-15 Thread Fam Zheng
On Sun, 02/14 18:17, Paolo Bonzini wrote: > Make the API more similar to the regular virtqueue API. This will > help when modifying the code to not use vring.c anymore. > > Signed-off-by: Paolo Bonzini > --- > hw/block/dataplane/virtio-blk.c | 3 ++- >

Re: [Qemu-devel] [PATCH 1/8] block-migration: acquire AioContext as necessary

2016-02-15 Thread Fam Zheng
On Sun, 02/14 18:17, Paolo Bonzini wrote: > This is needed because dataplane will run during block migration as well. > > The block device migration code is quite liberal in taking the iothread > mutex. For simplicity, keep it the same way, even though one could > actually choose between the BQL

Re: [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU.

2016-02-15 Thread Neo Jia
On Tue, Feb 16, 2016 at 06:49:30AM +, Tian, Kevin wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, February 04, 2016 3:33 AM > > > > On Wed, 2016-02-03 at 09:28 +0100, Gerd Hoffmann wrote: > > >   Hi, > > > > > > > Actually I have a long puzzle in this

Re: [Qemu-devel] [PATCH] s390x: remove s390-zipl.rom

2016-02-15 Thread Thomas Huth
On 16.02.2016 07:07, Thomas Huth wrote: > On 10.02.2016 12:35, Christian Borntraeger wrote: >> On 02/10/2016 12:06 PM, Michael Tokarev wrote: >>> This is an s390 boot rom which was used in s390-virtio machine. >>> but since commit 3538fb6f89dd9bb2e7e59de2bfad52a45321c744 >>> "s390x: remove

Re: [Qemu-devel] [PATCH v2 00/14] QOM'ify hw/timer/*

2016-02-15 Thread <zxq_yx_...@163.com>
Thanks Peter! At 2016-02-16 02:22:09, "Peter Maydell" wrote: >On 27 January 2016 at 02:54, xiaoqiang zhao wrote: >> This patch series QOM'ify timer code under hw/timer directory. >> Main idea is to split the initfn's work, some to

Re: [Qemu-devel] [PATCH v6 09/11] Dump: add qmp command "query-dump"

2016-02-15 Thread Peter Xu
On Tue, Feb 16, 2016 at 02:40:59PM +0800, Fam Zheng wrote: > On Wed, 12/09 10:42, Peter Xu wrote: > > -s->status = (local_err ? DUMP_STATUS_FAILED : DUMP_STATUS_COMPLETED); > > -error_propagate(errp, local_err); > > This means the error is released by caller, ... > > > +/* make sure

Re: [Qemu-devel] [PATCH v6 11/11] dump-guest-memory: add qmp event DUMP_COMPLETED

2016-02-15 Thread Fam Zheng
On Wed, 12/09 10:42, Peter Xu wrote: > One new QMP event DUMP_COMPLETED is added. When a dump finishes, one > DUMP_COMPLETED event will occur to notify the user. > > Signed-off-by: Peter Xu > --- > docs/qmp-events.txt | 18 ++ > dump.c | 19

Re: [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU.

2016-02-15 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Thursday, February 04, 2016 3:33 AM > > On Wed, 2016-02-03 at 09:28 +0100, Gerd Hoffmann wrote: > >   Hi, > > > > > Actually I have a long puzzle in this area. Definitely libvirt will use > > > UUID to > > > mark a VM. And

Re: [Qemu-devel] [PATCH v6 10/11] Dump: add hmp command "info dump"

2016-02-15 Thread Fam Zheng
On Wed, 12/09 10:42, Peter Xu wrote: > It will calculate percentage of finished work from completed and > total. > > Signed-off-by: Peter Xu > --- > hmp-commands-info.hx | 14 ++ > hmp.c| 17 + > hmp.h| 1 + > 3

Re: [Qemu-devel] [PATCH v6 09/11] Dump: add qmp command "query-dump"

2016-02-15 Thread Fam Zheng
On Wed, 12/09 10:42, Peter Xu wrote: > -s->status = (local_err ? DUMP_STATUS_FAILED : DUMP_STATUS_COMPLETED); > -error_propagate(errp, local_err); This means the error is released by caller, ... > +/* make sure status is written after written_size updates */ > +smp_wmb(); > +

Re: [Qemu-devel] RE: [iGVT-g] VFIO based vGPU(was Re: [Announcement] 2015-Q3 release of XenGT - a Mediated ...)

2016-02-15 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Thursday, February 04, 2016 11:02 AM > > > > > Thanks for your summary, Kevin.  It does seem like there are only a few > > outstanding issues which should be manageable and hopefully the overall > > approach is cleaner for QEMU, management tools, and provides a more >

[Qemu-devel] [PATCH] s390: remove misleading comment

2016-02-15 Thread Michael Tokarev
The comment talks about a non-ELF object while the example gives ELF object. Signed-off-by: Michael Tokarev --- hw/s390x/ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index c9cf7cc..2213405 100644 --- a/hw/s390x/ipl.c

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-15 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > Am 15.02.2016 um 15:24 hat Pavel Dovgalyuk geschrieben: > > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > > > There could be asynchronous events that occur in non-cpu threads. > > > > For now these events are shutdown request and block task

Re: [Qemu-devel] [PATCH COLO-Frame v14 24/40] COLO: Process shutdown command for VM in COLO state

2016-02-15 Thread Hailiang Zhang
On 2016/2/12 23:09, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: If VM is in COLO FT state, we should do some extra work before normal shutdown process. SVM will ignore the shutdown command if this command is issued directly to it, PVM will send the

Re: [Qemu-devel] [PATCH] s390x: remove s390-zipl.rom

2016-02-15 Thread Thomas Huth
On 10.02.2016 12:35, Christian Borntraeger wrote: > On 02/10/2016 12:06 PM, Michael Tokarev wrote: >> This is an s390 boot rom which was used in s390-virtio machine. >> but since commit 3538fb6f89dd9bb2e7e59de2bfad52a45321c744 >> "s390x: remove s390-virtio machine", this file isn't used. >> The

Re: [Qemu-devel] [PATCH v9 2/3] quorum: implement bdrv_add_child() and bdrv_del_child()

2016-02-15 Thread Changlong Xie
On 02/09/2016 01:06 AM, Alberto Garcia wrote: On Fri 22 Jan 2016 09:02:10 PM CET, "Dr. David Alan Gilbert" wrote: In general, what do you do to make sure that the data in a new Quorum child is consistent with that of the rest of the array? Quorum can have more than one

Re: [Qemu-devel] [PATCH 04/12] docker: Add test runner

2016-02-15 Thread Fam Zheng
On Mon, 02/15 14:10, Alex Bennée wrote: > > Fam Zheng writes: > > > On Mon, 02/15 12:45, Alex Bennée wrote: > >> > >> Alex Bennée writes: > >> > >> > Fam Zheng writes: > >> > > >> >> It's better to have a launcher for all tests, to

Re: [Qemu-devel] [PATCH v2 0/2] move qcow2_invalidate_cache() out of coroutine context

2016-02-15 Thread Denis V. Lunev
On 02/12/2016 09:39 AM, Denis V. Lunev wrote: There is a possibility to hit an assert in qcow2_get_specific_info that s->qcow_version is undefined. This happens when VM in starting from suspended state, i.e. it processes incoming migration, and in the same time 'info block' is called. The

Re: [Qemu-devel] [PATCH v7 0/5] don't use NVDIMM for balooning

2016-02-15 Thread Denis V. Lunev
On 02/10/2016 11:49 AM, Vladimir Sementsov-Ogievskiy wrote: v7: 02: Reviewed-by: Igor Mammedov 04: object instead of dimm 05: arror_abort instead of NULL for getting size property, remove superfluous include v6: add stubbed pc_dimm_build_list, fix compilation for

[Qemu-devel] [Bug 1329956] Re: multi-core FreeBSD guest hangs after warm reboot

2016-02-15 Thread Venkateswara Rao Dokku
Can you please let us know the exact version of the kernel it got fixed? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1329956 Title: multi-core FreeBSD guest hangs after warm reboot Status in

Re: [Qemu-devel] [PATCH] pseries: Include missing pseries-2.5 compat properties in pseries-2.4

2016-02-15 Thread Laszlo Ersek
On 02/16/16 03:20, David Gibson wrote: > Commit 4b23699 "pseries: Add pseries-2.6 machine type" added a new > SPAPR_COMPAT_2_5 macro in the usual way. However, it didn't add this > macro to the existing SPAPR_COMPAT_2_4 macro so that pseries-2.4 > inherits newer compatibility properties which are

Re: [Qemu-devel] [PATCH 6/8] ipmi: provide support for FRUs

2016-02-15 Thread Corey Minyard
On 02/15/2016 12:40 PM, Marcel Apfelbaum wrote: On 02/15/2016 07:17 PM, Cédric Le Goater wrote: On 02/14/2016 10:25 AM, Marcel Apfelbaum wrote: On 02/09/2016 02:13 PM, Cédric Le Goater wrote: This patch provides a simple FRU support for the BMC simulator. FRUs are loaded from a file which

Re: [Qemu-devel] [PATCH 04/12] docker: Add test runner

2016-02-15 Thread Fam Zheng
On Mon, 02/15 14:10, Alex Bennée wrote: > >> There is a slight wrinkle as to what happens if the user wants to enter > >> an interactive session for debugging. However that doesn't seem possible > >> via the makefile and perhaps that is just as well. Perhaps that should > >> be a helper script for

[Qemu-devel] [PATCH] pseries: Include missing pseries-2.5 compat properties in pseries-2.4

2016-02-15 Thread David Gibson
Commit 4b23699 "pseries: Add pseries-2.6 machine type" added a new SPAPR_COMPAT_2_5 macro in the usual way. However, it didn't add this macro to the existing SPAPR_COMPAT_2_4 macro so that pseries-2.4 inherits newer compatibility properties which are needed for 2.5 and earlier. This corrects the

Re: [Qemu-devel] [PATCH 11/12] .gitignore: Ignore temporary dockerfile

2016-02-15 Thread Fam Zheng
On Mon, 02/15 14:42, Alex Bennée wrote: > > Fam Zheng writes: > > > Signed-off-by: Fam Zheng > > --- > > .gitignore | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/.gitignore b/.gitignore > > index 88a80ff..a335b7b 100644 > > --- a/.gitignore >

Re: [Qemu-devel] [PATCH 00/12] tests: Introducing docker tests

2016-02-15 Thread Fam Zheng
On Mon, 02/15 17:59, Alex Bennée wrote: > > Fam Zheng writes: > > > v1: Since RFC, addressed comments from reviewers, and improved a lot of > > things. > > Thanks to Daniel, Eric, Paolo, Stefan, for the feedback. > > > > This series adds a new "docker" make target family

Re: [Qemu-devel] [PATCH v6 00/11] Add basic "detach" support for dump-guest-memory

2016-02-15 Thread Peter Xu
Still think this might help in some cases, so ping again... Peter On Wed, Dec 09, 2015 at 10:42:12AM +0800, Peter Xu wrote: > v6 changes: > - patch 10 > - English error fix [Fam] > - patch 11 > - remove useless var: "not_used" [me] > - all > - move patch 8 to the end to be patch 11 (v5

[Qemu-devel] [PATCH v2 1/1] quorum: Change vote rules for 64 bits hash

2016-02-15 Thread Changlong Xie
If quorum has two children(A, B). A do flush sucessfully, but B flush failed. We MUST choice A as winner rather than just pick anyone of them. Otherwise the filesystem of guest will become read-only with following errors: end_request: I/O error, dev vda, sector 11159960 Aborting journal on device

[Qemu-devel] [PATCH v2 0/1] change quorum vote rules for 64-bits hash

2016-02-15 Thread Changlong Xie
If quorum has two children(A, B). A do flush sucessfully, but B flush failed. We MUST choice A as winner, otherwise we will get following errors: {"timestamp": {"seconds": 1455641588, "microseconds": 415937}, "event": "BLOCK_IO_ERROR", "data": {"device": "colo-disk", "nospace": false,

[Qemu-devel] [Bug 1490611] Re: Using qemu >=2.2.1 to convert raw->VHD (fixed) adds extra padding to the result file, which Microsoft Azure rejects as invalid

2016-02-15 Thread Cole Mickens
I bisected to this commit: c70221df1f89953e85a3f1f96ceefbd6888bb55f -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1490611 Title: Using qemu >=2.2.1 to convert raw->VHD (fixed) adds extra padding

[Qemu-devel] [Bug 1490611] Re: Using qemu >=2.2.1 to convert raw->VHD (fixed) adds extra padding to the result file, which Microsoft Azure rejects as invalid

2016-02-15 Thread Cole Mickens
Kevin Wolf, I added you since you were the author of the commit that I bisected this bug to. Can you advise at all on this bug? Thank you. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1490611

Re: [Qemu-devel] [PATCH 1/1] quorum: change vote rules for 64 bits hash

2016-02-15 Thread Changlong Xie
On 02/16/2016 01:10 AM, Eric Blake wrote: On 02/15/2016 02:52 AM, Changlong Xie wrote: Before: 1) vote_count > max: winner = candidate, update max 2) vote_count <= max: do nothing Current: 1) vote_count > max: winner = candidate, update max 2) vote_count = max: compare the value of winner with

Re: [Qemu-devel] [PATCH 06/12] docker: Add basic test

2016-02-15 Thread Fam Zheng
On Mon, 02/15 14:52, Alex Bennée wrote: > > Peter Maydell writes: > > > On 15 February 2016 at 14:34, Alex Bennée wrote: > >> > >> Fam Zheng writes: > >>> +cd $(mktemp -d) > >>> +mkdir build > >>> +mkdir install > >>> +cd

[Qemu-devel] [PATCH v10 11/13] qapi: Don't box branches of flat unions

2016-02-15 Thread Eric Blake
There's no reason to do two malloc's for a flat union; let's just inline the branch struct directly into the C union branch of the flat union. Surprisingly, fewer clients were actually using explicit references to the branch types in comparison to the number of flat unions thus modified. This

[Qemu-devel] [PATCH v10 09/13] qapi: Emit structs used as variants in topological order

2016-02-15 Thread Eric Blake
Right now, we emit the branches of union types as a boxed pointer, and it suffices to have a forward declaration of the type. However, a future patch will swap things to directly use the branch type, instead of hiding it behind a pointer. For this to work, the compiler needs the full definition

[Qemu-devel] [PATCH v10 13/13] qapi: Change visit_start_implicit_struct to visit_start_alternate

2016-02-15 Thread Eric Blake
After recent changes, the only remaining use of visit_start_implicit_struct() is for allocating the space needed when visiting an alternate. Since the term 'implicit struct' is hard to explain, rename the function to its current usage. While at it, we can merge the functionality of

[Qemu-devel] [PATCH v10 08/13] qapi: Adjust layout of FooList types

2016-02-15 Thread Eric Blake
By sticking the next pointer first, we don't need a union with 64-bit padding for smaller types. On 32-bit platforms, this can reduce the size of uint8List from 16 bytes (or 12, depending on whether 64-bit ints can tolerate 4-byte alignment) down to 8. It has no effect on 64-bit platforms (where

[Qemu-devel] [PATCH v10 07/13] qapi-visit: Less indirection in visit_type_Foo_fields()

2016-02-15 Thread Eric Blake
We were passing 'Foo **obj' to the internal helper function, but all uses within the helper were via reads of '*obj'. Refactor things to pass one less level of indirection, by having the callers dereference before calling. For an example of the generated code change: |-static void

[Qemu-devel] [PATCH v10 12/13] qapi: Delete unused visit_start_union()

2016-02-15 Thread Eric Blake
Commit cee2dedb noticed that if you have a partial flat union (such as if an input parse failed due to a missing discriminator), calling the dealloc visitor could result in trying to dereference a NULL pointer if we attempted to visit an object branch without an earlier successful call to

[Qemu-devel] [PATCH v10 03/13] qapi: Reposition error checks in gen_visit_fields()

2016-02-15 Thread Eric Blake
Change the generated code for error checking after an optional field visit to have one less level of indentation. There is no real semantic change (the compiler should be smart enough to realize that err does not change if visit_optional() returns false, and optimize out unneeded branching in

[Qemu-devel] [PATCH v10 05/13] qapi-visit: Simplify how we visit common union members

2016-02-15 Thread Eric Blake
From: Markus Armbruster For a simple union SU, gen_visit_union() generates a visit of its single tag member, like this: visit_type_SUKind(v, "type", &(*obj)->type, ); For a flat union FU with base B, it generates a visit of its base fields: visit_type_B_fields(v, (B

[Qemu-devel] [PATCH v10 02/13] qapi: Forbid empty unions and useless alternates

2016-02-15 Thread Eric Blake
Empty unions serve no purpose, and while we compile with gcc which permits them, strict C99 forbids them. We could inject a dummy member (and in fact, we do for empty structs), but while empty structs make sense in qapi, empty unions don't add any expressiveness to the QMP language. So prohibit

[Qemu-devel] [PATCH v10 00/13] prune some QAPI visitor cruft (was qapi cleanups subset E)

2016-02-15 Thread Eric Blake
I'm still working on my documentation patches for QAPI visitors (https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg03504.html), but am finding it easier to nuke bad code up front than to document that it is bad only to later nuke it. So this pulls bits and pieces of other patches that

[Qemu-devel] [PATCH v10 10/13] qapi: Don't box struct branch of alternate

2016-02-15 Thread Eric Blake
There's no reason to do two malloc's for an alternate type visiting a QAPI struct; let's just inline the struct directly as the C union branch of the struct. Surprisingly, no clients were actually using the struct member prior to this patch; some testsuite coverage is added to avoid future

[Qemu-devel] [PATCH v10 04/13] qapi: Drop pointless gotos in generated code

2016-02-15 Thread Eric Blake
There's no point in emitting a goto if the very next thing emitted will be the label. A bit of cleverness in gen_visit_fields() will let us choose when to omit a final error check (basically, swap the order of emitted text within the loop, with the error check omitted on the first pass, then

[Qemu-devel] [PATCH v10 01/13] qapi: Simplify excess input reporting in input visitors

2016-02-15 Thread Eric Blake
When reporting that an unvisited member remains at the end of an input visit for a struct, we were using g_hash_table_find() coupled with a callback function that always returns true, to locate an arbitrary member of the hash table. But if all we need is an arbitrary entry, we can get that from a

[Qemu-devel] [PATCH v10 06/13] qapi-visit: Unify struct and union visit

2016-02-15 Thread Eric Blake
From: Markus Armbruster gen_visit_union() is now just like gen_visit_struct() plus additional code to handle variants. Make that code conditional on variants, so gen_visit_union() does exactly the same for structs as gen_visit_struct(). Rename it to gen_visit_object(), use

Re: [Qemu-devel] [PATCH v3] linux-user: Fix qemu-binfmt-conf.h to store config across reboot

2016-02-15 Thread Laurent Vivier
Ping? Le 29/01/2016 17:07, Laurent Vivier a écrit : > Original qemu-binfmt-conf.h is only able to write configuration > into /proc/sys/fs/binfmt_misc, and the configuration is lost on reboot. > > This script can configure debian and systemd services to restore > configuration on reboot.

Re: [Qemu-devel] [PATCH 2/3] i.MX: Add the Freescale SPI Controller

2016-02-15 Thread Jean-Christophe DUBOIS
Le 15/02/2016 17:46, mar.krzeminski a écrit : W dniu 15.02.2016 o 11:18, Jean-Christophe DUBOIS pisze: Le 14/02/2016 20:17, mar.krzeminski a écrit : W dniu 14.02.2016 o 17:56, Jean-Christophe DUBOIS pisze: Le 14/02/2016 12:52, mar.krzeminski a écrit : Hello, W dniu 13.02.2016 o 17:06,

[Qemu-devel] QEMU GSoC 2016: MTTCG project

2016-02-15 Thread Pranith Kumar
Hello, I am interested in working on a portion of the MTTCG project as part of GSoC 2016. I am writing to ask for guidance in creating a formal proposal. On IRC, Alex suggested a project to support proper modelling of memory consistency between different host and guest architectures. This, I

Re: [Qemu-devel] [PULL 0/5] tcg queued patches

2016-02-15 Thread Richard Henderson
On 02/16/2016 07:35 AM, Peter Maydell wrote: On 15 February 2016 at 20:29, Richard Henderson wrote: On 02/16/2016 12:04 AM, Peter Maydell wrote: I'm generally reluctant to suggest compiler bugs, but this does look rather like a compiler bug... There are at least 5 such

Re: [Qemu-devel] [PATCH v2 0/4] TriCore exception patches

2016-02-15 Thread Richard Henderson
On 02/16/2016 12:10 AM, Bastian Koppelmann wrote: Bastian Koppelmann (4): target-tricore: Add trap handling target-tricore: add context managment trap generation target-tricore: add illegal opcode trap generation target-tricore: add opd trap generation Comments on patch 1. Patches

Re: [Qemu-devel] [PATCH v2 1/4] target-tricore: Add trap handling

2016-02-15 Thread Richard Henderson
On 02/16/2016 12:10 AM, Bastian Koppelmann wrote: + +void tricore_cpu_do_interrupt(CPUState *cs) +{ +TriCoreCPU *cpu = TRICORE_CPU(cs); +CPUTriCoreState *env = >env; + +if (cs->exception_index <= TRAPC_NMI) { +/* The trap vector table is accessed to fetch the first

Re: [Qemu-devel] [PULL 0/5] tcg queued patches

2016-02-15 Thread Peter Maydell
On 15 February 2016 at 20:29, Richard Henderson wrote: > On 02/16/2016 12:04 AM, Peter Maydell wrote: >> I'm generally reluctant to suggest compiler bugs, but this does >> look rather like a compiler bug... > > > There are at least 5 such bugs open against gcc at the moment. > >

Re: [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-15 Thread Peter Maydell
On 15 February 2016 at 20:18, Andrew Jones wrote: > On Mon, Feb 15, 2016 at 08:40:54PM +0100, Markus Armbruster wrote: >> How would the command line look like? >> > > Here is what is available today > > # select gicv2 (this work with and without KVM) > qemu-system-aarch64 -M

Re: [Qemu-devel] [PULL 0/5] tcg queued patches

2016-02-15 Thread Richard Henderson
On 02/16/2016 12:04 AM, Peter Maydell wrote: On 15 February 2016 at 11:29, Richard Henderson wrote: Richard Henderson (5): tcg: Work around clang bug wrt enum ranges, part 2 tcg: Implement indirect

Re: [Qemu-devel] [PATCH] vl: fix migration from prelaunch state

2016-02-15 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Reproducer is simply to migrate a virtual machine that was started with -S. > > Signed-off-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert (I'm sure we have a bz for that as well somewhere) Dave >

Re: [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-15 Thread Andrew Jones
On Mon, Feb 15, 2016 at 08:40:54PM +0100, Markus Armbruster wrote: > Peter Maydell writes: > > > On 15 February 2016 at 15:08, Markus Armbruster wrote: > >> Peter Xu writes: > >>> On Mon, Feb 15, 2016 at 10:52:01AM +0100, Markus

Re: [Qemu-devel] [RFC PATCH v3 3/3] fw/pci: Allocate IGD stolen memory

2016-02-15 Thread Michael S. Tsirkin
On Mon, Feb 15, 2016 at 02:50:41PM -0500, Kevin O'Connor wrote: > On Mon, Feb 15, 2016 at 09:29:26PM +0200, Michael S. Tsirkin wrote: > > I can build a generic interface to pass addresses > > allocated by bios back to QEMU. It looks like this would > > be useful for other purposes as well.

Re: [Qemu-devel] [PATCH] msix: fix msix_vector_masked

2016-02-15 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > commit 428c3ece97179557f2753071fb0ca97a03437267 ("fix MSI injection on Xen") > inadvertently enabled the xen-specific logic unconditionally. > Limit it to only when xen is enabled. > Additionally, msix data should be read with pci_get_log > since

Re: [Qemu-devel] [RFC PATCH v3 3/3] fw/pci: Allocate IGD stolen memory

2016-02-15 Thread Alex Williamson
On Mon, 15 Feb 2016 21:29:26 +0200 "Michael S. Tsirkin" wrote: > On Mon, Feb 15, 2016 at 12:20:23PM -0700, Alex Williamson wrote: > > On Mon, 15 Feb 2016 10:54:51 +0100 > > Igor Mammedov wrote: > > > > > On Sat, 13 Feb 2016 18:03:31 -0700 > > > Alex

Re: [Qemu-devel] [RFC PATCH v3 3/3] fw/pci: Allocate IGD stolen memory

2016-02-15 Thread Kevin O'Connor
On Mon, Feb 15, 2016 at 09:29:26PM +0200, Michael S. Tsirkin wrote: > I can build a generic interface to pass addresses > allocated by bios back to QEMU. It looks like this would > be useful for other purposes as well. Interested? If this is undertaken, I suggest extending fw_cfg to support

Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus

2016-02-15 Thread Markus Armbruster
Igor Mammedov writes: > it will allow mgmt to query present and possible to hotplug CPUs > it is required from a target platform that wish to support > command to set board specific MachineClass.possible_cpus() hook, > which will return a list of possible CPUs with options >

Re: [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-15 Thread Markus Armbruster
Peter Maydell writes: > On 15 February 2016 at 15:08, Markus Armbruster wrote: >> Peter Xu writes: >>> On Mon, Feb 15, 2016 at 10:52:01AM +0100, Markus Armbruster wrote: Peter Xu writes: Adding ad hoc

Re: [Qemu-devel] [RFC PATCH v3 3/3] fw/pci: Allocate IGD stolen memory

2016-02-15 Thread Michael S. Tsirkin
On Mon, Feb 15, 2016 at 12:20:23PM -0700, Alex Williamson wrote: > On Mon, 15 Feb 2016 10:54:51 +0100 > Igor Mammedov wrote: > > > On Sat, 13 Feb 2016 18:03:31 -0700 > > Alex Williamson wrote: > > > > > On Sat, 13 Feb 2016 19:20:32 -0500 > > >

Re: [Qemu-devel] [RFC PATCH v3 3/3] fw/pci: Allocate IGD stolen memory

2016-02-15 Thread Alex Williamson
On Mon, 15 Feb 2016 10:54:51 +0100 Igor Mammedov wrote: > On Sat, 13 Feb 2016 18:03:31 -0700 > Alex Williamson wrote: > > > On Sat, 13 Feb 2016 19:20:32 -0500 > > "Kevin O'Connor" wrote: > > > > > On Sat, Feb 13, 2016 at

Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: 140: use virtio-scsi instead of IDE

2016-02-15 Thread Max Reitz
On 10.02.2016 20:26, Sascha Silbe wrote: > Dear Max, > > Max Reitz writes: > > [tests/qemu-iotests/140] >>> -_launch_qemu -drive >>> if=ide,media=cdrom,id=drv,file="$TEST_IMG",format=$IMGFMT \ >>> -2> >(_filter_nbd) >>> +_launch_qemu -drive >>>

Re: [Qemu-devel] proposed schedule for 2.6 release

2016-02-15 Thread Peter Maydell
On 2 February 2016 at 15:45, Peter Maydell wrote: > I've sketched out some proposed dates for QEMU 2.6's > release schedule (also at http://wiki.qemu.org/Planning/2.6) > That would put softfreeze just three weeks away. Should we shove > all the dates forward a week?

[Qemu-devel] [PATCH] migration: fix incorrect memory_global_dirty_log_start outside BQL

2016-02-15 Thread Paolo Bonzini
This can cause various segmentation faults or aborts in qemu-iotests test 091. Fixes: 5b82b703b69acc67b78b98a5efc897a3912719eb Cc: Dave Gilbert Cc: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- migration/ram.c | 4 1 file

[Qemu-devel] ping [PATCH v14] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-02-15 Thread Programmingkid
https://patchwork.ozlabs.org/patch/579325/ Mac OS X can be picky when it comes to allowing the user to use physical devices in QEMU. Most mounted volumes appear to be off limits to QEMU. If an issue is detected, a message is displayed showing the user how to unmount a volume. Now QEMU uses both

Re: [Qemu-devel] [PATCH v2 06/11] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-02-15 Thread Xiao Guangrong
On 02/16/2016 01:24 AM, Igor Mammedov wrote: On Mon, 15 Feb 2016 23:53:13 +0800 Xiao Guangrong wrote: On 02/15/2016 09:32 PM, Igor Mammedov wrote: On Mon, 15 Feb 2016 13:45:59 +0200 "Michael S. Tsirkin" wrote: On Mon, Feb 15, 2016 at

Re: [Qemu-devel] [PATCH 6/8] ipmi: provide support for FRUs

2016-02-15 Thread Marcel Apfelbaum
On 02/15/2016 07:17 PM, Cédric Le Goater wrote: On 02/14/2016 10:25 AM, Marcel Apfelbaum wrote: On 02/09/2016 02:13 PM, Cédric Le Goater wrote: This patch provides a simple FRU support for the BMC simulator. FRUs are loaded from a file which name is specified in the object properties, each

[Qemu-devel] [PATCH] vl: fix migration from prelaunch state

2016-02-15 Thread Paolo Bonzini
Reproducer is simply to migrate a virtual machine that was started with -S. Signed-off-by: Paolo Bonzini --- vl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vl.c b/vl.c index 1ec62ac..e600f8d 100644 --- a/vl.c +++ b/vl.c @@ -590,6 +590,7 @@ static const

Re: [Qemu-devel] [PATCH v2 00/14] QOM'ify hw/timer/*

2016-02-15 Thread Peter Maydell
On 27 January 2016 at 02:54, xiaoqiang zhao wrote: > This patch series QOM'ify timer code under hw/timer directory. > Main idea is to split the initfn's work, some to TypeInfo.instance_init > and some is placed in DeviceClass::realize. > Drop the use of SysBusDeviceClass::init

Re: [Qemu-devel] [PATCH v2 14/14] hw/timer: QOM'ify tusb6010 and remove all tabs

2016-02-15 Thread Peter Maydell
On 27 January 2016 at 02:56, xiaoqiang zhao wrote: > * assign tusb6010_init to tusb6010_info.instance_init and drop the > SysBusDeviceClass::init > * use spaces instead of tabs Please don't do whitespace/indentation changes and real code changes in the same patch. Indent

Re: [Qemu-devel] [PATCH v2 06/14] hw/timer: QOM'ify grlib_gptimer

2016-02-15 Thread Peter Maydell
On 27 January 2016 at 02:54, xiaoqiang zhao wrote: > * split grlib_gptimer_init into grlib_gptimer_info.instance_init and > grlib_gptimer_realize > * use DeviceClass::realize instead of SysBusDeviceClass::init Same comments as for other patches: * line wrapping * OBJECT

Re: [Qemu-devel] [PATCH v2 07/14] hw/timer: QOM'ify lm32_timer

2016-02-15 Thread Peter Maydell
On 27 January 2016 at 02:54, xiaoqiang zhao wrote: > * split lm32_timer_init into lm32_timer_info.instance_init and > lm32_timer_realize > * use DeviceClass::realize instead of SysBusDeviceClass::init Long lines again. > Signed-off-by: xiaoqiang zhao >

Re: [Qemu-devel] [PATCH v2 09/14] hw/timer: QOM'ify milkymist_sysctl

2016-02-15 Thread Peter Maydell
On 27 January 2016 at 02:54, xiaoqiang zhao wrote: > * split milkymist_sysctl_init into milkymist_sysctl_info.instance_init and > milkymist_sysctl_realize I think the "info" in this function name is wrong ? > * use DeviceClass::realize instead of SysBusDeviceClass::init

Re: [Qemu-devel] [PATCH v2 04/14] hw/timer: QOM'ify exynos4210_pwm

2016-02-15 Thread Peter Maydell
On 27 January 2016 at 02:54, xiaoqiang zhao wrote: > assign exynos4210_pwm_init to exynos4210_pwm_info.instance_init > and drop the SysBusDeviceClass::init > > Signed-off-by: xiaoqiang zhao > --- > hw/timer/exynos4210_pwm.c | 10 -- > 1 file

  1   2   3   4   >