Re: [Qemu-devel] [PATCH v3] ssh: switch from libssh2 to libssh

2017-11-15 Thread Richard W.M. Jones
me check for this. > > [1] https://red.libssh.org/issues/242 > > Signed-off-by: Pino Toscano <ptosc...@redhat.com> I haven't reviewed this in detail, but I have tested it and I was able to boot a VM remotely over ssh, do lots of heavy reads and writes, and at no time did it hang/crash. So

[Qemu-devel] Effect of qemu-img convert -m and -W options

2017-11-15 Thread Richard W.M. Jones
[CC to qemu-devel since I'm obviously doing something wrong here, I'm just not sure what.] I was getting ready to add multiple threads to ‘qemu-img convert’ (the longest part of v2v conversions) when I noticed that it had them already! (To be fair this was only added in February this year so no

Re: [Qemu-devel] [PATCH] vhost-user-scsi: add missing virtqueue_size param

2017-11-14 Thread Richard W.M. Jones
On Tue, Nov 14, 2017 at 05:28:36PM +0100, Dariusz Stojaczyk wrote: > Commit 5c0919d0 [1] introduced virtqueue_size parameter > for common virtio-scsi path, without updaing the vhost-user-scsi > code. vhost-user-scsi devices right now report size 0 for each vq. > > This patch introduces

Re: [Qemu-devel] [PATCH v4 40/45] hw/watchdog: Replace fprintf(stderr, "*\n" with error_report()

2017-11-09 Thread Richard W.M. Jones
On Wed, Nov 08, 2017 at 08:43:45PM -0300, Philippe Mathieu-Daudé wrote: > > @@ -126,7 +125,7 @@ void watchdog_perform_action(void) > > > > case WATCHDOG_ACTION_DEBUG: > > qapi_event_send_watchdog(WATCHDOG_ACTION_DEBUG, _abort); > > -fprintf(stderr, "watchdog: timer

Re: [Qemu-devel] [PATCH v3 7/7] block/curl: code cleanup to comply with coding style

2017-11-08 Thread Richard W.M. Jones
le if statement. > > Signed-off-by: Jeff Cody <jc...@redhat.com> > Reviewed-by: Eric Blake <ebl...@redhat.com> As you say, just simple coding style fixes except for the single combined if statement. Therefore: Reviewed-by: Richard W.M. Jones <rjo...@re

Re: [Qemu-devel] [PATCH v3 6/7] block/curl: fix minor memory leaks

2017-11-08 Thread Richard W.M. Jones
); username & proxyusername are allocated with g_strdup and so should obviously be freed. proxypassword is returned by qcrypto_secret_lookup_as_utf8, and it's not clear to me if we should free that or not. However examining the code of qcrypto_secret_lookup it looks as if this string is

Re: [Qemu-devel] [PATCH v3 5/7] block/curl: check error return of curl_global_init()

2017-11-08 Thread Richard W.M. Jones
; - Make it static in the file, for clarity > - Change the name for clarity > - Make it a bool > > Signed-off-by: Jeff Cody <jc...@redhat.com> > Reviewed-by: Eric Blake <ebl...@redhat.com> This is just a simple evolution of the previous code, so: Reviewed-by: Richard W.M. Jone

Re: [Qemu-devel] [PATCH v3 1/7] block/ssh: don't call libssh2_init() in block_init()

2017-11-08 Thread Richard W.M. Jones
On Tue, Nov 07, 2017 at 05:27:18PM -0500, Jeff Cody wrote: > We don't need libssh2 failure to be fatal (we could just opt to not > register the driver on failure). But, it is probably a good idea to > avoid external library calls during the block_init(), and call the > libssh2 global init function

Re: [Qemu-devel] [PATCH v3 2/7] block/ssh: make compliant with coding guidelines

2017-11-08 Thread Richard W.M. Jones
On Tue, Nov 07, 2017 at 05:27:19PM -0500, Jeff Cody wrote: > Signed-off-by: Jeff Cody <jc...@redhat.com> > Reviewed-by: Eric Blake <ebl...@redhat.com> This one is just simple coding style fixes, so: Reviewed-by: Richard W.M. Jones <rjo...@redhat.com> Ri

Re: [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm

2017-10-24 Thread Richard W.M. Jones
ial. > > v2: > - added Richard W.M. Jones Tested-by tag > - remove #ifdef CONFIG_TPM in tpm.c (Stefan Berger) Can confirm v2 works as well. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wor

Re: [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM

2017-10-24 Thread Richard W.M. Jones
On Mon, Oct 23, 2017 at 11:33:31PM -0300, Philippe Mathieu-Daudé wrote: > Hi Richard, > > On 10/23/2017 06:37 PM, Richard W.M. Jones wrote: > > The series fixes the build for me, thanks :-) > > Good, does this mean I can add your Tested-by: tag? Sure, Tested-by: Ri

Re: [Qemu-devel] [PATCH 3/3] vl: remove unnecessary #ifdef CONFIG_TPM

2017-10-23 Thread Richard W.M. Jones
The series fixes the build for me, thanks :-) Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the

Re: [Qemu-devel] [PATCH] tpm: Don't call tpm_cleanup unless CONFIG_TPM.

2017-10-23 Thread Richard W.M. Jones
Since I posted this, there are more failures with --disable-tpm ... LINKx86_64-softmmu/qemu-system-x86_64 ../vl.o: In function `main': /home/rjones/d/qemu/vl.c:4908: undefined reference to `tpm_cleanup' ../tpm.o: In function `qmp_query_tpm_types': /home/rjones/d/qemu/tpm.c:230: undefined

Re: [Qemu-devel] [sw-dev] [RFC] RISC-V Decoder generator

2017-10-21 Thread Richard W.M. Jones
On Fri, Oct 20, 2017 at 03:46:54PM +0200, Bastian Koppelmann wrote: > I asked you for feedback some while ago regarding a modular RISC-V QEMU > target (see discussion [1]). I tried getting it to work with the good > old C preprocessor and quickly realized that it is too limiting. Instead > I

[Qemu-devel] [PATCH] tpm: Don't call tpm_cleanup unless CONFIG_TPM.

2017-10-19 Thread Richard W.M. Jones
When compiling with --disable-tpm: ../vl.o: In function `main': /home/rjones/d/qemu/vl.c:4908: undefined reference to `tpm_cleanup' This appears to have been introduced in commit c37cacabf228 ("tpm: Move tpm_cleanup() to right place"). Signed-off-by: Richard W.M. Jones <rjo.

Re: [Qemu-devel] [PATCH v10 9/9] tpm: Move tpm_cleanup() to right place

2017-10-19 Thread Richard W.M. Jones
On Fri, Sep 29, 2017 at 02:10:21PM +0300, Amarnath Valluri wrote: > As Emulator TPM backend uses chardev, tpm cleanup should happen before chardev > similar to other vhost-users. > > Signed-off-by: Amarnath Valluri > --- > tpm.c | 1 - > vl.c | 1 + > 2 files

Re: [Qemu-devel] [PATCH for-2.10] qemu-options: Document the -drive locking parameter.

2017-09-12 Thread Richard W.M. Jones
On Tue, Sep 12, 2017 at 01:32:05PM +0200, Kevin Wolf wrote: > Am 12.09.2017 um 11:45 hat Richard W.M. Jones geschrieben: > > On Wed, Sep 06, 2017 at 01:38:45PM +0200, Kevin Wolf wrote: > > > This command line fragment looks correct to me. For me, it seems to > > > work

Re: [Qemu-devel] [PATCH for-2.10] qemu-options: Document the -drive locking parameter.

2017-09-12 Thread Richard W.M. Jones
On Wed, Sep 06, 2017 at 01:38:45PM +0200, Kevin Wolf wrote: > This command line fragment looks correct to me. For me, it seems to > work. I'm starting a first qemu in the background with default locking > options: > > $ x86_64-softmmu/qemu-system-x86_64 -hda /tmp/test.qcow2 > > And then

Re: [Qemu-devel] [PATCH v4 0/3] watchdog: Allow setting action on the fly

2017-09-06 Thread Richard W.M. Jones
On Wed, Sep 06, 2017 at 05:32:08PM +0200, Markus Armbruster wrote: > Series > Reviewed-by: Markus Armbruster > > Perhaps Rich would like to have a look, too. I looked at them and they seemed OK but I didn't review them. I also added this comment on the bug which maybe

Re: [Qemu-devel] [PATCH for-2.10] qemu-options: Document the -drive locking parameter.

2017-09-06 Thread Richard W.M. Jones
On Wed, Sep 06, 2017 at 12:19:05PM +0200, Kevin Wolf wrote: > Am 06.09.2017 um 10:50 hat Richard W.M. Jones geschrieben: > > Commit 16b48d5d66d2 ("file-posix: Add 'locking' option") added this > > option, but as it was not documented in the -help output it was not &g

Re: [Qemu-devel] [PATCH for-2.10] qemu-options: Document the -drive locking parameter.

2017-09-06 Thread Richard W.M. Jones
On Wed, Sep 06, 2017 at 09:50:06AM +0100, Richard W.M. Jones wrote: > Commit 16b48d5d66d2 ("file-posix: Add 'locking' option") added this > option, but as it was not documented in the -help output it was not > easily possible to tell if a particular qemu binary supports it. My

Re: [Qemu-devel] [PATCH for-2.10] qemu-options: Document the -drive locking parameter.

2017-09-06 Thread Richard W.M. Jones
On Wed, Sep 06, 2017 at 09:59:02AM +0100, Daniel P. Berrange wrote: > The 2.10 versio nis already released. Did you mean that you wanted > this in the stable branch ? If so, then CC qemu-sta...@nongnu.org > > On Wed, Sep 06, 2017 at 09:50:06AM +0100, Richard W.M. Jones wrote

[Qemu-devel] [PATCH for-2.10] qemu-options: Document the -drive locking parameter.

2017-09-06 Thread Richard W.M. Jones
Commit 16b48d5d66d2 ("file-posix: Add 'locking' option") added this option, but as it was not documented in the -help output it was not easily possible to tell if a particular qemu binary supports it. Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- qemu-options.h

Re: [Qemu-devel] [PATCH v2 1/7] block/ssh: don't call libssh2_init() in block_init()

2017-08-31 Thread Richard W.M. Jones
On Wed, Aug 30, 2017 at 02:40:16PM -0500, Eric Blake wrote: > On 08/30/2017 11:56 AM, Jeff Cody wrote: > > We don't need libssh2 failure to be fatal (we could just opt to not > > register the driver on failure). But, it is probably a good idea to > > avoid external library calls during the

[Qemu-devel] [PATCH] virtio-scsi: Add virtqueue_size parameter allowing virtqueue size to be set.

2017-08-10 Thread Richard W.M. Jones
-"- ditto -"- virtqueue_size=64: 318 disks -"- ditto -"- virtqueue_size=16: 775 disks With scsi-mq disabled (kernel before 5c279bd9e406): 1755 disks Note that to have any effect, this requires a kernel patch: https://lkml.org/lkml/2017/8/10/689 Sig

Re: [Qemu-devel] [sw-dev] RFC: QEMU RISC-V modular ISA decoding

2017-07-26 Thread Richard W.M. Jones
On Wed, Jul 26, 2017 at 02:00:14PM +0200, Bastian Koppelmann wrote: > Hi Samuel, > > On 07/25/2017 04:31 PM, Samuel Falvo II wrote: > > For those of us who are not in the know, how does target/s390 decoding work? > > sorry about that. I was going into this with a QEMU-dev mindset :) > > The

Re: [Qemu-devel] Slow tests on "make check" (was Re: [PULL 6/9] Convert error_report() to warn_report())

2017-07-26 Thread Richard W.M. Jones
On Tue, Jul 25, 2017 at 04:26:32PM -0700, Alistair Francis wrote: > Actually, what about to avoid duplication we can add a make check-slow > that runs all the slow tests that make check doesn't run. Then make > check-all can run both make check and make check-slow. > > That way you can run make

Re: [Qemu-devel] [PATCH] checkpatch: Error if signal(2) is used non-portably.

2017-07-04 Thread Richard W.M. Jones
Ignore this, Paolo also sent a similar patch after we were discussing this on IRC. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch

Re: [Qemu-devel] [PATCH] checkpatch: should not use signal except for SIG_DFL or SIG_IGN

2017-07-04 Thread Richard W.M. Jones
rence in > QEMU source code, so allow that. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> This looks good. Ignore the parallel version which I just sent :-( Reviewed-by: Richard W.M. Jones <rjo...@redhat.com> Rich. > scripts/checkpatch.pl | 4 > 1 f

[Qemu-devel] [PATCH] checkpatch: Error if signal(2) is used non-portably.

2017-07-04 Thread Richard W.M. Jones
#39: FILE: qemu-nbd.c:585: +signal(SIGPIPE, foobar); total: 1 errors, 0 warnings, 10 lines checked Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- scripts/checkpatch.pl | 9 + 1 file changed, 9 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpa

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Richard W.M. Jones
On Mon, Jun 26, 2017 at 12:12:05PM +0100, Daniel P. Berrange wrote: > On Mon, Jun 26, 2017 at 10:28:38AM +0200, Kevin Wolf wrote: > > [ Cc: qemu-devel; don't post to qemu-block only! ] > > > > Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: > > > Hi, > > > > > > I am currently working on

Re: [Qemu-devel] [PATCH v2 0/2] Parse 'filename' option for RBD/iSCSI

2017-06-14 Thread Richard W.M. Jones
On Wed, Jun 14, 2017 at 08:53:18AM -0400, Jeff Cody wrote: > Change from v2: > Add warning message that this is an unsupported option that may > be deprecated in the future. > > We need to be able to parse the 'filename' option for rbd and iscsi, because > there may exist images in the wild that

Re: [Qemu-devel] [RFC 0/2] Parse 'filename' option for RBD/iSCSI

2017-06-12 Thread Richard W.M. Jones
really have a Ceph server] So I would say that these patches, superficially at least, do seem to work. Although I wasn't able to test them against a real Ceph server. Tested-by: Richard W.M. Jones <rjo...@redhat.com> Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.r

Re: [Qemu-devel] [PATCH 0/2] Add reduce image for qcow2

2017-05-31 Thread Richard W.M. Jones
On Wed, May 31, 2017 at 06:54:33PM +0300, Pavel Butsykin wrote: > It is assumed that the user has already made a preparatory with the > image: > 1. freeing space at the end of the image > 2. reducing the last partition on the disk > 3. rebuilding fs > Only after these steps, the user can reduce

Re: [Qemu-devel] [PATCH] linuxboot_dma: compile for i486

2017-05-31 Thread Richard W.M. Jones
On Wed, May 31, 2017 at 02:44:18PM +0200, Paolo Bonzini wrote: > The ROM uses the cmovne instruction, which is new in Pentium Pro and does not > work when running QEMU with "-cpu 486". Avoid producing that instruction. > > Suggested-by: Richard W.M. Jones <rjo..

Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.

2017-05-31 Thread Richard W.M. Jones
On Tue, May 30, 2017 at 02:05:15PM -0500, Rob Landley wrote: > On 05/29/2017 05:14 AM, Richard W.M. Jones wrote: > > I see in the disassembly use of cmovne (new in Pentium Pro) and > > bswap (new in 486). > > [http://cse.unl.edu/~goddard/Courses/CSCE351/IntelArchitecture/Inst

Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.

2017-05-29 Thread Richard W.M. Jones
On Mon, May 29, 2017 at 11:22:14AM +0200, Thomas Huth wrote: > On 28.05.2017 07:18, Rob Landley wrote: > > You can't boot a kernel under -cpu 486 since that commit (hangs > > producing no output) because it added a bios image that won't run on > > anything short of pentium II. > > > > You can try

Re: [Qemu-devel] [PATCH v4 0/2] Support CPUID signature for TCG

2017-05-19 Thread Richard W.M. Jones
On Fri, May 19, 2017 at 04:41:46PM -0300, Eduardo Habkost wrote: > On Tue, May 09, 2017 at 07:18:07AM -0700, Richard Henderson wrote: > > On 05/09/2017 07:13 AM, Richard W.M. Jones wrote: > > > On Tue, May 09, 2017 at 07:05:51AM -0700, Richard Henderson wrote: > > >

Re: [Qemu-devel] [PATCH v4 0/2] Support CPUID signature for TCG

2017-05-19 Thread Richard W.M. Jones
On Fri, May 19, 2017 at 04:41:46PM -0300, Eduardo Habkost wrote: > On Tue, May 09, 2017 at 07:18:07AM -0700, Richard Henderson wrote: > > On 05/09/2017 07:13 AM, Richard W.M. Jones wrote: > > > On Tue, May 09, 2017 at 07:05:51AM -0700, Richard Henderson wrote: > > >

Re: [Qemu-devel] [PATCH v3 0/7] curl: locking cleanups/fixes, coroutine conversion, remove aio_poll

2017-05-18 Thread Richard W.M. Jones
On Mon, May 15, 2017 at 12:00:52PM +0200, Paolo Bonzini wrote: > Compared to v2, this silences checkpatch and correctly destroy the mutex on > exiting from curl_open with an error. FWIW I hit the curl bug again and tested the current patch series, and it also fixes the bug (as expected). Rich.

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/7] curl: locking cleanups/fixes, coroutine conversion, remove aio_poll

2017-05-15 Thread Richard W.M. Jones
On Mon, May 15, 2017 at 09:12:54PM +0200, Max Reitz wrote: > On 2017-05-10 17:57, Richard W.M. Jones wrote: > > On Wed, May 10, 2017 at 04:31:58PM +0200, Paolo Bonzini wrote: > >> Since the last patch in v1 didn't work, I bit the bullet and converted > >> the whole thing

Re: [Qemu-devel] [PATCH v2 0/7] curl: locking cleanups/fixes, coroutine conversion, remove aio_poll

2017-05-10 Thread Richard W.M. Jones
> I tested this by lowering CURL_NUM_STATES to 2. With this change, the > buggy case triggers a couple times while booting a Fedora netinst image. This series fixes the original bug, so: Tested-by: Richard W.M. Jones <rjo...@redhat.com> I think the Reported-by in patch 3 should cr

Re: [Qemu-devel] [PATCH 0/4] curl: locking cleanups and fixes

2017-05-09 Thread Richard W.M. Jones
On Tue, May 09, 2017 at 12:03:30PM -0400, Jeff Cody wrote: > On Tue, May 09, 2017 at 11:15:06AM +0100, Richard W.M. Jones wrote: > > > > No I'm afraid this patch series does not fix the bug. > > > > The stack trace is below. > > > > Rich. > >

Re: [Qemu-devel] [PATCH v4 0/2] Support CPUID signature for TCG

2017-05-09 Thread Richard W.M. Jones
On Tue, May 09, 2017 at 07:05:51AM -0700, Richard Henderson wrote: > On 05/09/2017 06:27 AM, Daniel P. Berrange wrote: > >This enables report of a signature in CPUID for the TCG > >interpretor. > > > >Changed in v4: > > > > - Report 0x4001 in EAX for 0x4000 index (Eduardo) > > - Report

Re: [Qemu-devel] [PATCH 0/4] curl: locking cleanups and fixes

2017-05-09 Thread Richard W.M. Jones
No I'm afraid this patch series does not fix the bug. The stack trace is below. Rich. Thread 4 (Thread 0x7f8595cf1700 (LWP 11235)): #0 0x7f86348e6700 in do_futex_wait () at /lib64/libpthread.so.0 #1 0x7f86348e6813 in __new_sem_wait_slow () at /lib64/libpthread.so.0 #2

Re: [Qemu-devel] [PULL 1/4] curl: do not use aio_context_acquire/release

2017-05-03 Thread Richard W.M. Jones
e); > > Yes, this fixes it, thanks Paolo. Reported-by: Kun Wei <ku...@redhat.com> Reviewed-by: Richard W.M. Jones <rjo...@redhat.com> Tested-by: Richard W.M. Jones <rjo...@redhat.com> Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones

Re: [Qemu-devel] [PULL 1/4] curl: do not use aio_context_acquire/release

2017-05-03 Thread Richard W.M. Jones
Same backtrace, but with some more symbols: __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 135 2: movl %edx, %eax (gdb) t a a bt Thread 3 (Thread 0x7f1d49967700 (LWP 29949)): #0 0x7f1d53a39bf9 in syscall () at

Re: [Qemu-devel] [PULL 1/4] curl: do not use aio_context_acquire/release

2017-05-03 Thread Richard W.M. Jones
On Wed, May 03, 2017 at 04:59:22PM +0200, Paolo Bonzini wrote: > Maybe there is, can you grab an all-threads backtrace via gdb? Program received signal SIGINT, Interrupt. 0x7f1d57f861bd in __lll_lock_wait () from /lib64/libpthread.so.0 (gdb) t a a bt Thread 9 (Thread 0x7f1d49967700 (LWP

Re: [Qemu-devel] [PULL 1/4] curl: do not use aio_context_acquire/release

2017-05-03 Thread Richard W.M. Jones
On Mon, Feb 27, 2017 at 04:34:44PM +, Stefan Hajnoczi wrote: > From: Paolo Bonzini > > Now that all bottom halves and callbacks take care of taking the > AioContext lock, we can migrate some users away from it and to a > specific QemuMutex or CoMutex. > > Protect

Re: [Qemu-devel] Writing a C library to generate qemu command lines and configuration files

2017-05-02 Thread Richard W.M. Jones
On Tue, May 02, 2017 at 04:28:52PM +0200, Markus Armbruster wrote: > > * Is comma-quoting (ie. doubling any commas) sufficient? Or are there > > other forms of quoting? A quick look at options parsing in qemu > > doesn't show any. > > A quick look at QemuOpts will at best confuse, and

[Qemu-devel] Writing a C library to generate qemu command lines and configuration files

2017-05-02 Thread Richard W.M. Jones
Firstly, is there such a thing already? (libvirt doesn't count since it cannot generate -readconfig configuration files) Well, I have written one. It's in C and doesn't have any dependencies beyond the standard C library: https://github.com/rwmjones/libguestfs/tree/max-disks/common/qemuopts

Re: [Qemu-devel] virtio-scsi limits

2017-04-18 Thread Richard W.M. Jones
On Tue, Apr 18, 2017 at 06:17:03PM +0100, Richard W.M. Jones wrote: > On Tue, Apr 18, 2017 at 05:30:52PM +0200, Paolo Bonzini wrote: > > > When I changed libguestfs to use LUNs instead of targets (target=0 > > > unit=i), I got a peculiar bug. It looks like there is some ki

Re: [Qemu-devel] virtio-scsi limits

2017-04-18 Thread Richard W.M. Jones
On Tue, Apr 18, 2017 at 05:30:52PM +0200, Paolo Bonzini wrote: > > When I changed libguestfs to use LUNs instead of targets (target=0 > > unit=i), I got a peculiar bug. It looks like there is some kind of > > race when enumerating the device, where /sys is populated before the > > device is

[Qemu-devel] virtio-scsi limits

2017-04-18 Thread Richard W.M. Jones
Hi Paolo, I was looking for documentation on the limits of #controllers, #channels, #targets, #LUNs, #disks in virtio-scsi, and couldn't find any, so I thought I would create that documentation instead. I wonder if you could check that the following is correct information. Also - at the bottom

Re: [Qemu-devel] [PATCH for-2.9] block: Don't check permissions for copy on read

2017-04-07 Thread Richard W.M. Jones
copy on read is refactored into its own filter driver. > > Reported-by: Richard W.M. Jones <rjo...@redhat.com> > Signed-off-by: Kevin Wolf <kw...@redhat.com> Thanks Kevin. As this is essentially the same as the patch I tested last night, Reviewed-by: Richard W.M. Jones <rjo.

Re: [Qemu-devel] [PULL 43/46] block: Assertions for write permissions

2017-04-06 Thread Richard W.M. Jones
On Thu, Apr 06, 2017 at 04:23:19PM -0500, Eric Blake wrote: > On 04/06/2017 04:15 PM, Richard W.M. Jones wrote: > > >>>> +++ b/block/io.c > >>>> @@ -945,6 +945,8 @@ static int coroutine_fn > >>>> bdrv_co_do_copy_on_readv(BdrvChild *child,

Re: [Qemu-devel] [PULL 43/46] block: Assertions for write permissions

2017-04-06 Thread Richard W.M. Jones
On Thu, Apr 06, 2017 at 04:03:28PM -0500, Eric Blake wrote: > On 04/06/2017 03:59 PM, Richard W.M. Jones wrote: > > On Tue, Feb 28, 2017 at 09:36:42PM +0100, Kevin Wolf wrote: > >> This adds assertions that ensure that the necessary write permissions > >> have been gran

Re: [Qemu-devel] [PULL 43/46] block: Assertions for write permissions

2017-04-06 Thread Richard W.M. Jones
On Tue, Feb 28, 2017 at 09:36:42PM +0100, Kevin Wolf wrote: > This adds assertions that ensure that the necessary write permissions > have been granted before someone attempts to write to a node. > > Signed-off-by: Kevin Wolf > Acked-by: Fam Zheng >

Re: [Qemu-devel] [PATCH v3 07/13] block: Use simpler QDict/QList scalar insertion macros

2017-04-05 Thread Richard W.M. Jones
On Wed, Apr 05, 2017 at 02:47:35PM -0500, Eric Blake wrote: > We now have macros in place to make it less verbose to add a scalar > to QDict and QList, so use them. > > Patch created mechanically via: > spatch --sp-file scripts/coccinelle/qobject.cocci \ > --macro-file

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

2017-04-05 Thread Richard W.M. Jones
On Wed, Apr 05, 2017 at 10:38:37AM +0200, Julia Lawall wrote: > OK, there is nothing special about g_assert_cmpint, but Coccinelle expects > expressions or types in function argument lists, so it gives a parse error > on finding an ==. I should have checked the coccinelle mailing list before

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

2017-04-05 Thread Richard W.M. Jones
On Wed, Apr 05, 2017 at 10:21:13AM +0200, Julia Lawall wrote: > > > On Wed, 5 Apr 2017, Richard W.M. Jones wrote: > > > On Tue, Apr 04, 2017 at 05:41:08PM -0500, Eric Blake wrote: > > > On 01/19/2017 08:38 AM, Eric Blake wrote: > > > > On 01/19

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

2017-04-05 Thread Richard W.M. Jones
On Tue, Apr 04, 2017 at 05:41:08PM -0500, Eric Blake wrote: > On 01/19/2017 08:38 AM, Eric Blake wrote: > > On 01/19/2017 03:25 AM, Markus Armbruster wrote: > >> Eric Blake writes: > >> > >>> Quite a few users of qdict_put() were manually wrapping a > >>> non-QObject. We can

Re: [Qemu-devel] [PATCH] main-loop: Acquire main_context lock around os_host_main_loop_wait.

2017-04-01 Thread Richard W.M. Jones
On Fri, Mar 31, 2017 at 09:51:33PM +0100, Richard W.M. Jones wrote: > When running virt-rescue the serial console hangs from time to time. > Virt-rescue runs an ordinary Linux kernel "appliance", but there is > only a single idle process running inside, so the qemu main loo

[Qemu-devel] [PATCH] main-loop: Acquire main_context lock around os_host_main_loop_wait.

2017-03-31 Thread Richard W.M. Jones
Core i7 and Intel Xeon), over many hours of automated testing. I wasn't able to reproduce the early boot hangs (but as noted above, these are extremely rare in any case). Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1435432 Reported-by: Richard W.M. Jones <rjo...@redhat.com> Tested-by

Re: [Qemu-devel] [PATCH] char: kick main loop after adding a watch

2017-03-31 Thread Richard W.M. Jones
On Fri, Mar 31, 2017 at 07:31:57PM +0200, Paolo Bonzini wrote: > > > On 31/03/2017 19:31, Richard W.M. Jones wrote: > > On Fri, Mar 31, 2017 at 06:53:56PM +0200, Paolo Bonzini wrote: > >> glib is expecting QEMU to use g_main_context_acquire around accesses to > >

Re: [Qemu-devel] [PATCH] char: kick main loop after adding a watch

2017-03-31 Thread Richard W.M. Jones
17 00:00:00 2001 From: "Richard W.M. Jones" <rjo...@redhat.com> Date: Fri, 31 Mar 2017 18:29:01 +0100 Subject: [PATCH] main-loop: Acquire main_context lock around os_host_main_loop_wait. --- util/main-loop.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/util

Re: [Qemu-devel] [PATCH] char: kick main loop after adding a watch

2017-03-31 Thread Richard W.M. Jones
On Fri, Mar 31, 2017 at 05:43:22PM +0100, Stefan Hajnoczi wrote: > The ISA serial port device's output can hang when the pipe on stdout > becomes full. This is a race condition where the vcpu thread executing > serial emulation code adds a watch on stdout while the main loop thread > is blocked

[Qemu-devel] Random hangs in the emulated ISA serial console, caused by glib2 change

2017-03-24 Thread Richard W.M. Jones
Hello Frediano, I'm tracking a rather difficult bug in qemu, where it appears that events in the glib loop are "lost". This is characterized by the emulated qemu serial console hanging until someone presses a key. This is normally disguised in the busy main loop of qemu (since some other event

Re: [Qemu-devel] [PATCH for-2.9] qom: Fix regression with 'qom-type'

2017-03-23 Thread Richard W.M. Jones
visit_free(v); > > qemu_opts_set_id(opts, (char *) id); > +qemu_opt_set(opts, "qom-type", type, _abort); > g_free(type); > QDECREF(pdict); > return obj; Thanks Eric. Yes, this fixes the problem I observed before with libguestfs. Tested-by: Richard W.M. Jon

[Qemu-devel] Possible regression (was: Re: [PATCH v3 2/3] qom: Avoid unvisited 'id'/'qom-type' in user_creatable_add_opts)

2017-03-23 Thread Richard W.M. Jones
On Wed, Mar 22, 2017 at 09:45:24AM -0500, Eric Blake wrote: > A regression in commit 15c2f669e caused us to silently ignore > excess input to the QemuOpts visitor. Later, commit ea4641 > accidentally abused that situation, by removing "qom-type" and > "id" from the corresponding QDict but leaving

Re: [Qemu-devel] [PATCH v2] qemu-ga: obey LISTEN_PID when using systemd socket activation

2017-03-16 Thread Richard W.M. Jones
On Thu, Mar 16, 2017 at 05:36:40PM +0100, Paolo Bonzini wrote: > qemu-ga's socket activation support was not obeying the LISTEN_PID > environment variable, which avoids that a process uses a socket-activation > file descriptor meant for its parent. > > Mess can for example ensue if a process

Re: [Qemu-devel] [PATCH] qemu-ga: obey LISTEN_PID when using systemd socket activation

2017-03-16 Thread Richard W.M. Jones
be used for both, but that's what this patch does. The > main change is to replace get_listen_fds's "consume" argument with > the FIRST_SOCKET_ACTIVATION_FD macro from the qemu-nbd code. > > Cc: "Richard W.M. Jones" <rjo...@redhat.com> > Cc: Stefan Hajnoczi

[Qemu-devel] ANNOUNCE: libguestfs 1.36 released

2017-02-28 Thread Richard W.M. Jones
I'm please to announce libguestfs 1.36, a library and a set of tools for accessing and modifying virtual machine disk images. This release represents about 7 months of work by many contributors. I'd like to call out in particular substantial code contributions from: Pino Toscano, Tomáš

Re: [Qemu-devel] [PATCH v2 0/3] i386: Add "max" CPU model to TCG and KVM

2017-02-24 Thread Richard W.M. Jones
On Fri, Feb 24, 2017 at 09:26:30AM -0300, Eduardo Habkost wrote: > On Thu, Feb 23, 2017 at 09:57:41PM +0000, Richard W.M. Jones wrote: > > On Thu, Feb 23, 2017 at 05:07:47PM -0300, Eduardo Habkost wrote: > > > Ping? > > > > > > As v1

Re: [Qemu-devel] [PATCH v2 0/3] i386: Add "max" CPU model to TCG and KVM

2017-02-23 Thread Richard W.M. Jones
On Thu, Feb 23, 2017 at 05:07:47PM -0300, Eduardo Habkost wrote: > Ping? > > As v1 was sitting on the list since Jan 19, if there are no > objections I will merge this and include in my next pull request > before soft freeze. Do you have a copy which applies on top of current HEAD? I get loads

Re: [Qemu-devel] [PATCH v5] qemu-nbd: Implement socket activation.

2017-02-06 Thread Richard W.M. Jones
On Mon, Feb 06, 2017 at 05:10:13PM +0100, Paolo Bonzini wrote: > Queued, thanks. Could you change this comment s/!_WIN32/_WIN32/, or do you want me to submit another patch? > > +#else /* !_WIN32 */ > > +static unsigned int check_socket_activation(void) > > +{ > > +return 0; > > +} > >

[Qemu-devel] [PATCH v4] qemu-nbd: Implement socket activation.

2017-02-04 Thread Richard W.M. Jones
v3 -> v4: - Remove restriction on --fork again. - Retest the patch using virt-p2v. Rich.

[Qemu-devel] [PATCH v5] qemu-nbd: Implement socket activation.

2017-02-04 Thread Richard W.M. Jones
v3 -> v5: - Use stringify() macro (thanks Markus). - Remove --fork restriction again. - Retest with virt-p2v. Rich.

[Qemu-devel] [PATCH v5] qemu-nbd: Implement socket activation.

2017-02-04 Thread Richard W.M. Jones
descriptor range. This change partially implements socket activation for qemu-nbd. If the environment variables are set correctly, then socket activation will happen automatically, otherwise everything works as before. The limitation is that LISTEN_FDS must be 1. Signed-off-by: Richard W.M. Jones

[Qemu-devel] [PATCH v4] qemu-nbd: Implement socket activation.

2017-02-04 Thread Richard W.M. Jones
descriptor range. This change partially implements socket activation for qemu-nbd. If the environment variables are set correctly, then socket activation will happen automatically, otherwise everything works as before. The limitation is that LISTEN_FDS must be 1. Signed-off-by: Richard W.M. Jones

Re: [Qemu-devel] [PATCH v3] qemu-nbd: Implement socket activation.

2017-02-03 Thread Richard W.M. Jones
On Fri, Feb 03, 2017 at 10:58:15AM -0800, Paolo Bonzini wrote: > On 03/02/2017 10:56, Richard W.M. Jones wrote: > > On Fri, Feb 03, 2017 at 09:31:43AM -0800, Paolo Bonzini wrote: > >> On 03/02/2017 09:09, Richard W.M. Jones wrote: > >>> +if (fork_process) { >

Re: [Qemu-devel] [PATCH v3] qemu-nbd: Implement socket activation.

2017-02-03 Thread Richard W.M. Jones
On Fri, Feb 03, 2017 at 09:31:43AM -0800, Paolo Bonzini wrote: > > > On 03/02/2017 09:09, Richard W.M. Jones wrote: > > + const char *port, > > + bool fork_process) >

Re: [Qemu-devel] Non-flat command line option argument syntax

2017-02-03 Thread Richard W.M. Jones
On Thu, Feb 02, 2017 at 08:42:33PM +0100, Markus Armbruster wrote: > There's also the -drive file=json:... syntax. It's a bad fit for > QemuOpts, because QemuOpts and JSON fight for the comma. I'd show you > if I could get it to work. I think this refers to the json: syntax for qemu URIs?

[Qemu-devel] [PATCH v3] qemu-nbd: Implement socket activation.

2017-02-03 Thread Richard W.M. Jones
descriptor range. This change partially implements socket activation for qemu-nbd. If the environment variables are set correctly, then socket activation will happen automatically, otherwise everything works as before. The limitation is that LISTEN_FDS must be 1. Signed-off-by: Richard W.M. Jones

[Qemu-devel] [PATCH v3] qemu-nbd: Implement socket activation.

2017-02-03 Thread Richard W.M. Jones
v2 -> v3: - Changes suggested by Stefan. - Retested it, using my socket activation code in virt-p2v: https://www.redhat.com/archives/libguestfs/2017-February/msg00036.html Rich.

Re: [Qemu-devel] [PATCH v2] qemu-nbd: Implement socket activation.

2017-02-03 Thread Richard W.M. Jones
On Fri, Feb 03, 2017 at 03:16:43PM +, Stefan Hajnoczi wrote: > On Thu, Feb 02, 2017 at 05:16:25PM +0000, Richard W.M. Jones wrote: > > +if (*port == NULL) { > > +*port = g_strdup_printf("%d", NBD_DEFAULT_PORT);; > > Please stringify NB

[Qemu-devel] [PATCH v2] qemu-nbd: Implement socket activation.

2017-02-02 Thread Richard W.M. Jones
descriptor range. This change partially implements socket activation for qemu-nbd. If the environment variables are set correctly, then socket activation will happen automatically, otherwise everything works as before. The limitation is that LISTEN_FDS must be 1. Signed-off-by: Richard W.M. Jones

[Qemu-devel] [PATCH v2] qemu-nbd: Implement socket activation.

2017-02-02 Thread Richard W.M. Jones
v2: - A few small fixed identified by Dan Berrange. The original cover letter is below. Rich. Socket activation (sometimes known as systemd socket activation) allows an Internet superserver to pass a pre-opened listening socket to the process, instead of having qemu-nbd open a socket itself.

[Qemu-devel] [PATCH] qemu-nbd: Implement socket activation.

2017-02-02 Thread Richard W.M. Jones
Socket activation (sometimes known as systemd socket activation) allows an Internet superserver to pass a pre-opened listening socket to the process, instead of having qemu-nbd open a socket itself. This is done via the LISTEN_FDS and LISTEN_PID environment variables, and a standard file

[Qemu-devel] [PATCH] qemu-nbd: Implement socket activation.

2017-02-02 Thread Richard W.M. Jones
descriptor range. This change partially implements socket activation for qemu-nbd. If the environment variables are set correctly, then socket activation will happen automatically, otherwise everything works as before. The limitation is that LISTEN_FDS must be 1. Signed-off-by: Richard W.M. Jones

Re: [Qemu-devel] [Qemu-block] [PATCH v10 14/16] file-posix: Implement image locking

2017-01-19 Thread Richard W.M. Jones
On Thu, Jan 19, 2017 at 10:19:29AM -0600, Eric Blake wrote: > On 01/19/2017 09:49 AM, Daniel P. Berrange wrote: > > On Thu, Jan 19, 2017 at 10:38:14PM +0800, Fam Zheng wrote: > >> This implements open flag sensible image locking for local file > >> and host device protocol. > >> > >> virtlockd in

Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too

2017-01-17 Thread Richard W.M. Jones
On Tue, Jan 17, 2017 at 12:05:41PM -0200, Eduardo Habkost wrote: > On Tue, Jan 17, 2017 at 01:57:34PM +0000, Richard W.M. Jones wrote: > > > > Oh no wait, these errors are just because of the new version of qemu > > that I am using to test your patch, so nothing

Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too

2017-01-17 Thread Richard W.M. Jones
Oh no wait, these errors are just because of the new version of qemu that I am using to test your patch, so nothing to do with this patch. /me fires up git bisect ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization

Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too

2017-01-17 Thread Richard W.M. Jones
On Tue, Jan 17, 2017 at 01:42:08PM +, Richard W.M. Jones wrote: > On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote: > > Change the meaning of "-cpu host" to "enable all features > > supported by the accelerator in the current host", so that it

Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too

2017-01-17 Thread Richard W.M. Jones
On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote: > Change the meaning of "-cpu host" to "enable all features > supported by the accelerator in the current host", so that it can > be used to enable/query all features supported by TCG. > > To make sure "host" is still at the end of

Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too

2017-01-17 Thread Richard W.M. Jones
On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote: > Change the meaning of "-cpu host" to "enable all features > supported by the accelerator in the current host", so that it can > be used to enable/query all features supported by TCG. > > To make sure "host" is still at the end of

Re: [Qemu-devel] [PATCH] watchdog: 6300esb: add exit function

2016-11-29 Thread Richard W.M. Jones
On Tue, Nov 29, 2016 at 04:56:55PM +0800, Li Qiang wrote: > Hi > > 2016-11-29 16:39 GMT+08:00 Richard W.M. Jones <rjo...@redhat.com>: > > > On Mon, Nov 28, 2016 at 05:49:04PM -0800, Li Qiang wrote: > > > From: Li Qiang <liqiang...@360.cn> > > > >

Re: [Qemu-devel] [PATCH] watchdog: 6300esb: add exit function

2016-11-29 Thread Richard W.M. Jones
On Mon, Nov 28, 2016 at 05:49:04PM -0800, Li Qiang wrote: > From: Li Qiang > > When the Intel 6300ESB watchdog is hot unplug. The timer allocated > in realize isn't freed thus leaking memory leak. This patch avoid > this through adding the exit function. I will just note that

Re: [Qemu-devel] qemu-img create doesn't always replace the existing file

2016-11-08 Thread Richard W.M. Jones
On Tue, Nov 08, 2016 at 03:05:24PM +0100, Kevin Wolf wrote: > [ Cc: qemu-block ] > > Am 08.11.2016 um 11:58 hat Richard W.M. Jones geschrieben: > > When using 'qemu-img create', if the file being created already > > exists, then qemu-img tries to read it first. This ha

[Qemu-devel] qemu-img create doesn't always replace the existing file

2016-11-08 Thread Richard W.M. Jones
When using 'qemu-img create', if the file being created already exists, then qemu-img tries to read it first. This has some unexpected effects: $ rm test.qcow2 $ qemu-img create -f qcow2 -o compat=1.1,preallocation=off test.qcow2 1G Formatting 'test.qcow2', fmt=qcow2 size=1073741824 compat=1.1

<    1   2   3   4   5   6   7   8   9   10   >