Re: [Qemu-devel] [PATCH 2/2] [RESENT-INLINE] Remove unnecessary CONFIG_EVENTFD preprocessor conditional to satisfy link

2016-05-03 Thread Markus Armbruster
Christopher Friedt writes: > The file ivshmem.c unconditionally references event_notifier_init_fd() in > util/event_notifier-posix.c, even if CONFIG_EVENTFD is not defined. On > platforms where CONFIG_POSIX is defined, but CONFIG_EVENTFD is not defined, > that results in an undefined symbol re

Re: [Qemu-devel] [PATCH 1/2v2] [RESENT-INLINE] Use libtool instead of ar to create static libraries on Darwin.

2016-05-03 Thread Richard Henderson
On 05/02/2016 03:10 PM, Christopher Friedt wrote: %.a: +ifdef CONFIG_DARWIN + $(call quiet-command,rm -f $@ && libtool -static -o $@ $^," libtool $(TARGET_DIR)$@") +else $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@") +endif Does it work to use

Re: [Qemu-devel] [PATCH v3 03/18] qapi: Factor out JSON string escaping

2016-05-03 Thread Markus Armbruster
Eric Blake writes: > On 04/29/2016 06:09 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Pull out a new qstring_append_json_string() helper, so that all >>> JSON output producers can use the same output escaping rules. >>> >>> While it appears that vmstate's use of the simpler qjson.c

Re: [Qemu-devel] [PATCH v4 13/14] tb hash: track translated blocks with qht

2016-05-03 Thread Alex Bennée
Emilio G. Cota writes: > Having a fixed-size hash table for keeping track of all translation blocks > is suboptimal: some workloads are just too big or too small to get maximum > performance from the hash table. The MRU promotion policy helps improve > performance when the hash table is a little

Re: [Qemu-devel] [PATCH v4 03/14] nand: Switch to byte-based block access

2016-05-03 Thread Kevin Wolf
Am 02.05.2016 um 23:09 hat Eric Blake geschrieben: > On 05/02/2016 09:35 AM, Kevin Wolf wrote: > > Am 29.04.2016 um 22:08 hat Eric Blake geschrieben: > >> Sector-based blk_write() should die; switch to byte-based > >> blk_pwrite() instead. Likewise for blk_read(). > >> > >> This file is doing some

Re: [Qemu-devel] [PATCH] block: Don't lose FUA flag during ZERO_WRITE fallback

2016-05-03 Thread Kevin Wolf
Am 02.05.2016 um 19:14 hat Eric Blake geschrieben: > On 05/02/2016 09:42 AM, Eric Blake wrote: > > On 05/02/2016 09:35 AM, Kevin Wolf wrote: > >> Am 30.04.2016 um 23:48 hat Eric Blake geschrieben: > >>> NBD has situations where it can support FUA but not ZERO_WRITE; > >>> when that happens, the gen

Re: [Qemu-devel] [PATCH v3 04/18] qapi: Factor out JSON number formatting

2016-05-03 Thread Markus Armbruster
Eric Blake writes: > On 04/29/2016 07:22 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Pull out a new qstring_append_json_number() helper, so that all >>> JSON output producers can use a consistent style for printing >>> floating point without duplicating code (since we are doing mo

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

2016-05-03 Thread Alex Bennée
Fam Zheng writes: > v4: Dropped the .gitignore patch in favor of tempfile [Alex]; > Added one EXTRA_CONFIGURE_OPTS patch [Alex]; > > 01: Fix commit message, and improve help text; > Fix pylint warnings, mostly long lines and some refactoring; > "--verbose" is now replaced

[Qemu-devel] [PATCH] 9p: drop unused declaration from coth.h

2016-05-03 Thread Greg Kurz
Commit "ebac1202c95a virtio-9p: use QEMU thread pool" dropped function v9fs_init_worker_threads. Signed-off-by: Greg Kurz --- hw/9pfs/coth.h |1 - 1 file changed, 1 deletion(-) diff --git a/hw/9pfs/coth.h b/hw/9pfs/coth.h index 209fc6a9afbc..a911cbb16589 100644 --- a/hw/9pfs/coth.h +++ b/hw

Re: [Qemu-devel] [PATCH v3 07/18] qapi: Add json output visitor

2016-05-03 Thread Markus Armbruster
Eric Blake writes: > On 05/02/2016 03:15 AM, Markus Armbruster wrote: >> Title: s/json/JSON/ >> >> Eric Blake writes: >> >>> We have several places that want to go from qapi to JSON; right now, >>> they have to create an intermediate QObject to do the work. That >>> also has the drawback that

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-03 Thread Markus Armbruster
Eric Blake writes: > On 05/02/2016 07:26 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Rather than using a QJSON object and converting the QString result >>> to a char *, we can use the new JSON output visitor and get directly >>> to a char *. >>> >>> The conversions are a bit trick

Re: [Qemu-devel] [PATCH v3 12/18] qapi: Add qobject_to_json_pretty_prefix()

2016-05-03 Thread Markus Armbruster
Eric Blake writes: > On 05/02/2016 07:56 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> The next patch will add pretty indentation to the JSON visitor. >>> But in order to support pretty output in the type_any() callback, >>> we need to prefix every line of the QObject visitor by the

Re: [Qemu-devel] qcow2 resize with snapshots

2016-05-03 Thread Kevin Wolf
[ Cc: qemu-block ] Am 29.04.2016 um 10:59 hat zhangzm geschrieben: > hi, i want to implement the function of qcow2 resize which has > snapshots. > > each snapshot of qcow2 will have a separate total size, and when apply > a snapshot, the image can be shrunk, and the total size of image will > chan

[Qemu-devel] [Bug 1242963] Re: QEMU loadvm causes guest OS freeze

2016-05-03 Thread None
I have the same bug, is there any news concerning a fix? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1242963 Title: QEMU loadvm causes guest OS freeze Status in QEMU: New Bug description: H

[Qemu-devel] memory_listener_unregister does not call region_del() - why?

2016-05-03 Thread Alexey Kardashevskiy
Hi! Noticed a thing - when we do vfio-pci hotplug, we register a memory listener on PCI address space: memory_listener_register(&container->listener, container->space->as); Then on the "pseries" machine, I add IOMMU subregions and this ends up in vfio_listener_region_add() where I can create

Re: [Qemu-devel] [PATCH v2 4/5] test: Postcopy

2016-05-03 Thread Dr. David Alan Gilbert
* Marcel Apfelbaum (mar...@redhat.com) wrote: > Hi David, > > On 04/29/2016 05:47 PM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > and that can be assembled by the following magic: > > as --32 -march=i486 fill.s -o fill.o > > objcopy -O binary fill.o fil

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

2016-05-03 Thread Fam Zheng
On Tue, 05/03 09:20, Alex Bennée wrote: > > What's the state of this series? Are we just waiting for the tree to > open for 2.7? Hi Alex, I couldn't allocate any time for this being busy with 2.6 things, this week I'll take a look at the points you have commented on and update it. Fam

[Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardware version.

2016-05-03 Thread Janne Karhunen
From: Janne Karhunen Vmdk images have metadata to indicate the vmware virtual hardware version image was created/tested to run with. Allow users to specify that version via new 'hwversion' option. Signed-off-by: Janne Karhunen --- block/vmdk.c | 27 +++ inc

Re: [Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardware version.

2016-05-03 Thread Janne Karhunen
On Mon, May 2, 2016 at 5:49 PM, Fam Zheng wrote: > Yes. > > But you get: Fair enough, sent another one. Thanks, -- Janne

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-03 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > -static void vmstate_save_old_style(QEMUFile *f, SaveStateEntry *se, QJSON > *vmdesc) > +static void vmstate_save_old_style(QEMUFile *f, SaveStateEntry *se, > + Visitor *vmdesc) > { > int64_t old_offset, size; > +

Re: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h

2016-05-03 Thread haris iqbal
Just a reminder. waiting for a review for the previous patch. On Tue, Apr 5, 2016 at 6:39 PM, Md Haris Iqbal wrote: > Signed-off-by: Md Haris Iqbal > --- > bsd-user/qemu.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h > index 03b5

Re: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in ui/shader.c

2016-05-03 Thread haris iqbal
Just a reminder. waiting for a review for the previous patch. On Tue, Apr 5, 2016 at 6:51 PM, Md Haris Iqbal wrote: > Signed-off-by: Md Haris Iqbal > --- > ui/shader.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/ui/shader.c b/ui/shader.c > index 9264009..1ff

Re: [Qemu-devel] [Qemu-Devel] [PATCH] Changed malloc to g_malloc, free to g_free in linux-user/qemu.h

2016-05-03 Thread haris iqbal
Just a reminder. any more changes needed for this patch? or can it be merged? On Thu, Mar 31, 2016 at 4:27 PM, haris iqbal wrote: > On Thu, Mar 31, 2016 at 3:12 PM, Stefan Hajnoczi wrote: >> On Wed, Mar 30, 2016 at 09:58:41PM +0530, haris iqbal wrote: >>> On Wed, Mar 30, 2016 at 7:39 PM, Stefan

Re: [Qemu-devel] tcg: How 'CPUState::current_tb' is used?

2016-05-03 Thread Sergey Fedorov
On 03/05/16 03:02, Peter Maydell wrote: > On 2 May 2016 at 21:18, Sergey Fedorov wrote: >> On 02/05/16 22:54, Sergey Fedorov wrote: >> >> Hi, >> >> I can't figure out how this field is used. The comment says it's "Currently >> executing TB", but actually it's the first TB in a chain of TBs execute

Re: [Qemu-devel] [PATCH v2 4/5] test: Postcopy

2016-05-03 Thread Marcel Apfelbaum
On 05/03/2016 12:22 PM, Dr. David Alan Gilbert wrote: * Marcel Apfelbaum (mar...@redhat.com) wrote: Hi David, On 04/29/2016 05:47 PM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" and that can be assembled by the following magic: as --32 -march=i486 fill.s -o f

Re: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in ui/shader.c

2016-05-03 Thread Gerd Hoffmann
On Di, 2016-05-03 at 15:16 +0530, haris iqbal wrote: > Just a reminder. waiting for a review for the previous patch. Patch is fine. Just stalled b/c we are in code freeze, I expect trivial queue will pick this up for the 2.7 devel cycle. cheers, Gerd

Re: [Qemu-devel] [PATCH v2 4/5] test: Postcopy

2016-05-03 Thread Dr. David Alan Gilbert
* Marcel Apfelbaum (mar...@redhat.com) wrote: > On 05/03/2016 12:22 PM, Dr. David Alan Gilbert wrote: > > > > +QDECREF(rsp); > > > > +usleep(1000 * 100); > > > > +} while (!completed); > > > > +} > > > > > > It is possible that the migration will not finish (from some reason)

[Qemu-devel] define registers for intel x86-64 in xml file

2016-05-03 Thread Marwa Hamza
hello i want to have access in some x86-64 registers with 'p' command (CR0 CR2 CR3 DR0 GDTL etc ... ) so i need to define those registers in xml file with reg number but i don't know which file xml i should modify , what is the first register number should i start with ? and it is possible to modif

Re: [Qemu-devel] [RFC PATCH v3 3/3] VFIO Type1 IOMMU change: to support with iommu and without iommu

2016-05-03 Thread Jike Song
On 05/03/2016 02:40 AM, Kirti Wankhede wrote: > VFIO Type1 IOMMU driver is designed for the devices which are IOMMU capable. > vGPU device are only using IOMMU TYPE1 API, the underlying hardware can be > managed by an IOMMU domain. To use most of the code of IOMMU driver for vGPU > devices, type1 I

Re: [Qemu-devel] [PATCH v2 4/5] test: Postcopy

2016-05-03 Thread Marcel Apfelbaum
On 05/03/2016 01:34 PM, Dr. David Alan Gilbert wrote: * Marcel Apfelbaum (mar...@redhat.com) wrote: On 05/03/2016 12:22 PM, Dr. David Alan Gilbert wrote: +QDECREF(rsp); +usleep(1000 * 100); +} while (!completed); +} It is possible that the migration will not finish (from

Re: [Qemu-devel] [PATCH] migration: Fix multi-thread compression bug

2016-05-03 Thread Daniel P. Berrange
On Tue, May 03, 2016 at 02:38:41PM +0800, Liang Li wrote: > Recently, a bug related to multiple thread compression feature for > live migration is reported. The destination side will be blocked > during live migration if there are heavy workload in host and > memory intensive workload in guest, thi

Re: [Qemu-devel] [PATCH 02/19] block: Add BDS.backing_overridden

2016-05-03 Thread Max Reitz
On 02.05.2016 17:35, Kevin Wolf wrote: > Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: >> If the backing file is overridden, this most probably does change the >> guest-visible data of a BDS. Therefore, we will need to consider this in >> bdrv_refresh_filename(). >> >> Adding a new field to the

Re: [Qemu-devel] [PATCH 03/19] block: Respect backing bs in bdrv_refresh_filename

2016-05-03 Thread Max Reitz
On 02.05.2016 17:36, Kevin Wolf wrote: > Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: >> Basically, bdrv_refresh_filename() should respect all children of a >> BlockDriverState. However, generally those children are driver-specific, >> so this function cannot handle the general case. On the ot

[Qemu-devel] [PATCH] tcg: Remove needless CPUState::current_tb

2016-05-03 Thread Sergey Fedorov
From: Sergey Fedorov This field was used for telling cpu_interrupt() to unlink a chain of TBs being executed when it worked that way. Now, cpu_interrupt() don't do this anymore. So we don't need this field anymore. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov --- This patch is

Re: [Qemu-devel] [PATCH 06/19] block: Make bdrv_default_refresh_format_filename public

2016-05-03 Thread Max Reitz
On 02.05.2016 17:36, Kevin Wolf wrote: > Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: >> In order to allow block drivers to use that function, it needs to be >> public. In order to be useful, it needs to take a parameter which allows >> the caller to specify whether the runtime options allowed

Re: [Qemu-devel] [PATCH 16/19] block/nbd: Implement bdrv_dirname()

2016-05-03 Thread Max Reitz
On 02.05.2016 17:36, Kevin Wolf wrote: > Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: >> The idea behind this implementation is that the export name might be >> interpreted as a path (which is the only apparent interpretation of >> relative filenames for NBD paths). >> >> The default implement

Re: [Qemu-devel] [PATCH v3 15/18] qapi: Add new clone visitor

2016-05-03 Thread Markus Armbruster
Eric Blake writes: > On 05/02/2016 11:54 AM, Markus Armbruster wrote: > >> >> qapi-types.h grows by 492 lines (19KiB, +19%). Roughly one non-blank >> line per non-simple type, including list types. It's included all over >> the place. >> >> qapi-types.c grows by 4212 lines (92KiB, +90%). >>

Re: [Qemu-devel] [PATCH v3 18/18] qapi: Add parameter to visit_end_*

2016-05-03 Thread Markus Armbruster
Eric Blake writes: > On 05/02/2016 12:20 PM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Rather than making the dealloc visitor track of stack of pointers >>> remembered during visit_start_* in order to free them during >>> visit_end_*, it's a lot easier to just make all callers pass

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-03 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Eric Blake (ebl...@redhat.com) wrote: > >> -static void vmstate_save_old_style(QEMUFile *f, SaveStateEntry *se, QJSON >> *vmdesc) >> +static void vmstate_save_old_style(QEMUFile *f, SaveStateEntry *se, >> + Visitor *vmdesc) >

Re: [Qemu-devel] [PATCH] block: Don't lose FUA flag during ZERO_WRITE fallback

2016-05-03 Thread Eric Blake
On 05/03/2016 01:55 AM, Kevin Wolf wrote: >> And looking further, it looks like SCSI does NOT support FUA during >> WRITESAME(10/16), only during WRITE(10/16). Which means we probably >> want to start having both .supported_write_flags AND >> .supported_write_zero flags, so that at least the iscsi

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-03 Thread Eric Blake
On 05/03/2016 06:26 AM, Markus Armbruster wrote: >>> +visit_type_int(vmdesc, "size", &size, &error_abort); >>> +visit_start_list(vmdesc, "fields", NULL, 0, &error_abort); >>> +visit_start_struct(vmdesc, NULL, NULL, 0, &error_abort); >> >> Please avoid error_abort in migrati

Re: [Qemu-devel] [PATCH v3 18/18] qapi: Add parameter to visit_end_*

2016-05-03 Thread Eric Blake
On 05/03/2016 05:53 AM, Markus Armbruster wrote: > Okay, I'm confused. > > Consider BlockdevRef, defined as > > { 'alternate': 'BlockdevRef', > 'data': { 'definition': 'BlockdevOptions', > 'reference': 'str' } } > > where BlockdevOptions is a (flat) union. Let's clone

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-03 Thread Alberto Garcia
On Fri 29 Apr 2016 05:18:26 PM CEST, Kevin Wolf wrote: > This patch errors out if we can't find the active layer. Sounds safe > and appropriate for an initial version. The real solution isn't to > improve the magic to find the root node, but to remove the need to > find it (by getting the new op bl

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-03 Thread Alberto Garcia
On Fri 29 Apr 2016 05:11:07 PM CEST, Kevin Wolf wrote: >> +if (active == NULL) { >> +error_setg(errp, "Cannot find top level node for '%s'", device); >> +goto out; >> +} > > Hm... On the one hand, I really like that you don't expect the user to > provide the active layer in

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-03 Thread Kevin Wolf
Am 03.05.2016 um 14:53 hat Alberto Garcia geschrieben: > On Fri 29 Apr 2016 05:11:07 PM CEST, Kevin Wolf wrote: > >> +if (active == NULL) { > >> +error_setg(errp, "Cannot find top level node for '%s'", device); > >> +goto out; > >> +} > > > > Hm... On the one hand, I really

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-03 Thread Kevin Wolf
Am 03.05.2016 um 14:50 hat Alberto Garcia geschrieben: > On Fri 29 Apr 2016 05:18:26 PM CEST, Kevin Wolf wrote: > > This patch errors out if we can't find the active layer. Sounds safe > > and appropriate for an initial version. The real solution isn't to > > improve the magic to find the root node

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-03 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Eric Blake (ebl...@redhat.com) wrote: > > > >> -static void vmstate_save_old_style(QEMUFile *f, SaveStateEntry *se, QJSON > >> *vmdesc) > >> +static void vmstate_save_old_style(QEMUFile *f, SaveStateEntry *

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-03 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 05/03/2016 06:26 AM, Markus Armbruster wrote: > > >>> +visit_type_int(vmdesc, "size", &size, &error_abort); > >>> +visit_start_list(vmdesc, "fields", NULL, 0, &error_abort); > >>> +visit_start_struct(vmdesc, NULL, NULL, 0, &error

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-03 Thread Alberto Garcia
On Tue 03 May 2016 03:18:39 PM CEST, Kevin Wolf wrote: >> > On the other hand, this code assumes that there is only a single >> > top-level node. This isn't necessarily true any more these days. >> >> Hmm... if you give me an example I can test that scenario. > > Simply reference the same node twi

Re: [Qemu-devel] [PATCH for 2.7 v2 1/1] qcow2: improve qcow2_co_write_zeroes()

2016-05-03 Thread Denis V. Lunev
On 05/02/2016 06:35 PM, Kevin Wolf wrote: Am 27.04.2016 um 09:08 hat Denis V. Lunev geschrieben: There is a possibility that qcow2_co_write_zeroes() will be called by with the partial block. This could be synthetically triggered with qemu-io -c "write -z 32k 4k" and can happen in the real l

Re: [Qemu-devel] [PATCH 02/19] block: Add BDS.backing_overridden

2016-05-03 Thread Kevin Wolf
Am 03.05.2016 um 12:49 hat Max Reitz geschrieben: > On 02.05.2016 17:35, Kevin Wolf wrote: > > Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: > >> If the backing file is overridden, this most probably does change the > >> guest-visible data of a BDS. Therefore, we will need to consider this in >

[Qemu-devel] [PATCH] Modify net/socket.c to use functions from include/qemu/sockets.h

2016-05-03 Thread Ashijeet Acharya
From: Ashijeet Replaced connect()/listen()/parse_host_port() in net/socket.c with inet_connect()/inet_listen/inet_parse() in include/qemu/sockets.h. Signed-off-by: Ashijeet Acharya --- net/socket.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/net/so

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-03 Thread Alberto Garcia
On Tue 03 May 2016 03:23:24 PM CEST, Kevin Wolf wrote: >> c) we fix bdrv_reopen() so we can actually run both jobs at the same >>time. I'm wondering if pausing all block jobs between >>bdrv_reopen_prepare() and bdrv_reopen_commit() would do the >>trick. Opinions? > > I would have to rea

Re: [Qemu-devel] [PATCH 06/19] block: Make bdrv_default_refresh_format_filename public

2016-05-03 Thread Kevin Wolf
Am 03.05.2016 um 13:19 hat Max Reitz geschrieben: > On 02.05.2016 17:36, Kevin Wolf wrote: > > Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: > >> In order to allow block drivers to use that function, it needs to be > >> public. In order to be useful, it needs to take a parameter which allows >

Re: [Qemu-devel] [PATCH 06/19] block: Make bdrv_default_refresh_format_filename public

2016-05-03 Thread Max Reitz
On 03.05.2016 15:31, Kevin Wolf wrote: > Am 03.05.2016 um 13:19 hat Max Reitz geschrieben: >> On 02.05.2016 17:36, Kevin Wolf wrote: >>> Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: In order to allow block drivers to use that function, it needs to be public. In order to be useful, it

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-03 Thread Kevin Wolf
Am 03.05.2016 um 15:33 hat Alberto Garcia geschrieben: > On Tue 03 May 2016 03:23:24 PM CEST, Kevin Wolf wrote: > >> c) we fix bdrv_reopen() so we can actually run both jobs at the same > >>time. I'm wondering if pausing all block jobs between > >>bdrv_reopen_prepare() and bdrv_reopen_commi

Re: [Qemu-devel] [PATCH 1/2v2] [RESENT-INLINE] Use libtool instead of ar to create static libraries on Darwin.

2016-05-03 Thread Christopher Friedt
On Tue, May 3, 2016 at 3:06 AM, Richard Henderson wrote: > On 05/02/2016 03:10 PM, Christopher Friedt wrote: >> >> %.a: >> +ifdef CONFIG_DARWIN >> + $(call quiet-command,rm -f $@ && libtool -static -o $@ $^," >> libtool$(TARGET_DIR)$@") >> +else >> $(call quiet-command,rm -f $@

Re: [Qemu-devel] [PATCH v3 for-2.7 00/14] qapi: Allow blockdev-add for NBD

2016-05-03 Thread Max Reitz
On 06.04.2016 20:28, Max Reitz wrote: > Turns out NBD is not so simple to do if you do it right. Anyway, this > series adds blockdev-add support for NBD clients. > > Patch 1 adds a QDict function which I needed in later NBD patches for > handling legacy options (move "host" to "address.data.host"

Re: [Qemu-devel] [PATCH] Modify net/socket.c to use functions from include/qemu/sockets.h

2016-05-03 Thread Daniel P. Berrange
On Tue, May 03, 2016 at 07:04:17PM +0530, Ashijeet Acharya wrote: > From: Ashijeet > > Replaced connect()/listen()/parse_host_port() in net/socket.c > with inet_connect()/inet_listen/inet_parse() in include/qemu/sockets.h. If you're going to re-work this, then I think it'd be better to go straig

Re: [Qemu-devel] [PATCH 1/2v2] [RESENT-INLINE] Use libtool instead of ar to create static libraries on Darwin.

2016-05-03 Thread Peter Maydell
On 3 May 2016 at 14:50, Christopher Friedt wrote: > To be honest, if it weren't for the man page for libtool on Mac OS X > [1] dating all the way back to Snow Leopard saying that libtool is the > preferred tool on Mac for creating static archives, I'm left wondering > if this is just a massive ove

Re: [Qemu-devel] [PATCH 06/19] block: Make bdrv_default_refresh_format_filename public

2016-05-03 Thread Kevin Wolf
Am 03.05.2016 um 15:48 hat Max Reitz geschrieben: > On 03.05.2016 15:31, Kevin Wolf wrote: > > Am 03.05.2016 um 13:19 hat Max Reitz geschrieben: > >> On 02.05.2016 17:36, Kevin Wolf wrote: > >>> Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: > In order to allow block drivers to use that fun

Re: [Qemu-devel] [PATCH] cpu-exec: Remove relic orphaned comment

2016-05-03 Thread Sergey Fedorov
On 03/05/16 17:34, Sergey Fedorov wrote: > From: Sergey Fedorov > > This comment should have been deleted by commit 0ac087f1f3ae ("removed > unused code") but somehow it is still here. There's no point to keep it. > > Signed-off-by: Sergey Fedorov > Signed-off-by: Sergey Fedorov Sorry, should b

[Qemu-devel] [PATCH] cpu-exec: Remove relic orphaned comment

2016-05-03 Thread Sergey Fedorov
From: Sergey Fedorov This comment should have been deleted by commit 0ac087f1f3ae ("removed unused code") but somehow it is still here. There's no point to keep it. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov --- cpu-exec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/

Re: [Qemu-devel] [PATCH 06/19] block: Make bdrv_default_refresh_format_filename public

2016-05-03 Thread Max Reitz
On 03.05.2016 16:34, Kevin Wolf wrote: > Am 03.05.2016 um 15:48 hat Max Reitz geschrieben: >> On 03.05.2016 15:31, Kevin Wolf wrote: >>> Am 03.05.2016 um 13:19 hat Max Reitz geschrieben: On 02.05.2016 17:36, Kevin Wolf wrote: > Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: >> In or

Re: [Qemu-devel] [PATCH v2 2/2] xen: add pvUSB backend

2016-05-03 Thread Anthony PERARD
On Thu, Mar 10, 2016 at 04:19:30PM +0100, Juergen Gross wrote: > Add a backend for para-virtualized USB devices for xen domains. > > The backend is using host-libusb to forward USB requests from a > domain via libusb to the real device(s) passed through. > > Signed-off-by: Juergen Gross > --- [

Re: [Qemu-devel] [PATCH v2 1/2] xen: introduce dummy system device

2016-05-03 Thread Anthony PERARD
On Thu, Mar 10, 2016 at 04:19:29PM +0100, Juergen Gross wrote: > Introduce a new dummy system device serving as parent for virtual > buses. This will enable new pv backends to introduce virtual buses > which are removable again opposed to system buses which are meant > to stay once added. > > Sign

Re: [Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-05-03 Thread Alberto Garcia
On Tue 03 May 2016 03:48:47 PM CEST, Kevin Wolf wrote: > The solution to that should be simply changing the order of things: > > 1. bdrv_drained_begin() > 2. bdrv_reopen_queue() > 3. bdrv_reopen_multiple() > * Instead of bdrv_drain_all(), assert that no requests are pending No requests are pen

Re: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in ui/shader.c

2016-05-03 Thread haris iqbal
On Tue, May 3, 2016 at 3:42 PM, Gerd Hoffmann wrote: > On Di, 2016-05-03 at 15:16 +0530, haris iqbal wrote: >> Just a reminder. waiting for a review for the previous patch. > > Patch is fine. Just stalled b/c we are in code freeze, I expect trivial > queue will pick this up for the 2.7 devel cycl

Re: [Qemu-devel] [PATCH v3 for-2.7 00/14] qapi: Allow blockdev-add for NBD

2016-05-03 Thread Kevin Wolf
Am 06.04.2016 um 20:28 hat Max Reitz geschrieben: > Turns out NBD is not so simple to do if you do it right. Anyway, this > series adds blockdev-add support for NBD clients. What the series does seems to make sense to me, though things would be a bit nicer (especially on the command line) if Socke

[Qemu-devel] [PATCH v5 00/14] block: kill sector-based blk_write/read

2016-05-03 Thread Eric Blake
2.7 material, depends on Kevin's block-next: git://repo.or.cz/qemu/kevin.git block-next Previously posted as part of a larger NBD series [1] and as v4 [2]. Mostly orthogonal to Kevin's recent work to also kill sector interfaces from the driver. [1] https://lists.gnu.org/archive/html/qemu-devel/20

[Qemu-devel] [PATCH v5 02/14] fdc: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake --- hw/block/fdc.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 3722275..f73

[Qemu-devel] [PATCH v5 13/14] block: Switch blk_write_zeroes() to byte interface

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; convert the one-off variant blk_write_zeroes(). Signed-off-by: Eric Blake Acked-by: Denis V. Lunev --- include/sysemu/block-backend.h | 4 ++-- block/block-backend.c | 8 block/parallels.c | 3 ++- qemu-img.c

[Qemu-devel] [PATCH v5 12/14] block: Switch blk_read_unthrottled() to byte interface

2016-05-03 Thread Eric Blake
Sector-based blk_read() should die; convert the one-off variant blk_read_unthrottled(). Signed-off-by: Eric Blake --- include/sysemu/block-backend.h | 4 ++-- block/block-backend.c | 8 hw/block/hd-geometry.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) dif

[Qemu-devel] [PATCH v5 05/14] pflash: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake --- hw/block/pflash_cfi01.c | 12 ++-- hw/block/pflash_cfi02.c | 12 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/block/

[Qemu-devel] [PATCH v5 03/14] nand: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). This file is doing some complex computations to map various flash page sizes (256, 512, and 2048) atop generic uses of 512-byte sector operations. Perhaps someone will want to tidy up the fil

[Qemu-devel] [PATCH v5 06/14] sd: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Greatly simplifies the code, now that we let the block layer take care of alignment and read-modify-write on our behalf :) In fact, we no longer need to include 'buf' in the migration stream (

[Qemu-devel] [PATCH v5 04/14] onenand: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). This particular device picks its size during onenand_initfn(), and can be at most 0x8000 bytes; therefore, shifting an 'int sec' request to get back to a byte offset should never overflow

[Qemu-devel] [PATCH v5 07/14] m25p80: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_read() should die; switch to byte-based blk_pread() instead. Signed-off-by: Eric Blake --- v5: compile tested this time --- hw/block/m25p80.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 906b712..01c51a2 10064

[Qemu-devel] [PATCH v5 08/14] atapi: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_read() should die; switch to byte-based blk_pread() instead. Add new defines ATAPI_SECTOR_BITS and ATAPI_SECTOR_SIZE to use anywhere we were previously scaling BDRV_SECTOR_* by 4, for better legibility. Signed-off-by: Eric Blake --- v4: add new defines for use in more places [j

[Qemu-devel] [PATCH v5 09/14] nbd: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_read() should die; switch to byte-based blk_pread() instead. Signed-off-by: Eric Blake --- qemu-nbd.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index c55b40f..c07ceef 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -159,1

[Qemu-devel] [PATCH v5 01/14] block: Allow BDRV_REQ_FUA through blk_pwrite()

2016-05-03 Thread Eric Blake
We have several block drivers that understand BDRV_REQ_FUA, and emulate it in the block layer for the rest by a full flush. But without a way to actually request BDRV_REQ_FUA during a pass-through blk_pwrite(), FUA-aware block drivers like NBD are forced to repeat the emulation logic of a full flus

[Qemu-devel] [PATCH v5 10/14] qemu-img: Switch to byte-based block access

2016-05-03 Thread Eric Blake
Sector-based blk_write() should die; switch to byte-based blk_pwrite() instead. Likewise for blk_read(). Signed-off-by: Eric Blake --- qemu-img.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 46f2a6d..c19f9d4 1006

[Qemu-devel] [PATCH v5 11/14] qemu-io: Switch to byte-based block access

2016-05-03 Thread Eric Blake
blk_write() and blk_read() are now very simple wrappers around blk_pwrite() and blk_pread(). There's no reason to require the user to pass in aligned numbers. Keep 'read -p' and 'write -p' so that I don't have to hunt down and update all users of qemu-io, but make the default 'read' and 'write' n

[Qemu-devel] [PATCH v5 14/14] block: Kill blk_write(), blk_read()

2016-05-03 Thread Eric Blake
Now that there are no remaining clients, we can drop these functions, to ensure that all future users get the byte-based interfaces. Sadly, there are still remaining sector-based interfaces, such as blk_aio_writev; those will have to wait for another day. Signed-off-by: Eric Blake --- include/s

[Qemu-devel] [PATCH 10/12] ppc: Fix sign extension issue in mtmsr(d) emulation

2016-05-03 Thread Cédric Le Goater
From: Michael Neuling Signed-off-by: Michael Neuling Signed-off-by: Benjamin Herrenschmidt Reviewed-by: David Gibson --- target-ppc/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 4f18dc8bca2f..3fe08e092

[Qemu-devel] [PATCH 05/12] ppc: Fix hreg_store_msr() so that non-HV mode cannot alter MSR:HV

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This helper is only used by the various instructions that can alter MSR and not interrupts. Add a comment to that effect to the interrupt code as well in case somebody wants to change this Signed-off-by: Benjamin Herrenschmidt Reviewed-by: David Gibson --- target-

[Qemu-devel] [PATCH 11/12] ppc: Get out of emulation on SMT "OR" ops

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Otherwise tight loops at smt_low for example, which OPAL does, eat so much CPU that we can't boot a kernel anymore. With that, I can boot 8 CPUs just fine with powernv. Signed-off-by: Benjamin Herrenschmidt Reviewed-by: David Gibson --- target-ppc/translate.c | 21

[Qemu-devel] [PATCH 03/12] ppc: Do some batching of TCG tlb flushes

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt On ppc64 especially, we flush the tlb on any slbie or tlbie instruction. However, those instructions often come in bursts of 3 or more (context switch will favor a series of slbie's for example to an slbia if the SLB has less than a certain number of entries in it, a

[Qemu-devel] [PATCH 06/12] ppc: Fix rfi/rfid/hrfi/... emulation

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This reworks emulation of the various "rfi" variants. I removed some masking bits that I couldn't make sense of, the only bit that I am aware we should mask here is POW, the CPU's MSR mask should take care of the rest. This also fixes some problems when running 32-bi

[Qemu-devel] [PATCH 07/12] ppc: Better figure out if processor has HV mode

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We use an env. flag which is set to the initial value of MSR_HVB in the msr_mask. We also adjust the POWER8 mask to set SHV. Also use this to adjust ctx.hv so that it is *set* when the processor doesn't have an HV mode (970 with Apple mode for example), thus enabling

[Qemu-devel] [PATCH 08/12] ppc: tlbie, tlbia and tlbisync are HV only

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Not that anything remotely recent supports tlbia but ... Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 6f55bcd34a74..5

[Qemu-devel] [PATCH 02/12] ppc: Use split I/D mmu modes to avoid flushes on interrupts

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We rework the way the MMU indices are calculated, providing separate indices for I and D side based on MSR:IR and MSR:DR respectively, and thus no longer need to flush the TLB on context changes. This also adds correct support for HV as a separate address space. Sign

[Qemu-devel] [PATCH 01/12] ppc: Remove MMU_MODEn_SUFFIX definitions

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We don't use the resulting accessors and this gets in the way of the split I/D TLB work. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/cpu.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 5282533b3858..4c0dc02

[Qemu-devel] [PATCH 12/12] ppc: Add PPC_64H instruction flag to POWER7 and POWER8

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This will enable decoding of hrfid Signed-off-by: Benjamin Herrenschmidt Reviewed-by: David Gibson --- target-ppc/translate_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c ind

[Qemu-devel] [PATCH 09/12] ppc: Change 'invalid' bit mask of tlbiel and tlbie

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Otherwise it will trip on the forms used in recent architecture. Ideally, we should have different handlers for different architecture levels but our current implementation of TLB flushing is dumb enough that this will do for now. Signed-off-by: Benjamin Herrenschmi

[Qemu-devel] XSAVES in GET_SUPPORTED_CPUID (was Re: [PATCH] target-i386: add Skylake-Client cpu mode)

2016-05-03 Thread Eduardo Habkost
(CCing KVM mailing list) On Tue, May 03, 2016 at 02:38:44PM +0800, Xiao Guangrong wrote: > On 04/29/2016 01:34 AM, Eduardo Habkost wrote: > >On Wed, Apr 27, 2016 at 04:13:06PM +0800, Xiao Guangrong wrote: [...] > >>1. As XSAVES is disabled in upstream linux kernel by commit e88221c50 > >>(x86/fpu:

Re: [Qemu-devel] [V9 1/4] hw/i386: Introduce AMD IOMMU

2016-05-03 Thread David Kiarie
On Sun, May 1, 2016 at 5:14 PM, Michael S. Tsirkin wrote: > On Sat, Apr 30, 2016 at 01:42:40AM +0300, David Kiarie wrote: >> Add AMD IOMMU emulaton to Qemu in addition to Intel IOMMU >> The IOMMU does basic translation, error checking and has a >> minimal IOTLB implementation >> >> Signed-off-by:

[Qemu-devel] [PATCH 04/12] ppc: Add a bunch of hypervisor SPRs to Book3s

2016-05-03 Thread Cédric Le Goater
From: Benjamin Herrenschmidt We don't give them a KVM reg number yet as no current KVM version supports HV mode. Signed-off-by: Benjamin Herrenschmidt [clg: SPRs AMOR,DAWR,DARWX were already included in commit f401dd32cb8e9] Signed-off-by: Cédric Le Goater --- target-ppc/translate_init.c | 11

[Qemu-devel] [Bug 1577841] [NEW] target-mips/helper.c:542: bad sizeof ?

2016-05-03 Thread dcb
Public bug reported: Recent versions of gcc say this: qemu/target-mips/helper.c:542:9: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] Source code is memset(env->CP0_WatchLo, 0, sizeof(*env->CP0_WatchLo)); Maybe bette

Re: [Qemu-devel] [V9 1/4] hw/i386: Introduce AMD IOMMU

2016-05-03 Thread Jan Kiszka
[please shorten too long replies] On 2016-05-03 18:11, David Kiarie wrote: > On Sun, May 1, 2016 at 5:14 PM, Michael S. Tsirkin wrote: >> On Sat, Apr 30, 2016 at 01:42:40AM +0300, David Kiarie wrote: >>> + >>> +#include "hw/hw.h" >>> +#include "hw/pci/pci.h" >>> +#include "hw/pci/msi.h" >>> +#inc

  1   2   >