[Qemu-devel] [PATCH] filter-buffer: fix segfault while start qemu with status=off property

2016-04-01 Thread zhanghailiang
After commit 338d3f, we support 'status' property for filter object. The segfault can be triggered by starting qemu with 'status=off' property for filter, when the s->incoming_queue is NULL, we reference it directly in qemu_net_queue_flush(). Let's check the value of 's->incoming_queue' before cal

Re: [Qemu-devel] [PATCH] filter-buffer: fix segfault while start qemu with status=off property

2016-04-01 Thread Jason Wang
On 04/01/2016 03:08 PM, zhanghailiang wrote: > After commit 338d3f, we support 'status' property for filter object. > The segfault can be triggered by starting qemu with 'status=off' property > for filter, when the s->incoming_queue is NULL, we reference it directly > in qemu_net_queue_flush(). >

Re: [Qemu-devel] [Qemu-stable] [ANNOUNCE] QEMU 2.5.1 Stable released

2016-04-01 Thread Peter Lieven
Am 30.03.2016 um 02:11 schrieb Michael Roth: > Hi everyone, > > I am pleased to announce that the QEMU v2.5.1 stable release is now > available at: > > http://wiki.qemu.org/download/qemu-2.5.1.tar.bz2 > > v2.5.1 is now tagged in the official qemu.git repository, > and the stable-2.5 branch has be

Re: [Qemu-devel] [Nbd] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH?

2016-04-01 Thread Paolo Bonzini
On 31/03/2016 22:17, Alex Bligh wrote: >> > In qemu, read+FUA just triggers blk_co_flush() prior to reading; but >> > that's the same function it calls for write+FUA. > That's harmless, but unnecessary in the sense that current documented > behaviour doesn't require it. Perhaps it should? > > I

Re: [Qemu-devel] [Nbd] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH?

2016-04-01 Thread Paolo Bonzini
On 31/03/2016 22:34, Eric Blake wrote: > give me possibly stale data because I accessed > the underlying storage rather than paying attention to in-flight writes > that would change what I read". Overlapping I/O is always unspecified, so you should expect stale data if a read overlaps an in-flig

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Richard W.M. Jones
On Thu, Mar 31, 2016 at 06:44:32PM -0400, Kevin O'Connor wrote: > On Thu, Mar 31, 2016 at 11:17:30PM +0100, Richard W.M. Jones wrote: > > I'd dearly love to get rid of the sgabios option ROM. It looks like > > SeaBIOS nearly supports a full serial console now? > > Last I checked, one could disabl

Re: [Qemu-devel] [PATCH] slirp: Fix migration from older versions of QEMU to the current one

2016-04-01 Thread Thomas Huth
On 01.04.2016 00:22, Samuel Thibault wrote: > Samuel Thibault, on Fri 01 Apr 2016 00:00:43 +0200, wrote: >> Just realizing... We'd need to add AF_INET6 cases here too, to be able >> to save/restore a VM using ipv6 connections. > > That seems quite involved however, maybe we should postpone that to

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Richard W.M. Jones
On Thu, Mar 31, 2016 at 06:44:32PM -0400, Kevin O'Connor wrote: > I think you'll find that if you compile out some features from > SeaBIOS, it will be of a similar speed to that "minimal BIOS". Try > this: > > cd /path/to/seabios/ > echo -e > 'CONFIG_USB=n\nCONFIG_DRIVES=n\nCONFIG_KEYBOARD=n\nCO

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 09:55, Richard W.M. Jones wrote: >>> > > I'd dearly love to get rid of the sgabios option ROM. It looks like >>> > > SeaBIOS nearly supports a full serial console now? >> > >> > Last I checked, one could disable the option rom by adding "-device >> > VGA,romfile=" to the qemu comm

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 10:02, Richard W.M. Jones wrote: >> > echo -e >> > 'CONFIG_USB=n\nCONFIG_DRIVES=n\nCONFIG_KEYBOARD=n\nCONFIG_MOUSE=n\nCONFIG_WRITABLE_UPPERMEMORY=y\nCONFIG_TCGBIOS=n\nCONFIG_PIRTABLE=n\nCONFIG_MPTABLE=n\nCONFIG_SMBIOS=n\nCONFIG_ACPI=n\nCONFIG_DEBUG_LEVEL=0' >> > > .config >> > mak

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 10:11:46AM +0200, Paolo Bonzini wrote: > > > On 01/04/2016 10:02, Richard W.M. Jones wrote: > >> > echo -e > >> > 'CONFIG_USB=n\nCONFIG_DRIVES=n\nCONFIG_KEYBOARD=n\nCONFIG_MOUSE=n\nCONFIG_WRITABLE_UPPERMEMORY=y\nCONFIG_TCGBIOS=n\nCONFIG_PIRTABLE=n\nCONFIG_MPTABLE=n\nCONFI

[Qemu-devel] [PATCH for-2.6] target-i386: KVM loves Hyper-V!

2016-04-01 Thread Paolo Bonzini
Microsoft loves Linux, and Red Hat loves .NET. Since we can put whatever we want in the Hyper-V vendor signature, let's show some love too! Cc: Andreas Färber Cc: Alex Williamson Cc: Denis V. Lunev Cc: Eduardo Habkost Cc: Roman Kagan Cc: KY Srinivasan Signed-off-by: Paolo Bonzini --- targ

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Richard W.M. Jones
Minimal SeaBIOS (+ CONFIG_MPTABLE): http://oirase.annexia.org/tmp/min-seabios.txt Stock SeaBIOS from qemu: http://oirase.annexia.org/tmp/stock-seabios.txt Both files best viewed with `less -r'. It does appear to considerably reduce SeaBIOS time. Rich. -- Richard Jones, Virtualization Group,

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 10:14, Richard W.M. Jones wrote: >> > At least ACPI (I would also add mptable and SMBIOS). > Found it: only CONFIG_MPTABLE=y was necessary. It boots with: > > # CONFIG_PIRTABLE is not set > CONFIG_MPTABLE=y > # CONFIG_SMBIOS is not set > # CONFIG_ACPI is not set If you add all th

[Qemu-devel] [PATCH] ui/virtio-gpu: add and use qemu_create_displaysurface_pixman

2016-04-01 Thread Gerd Hoffmann
Add a the new qemu_create_displaysurface_pixman function, to create a DisplaySurface backed by an existing pixman image. In that case there is no need to create a new pixman image pointing to the same backing storage. We can just use the existing image directly. This does not only simplify thing

Re: [Qemu-devel] [PATCH] filter-buffer: fix segfault while start qemu with status=off property

2016-04-01 Thread Hailiang Zhang
On 2016/4/1 15:39, Jason Wang wrote: On 04/01/2016 03:08 PM, zhanghailiang wrote: After commit 338d3f, we support 'status' property for filter object. The segfault can be triggered by starting qemu with 'status=off' property for filter, when the s->incoming_queue is NULL, we reference it direc

[Qemu-devel] [Bug 1006655] Re: Can't convert to vmdk with the streamOptimized subformat

2016-04-01 Thread Thiago Martins
I have tried, many times, to use qemu-img to create StreamOptimized for VMWare ESXi 6.0 OVAs. It does NOT work. After days of research, I replaced qemu-img, by vboxmanage, then, it worked! Now, I'm using something this: -- vboxmanage convertfromraw packer/output-vm.raw packer/output-vm-disk1.vm

[Qemu-devel] [Bug 1006655] Re: Can't convert to vmdk with the streamOptimized subformat

2016-04-01 Thread Thiago Martins
It looks like my problem is different, since I'm not seeing this: qemu-img: error while writing sector 65: Input/output error But maybe, it is a light in the end of the tunnel... -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https

Re: [Qemu-devel] [Nbd] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH?

2016-04-01 Thread Wouter Verhelst
On Thu, Mar 31, 2016 at 02:34:24PM -0600, Eric Blake wrote: > On 03/31/2016 02:17 PM, Alex Bligh wrote: > >> even if we aren't quite sure > >> what to document of those flags. And that means qemu is correct, and > >> the NBD protocol has a bug. Since you contributed the FUA flag, is that > >> som

Re: [Qemu-devel] [Nbd] [PATCH 2/2] Correct definition of NBD_CMD_FLAG_FUA

2016-04-01 Thread Wouter Verhelst
On Thu, Mar 31, 2016 at 07:15:32PM +0100, Alex Bligh wrote: > NBD_CMD_FLAG_FUA is defined as 1<<0 in the documentation, but > 1<<16 in nbd.h. It is not used anywhere within the code. Yes it is: wouter@gangtai:~/code/c/nbd$ grep -rl CMD_FLAG_FUA * doc/proto.md make-integrityhuge.c nbd.h nbd-server

Re: [Qemu-devel] [Nbd] [PATCH] Improve documentation of FUA and FLUSH

2016-04-01 Thread Wouter Verhelst
On Fri, Apr 01, 2016 at 12:03:19AM +0100, Alex Bligh wrote: > Improve the documentation of NBD_CMD_FLUSH and NBD_CMD_FLAG_FUA. Specifically > the latter may be set on any command, and its semantics on commands other > than NBD_CMD_WRITE need explaining. Further, explain how these relate to > reorde

Re: [Qemu-devel] [Nbd] [PATCH] Docs: proto.md: Clarify NUL in export name

2016-04-01 Thread Wouter Verhelst
Thanks, applied. On Fri, Apr 01, 2016 at 12:16:48AM +0100, Alex Bligh wrote: > Clarify that > > * The name is not NUL terminated (not just that the length > 'does not include NUL termination' which might be taken to mean > there is NUL termination but the length doesn't include it. > > * The

Re: [Qemu-devel] [Nbd] [PATCH v2 1/1] NBD proto: add WRITE_ZEROES extension

2016-04-01 Thread Wouter Verhelst
Hi, Thanks, applied. On Thu, Mar 31, 2016 at 04:02:05PM +0300, Denis V. Lunev wrote: > From: Pavel Borzenkov > > There exist some cases when a client knows that the data it is going to > write is all zeroes. Such cases include mirroring or backing up a device > implemented by a sparse file. >

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 10:24:37AM +0200, Paolo Bonzini wrote: > On 01/04/2016 10:14, Richard W.M. Jones wrote: > > Found it: only CONFIG_MPTABLE=y was necessary. It boots with: > > > > # CONFIG_PIRTABLE is not set > > CONFIG_MPTABLE=y > > # CONFIG_SMBIOS is not set > > # CONFIG_ACPI is not set >

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 10:03:10AM +0200, Paolo Bonzini wrote: > > > On 01/04/2016 09:55, Richard W.M. Jones wrote: > >>> > > I'd dearly love to get rid of the sgabios option ROM. It looks like > >>> > > SeaBIOS nearly supports a full serial console now? > >> > > >> > Last I checked, one could

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 10:44, Richard W.M. Jones wrote: > On Fri, Apr 01, 2016 at 10:24:37AM +0200, Paolo Bonzini wrote: >> On 01/04/2016 10:14, Richard W.M. Jones wrote: >>> Found it: only CONFIG_MPTABLE=y was necessary. It boots with: >>> >>> # CONFIG_PIRTABLE is not set >>> CONFIG_MPTABLE=y >>> # CONF

Re: [Qemu-devel] [PATCH] Whitelist sysinfo call

2016-04-01 Thread Eduardo Otubo
On Mon, Mar 21, 2016 at 08=17=45AM -0400, Miroslav Rezanina wrote: > > > - 元のメッセージ - > > 差出人: "Eduardo Otubo" > > 宛先: mreza...@redhat.com > > Cc: qemu-devel@nongnu.org, arm...@redhat.com > > 送信済み: 2016年3月11日, 金曜日 午前 9:51:50 > > 件名: Re: [Qemu-devel] [PATCH] Whitelist sysinfo call > > > >

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Vasiliy Tolstov
2016-04-01 11:47 GMT+03:00 Paolo Bonzini : > That's an interesting idea. We can look at it for 2.7. That's fine =) I'm waiting too. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 10:47, Richard W.M. Jones wrote: > It's so we can handle error reports. When someone reports that > libguestfs "hangs", it's sometimes useful to know if the BIOS was > entered or not, since it points the finger at either qemu, BIOS or > kernel. (Remember we have to be able to run

Re: [Qemu-devel] [PATCH for-2.6] target-i386: KVM loves Hyper-V!

2016-04-01 Thread Denis V. Lunev
On 04/01/2016 11:18 AM, Paolo Bonzini wrote: Microsoft loves Linux, and Red Hat loves .NET. Since we can put whatever we want in the Hyper-V vendor signature, let's show some love too! Cc: Andreas Färber Cc: Alex Williamson Cc: Denis V. Lunev Cc: Eduardo Habkost Cc: Roman Kagan Cc: KY Srin

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 10:51:31AM +0200, Paolo Bonzini wrote: > > > On 01/04/2016 10:47, Richard W.M. Jones wrote: > > It's so we can handle error reports. When someone reports that > > libguestfs "hangs", it's sometimes useful to know if the BIOS was > > entered or not, since it points the fin

Re: [Qemu-devel] [PATCH for-2.6] target-i386: KVM loves Hyper-V!

2016-04-01 Thread Daniel P. Berrange
On Fri, Apr 01, 2016 at 10:18:02AM +0200, Paolo Bonzini wrote: > Microsoft loves Linux, and Red Hat loves .NET. Since we can put whatever > we want in the Hyper-V vendor signature, let's show some love too! > > Cc: Andreas Färber > Cc: Alex Williamson > Cc: Denis V. Lunev > Cc: Eduardo Habkost

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 10:57, Richard W.M. Jones wrote: > That's the qemu option? Currently we use > -nodefconfig -nodefaults -display none > which I assumed would do the same thing (ie. not add any default > devices). Does -vga none do more than this? No, I missed the -nodefaults. Paolo

Re: [Qemu-devel] [PATCH for-2.6] target-i386: KVM loves Hyper-V!

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 10:58, Daniel P. Berrange wrote: > On Fri, Apr 01, 2016 at 10:18:02AM +0200, Paolo Bonzini wrote: >> Microsoft loves Linux, and Red Hat loves .NET. Since we can put whatever >> we want in the Hyper-V vendor signature, let's show some love too! >> >> Cc: Andreas Färber >> Cc: Alex

Re: [Qemu-devel] [PATCH] filter-buffer: fix segfault while start qemu with status=off property

2016-04-01 Thread Wen Congyang
On 04/01/2016 04:24 PM, Hailiang Zhang wrote: > On 2016/4/1 15:39, Jason Wang wrote: >> >> >> On 04/01/2016 03:08 PM, zhanghailiang wrote: >>> After commit 338d3f, we support 'status' property for filter object. >>> The segfault can be triggered by starting qemu with 'status=off' property >>> for f

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Dr. David Alan Gilbert
* Richard W.M. Jones (rjo...@redhat.com) wrote: > On Fri, Apr 01, 2016 at 10:24:37AM +0200, Paolo Bonzini wrote: > > On 01/04/2016 10:14, Richard W.M. Jones wrote: > > > Found it: only CONFIG_MPTABLE=y was necessary. It boots with: > > > > > > # CONFIG_PIRTABLE is not set > > > CONFIG_MPTABLE=y >

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Gerd Hoffmann
Hi, > I wonder how we can make use of this in qemu and downstream distros? > Can we have a bios-min.bin which is used with -kernel boots? We already build two seabios roms: one full featued and one slightly stripped down to keep it below 128k, for backward compatibility with old machine types.

Re: [Qemu-devel] [Nbd] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH?

2016-04-01 Thread Alex Bligh
On 1 Apr 2016, at 08:43, Paolo Bonzini wrote: > > On 31/03/2016 22:17, Alex Bligh wrote: In qemu, read+FUA just triggers blk_co_flush() prior to reading; but that's the same function it calls for write+FUA. >> That's harmless, but unnecessary in the sense that current documented >> be

Re: [Qemu-devel] [Nbd] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH?

2016-04-01 Thread Alex Bligh
On 1 Apr 2016, at 08:49, Paolo Bonzini wrote: > > On 31/03/2016 22:34, Eric Blake wrote: >> give me possibly stale data because I accessed >> the underlying storage rather than paying attention to in-flight writes >> that would change what I read". > > Overlapping I/O is always unspecified, so

Re: [Qemu-devel] [Nbd] [PATCH] Improve documentation of FUA and FLUSH

2016-04-01 Thread Alex Bligh
On 1 Apr 2016, at 09:35, Wouter Verhelst wrote: >> +* All write commands (that includes both `NBD_CMD_WRITE` and >> + `NBD_CMD_TRIM`) that the server completes (i.e. replies to) >> + prior to processing to a `NBD_CMD_FLUSH` MUST be written to non-volatile >> + storage prior to replying to tha

[Qemu-devel] [PATCH] virtio-input: implement pass-through evdev writes

2016-04-01 Thread Ladi Prosek
The write path for pass-through devices, commonly used for controlling keyboard LEDs via EV_LED, was not implemented. This commit adds the necessary plumbing to connect the status virtio queue to the host evdev file descriptor. Signed-off-by: Ladi Prosek --- Most of the new code has to do with ha

Re: [Qemu-devel] [Nbd] [PATCH 2/2] Correct definition of NBD_CMD_FLAG_FUA

2016-04-01 Thread Alex Bligh
On 1 Apr 2016, at 08:59, Wouter Verhelst wrote: > On Thu, Mar 31, 2016 at 07:15:32PM +0100, Alex Bligh wrote: >> NBD_CMD_FLAG_FUA is defined as 1<<0 in the documentation, but >> 1<<16 in nbd.h. It is not used anywhere within the code. > > Yes it is: > > wouter@gangtai:~/code/c/nbd$ grep -rl CM

Re: [Qemu-devel] Virtio-9p

2016-04-01 Thread Greg Kurz
On Fri, 1 Apr 2016 09:09:32 +0200 Pradeep Kiruvale wrote: > Hi Greg, > Hi Pradeep, I'm Cc'ing qemu-devel like in your previous posts, so QEMU experts may jump in. > What I understand from the requirement for our project is if we use > virtio-blk it caches the pages in the guest. We would like

Re: [Qemu-devel] [Nbd] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH?

2016-04-01 Thread Alex Bligh
On 1 Apr 2016, at 09:27, Wouter Verhelst wrote: >> It's also tricky because we just barely documented that servers SHOULD >> reject invalid flags with EINVAL; and that clients MUST NOT send FUA on >> commands where it is not documented; I don't know if we have an adequate >> discovery system in

[Qemu-devel] [PATCH] checkpatch: add target_ulong to typelist

2016-04-01 Thread Cédric Le Goater
In some occasions, a patch [1] can start with a hunk containing a simple type cast. At the time annotate_values() is run, the type is unknown and the cast type is misinterpreted as a identifier, resulting in an error if it is followed with a negative value: ERROR: spaces required around th

[Qemu-devel] [PATCH] block: Fix bdrv_drain in coroutine

2016-04-01 Thread Fam Zheng
Using the nested aio_poll() in coroutine is a bad idea. This patch replaces the aio_poll loop in bdrv_drain with a BH, if called in coroutine. For example, the bdrv_drain() in mirror.c can hang when a guest issued request is pending on it in qemu_co_mutex_lock(). Mirror coroutine in this case has

Re: [Qemu-devel] [PATCH] block: Fix bdrv_drain in coroutine

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 11:46, Fam Zheng wrote: > + > +static void bdrv_co_drain_bh_cb(void *opaque) > +{ > +BdrvCoDrainData *data = opaque; > +Coroutine *co = data->co; > + > +bdrv_drain(data->bs); > +data->done = true; > +qemu_coroutine_enter(co, NULL); > +} > + > +static void corouti

Re: [Qemu-devel] [PATCH] checkpatch: add target_ulong to typelist

2016-04-01 Thread Greg Kurz
On Fri, 1 Apr 2016 11:40:06 +0200 Cédric Le Goater wrote: > In some occasions, a patch [1] can start with a hunk containing a > simple type cast. At the time annotate_values() is run, the type is > unknown and the cast type is misinterpreted as a identifier, resulting > in an error if it is foll

[Qemu-devel] [PATCHv2] Improve documentation of FUA and FLUSH

2016-04-01 Thread Alex Bligh
Improve the documentation of NBD_CMD_FLUSH and NBD_CMD_FLAG_FUA. Specifically the latter may be set on any command, and its semantics on commands other than NBD_CMD_WRITE need explaining. Further, explain how these relate to reordering of commands. Signed-off-by: Alex Bligh --- doc/proto.md | 83

[Qemu-devel] [PATCH] qemu-iotests: 149: Use "/usr/bin/env python"

2016-04-01 Thread Fam Zheng
Do the same as other scripts, to pick the correct interpreter between python2 and python3 from the environment. Signed-off-by: Fam Zheng --- tests/qemu-iotests/149 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/149 b/tests/qemu-iotests/149 index bb5811d..5

[Qemu-devel] [PATCH] doc/proto.md: Clients MUST not set unknown client flags

2016-04-01 Thread Alex Bligh
Clients MUST NOT set unknown client flags. Currently this is permitted (but 'SHOULD NOT' be done), with the result that the server MUST drop the connection if it happens. This in effect gives the client an inappropriate way to close the connection. Signed-off-by: Alex Bligh --- doc/proto.md | 2

Re: [Qemu-devel] [Nbd] [PATCH 2/2] Correct definition of NBD_CMD_FLAG_FUA

2016-04-01 Thread Wouter Verhelst
On Fri, Apr 01, 2016 at 10:32:50AM +0100, Alex Bligh wrote: > #define NBD_CMD_MASK_COMMAND 0x > -#define NBD_CMD_FLAG_FUA (1<<16) > +#define NBD_CMD_SHIFT (16) > +#define NBD_CMD_FLAG_FUA ((1 << 0) << NBD_CMD_SHIFT) That works too, I suppose. However, like I said, I need to clean this up

Re: [Qemu-devel] [PATCH] block: Fix bdrv_drain in coroutine

2016-04-01 Thread Fam Zheng
On Fri, 04/01 11:49, Paolo Bonzini wrote: > > > On 01/04/2016 11:46, Fam Zheng wrote: > > + > > +static void bdrv_co_drain_bh_cb(void *opaque) > > +{ > > +BdrvCoDrainData *data = opaque; > > +Coroutine *co = data->co; > > + > > +bdrv_drain(data->bs); > > +data->done = true; > > +

Re: [Qemu-devel] [Nbd] [PATCH] Improve documentation of FUA and FLUSH

2016-04-01 Thread Wouter Verhelst
On Fri, Apr 01, 2016 at 10:28:03AM +0100, Alex Bligh wrote: > > On 1 Apr 2016, at 09:35, Wouter Verhelst wrote: > > >> +* All write commands (that includes both `NBD_CMD_WRITE` and > >> + `NBD_CMD_TRIM`) that the server completes (i.e. replies to) > >> + prior to processing to a `NBD_CMD_FLUSH

Re: [Qemu-devel] [Nbd] [PATCH 2/2] Correct definition of NBD_CMD_FLAG_FUA

2016-04-01 Thread Alex Bligh
On 1 Apr 2016, at 10:43, Wouter Verhelst wrote: > On Fri, Apr 01, 2016 at 10:32:50AM +0100, Alex Bligh wrote: >> #define NBD_CMD_MASK_COMMAND 0x >> -#define NBD_CMD_FLAG_FUA (1<<16) >> +#define NBD_CMD_SHIFT (16) >> +#define NBD_CMD_FLAG_FUA ((1 << 0) << NBD_CMD_SHIFT) > > That works to

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 11:18:30AM +0200, Gerd Hoffmann wrote: > Hi, > > > I wonder how we can make use of this in qemu and downstream distros? > > Can we have a bios-min.bin which is used with -kernel boots? > > We already build two seabios roms: one full featued and one slightly > stripped do

Re: [Qemu-devel] [Nbd] [PATCH] Improve documentation of FUA and FLUSH

2016-04-01 Thread Alex Bligh
On 1 Apr 2016, at 11:10, Wouter Verhelst wrote: > On Fri, Apr 01, 2016 at 10:28:03AM +0100, Alex Bligh wrote: >> >> On 1 Apr 2016, at 09:35, Wouter Verhelst wrote: >> +* All write commands (that includes both `NBD_CMD_WRITE` and + `NBD_CMD_TRIM`) that the server completes (i.e. rep

Re: [Qemu-devel] [PATCH] virtio-input: implement pass-through evdev writes

2016-04-01 Thread Gerd Hoffmann
On Fr, 2016-04-01 at 11:31 +0200, Ladi Prosek wrote: > The write path for pass-through devices, commonly used for controlling > keyboard LEDs via EV_LED, was not implemented. This commit adds the > necessary plumbing to connect the status virtio queue to the host evdev > file descriptor. > > Signe

Re: [Qemu-devel] [PATCH] virtio-input: implement pass-through evdev writes

2016-04-01 Thread Ladi Prosek
On Fri, Apr 1, 2016 at 12:20 PM, Gerd Hoffmann wrote: > On Fr, 2016-04-01 at 11:31 +0200, Ladi Prosek wrote: >> The write path for pass-through devices, commonly used for controlling >> keyboard LEDs via EV_LED, was not implemented. This commit adds the >> necessary plumbing to connect the status

Re: [Qemu-devel] [PATCH] target-ppc: Correct KVM synchronization for ppc_hash64_set_external_hpt()

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 05:52, David Gibson wrote: > This seems like the right minimal fix in the qemu-2.6 timeframe to fix > the actual bug. However, longer term it seems like the correct thing > to do might be to set kvm_vcpu_dirty early in the reset path. Thoughts? Isn't it done already? vl.c does:

Re: [Qemu-devel] [PATCH] filter-buffer: fix segfault while start qemu with status=off property

2016-04-01 Thread Hailiang Zhang
On 2016/4/1 17:10, Wen Congyang wrote: On 04/01/2016 04:24 PM, Hailiang Zhang wrote: On 2016/4/1 15:39, Jason Wang wrote: On 04/01/2016 03:08 PM, zhanghailiang wrote: After commit 338d3f, we support 'status' property for filter object. The segfault can be triggered by starting qemu with 'sta

Re: [Qemu-devel] [PATCH] checkpatch: add target_ulong to typelist

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 11:50, Greg Kurz wrote: > > And I tend to agree with Cedric... unless Paolo has a bright idea of course. > :) > > Acked-by: Greg Kurz Yes, the patch is correct. Paolo

[Qemu-devel] [PATCH] doc/proto.md: restore formatting

2016-04-01 Thread Alex Bligh
Restore formatting and correct name of 'length' Signed-off-by: Alex Bligh --- doc/proto.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/proto.md b/doc/proto.md index 8c83382..03dfe2b 100644 --- a/doc/proto.md +++ b/doc/proto.md @@ -501,8 +501,8 @@ The following req

Re: [Qemu-devel] [RFC PATCH v2.1 05/12] qdev: hotplug: Introduce HotplugHandler.pre_plug() callback

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 05:30, David Gibson wrote: > On Thu, Mar 31, 2016 at 02:09:14PM +0530, Bharata B Rao wrote: >> From: Igor Mammedov >> >> pre_plug callback is to be called before device.realize() is executed. >> This would allow to check/set device's properties from HotplugHandler. >> >> Signed-off

[Qemu-devel] [PATCH] doc/memory: update MMIO section

2016-04-01 Thread Cao jin
There is no memory_region_io(). And remove a stray '-'. Signed-off-by: Cao jin --- docs/memory.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/memory.txt b/docs/memory.txt index 97134e1..fddc0d9 100644 --- a/docs/memory.txt +++ b/docs/memory.txt @@ -37,7 +37,7 @@

[Qemu-devel] [PATCHv2 2/2] Correct definition of NBD_CMD_FLAG_FUA

2016-04-01 Thread Alex Bligh
NBD_CMD_FLAG_FUA is defined as 1<<0 in the documentation, but 1<<16 in nbd.h. The code currently treats the command as a 32 bit quantity and masks this off. This is confusing. Until such time as the code is fixed up, make it obvious this isn't really bit 16. Signed-off-by: Alex Bligh --- nbd.h

[Qemu-devel] [PATCHv2 1/2] proto.md: Clearly set out NBDMAGIC is the actual value

2016-04-01 Thread Alex Bligh
Clearly set out NBDMAGIC, not the name of a constant equal to some value. Set out the value in hex as well. Document the newstyle magic number is "IHAVEOPT". Signed-off-by: Alex Bligh --- doc/proto.md | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/proto.md

Re: [Qemu-devel] [PATCH 3/3] nbd: Reject unknown request flags

2016-04-01 Thread Paolo Bonzini
On 31/03/2016 23:20, Eric Blake wrote: > The NBD protocol says that clients should not send a command flag > that has not been negotiated (whether by the client requesting an > option during a handshake, or because we advertise support for the > flag in response to NBD_OPT_EXPORT_NAME), and that

Re: [Qemu-devel] [PATCH v2 0/2] Fixing non-blocking operation of chardevs

2016-04-01 Thread Paolo Bonzini
On 31/03/2016 17:29, Daniel P. Berrange wrote: > This fixes socket chardevs to always be in non-blocking > mode, as they were before the QIOChannel conversion. The > second patch was already posted before, but dropped when > Peter discovered a problem on OS-X causing ahci-test to > hang: > > h

Re: [Qemu-devel] [PATCH 2/3] nbd: Fix poor debug message

2016-04-01 Thread Paolo Bonzini
On 31/03/2016 23:20, Eric Blake wrote: > The client sends messages to the server, not itself. > > Signed-off-by: Eric Blake > --- > nbd/client.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/nbd/client.c b/nbd/client.c > index 5af9f26..d95ad7a 100644 > --- a/nbd/cli

Re: [Qemu-devel] [PATCH] doc/memory: update MMIO section

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 12:47, Cao jin wrote: > There is no memory_region_io(). And remove a stray '-'. > > Signed-off-by: Cao jin > --- > docs/memory.txt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/docs/memory.txt b/docs/memory.txt > index 97134e1..fddc0d9 100644 > ---

Re: [Qemu-devel] Ballooning on TPS!=HPS hosts

2016-04-01 Thread Amit Shah
CC'ing virtualization list. On (Thu) 31 Mar 2016 [19:00:24], Dr. David Alan Gilbert wrote: > Hi, > I was reading the balloon code and am confused as to how/if ballooning > works on hosts where the host page size is larger than the > target page size. > > static void balloon_page(void *addr, int

Re: [Qemu-devel] [RFC Design Doc]Speed up live migration by skipping free pages

2016-04-01 Thread Amit Shah
On (Tue) 22 Mar 2016 [19:05:31], Dr. David Alan Gilbert wrote: > * Liang Li (liang.z...@intel.com) wrote: > > b. Implement a new virtio device > > Implementing a brand new virtio device to exchange information > > between host and guest is another choice. It requires modifying the > > virtio spec

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Gerd Hoffmann
On Fr, 2016-04-01 at 11:17 +0100, Richard W.M. Jones wrote: > On Fri, Apr 01, 2016 at 11:18:30AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > I wonder how we can make use of this in qemu and downstream distros? > > > Can we have a bios-min.bin which is used with -kernel boots? > > > > We alrea

Re: [Qemu-devel] [PATCH v2] migration: skip sending ram pages released by virtio-balloon driver.

2016-04-01 Thread Jitendra Kolhe
On 3/29/2016 5:58 PM, Michael S. Tsirkin wrote: > On Mon, Mar 28, 2016 at 09:46:05AM +0530, Jitendra Kolhe wrote: >> While measuring live migration performance for qemu/kvm guest, it >> was observed that the qemu doesn’t maintain any intelligence for the >> guest ram pages which are released by the

Re: [Qemu-devel] tcg: reworking tb_invalidated_flag

2016-04-01 Thread Alex Bennée
Sergey Fedorov writes: > On 31/03/16 16:37, Alex Bennée wrote: >> Sergey Fedorov writes: >>> Looks like no matter which approach we use, it's ultimately necessary to >>> ensure all CPUs have exited from translated code before the translation >>> buffer may be safely flushed. >> One approach wou

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 01:07:55PM +0200, Gerd Hoffmann wrote: > On Fr, 2016-04-01 at 11:17 +0100, Richard W.M. Jones wrote: > > On Fri, Apr 01, 2016 at 11:18:30AM +0200, Gerd Hoffmann wrote: > > > Hi, > > > > > > > I wonder how we can make use of this in qemu and downstream distros? > > > > Can

[Qemu-devel] [PATCH 05/18] vhost-user: check reconnect comes with wait

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau If the client socket has the 'reconnect' option, make sure the 'wait' option is also used. That way, an initial connection will be ensured before the VM start and the virtio device is configured. Signed-off-by: Marc-André Lureau --- net/vhost-user.c | 12 1

[Qemu-devel] [PATCH 02/18] char: lower reconnect error to trace event

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau This message is an information rather than an error. Use a trace event instead. This allows using reconnect in tests without extra error messages. Signed-off-by: Marc-André Lureau --- qemu-char.c | 4 ++-- trace-events | 3 +++ 2 files changed, 5 insertions(+), 2 dele

[Qemu-devel] [PATCH 01/18] tests: append i386 tests

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau Do not overwrite x86-64 tests, re-enable vhost-user-test. Signed-off-by: Marc-André Lureau --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 45b9048..9293d49 100644 --- a/tests/Makefile +++ b/tes

[Qemu-devel] [PATCH 00/18] RFCv2: vhost-user: shutdown and reconnection

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau Hi This is a follow-up on previous RFC allowing the slave to request a "managed" shutdown and reconnect later. A new optional communication socket is added for the slave to make request to the master (since vhost-user protocol isn't bidirectional) The initial connection

[Qemu-devel] [PATCH 03/18] char: use a trace for when the char is waiting

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau Similarly to the reconnect error, this is an information message rather than an error. Use a trace event instead. Signed-off-by: Marc-André Lureau --- qemu-char.c | 3 +-- trace-events | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-char.c b/

[Qemu-devel] [PATCH 07/18] vhost: add vhost_dev stop callback

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau vhost backend may want to stop the device, for example if it wants to restart itself (translates to a link down for vhost-net). Signed-off-by: Marc-André Lureau --- hw/net/vhost_net.c| 14 ++ include/hw/virtio/vhost.h | 4 2 files changed, 18 i

[Qemu-devel] [PATCH 04/18] char: add wait support for reconnect

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau Until now, 'wait' was solely used for listening sockets. However, it can also be useful for 'reconnect' socket kind, where the first open must succeed before continuing. This allows for instance (with other support patches) having vhost-user wait for an initial connection

[Qemu-devel] [PATCH 17/18] test: start vhost-user reconnect test

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau Check that SLAVE_FD & SHUTDOWN message work and that the master asked for the ring read status. Signed-off-by: Marc-André Lureau --- tests/Makefile | 2 +- tests/vhost-user-test.c | 184 2 files changed, 170 in

[Qemu-devel] [PATCH 09/18] qemu-char: add qemu_chr_disconnect to close a fd accepted by listen fd

2016-04-01 Thread marcandre . lureau
From: Tetsuya Mukawa The patch introduces qemu_chr_disconnect(). The function is used for closing a fd accepted by listen fd. Though we already have qemu_chr_delete(), but it closes not only accepted fd but also listen fd. This new function is used when we still want to keep listen fd. Signed-of

[Qemu-devel] [PATCH 06/18] vhost-user: add ability to know vhost-user backend disconnection

2016-04-01 Thread marcandre . lureau
From: Tetsuya Mukawa Current QEMU cannot detect vhost-user backend disconnection. The patch adds ability to know it. To know disconnection, add watcher to detect G_IO_HUP event. When G_IO_HUP event is detected, the disconnected socket will be read to cause a CHR_EVENT_CLOSED. Signed-off-by: Tets

[Qemu-devel] [PATCH 08/18] vhost-user: add vhost_user to hold the chr

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau Next patches will add more fields to the structure Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 5914e85..02ac1fc

[Qemu-devel] [PATCH 13/18] vhost-net: do not crash if backend is not present

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau Do not crash when backend is not present while enabling the ring. A following patch will save the enabled state so it can be restored once the backend is started. Signed-off-by: Marc-André Lureau --- hw/net/vhost_net.c | 7 ++- 1 file changed, 6 insertions(+), 1 del

[Qemu-devel] [PATCH 10/18] vhost-user: add slave-fd support

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau Learn to give a socket to the slave to let him make requests to the master. Signed-off-by: Marc-André Lureau --- docs/specs/vhost-user.txt | 23 hw/virtio/vhost-user.c| 69 +++ 2 files changed, 92 insertio

[Qemu-devel] [PATCH 11/18] vhost-user: add shutdown support

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- docs/specs/vhost-user.txt | 15 +++ hw/virtio/vhost-user.c| 16 2 files changed, 31 insertions(+) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 8a635fa..60d6d13 100644 --- a

[Qemu-devel] [PATCH 16/18] test: vubr check vring enable state

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau The rings shouldn't be processed unless previously enabled. Signed-off-by: Marc-André Lureau --- tests/vhost-user-bridge.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c index 0779ba2.

[Qemu-devel] [PATCH 15/18] vhost-net: save & restore vring enable state

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau A driver may change the vring enable state at run time but vhost-user backend may not be present (a contrived example is when the backend is disconnected and the device is reconfigured after driver rebinding) Restore the vring state when the vhost-user backend is started,

[Qemu-devel] [PATCH 12/18] vhost-user: disconnect on start failure

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau If the backend failed to start (for example feature negociation failed), do not exit, but disconnect the char device instead. Signed-off-by: Marc-André Lureau --- net/vhost-user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/vhost-user.c b/n

[Qemu-devel] [PATCH 14/18] vhost-net: save & restore vhost-user acked features

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau The initial vhost-user connection sets the features to be negotiated with the driver. Renegotiation isn't possible without device reset. To handle reconnection of vhost-user backend, ensure the same set of features are provided, and reuse already acked features. Signed-o

[Qemu-devel] [PATCH 18/18] test: add shutdown support vubr test

2016-04-01 Thread marcandre . lureau
From: Marc-André Lureau The bridge can now be interrupted with ctrl-c. Once the slave channel is up, it will request a shutdown, and wait for success reply to exit. Signed-off-by: Marc-André Lureau --- tests/vhost-user-bridge.c | 102 -- 1 file chang

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Paolo Bonzini
On 01/04/2016 13:20, Richard W.M. Jones wrote: > +# MPTABLE is required by Linux kernel, the others add only a > +# couple of milliseconds so we might as well have them > +CONFIG_PIRTABLE=y > +CONFIG_MPTABLE=y > +CONFIG_SMBIOS=y > +CONFIG_ACPI=y > + MPTABLE is only required is you don't have ACP

Re: [Qemu-devel] [PATCH v2] migration: skip sending ram pages released by virtio-balloon driver.

2016-04-01 Thread Jitendra Kolhe
On 3/29/2016 4:18 PM, Paolo Bonzini wrote: > > > On 29/03/2016 12:47, Jitendra Kolhe wrote: >>> Indeed. It is correct for the main system RAM, but hot-plugged RAM >>> would also have a zero-based section.offset_within_region. You need to >>> add memory_region_get_ram_addr(section.mr), just like

Re: [Qemu-devel] Why is SeaBIOS used with -kernel?

2016-04-01 Thread Richard W.M. Jones
My patch, plus the configuration and comments from your patch, combined. Plus I tested it with libguestfs boot-analysis and it works and is still fast. Integrating this so it happens automatically when the user adds -kernel on x86 seems quite complicated. The only way I could do it was by addin

Re: [Qemu-devel] tcg: reworking tb_invalidated_flag

2016-04-01 Thread Sergey Fedorov
On 01/04/16 14:11, Alex Bennée wrote: > Sergey Fedorov writes: > >> On 31/03/16 16:37, Alex Bennée wrote: >>> Sergey Fedorov writes: Looks like no matter which approach we use, it's ultimately necessary to ensure all CPUs have exited from translated code before the translation buff

  1   2   3   >