Re: [Qemu-devel] [vhost-user BUG ?] QEMU process segfault when shutdown or reboot with vhost-user

2015-11-04 Thread zhanghailiang
On 2015/11/4 11:19, Jason Wang wrote: On 11/04/2015 10:24 AM, zhanghailiang wrote: On 2015/11/3 22:54, Marc-André Lureau wrote: Hi On Tue, Nov 3, 2015 at 2:01 PM, zhanghailiang wrote: The corresponding codes where gdb reports error are: (We have added some codes in net.c) Can you reprodu

Re: [Qemu-devel] [PATCH v9 03/27] qapi: Plug leaks in test-qmp-*

2015-11-04 Thread Markus Armbruster
Eric Blake writes: > Make valgrind happy with the current state of the tests, so that > it is easier to see if future patches introduce new memory problems > without being drowned in noise. Many of the leaks were due to > calling a second init without tearing down the data from an earlier > visi

Re: [Qemu-devel] [PATCH] set_memory_options: remove code that make no sense

2015-11-04 Thread Cao jin
hi Michael, Thanks for your explanation that make me realized I am wrong about my patch:-[ ...So, forget it. On 11/03/2015 08:40 PM, Michael Tokarev wrote: 03.11.2015 15:30, Cao jin wrote: Signed-off-by: Cao jin --- vl.c | 9 - 1 file changed, 9 deletions(-) diff --git a/vl.c

Re: [Qemu-devel] [PATCH v9 04/27] qapi: Simplify error testing in test-qmp-*

2015-11-04 Thread Markus Armbruster
Eric Blake writes: > By using &error_abort, we can avoid a local err variable in > situations where we expect success. This part is a no-brainer. Bonus: before we abort(), we print Unexpected error in FUNC() at FILE:LINE: THE-ERROR-MESSAGE to stdout on unexpected errors, which is a wh

Re: [Qemu-devel] [PATCH v7 27/35] nvdimm acpi: build ACPI nvdimm devices

2015-11-04 Thread Igor Mammedov
On Tue, 3 Nov 2015 22:22:40 +0800 Xiao Guangrong wrote: > > > On 11/03/2015 09:13 PM, Igor Mammedov wrote: > > On Mon, 2 Nov 2015 17:13:29 +0800 > > Xiao Guangrong wrote: > > > >> NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices > >> > >> There is a root device under \_SB and specifi

Re: [Qemu-devel] [PATCH v9 05/27] qapi: More tests of alternate output

2015-11-04 Thread Markus Armbruster
Suggest "qapi: Test alternate output visitor with boxed type" Eric Blake writes: > The testsuite was only covering that we could output a built-in > branch of an alternate; make sure that things still work even Well, 'str' is built-in, too. "'int' branch"? > when a branch involves allocation,

Re: [Qemu-devel] safety of migration_bitmap_extend

2015-11-04 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > On 11/03/2015 09:47 PM, Dr. David Alan Gilbert wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > >> "Dr. David Alan Gilbert" wrote: > >>> Hi, > >>> I'm trying to understand why migration_bitmap_extend is correct/safe; > >>> If I understand c

Re: [Qemu-devel] [PATCH v9 06/27] qapi: Test failure in middle of array parse

2015-11-04 Thread Markus Armbruster
Eric Blake writes: > Our generated list visitors have the same problem as has been > mentioned elsewhere (see commit 2f52e20): they allocate data > even on failure. An upcoming patch will correct things to > provide saner guarantees, but first we need to expose the > behavior in the testsuite to

Re: [Qemu-devel] [PATCH v9 07/27] qapi: More tests of input arrays

2015-11-04 Thread Markus Armbruster
Eric Blake writes: > Our testsuite had no coverage of empty arrays, nor of what > happens when the input does not match the expected type. > Useful to have, especially if we start changing the visitor > contracts. > > Signed-off-by: Eric Blake > > --- > v9: move earlier in series (was 16/17) > v

Re: [Qemu-devel] safety of migration_bitmap_extend

2015-11-04 Thread Wen Congyang
On 11/04/2015 05:05 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: >> On 11/03/2015 09:47 PM, Dr. David Alan Gilbert wrote: >>> * Juan Quintela (quint...@redhat.com) wrote: "Dr. David Alan Gilbert" wrote: > Hi, > I'm trying to understand why migrati

Re: [Qemu-devel] safety of migration_bitmap_extend

2015-11-04 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > On 11/04/2015 05:05 PM, Dr. David Alan Gilbert wrote: > > * Wen Congyang (we...@cn.fujitsu.com) wrote: > >> On 11/03/2015 09:47 PM, Dr. David Alan Gilbert wrote: > >>> * Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert" wrote:

Re: [Qemu-devel] [RFC PATCH 1/1] dataplane: alternative approach to locking

2015-11-04 Thread Juan Quintela
"Denis V. Lunev" wrote: D> What about this? Is it simple enough for you keeping lock around > qemu_fopen_bdrv/qemu_fclose as suggested in patch 1? > > This is not tested at all, just sent as an idea for a discussion. > > Signed-off-by: Denis V. Lunev > CC: Stefan Hajnoczi > CC: Juan Quintela >

Re: [Qemu-devel] [PATCH v9 09/27] qapi-introspect: Document lack of sorting

2015-11-04 Thread Markus Armbruster
Eric Blake writes: > qapi-code-gen.txt already claims that types, commands, and > events share a common namespace; set this in stone by further > documenting that our introspection output will never have > collisions with the same name tied to more than one meta-type. > > Our largest QMP enum cur

[Qemu-devel] Mouse cursor locked

2015-11-04 Thread Frans de Boer
Dear reader, I am using the GTK3 UI now some time. However, when I go to fullscreen mode, my cursor gets locked inside the QEMU window and can get out except by aborting QEMU. This behavior is with 2.4.0.1 and 2.4.1. I tried the master too, where there is no problem beside stability. Am I mi

Re: [Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix

2015-11-04 Thread Richard Henderson
On 11/02/2015 04:13 PM, Peter Maydell wrote: On 2 November 2015 at 14:48, Paolo Bonzini wrote: On 02/11/2015 15:09, Peter Maydell wrote: diff --git a/target-sparc/vis_helper.c b/target-sparc/vis_helper.c index 383cc8b..45fc7db 100644 --- a/target-sparc/vis_helper.c +++ b/target-sparc/vis_hel

Re: [Qemu-devel] [PATCH v9 00/27] alternate layout (post-introspection cleanups, subset C)

2015-11-04 Thread Markus Armbruster
Eric Blake writes: > No pending prerequisites; based on qemu.git master > > Also available as a tag at this location: > git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv9c > > and will soon be part of my branch with the rest of the v5 series, at: > http://repo.or.cz/qemu/ericb.git/shortlog/

Re: [Qemu-devel] [PATCH v3 1/3] qemu-io: fix cvtnum lval types

2015-11-04 Thread Kevin Wolf
Am 04.11.2015 um 01:17 hat John Snow geschrieben: > cvtnum() returns int64_t: we should not be storing this > result inside of an int. > > In a few cases, we need an extra sprinkling of error handling > where we expect to pass this number on towards a function that > expects something smaller than

Re: [Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix

2015-11-04 Thread Paolo Bonzini
On 04/11/2015 11:12, Richard Henderson wrote: > On 11/02/2015 04:13 PM, Peter Maydell wrote: >> On 2 November 2015 at 14:48, Paolo Bonzini wrote: >>> >>> >>> On 02/11/2015 15:09, Peter Maydell wrote: >> diff --git a/target-sparc/vis_helper.c b/target-sparc/vis_helper.c >> index 383cc8b..

Re: [Qemu-devel] [PATCH v2 0/3] target-i386: Don't trigger CPUID warnings by default in KVM mode (in most hosts)

2015-11-04 Thread Paolo Bonzini
On 03/11/2015 23:54, Eduardo Habkost wrote: > Probably, yes. libvirt even has these commented out in their cpu_map.xml: > > > > > > > > (libvirt must stop making assumptions about the CPU model feature sets so > all elements in cpu_map.xml should go away. But at

Re: [Qemu-devel] [PATCH v18 00/21] Deterministic replay core

2015-11-04 Thread Igor R
Hello, I would like to try this new functionality. What's the correct way to do this? I'm trying the following (after applying the patches to qemu upstream): qemu-system-i386 mylinux.qcow2 -icount shift=7,rr=record,rrfile=record.bin -net none Linux gets booted, record.bin file is created. Then I

Re: [Qemu-devel] [PATCH v9 10/27] qapi: Track simple union tag in object.local_members

2015-11-04 Thread Markus Armbruster
Eric Blake writes: > We were previously creating all unions with an empty list for > local_members. However, it will make it easier to unify struct > and union generation if we include the generated tag member in > local_members. That way, we can have a common code pattern: > visit the base (if

Re: [Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix

2015-11-04 Thread Richard Henderson
On 11/04/2015 11:45 AM, Paolo Bonzini wrote: int32_t src = rs2 >> (word * 32); -int64_t scaled = src << scale; +int64_t scaled = (int64_t)src << scale; int64_t from_fixed = scaled >> 16; ... I do think we'd be better served by casting to uint64_t on that l

Re: [Qemu-devel] [PATCH] qcow2: avoid misaligned 64bit bswap

2015-11-04 Thread Kevin Wolf
Am 03.11.2015 um 00:46 hat Eric Blake geschrieben: > On 11/02/2015 04:32 PM, John Snow wrote: > > If we create a buffer directly on the stack by using 12 bytes, there's > > no guarantee the 64bit value we want to swap will be aligned, which > > could cause errors with undefined behavior. > > > > S

Re: [Qemu-devel] [PATCH] qemu-img: add check for zero-length job len

2015-11-04 Thread Kevin Wolf
Am 03.11.2015 um 00:45 hat John Snow geschrieben: > >> diff --git a/qemu-img.c b/qemu-img.c > >> index 3025776..38b4888 100644 > >> --- a/qemu-img.c > >> +++ b/qemu-img.c > >> @@ -656,7 +656,8 @@ static void run_block_job(BlockJob *job, Error **errp) > >> > >> do { > >> aio_poll(aio

Re: [Qemu-devel] [RFC PATCH 1/1] dataplane: alternative approach to locking

2015-11-04 Thread Denis V. Lunev
On 11/04/2015 12:49 PM, Juan Quintela wrote: void hmp_delvm(Monitor *mon, const QDict *qdict) { const char *name = qdict_get_str(qdict, "name"); if (!bdrv_find_snapshot_bs()) { monitor_printf(mon, "No block device supports snapshots\n"); return; } del_exist

[Qemu-devel] [PATCH RFC 2/2] snapshot: create bdrv_snapshot_all_del_snapshot helper

2015-11-04 Thread Denis V. Lunev
to delete snapshots from all loaded block drivers. The patch also ensures proper locking. Signed-off-by: Denis V. Lunev CC: Stefan Hajnoczi CC: Juan Quintela --- block/snapshot.c | 27 include/block/snapshot.h | 2 ++ migration/savevm.c | 54 +--

[Qemu-devel] [PATCH RFC 1/2] snapshot: create helper to test that block drivers supports snapshots

2015-11-04 Thread Denis V. Lunev
The patch enforces proper locking for this operation. Signed-off-by: Denis V. Lunev CC: Stefan Hajnoczi CC: Juan Quintela --- Patches are compile-tested only. Sent to check the approach, naming and functions placement. Functions are returning bad BlockDriver via parameter to make clear distinct

Re: [Qemu-devel] [RFC PATCH 1/1] dataplane: alternative approach to locking

2015-11-04 Thread Juan Quintela
"Denis V. Lunev" wrote: > On 11/04/2015 12:49 PM, Juan Quintela wrote: >> void hmp_delvm(Monitor *mon, const QDict *qdict) >> { >> const char *name = qdict_get_str(qdict, "name"); >> >> if (!bdrv_find_snapshot_bs()) { >> monitor_printf(mon, "No block device supports snapshots\n"

Re: [Qemu-devel] [PATCH RFC 1/2] snapshot: create helper to test that block drivers supports snapshots

2015-11-04 Thread Juan Quintela
"Denis V. Lunev" wrote: > The patch enforces proper locking for this operation. > > Signed-off-by: Denis V. Lunev > CC: Stefan Hajnoczi > CC: Juan Quintela > --- > Patches are compile-tested only. Sent to check the approach, naming and > functions placement. Functions are returning bad BlockDri

Re: [Qemu-devel] [RFC PATCH 1/1] dataplane: alternative approach to locking

2015-11-04 Thread Denis V. Lunev
On 11/04/2015 03:03 PM, Juan Quintela wrote: "Denis V. Lunev" wrote: On 11/04/2015 12:49 PM, Juan Quintela wrote: void hmp_delvm(Monitor *mon, const QDict *qdict) { const char *name = qdict_get_str(qdict, "name"); if (!bdrv_find_snapshot_bs()) { monitor_printf(mon, "No b

Re: [Qemu-devel] [PATCH RFC 2/2] snapshot: create bdrv_snapshot_all_del_snapshot helper

2015-11-04 Thread Juan Quintela
"Denis V. Lunev" wrote: > to delete snapshots from all loaded block drivers. > > The patch also ensures proper locking. > > Signed-off-by: Denis V. Lunev > CC: Stefan Hajnoczi > CC: Juan Quintela > --- > block/snapshot.c | 27 > include/block/snapshot.h | 2 ++

Re: [Qemu-devel] [PATCH v7 08/35] exec: allow memory to be allocated from any kind of path

2015-11-04 Thread Eduardo Habkost
On Wed, Nov 04, 2015 at 11:12:41AM +0800, Xiao Guangrong wrote: > On 11/04/2015 07:00 AM, Eduardo Habkost wrote: > >On Mon, Nov 02, 2015 at 05:13:10PM +0800, Xiao Guangrong wrote: > >>Currently file_ram_alloc() is designed for hugetlbfs, however, the memory > >>of nvdimm can come from either raw pm

Re: [Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix

2015-11-04 Thread Paolo Bonzini
On 04/11/2015 12:05, Richard Henderson wrote: > On 11/04/2015 11:45 AM, Paolo Bonzini wrote: int32_t src = rs2 >> (word * 32); -int64_t scaled = src << scale; +int64_t scaled = (int64_t)src << scale; int64_t from_fixed = sc

[Qemu-devel] [PULL 0/5] Migration pull request

2015-11-04 Thread Juan Quintela
motes/pmaydell/tags/pull-target-arm-20151103' into staging (2015-11-03 14:54:40 +) are available in the git repository at: git://github.com/juanquintela/qemu.git tags/migration/20151104 for you to fetch changes up to 96e5c9bc77acef8b7b56cbe23a8a2611feff9e34: migration: fix analyze-mi

[Qemu-devel] [PULL 2/5] migration: rename qemu_savevm_state_cancel

2015-11-04 Thread Juan Quintela
From: Liang Li The function qemu_savevm_state_cancel is called after the migration in migration_thread, it seems strange to 'cancel' it after completion, rename it to qemu_savevm_state_cleanup looks better. Signed-off-by: Liang Li Reviewed-by: Juan Quintela al3 Reviewed-by: Amit Shah al3 Signed

[Qemu-devel] [PULL 3/5] migration: rename cancel to cleanup in SaveVMHandles

2015-11-04 Thread Juan Quintela
From: Liang Li 'cleanup' seems more appropriate than 'cancel'. Signed-off-by: Liang Li Reviewed-by: Juan Quintela al3 Reviewed-by: Amit Shah al3 Signed-off-by: Juan Quintela al3 --- include/migration/vmstate.h | 2 +- migration/block.c | 2 +- migration/ram.c | 2 +- migr

[Qemu-devel] [PULL 1/5] migration: defer migration_end & blk_mig_cleanup

2015-11-04 Thread Juan Quintela
From: Liang Li Because of the patch 3ea3b7fa9af067982f34b of kvm, which introduces a lazy collapsing of small sptes into large sptes mechanism, now migration_end() is a time consuming operation because it calls memroy_global_dirty_log_stop(), which will trigger the dropping of small sptes operati

[Qemu-devel] [PULL 5/5] migration: fix analyze-migration.py script

2015-11-04 Thread Juan Quintela
From: Mark Cave-Ayland Commit 61964 "Add configuration section" broke the analyze-migration.py script which terminates due to the unrecognised section. Fix the script by parsing the contents of the configuration section directly into a new ConfigurationSection object (although nothing is done wit

[Qemu-devel] [PULL 4/5] migration: code clean up

2015-11-04 Thread Juan Quintela
From: Liang Li Just clean up code, no behavior change. Signed-off-by: Liang Li Reviewed-by: Juan Quintela al3 Reviewed-by: Amit Shah al3 Signed-off-by: Juan Quintela al3 --- migration/block.c | 9 ++--- migration/ram.c | 9 ++--- 2 files changed, 4 insertions(+), 14 deletions(-) dif

Re: [Qemu-devel] [PATCH v3 4/5] fw_cfg: add generic non-DMA read method

2015-11-04 Thread Laszlo Ersek
On 11/03/15 23:03, Gabriel L. Somlo wrote: > On Tue, Nov 03, 2015 at 10:35:36PM +0100, Laszlo Ersek wrote: >> On 11/03/15 18:55, Gabriel L. Somlo wrote: >>> On Tue, Nov 03, 2015 at 11:53:55AM +0100, Laszlo Ersek wrote: Thank you for splitting out this patch; it makes it easier to review.

[Qemu-devel] [PATCH 1/2] throttle: Check for pending requests in throttle_group_unregister_bs()

2015-11-04 Thread Alberto Garcia
throttle_group_unregister_bs() removes a BlockDriverState from its throttling group and destroys the timers. This means that there must be no pending throttled requests at that point (because it would be impossible to complete them), so the caller has to drain them first. At the moment throttle_gr

[Qemu-devel] [PATCH 0/2] Minor throttling updates

2015-11-04 Thread Alberto Garcia
Here's a couple of patches for the throttling code. I think the commit messages are clear enough, but if you have any comments or questions I'll be glad to hear them. Berto Alberto Garcia (2): throttle: Check for pending requests in throttle_group_unregister_bs() throttle: Use bs->throttle_st

[Qemu-devel] [PATCH 2/2] throttle: Use bs->throttle_state instead of bs->io_limits_enabled

2015-11-04 Thread Alberto Garcia
There are two ways to check for I/O limits in a BlockDriverState: - bs->throttle_state: if this pointer is not NULL, it means that this BDS is member of a throttling group, its ThrottleTimers structure has been initialized and its I/O limits are ready to be applied. - bs->io_limits_enabled: i

Re: [Qemu-devel] [PATCH v9 13/27] qapi: Drop obsolete tag value collision assertions

2015-11-04 Thread Markus Armbruster
Eric Blake writes: > From: Markus Armbruster > > Union tag values can't clash with member names in generated C anymore > since commit e4ba22b, but QAPISchemaObjectTypeVariant.check() still > asserts they don't. Drop it. > > Signed-off-by: Markus Armbruster > Message-Id: <1446559499-26984-1-git

Re: [Qemu-devel] [PATCH v9 14/27] qapi: Fix up commit 7618b91's clash sanity checking change

2015-11-04 Thread Markus Armbruster
Eric Blake writes: > From: Markus Armbruster > > This hunk > > @@ -964,6 +965,7 @@ class QAPISchemaObjectType(QAPISchemaType): > members = [] > seen = {} > for m in members: > +assert c_name(m.name) not in seen > see

Re: [Qemu-devel] [PATCH v9 17/27] qapi: Clean up after previous commit

2015-11-04 Thread Markus Armbruster
Eric Blake writes: > From: Markus Armbruster > > QAPISchemaObjectTypeVariants.check() parameter members is no > longer used, drop it. > > Signed-off-by: Markus Armbruster > Message-Id: <1446559499-26984-3-git-send-email-arm...@redhat.com> > [Variant.check(seen) is used after all, so reword and

[Qemu-devel] [PATCH v2] qemu-sockets: do not test path with access() before unlinking

2015-11-04 Thread Paolo Bonzini
Using access() is a time-of-check/time-of-use race condition. It is okay to use them to provide better error messages, but that is pretty much it. This is not one such case; on the other hand, access() *will* skip unlink() for a non-existent path, so ignore ENOENT return values from the unlink()

Re: [Qemu-devel] [PATCH v2] iscsi: Translate scsi sense into error code

2015-11-04 Thread Paolo Bonzini
On 04/11/2015 02:36, Fam Zheng wrote: > Previously we return -EIO blindly when anything goes wrong. Add a helper > function to parse sense fields and try to make the return code more > meaningful. > > This also fixes the default werror configuration (enospc) when we're > using qcow2 on an iscsi

Re: [Qemu-devel] [PATCH RFC 1/2] snapshot: create helper to test that block drivers supports snapshots

2015-11-04 Thread Stefan Hajnoczi
On Wed, Nov 04, 2015 at 01:07:44PM +0100, Juan Quintela wrote: > > +{ > > +BlockDriverState *bs; > > + > > +while ((bs = bdrv_next(bs))) { > > +bool ok; > > +AioContext *ctx = bdrv_get_aio_context(bs); > > + > > +if (!bdrv_is_inserted(bs) || bdrv_is_read_only(bs)) {

Re: [Qemu-devel] [PATCH RFC 1/2] snapshot: create helper to test that block drivers supports snapshots

2015-11-04 Thread Stefan Hajnoczi
On Wed, Nov 04, 2015 at 02:31:55PM +0300, Denis V. Lunev wrote: > The patch enforces proper locking for this operation. > > Signed-off-by: Denis V. Lunev > CC: Stefan Hajnoczi > CC: Juan Quintela > --- > Patches are compile-tested only. Sent to check the approach, naming and > functions placeme

Re: [Qemu-devel] [PATCH v2] configure: disable FORTIFY_SOURCE under clang

2015-11-04 Thread Paolo Bonzini
On 03/11/2015 21:43, John Snow wrote: > Some versions of clang may have difficulty compiling glibc headers when > -D_FORTIFY_SOURCE is used. For example, Clang++ 3.5.0-9.fc22 cannot > compile glibc's stdio headers when -D_FORTIFY_SOURCE=2 is used. This > manifests currently as build failures with

Re: [Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix

2015-11-04 Thread Markus Armbruster
Paolo Bonzini writes: > On 04/11/2015 12:05, Richard Henderson wrote: >> On 11/04/2015 11:45 AM, Paolo Bonzini wrote: >int32_t src = rs2 >> (word * 32); > -int64_t scaled = src << scale; > +int64_t scaled = (int64_t)src << scale; >

Re: [Qemu-devel] [PATCH v2] qemu-sockets: do not test path with access() before unlinking

2015-11-04 Thread Markus Armbruster
Paolo Bonzini writes: > Using access() is a time-of-check/time-of-use race condition. It is > okay to use them to provide better error messages, but that is pretty > much it. > > This is not one such case; on the other hand, access() *will* skip > unlink() for a non-existent path, so ignore ENOE

Re: [Qemu-devel] [PATCH v2] qemu-sockets: do not test path with access() before unlinking

2015-11-04 Thread Edgar E. Iglesias
On Wed, Nov 04, 2015 at 02:48:47PM +0100, Paolo Bonzini wrote: > Using access() is a time-of-check/time-of-use race condition. It is > okay to use them to provide better error messages, but that is pretty > much it. > > This is not one such case; on the other hand, access() *will* skip > unlink()

Re: [Qemu-devel] [PATCH v7 27/35] nvdimm acpi: build ACPI nvdimm devices

2015-11-04 Thread Xiao Guangrong
On 11/04/2015 04:56 PM, Igor Mammedov wrote: On Tue, 3 Nov 2015 22:22:40 +0800 Xiao Guangrong wrote: On 11/03/2015 09:13 PM, Igor Mammedov wrote: On Mon, 2 Nov 2015 17:13:29 +0800 Xiao Guangrong wrote: NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices There is a root device u

Re: [Qemu-devel] [PATCH v7 08/35] exec: allow memory to be allocated from any kind of path

2015-11-04 Thread Xiao Guangrong
On 11/04/2015 08:40 PM, Eduardo Habkost wrote: On Wed, Nov 04, 2015 at 11:12:41AM +0800, Xiao Guangrong wrote: On 11/04/2015 07:00 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:10PM +0800, Xiao Guangrong wrote: Currently file_ram_alloc() is designed for hugetlbfs, however, the mem

Re: [Qemu-devel] [PATCH v4 4/6] fw_cfg: avoid calculating invalid current entry pointer

2015-11-04 Thread Laszlo Ersek
On 11/03/15 22:40, Gabriel L. Somlo wrote: > When calculating a pointer to the currently selected fw_cfg item, the > following is used: > > FWCfgEntry *e = &s->entries[arch][s->cur_entry & FW_CFG_ENTRY_MASK]; > > When s->cur_entry is FW_CFG_INVALID, we are calculating the address of > a non-exi

Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-04 Thread Eduardo Habkost
On Wed, Nov 04, 2015 at 11:17:09AM +0800, Xiao Guangrong wrote: > > > On 11/04/2015 07:21 AM, Eduardo Habkost wrote: > >On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: > >[...] > >>+size_t qemu_file_getlength(const char *file, Error **errp) > >>+{ > >>+int64_t size; > >[...] >

Re: [Qemu-devel] [PATCH v4 2/7] e1000: Add support for migrating the entire MAC registers' array

2015-11-04 Thread Leonid Bloch
On Wed, Nov 4, 2015 at 4:35 AM, Jason Wang wrote: > > > On 11/03/2015 07:14 PM, Leonid Bloch wrote: >> This patch enables the migration of the entire array of MAC registers >> during live migration. The entire array is just 128 KB long, so >> practically no penalty should be felt when transmitting

Re: [Qemu-devel] [PATCH v7 11/35] util: introduce qemu_file_getlength()

2015-11-04 Thread Xiao Guangrong
On 11/04/2015 10:44 PM, Eduardo Habkost wrote: On Wed, Nov 04, 2015 at 11:17:09AM +0800, Xiao Guangrong wrote: On 11/04/2015 07:21 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote: [...] +size_t qemu_file_getlength(const char *file, Error **errp) +{

Re: [Qemu-devel] [PATCH v9 00/27] alternate layout (post-introspection cleanups, subset C)

2015-11-04 Thread Eric Blake
On 11/04/2015 03:22 AM, Markus Armbruster wrote: > Eric Blake writes: > >> No pending prerequisites; based on qemu.git master >> >> Also available as a tag at this location: >> git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv9c >> >> and will soon be part of my branch with the rest of the

Re: [Qemu-devel] [PATCH v4 5/6] fw_cfg: add generic non-DMA read method

2015-11-04 Thread Laszlo Ersek
On 11/03/15 22:40, Gabriel L. Somlo wrote: > Introduce fw_cfg_data_read(), a generic read method which works > on all access widths (1 through 8 bytes, inclusive), and can be > used during both IOPort and MMIO read accesses. > > To maintain legibility, only fw_cfg_data_mem_read() (the MMIO > data

Re: [Qemu-devel] [PATCH v4 3/7] e1000: Trivial implementation of various MAC registers

2015-11-04 Thread Leonid Bloch
On Wed, Nov 4, 2015 at 4:44 AM, Jason Wang wrote: > > > On 11/03/2015 07:14 PM, Leonid Bloch wrote: >> These registers appear in Intel's specs, but were not implemented. >> These registers are now implemented trivially, i.e. they are initiated >> with zero values, and if they are RW, they can be w

[Qemu-devel] [PATCH] target-i386: Remove POPCNT from qemu64 and qemu32 CPU models

2015-11-04 Thread Eduardo Habkost
POPCNT is not available on Penryn and older and on Opteron_G2 and older, and we want to make the default CPU runnable in most hosts, so it won't be enabled by default in KVM mode. We should eventually have all features supported by TCG enabled by default in TCG mode, but as we don't have a good me

Re: [Qemu-devel] [PATCH v4 7/7] e1000: Implementing various counters

2015-11-04 Thread Leonid Bloch
On Wed, Nov 4, 2015 at 4:46 AM, Jason Wang wrote: > > > On 11/03/2015 07:14 PM, Leonid Bloch wrote: >> This implements the following Statistic registers (various counters) >> according to Intel's specs: >> >> TSCTC GOTCL GOTCH GORCL GORCH MPRC BPRC RUCROC >> BPTC MPTC PTC... PRC..

Re: [Qemu-devel] [PATCH] qdev: free qemu-opts when the QOM path goes away

2015-11-04 Thread Paolo Bonzini
On 19/10/2015 13:11, Paolo Bonzini wrote: > Otherwise there is a race where the DEVICE_DELETED event has been sent but > attempts to reuse the ID will fail. > > Reported-by: Michael S. Tsirkin > Signed-off-by: Paolo Bonzini Ping? Paolo > --- > hw/core/qdev.c | 4 +++- > 1 file changed, 3 ins

Re: [Qemu-devel] [PATCH] target-i386: Remove POPCNT from qemu64 and qemu32 CPU models

2015-11-04 Thread Paolo Bonzini
On 04/11/2015 16:35, Eduardo Habkost wrote: > POPCNT is not available on Penryn and older and on Opteron_G2 and older, > and we want to make the default CPU runnable in most hosts, so it won't > be enabled by default in KVM mode. > > We should eventually have all features supported by TCG enable

Re: [Qemu-devel] [PATCH v8 10/17] qapi: Simplify visiting of alternate types

2015-11-04 Thread Markus Armbruster
Eric Blake writes: > On 11/03/2015 11:30 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Previously, working with alternates required two enums, and >>> some indirection: for type Foo, we created Foo_qtypes[] which >>> maps each qtype to a member of FooKind_lookup[], then use >> >> m

Re: [Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix

2015-11-04 Thread Paolo Bonzini
On 04/11/2015 15:07, Markus Armbruster wrote: > Paolo Bonzini writes: > >> On 04/11/2015 12:05, Richard Henderson wrote: >>> On 11/04/2015 11:45 AM, Paolo Bonzini wrote: >>int32_t src = rs2 >> (word * 32); >> -int64_t scaled = src << scale; >> +

Re: [Qemu-devel] [PATCH v4 0/4] Add 'x-blockdev-del' command

2015-11-04 Thread Max Reitz
On 02.11.2015 15:51, Alberto Garcia wrote: > This version has only documentation and test fixes. > > Most are cosmetic changes, but there were two missing wait_ready() and > wait_until_completed() calls that could break one of the tests. > > Regards, > > Berto > > v4: > - patch 3: s/being used/

[Qemu-devel] [PULL 00/18] Record/replay core for QEMU 2.4-rc1

2015-11-04 Thread Paolo Bonzini
The following changes since commit 7bc8e0c967a4ef77657174d28af775691e18b4ce: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-10-29 09:49:52 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream-replay for you to

[Qemu-devel] [PULL 08/18] replay: asynchronous events infrastructure

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch adds module for saving and replaying asynchronous events. These events include network packets, keyboard and mouse input, USB packets, thread pool and bottom halves callbacks. All events are stored in the queue to be processed at synchronization points such as beg

[Qemu-devel] [PULL 01/18] replay: global variables and function stubs

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch adds global variables, defines, function declarations, and function stubs for deterministic VM replay used by external modules. Reviewed-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Pavel Dovgalyuk Message-Id: <20150917162337.8676.41538.st...@pash

[Qemu-devel] [PULL 04/18] replay: introduce icount event

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch adds icount event to the replay subsystem. This event corresponds to execution of several instructions and used to synchronize input events in the replay phase. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk Message-Id: <20150917162354.8676.31351.st

[Qemu-devel] [PULL 02/18] replay: internal functions for replay log

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch adds functions to perform read and write operations with replay log. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk Message-Id: <20150917162342.8676.29445.st...@pasha-isp.def.inno> Signed-off-by: Paolo Bonzini --- replay/Makefile.objs | 1 +

[Qemu-devel] [PULL 17/18] replay: command line options

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch introduces command line options for enabling recording or replaying virtual machine behavior. These options are added to icount command line parameter. They include 'rr' which switches between record and replay and 'rrfile' for specifying the filename for replay l

[Qemu-devel] [PULL 07/18] replay: interrupts and exceptions

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch includes modifications of common cpu files. All interrupts and exceptions occured during recording are written into the replay log. These events allow correct replaying the execution by kicking cpu thread when one of these events is found in the log. Signed-off-b

[Qemu-devel] [PULL 05/18] cpu-exec: allow temporary disabling icount

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch is required for deterministic replay to generate an exception by trying executing an instruction without changing icount. It adds new flag to TB for disabling icount while translating it. Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk Message-Id:

[Qemu-devel] [PULL 02/14] scripts/text2pod.pl: Escape left brace

2015-11-04 Thread Paolo Bonzini
From: Fam Zheng Latest perl now deprecates "{" literal in regex and print warnings like "unescaped left brace in regex is deprecated". Add escapes to keep it happy. Signed-off-by: Fam Zheng Message-Id: <1445326726-16031-1-git-send-email-f...@redhat.com> Signed-off-by: Paolo Bonzini --- scri

[Qemu-devel] [PULL 10/18] replay: shutdown event

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch records and replays simulator shutdown event. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk Message-Id: <20150917162433.8676.32262.st...@pasha-isp.def.inno> Signed-off-by: Paolo Bonzini --- include/sysemu/replay.h | 5 + replay/replay-inter

[Qemu-devel] [PULL 05/14] qemu-log: remove -d ioport

2015-11-04 Thread Paolo Bonzini
It was disabled at compile-time, and is now replaced by tracepoints. Signed-off-by: Paolo Bonzini --- include/qemu/log.h | 1 - qemu-log.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/include/qemu/log.h b/include/qemu/log.h index 7de4500..362cbc4 100644 --- a/include/qemu/log.h

[Qemu-devel] [PULL 14/18] replay: ptimer

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch adds deterministic replay for hardware periodic countdown timers. ptimer uses bottom halves layer to execute such an asynchronous callback. We put this callback into the replay queue instead of bottom halves one. When checkpoint is met by main loop thread, the rep

[Qemu-devel] [PULL 09/18] replay: recording and replaying clock ticks

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk Clock ticks are considered as the sources of non-deterministic data for virtual machine. This patch implements saving the clock values when they are acquired (virtual, host clock). When replaying the execution corresponding values are read from log and transfered to the modu

[Qemu-devel] [PULL 12/18] replay: checkpoints

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch introduces checkpoints that synchronize cpu thread and iothread. When checkpoint is met in the code all asynchronous events from the queue are executed. Signed-off-by: Pavel Dovgalyuk Message-Id: <20150917162444.8676.52916.st...@pasha-isp.def.inno> Signed-off-by

[Qemu-devel] [PULL 11/18] icount: improve counting for record/replay

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk icount_warp_rt function is called by qemu_clock_warp and as callback of icount_warp timer. This patch adds call to qemu_clock_warp into main_loop_wait function, because icount warp may be missed in record/replay mode, when CPU is sleeping. This patch also disables of calling

[Qemu-devel] [PULL 15/18] replay: initialization and deinitialization

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch introduces the functions for enabling the record/replay and for freeing the resources when simulator closes. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk Message-Id: <20150917162507.8676.90232.st...@pasha-isp.def.inno> Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 11/14] configure: disallow ccache during compile tests

2015-11-04 Thread Paolo Bonzini
From: John Snow If the user is using ccache during the configuration step, it may interfere with some of the configuration tests, particularly the "Is ccache interfering with macro analysis" step, which is a bit of a poetic problem. 1) Disallow ccache from reading from the cache during configure

[Qemu-devel] [PULL 13/18] bottom halves: introduce bh call function

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch introduces aio_bh_call function. It is used to execute bottom halves as callbacks without adding them to the queue. Signed-off-by: Pavel Dovgalyuk Message-Id: <20150917162450.8676.56980.st...@pasha-isp.def.inno> Signed-off-by: Paolo Bonzini --- async.c

[Qemu-devel] [PULL 16/18] replay: replay blockers for devices

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk Some devices are not supported by record/replay subsystem. This patch introduces replay blocker which denies starting record/replay if such devices are included into the configuration. Signed-off-by: Pavel Dovgalyuk Message-Id: <20150917162512.8676.11367.st...@pasha-isp.de

[Qemu-devel] [PULL 03/18] replay: introduce mutex to protect the replay log

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This mutex will protect read/write operations for replay log. Using mutex is necessary because most of the events consist of several fields stored in the log. The mutex will help to avoid races. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk Message-Id: <20150

[Qemu-devel] [PULL 06/18] cpu: replay instructions sequence

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch adds calls to replay functions into the icount setup block. In record mode number of executed instructions is written to the log. In replay mode number of istructions to execute is taken from the replay log. When replayed instructions counter is expired qemu_notif

[Qemu-devel] [PULL 03/14] target-i386: fix pcmpxstrx equal-ordered (strstr) mode

2015-11-04 Thread Paolo Bonzini
In this mode, referring an invalid element of the source forces the result to false (table 4-7, last column) but referring an invalid element of the destination forces the result to true, so the outer loop should still be run even if some elements of the destination will be invalid. They will be a

[Qemu-devel] [PULL 18/18] replay: recording of the user input

2015-11-04 Thread Paolo Bonzini
From: Pavel Dovgalyuk This records user input (keyboard and mouse events) in record mode and replays these input events in replay mode. Signed-off-by: Pavel Dovgalyuk Message-Id: <20150917162524.8676.11696.st...@pasha-isp.def.inno> Signed-off-by: Paolo Bonzini --- include/sysemu/replay.h |

[Qemu-devel] [PULL 00/14] Misc changes for QEMU 2.4-rc1

2015-11-04 Thread Paolo Bonzini
The following changes since commit 7bc8e0c967a4ef77657174d28af775691e18b4ce: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-10-29 09:49:52 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch c

[Qemu-devel] [PULL 06/14] pc: Set hw_version on all machine classes

2015-11-04 Thread Paolo Bonzini
From: Eduardo Habkost In 2012, QEMU had a bug where it exposed QEMU version information to the guest, meaning a QEMU upgrade would expose different hardware to the guest OS even if the same machine-type is being used. The bug was fixed by commit 93bfef4c6e4b23caea9d51e1099d06433d8835a4, on all m

[Qemu-devel] [PULL 10/14] cpu-exec: Fix compiler warning (-Werror=clobbered)

2015-11-04 Thread Paolo Bonzini
From: Stefan Weil Reloading of local variables after sigsetjmp is only needed for some buggy compilers. The code which should reload these variables causes compiler warnings with gcc 4.7 when compiler optimizations are enabled: cpu-exec.c:204:15: error: variable ‘cpu’ might be clobbered by ‘lo

[Qemu-devel] [PULL 09/14] memory: call begin, log_start and commit when registering a new listener

2015-11-04 Thread Paolo Bonzini
This ensures that cpu_reload_memory_map() is called as soon as tcg_cpu_address_space_init() is called, and before cpu->memory_dispatch is used. qemu-system-s390x never changes the address spaces after tcg_cpu_address_space_init() is called, and thus tcg_commit() is never called. This causes a SIG

[Qemu-devel] [PULL 04/14] ioport: do not use CPU_LOG_IOPORT

2015-11-04 Thread Paolo Bonzini
These messages are disabled by default; a perfect usecase for tracepoints, which in fact already exist. Add the missing information to them and stop using qemu_log_mask. Signed-off-by: Paolo Bonzini --- ioport.c | 26 ++ trace-events | 4 ++-- 2 files changed, 8 ins

[Qemu-devel] [PULL 14/14] configure: disable FORTIFY_SOURCE under clang

2015-11-04 Thread Paolo Bonzini
From: John Snow Some versions of clang may have difficulty compiling glibc headers when -D_FORTIFY_SOURCE is used. For example, Clang++ 3.5.0-9.fc22 cannot compile glibc's stdio headers when -D_FORTIFY_SOURCE=2 is used. This manifests currently as build failures with clang and any arm target. Ac

[Qemu-devel] [PULL 13/14] iscsi: Translate scsi sense into error code

2015-11-04 Thread Paolo Bonzini
From: Fam Zheng Previously we return -EIO blindly when anything goes wrong. Add a helper function to parse sense fields and try to make the return code more meaningful. This also fixes the default werror configuration (enospc) when we're using qcow2 on an iscsi lun. The old -EIO not being treate

  1   2   3   >