Re: [Qemu-devel] [PATCH] block/curl: Implement the libcurl timer callback interface

2014-01-16 Thread Richard W.M. Jones
On further investigation, the "No such file or directory" error occurs when using snapshot=on. ie: This fails: ./x86_64-softmmu/qemu-system-x86_64 -drive 'file=http://127.0.0.1/~rjones/cirros-0.3.1-x86_64-disk.img,if=virtio,snapshot=on' This works: ./x86_64-softmmu/qemu-system-x86_64 -drive

Re: [Qemu-devel] (i386) TCG is broken in 1.5-rc0 with guest kernel 3.2?

2013-05-08 Thread Richard W.M. Jones
On Wed, May 08, 2013 at 12:22:01PM +0400, Michael Tokarev wrote: [...] There is a long term (since 1.4), but different, bug in i386 / tcg which causes processes to segfault very rarely and randomly. In fact it sounds a bit like what you describe here: > This happened when CarlFK (Cc'd) mentioned

Re: [Qemu-devel] [PATCH for-1.5 0/3] qcow2: Catch some L1 table index overflows

2013-05-13 Thread Richard W.M. Jones
e the file, and then try to add it with the new qemu, you get: -drive file=/tmp/huge.qcow2,cache=none,id=hd0,if=none: could not open disk image /tmp/huge.qcow2: File too large (instead of a segfault). So: ACK. Tested-by: Richard W.M. Jones My only gripe is it would be nice if the qemu-im

Re: [Qemu-devel] drive-mirror sync points

2013-05-13 Thread Richard W.M. Jones
On Mon, May 13, 2013 at 01:50:00PM -0400, Wolfgang Richter wrote: > Paolo/anyone who knows - > > Are drive-mirror sync points (NBD flush commands) reflecting guest write > barriers? Are guest write barriers respected by drive-mirror? If so, that > would make drive-mirror much more palatable for

Re: [Qemu-devel] drive-mirror sync points

2013-05-13 Thread Richard W.M. Jones
On Mon, May 13, 2013 at 10:46:55PM +0100, Richard W.M. Jones wrote: > On Mon, May 13, 2013 at 01:50:00PM -0400, Wolfgang Richter wrote: > > Paolo/anyone who knows - > > > > Are drive-mirror sync points (NBD flush commands) reflecting guest write > > barriers? Are gue

Re: [Qemu-devel] [PATCH v2 for-1.5 0/4] qcow2: Catch some L1 table index overflows

2013-05-14 Thread Richard W.M. Jones
On Tue, May 14, 2013 at 04:14:32PM +0200, Kevin Wolf wrote: > Kevin Wolf (4): > qcow2: Catch some L1 table index overflows > block: Add hint to -EFBIG error message > qcow2.py: Subcommand for changing header fields > qemu-iotests: Try creating huge qcow2 image > > block.c

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-16 Thread Richard W.M. Jones
[...] >From my point of view, what I'm missing here is how would I use it. Ideally I'd like to issue some QMP commands which would set up the point-in-time snapshot, and then connect to this snapshot over (eg) NBD, then when I'm done, send some more QMP commands to tear down the snapshot. I thin

Re: [Qemu-devel] [PATCH v4 0/8] block: drive-backup live backup command

2013-05-19 Thread Richard W.M. Jones
On Thu, May 16, 2013 at 10:36:11AM +0200, Stefan Hajnoczi wrote: [...] > How can drive-backup be used? > - > The simplest use-case is to copy a point-in-time snapshot to a local file. > > More advanced users may wish to make the target an NBD URL. The NBD server > lis

Re: [Qemu-devel] [PATCH] tests: set MALLOC_PERTURB_ to expose memory bugs

2013-05-19 Thread Richard W.M. Jones
On Fri, May 17, 2013 at 11:07:38AM +0100, Daniel P. Berrange wrote: > On Fri, May 17, 2013 at 11:54:12AM +0200, Markus Armbruster wrote: > > If you want punishment, why not go for extra punishment? > > > > MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) > > That could lead to non-reproducable failures th

Re: [Qemu-devel] [PATCH v4 0/8] block: drive-backup live backup command

2013-05-19 Thread Richard W.M. Jones
On Sun, May 19, 2013 at 09:30:46PM +0200, Paolo Bonzini wrote: > Il 19/05/2013 18:47, Richard W.M. Jones ha scritto: > >> > > >> > More advanced users may wish to make the target an NBD URL. The NBD > >> > server > >> > listening on the

Re: [Qemu-devel] [PATCH v3 00/10] curl: fix curl read

2013-05-20 Thread Richard W.M. Jones
On Mon, May 20, 2013 at 03:03:34PM +0800, Fam Zheng wrote: > CURL library API has changed, the current curl driver is not working. > This patch rewrites the use of API as well as the structure of internal > states. I tried this, but it segfaults: Program terminated with signal 11, Segmentation f

Re: [Qemu-devel] [PATCH v3 00/10] curl: fix curl read

2013-05-20 Thread Richard W.M. Jones
On Mon, May 20, 2013 at 09:41:06AM +0100, Richard W.M. Jones wrote: > On Mon, May 20, 2013 at 03:03:34PM +0800, Fam Zheng wrote: > > CURL library API has changed, the current curl driver is not working. > > This patch rewrites the use of API as well as the structure of internal >

Re: [Qemu-devel] [PATCH v3 00/10] curl: fix curl read

2013-05-21 Thread Richard W.M. Jones
On Tue, May 21, 2013 at 09:54:15AM +0800, Fam Zheng wrote: > On Mon, 05/20 09:49, Richard W.M. Jones wrote: > > On Mon, May 20, 2013 at 09:41:06AM +0100, Richard W.M. Jones wrote: > > > On Mon, May 20, 2013 at 03:03:34PM +0800, Fam Zheng wrote: > > > > CURL librar

Re: [Qemu-devel] [PATCH v4 00/10] curl: fix curl read

2013-05-22 Thread Richard W.M. Jones
On Wed, May 22, 2013 at 11:16:40AM +0800, Fam Zheng wrote: > Changes from v3: > 01, 06, 07: Add QLIST_INIT in qemu_open to initialize each list. > 07: Move clean up for s->acbs from later patch to here. Use qemu_aio_relase > instead of g_free on acb. > Fix use-after-free bug. [Rich] Thi

Re: [Qemu-devel] [PATCH v4 00/10] curl: fix curl read

2013-05-22 Thread Richard W.M. Jones
s Linux and Windows. http://people.redhat.com/~rjones/virt-df/ From 0d42755f009c142b85fb07a06a41cee6c7ea68ba Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 22 May 2013 12:11:45 +0100 Subject: [PATCH] block/curl.c: Refuse to open the handle for writes. --- block/curl.c | 4

[Qemu-devel] [PATCH] block/curl.c: Refuse to open the handle for writes.

2013-05-22 Thread Richard W.M. Jones
From: "Richard W.M. Jones" --- block/curl.c | 4 1 file changed, 4 insertions(+) diff --git a/block/curl.c b/block/curl.c index b8935fd..f1e302b 100644 --- a/block/curl.c +++ b/block/curl.c @@ -406,6 +406,10 @@ static int curl_open(BlockDriverState *bs, QDict *options,

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Richard W.M. Jones
On Wed, May 22, 2013 at 11:51:16AM -0400, Wolfgang Richter wrote: > This is actually interesting. Does the QEMU nbd server support multiple > readers? Yes. qemu-nbd has a -e/--shared= option which appears to do exactly what it says in the man page. $ guestfish -N fs exit $ ls -lh test1.img -rw

Re: [Qemu-devel] [PATCH v2] wdt_i6300esb: fix vmstate versioning

2013-05-22 Thread Richard W.M. Jones
On Wed, May 22, 2013 at 11:32:51AM -0500, Michael Roth wrote: > When this VMSD was introduced it's version fields were set to > sizeof(I6300State), making them essentially random from build to build, > version to version. > > To fix this, we lock in a high version id and low minimum version id to

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Richard W.M. Jones
On Wed, May 22, 2013 at 02:32:37PM -0400, Wolfgang Richter wrote: > On Wed, May 22, 2013 at 12:42 PM, Richard W.M. Jones wrote: > > > Run up to two extra guestfish instances, with the same result. The > > fourth guestfish instance hangs at the 'run' command until o

Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection

2013-05-22 Thread Richard W.M. Jones
On Wed, May 22, 2013 at 03:38:33PM -0400, Wolfgang Richter wrote: > On Wed, May 22, 2013 at 3:26 PM, Richard W.M. Jones wrote: > > > On Wed, May 22, 2013 at 02:32:37PM -0400, Wolfgang Richter wrote: > > > On Wed, May 22, 2013 at 12:42 PM, Richard W.M. Jones > >wrote:

Re: [Qemu-devel] [PATCH v5 00/11] curl: fix curl read

2013-05-23 Thread Richard W.M. Jones
v5 tested and works for me. Attached is the test script I'm using. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. h

[Qemu-devel] ANNOUNCE: libguestfs 1.22 has been released

2013-05-23 Thread Richard W.M. Jones
I'm pleased to announce the next stable release of libguestfs (1.22). libguestfs is a set of tools for accessing and modifying virtual machine disk images. http://libguestfs.org/ This release represents 5 months of development and has many significant new features including: - access remote di

Re: [Qemu-devel] [Libguestfs] ANNOUNCE: libguestfs 1.22 has been released

2013-05-24 Thread Richard W.M. Jones
On Fri, May 24, 2013 at 08:42:37AM +0530, Kashyap Chamarthy wrote: > On 05/23/2013 05:53 PM, Richard W.M. Jones wrote: > > I'm pleased to announce the next stable release of libguestfs (1.22). > > Great work! > > == > $ ./autogen.sh && make -j 7 &

Re: [Qemu-devel] [PATCH v6 00/12] curl: fix curl read

2013-05-24 Thread Richard W.M. Jones
On Fri, May 24, 2013 at 01:36:55PM +0800, Fam Zheng wrote: > Changes from v5: > 05: Rename bs to s for BDRVCURLState. > 06: Use int64_t for offsets. > Fix printf format string. > Move introducing of use_count to 07. > 07: Drop explicit cast. > Use int64_t for offsets. >

Re: [Qemu-devel] [PATCH] Remove unnecessary break statements

2013-05-24 Thread Richard W.M. Jones
On Fri, May 24, 2013 at 12:19:25PM +0200, Stefan Weil wrote: > Fix these warnings from cppcheck: > > hw/display/cirrus_vga.c:2603: > hw/sd/sd.c:348: > hw/timer/exynos4210_mct.c:1033: > target-arm/translate.c:9886: > target-s390x/mem_helper.c:518: > target-unicore32/translate.c:1936: > style: Con

Re: [Qemu-devel] [PATCH v13 00/14] Drop in_use from BlockDriverState and enable point-in-time snapshot exporting over NBD

2014-02-12 Thread Richard W.M. Jones
On Wed, Feb 12, 2014 at 09:22:29AM -0800, Ian Main wrote: > On Wed, Jan 29, 2014 at 01:07:27PM +0800, Fam Zheng wrote: > > This series adds for point-in-time snapshot NBD exporting based on > > blockdev-backup (variant of drive-backup with existing device as target). > > > > We get a thin point-in

Re: [Qemu-devel] [PATCH 00/28] target-ppc: Altivec 2.07

2014-02-18 Thread Richard W.M. Jones
Hi Tom, I would love to test your latest non-upstream qemu patches, because the better emulation of VSX may enable me to get libguestfs working on ppc64p7. Do you have a public git tree anywhere which contains something testable? The published patches no longer cleanly apply to qemu.git. Rich.

Re: [Qemu-devel] [PATCH 00/28] target-ppc: Altivec 2.07

2014-02-20 Thread Richard W.M. Jones
Tom, I tested your patches [see below] and I found they work very well. They solve all the immediate problems that libguestfs was hitting with qemu not emulating certain POWER7 instructions. I am now running a full libguestfs test which will take several hours, but it looks as if -- even if this

Re: [Qemu-devel] [PATCH 00/28] target-ppc: Altivec 2.07

2014-02-20 Thread Richard W.M. Jones
On Thu, Feb 20, 2014 at 10:23:42AM +, Richard W.M. Jones wrote: > I am now running a full libguestfs test which will take several hours, > but it looks as if -- even if this test fails -- it won't be because > of lack of emulation / missing instructions in qemu. The tests ran.

Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/28] target-ppc: Altivec 2.07

2014-02-20 Thread Richard W.M. Jones
On Thu, Feb 20, 2014 at 01:36:57PM +0100, Alexander Graf wrote: > > On 20.02.2014, at 13:34, Richard W.M. Jones wrote: > > > On Thu, Feb 20, 2014 at 10:23:42AM +0000, Richard W.M. Jones wrote: > >> I am now running a full libguestfs test which will take several hours,

Re: [Qemu-devel] [PATCH 0/8] curl: Fix hang reading from slow connections

2014-04-29 Thread Richard W.M. Jones
On Tue, Apr 29, 2014 at 04:03:24PM +0100, Matthew Booth wrote: > [PATCH 1/8] curl: Fix long line > [PATCH 2/8] curl: Remove unnecessary use of goto > [PATCH 3/8] curl: Fix return from curl_read_cb with invalid state > [PATCH 4/8] curl: Remove erroneous sleep waiting for curl completion > [PATCH 5/8

Re: [Qemu-devel] [PATCH 17/22] ssh: use BlockDriverState's AioContext

2014-05-01 Thread Richard W.M. Jones
v_attach_aio_context() interfaces > are not needed since no fd handlers, timers, or BHs stay registered when > requests have been drained. > > For now this doesn't make much difference but will allow ssh to work in > IOThread instances in the future. > > Cc: Richar

Re: [Qemu-devel] [PULL 00/10] target-arm queue

2014-05-04 Thread Richard W.M. Jones
On Thu, May 01, 2014 at 03:54:57PM +0100, Peter Maydell wrote: > Nothing earthshattering here, but it does have the patch which > actually lets us boot an emulated AArch64 CPU on a board... Hi Peter, I have real aarch64 hardware, and I'm trying to find a version of qemu-system-aarch64 which will

Re: [Qemu-devel] [PULL 00/10] target-arm queue

2014-05-04 Thread Richard W.M. Jones
On Sun, May 04, 2014 at 07:48:38PM +0100, Peter Maydell wrote: > On 4 May 2014 19:30, Richard W.M. Jones wrote: > > I have real aarch64 hardware, and I'm trying to find a version of > > qemu-system-aarch64 which will boot a KVM guest in some form. > > > > Upstream

Re: [Qemu-devel] [PULL 00/10] target-arm queue

2014-05-04 Thread Richard W.M. Jones
I think this problem comes from my environment adding -fPIE. In any case, without that flag it doesn't crash in qemu (it kernel panics instead ..) Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wo

Re: [Qemu-devel] [PULL 00/10] target-arm queue

2014-05-04 Thread Richard W.M. Jones
On Sun, May 04, 2014 at 08:36:20PM +0100, Peter Maydell wrote: > OK, so you have a kernel (possibly just kernel config) problem > here -- this means QEMU got EPERM trying to open /dev/kvm. Yes for some reason it was 0600. I set it to 0666. > This isn't going to work for aarch64 at the moment bec

Re: [Qemu-devel] [PATCH v8 0/3] block: Add support for Secure Shell (ssh) block device.

2013-10-17 Thread Richard W.M. Jones
On Tue, Apr 09, 2013 at 10:56:30AM +0100, Richard W.M. Jones wrote: > Changes since v7: > > - fsync (ie. bdrv_co_flush_to_disk) is now supported, *if* you have > the following patches to libssh2 and OpenSSH: > > https://bugzilla.mindrot.org/show_bug.cgi?id=1798 > (OpenS

Re: [Qemu-devel] [PATCH] MAINTAINERS: add block driver sub-maintainers

2013-10-21 Thread Richard W.M. Jones
> +VHDX > +M: Jeff Cody > +S: Supported > +F: block/vhdx.c > + > +VDI > +M: Stefan Weil > +S: Maintained > +F: block/vdi.c > + > +iSCSI > +M: Ronnie Sahlberg > +M: Paolo Bonzini > +S: Supported > +F: block/iscsi.c > + > +SSH > +M: Richard W.M. Jon

Re: [Qemu-devel] [PATCH] MAINTAINERS: add block driver sub-maintainers

2013-10-21 Thread Richard W.M. Jones
On Mon, Oct 21, 2013 at 09:19:42PM +0100, Anthony Liguori wrote: > On Mon, Oct 21, 2013 at 2:26 PM, Stefan Hajnoczi wrote: > > There are a number of contributors who maintain block drivers (image > > formats and protocols). They should be listed in the MAINTAINERS file > > so that get_maintainer.

[Qemu-devel] Trying to get fstrim / discard=unmap to work

2014-03-10 Thread Richard W.M. Jones
I'm trying to get fstrim in a guest to cause the host disk to become sparse, without success so far. I wonder if anyone can see what I'm missing? Guest: - guest kernel: 3.13.4-200.fc20.x86_64 - ext4 guest filesystem - fstrim from util-linux 2.24.1 - cat /sys/block/sda/device/scsi_disk/*/prov

Re: [Qemu-devel] Trying to get fstrim / discard=unmap to work

2014-03-10 Thread Richard W.M. Jones
On Mon, Mar 10, 2014 at 04:11:20PM +, Richard W.M. Jones wrote: > Guest: > - guest kernel: 3.13.4-200.fc20.x86_64 > - ext4 guest filesystem > - fstrim from util-linux 2.24.1 > - cat /sys/block/sda/device/scsi_disk/*/provisioning_mode >unmap I noticed that I wasn&#x

Re: [Qemu-devel] Trying to get fstrim / discard=unmap to work

2014-03-10 Thread Richard W.M. Jones
On Mon, Mar 10, 2014 at 05:57:01PM +0100, Paolo Bonzini wrote: > Il 10/03/2014 17:14, Richard W.M. Jones ha scritto: > >On Mon, Mar 10, 2014 at 04:11:20PM +, Richard W.M. Jones wrote: > >>Guest: > >> - guest kernel: 3.13.4-200.fc20.x86_64 > >> - ext4 gues

Re: [Qemu-devel] Trying to get fstrim / discard=unmap to work

2014-03-11 Thread Richard W.M. Jones
Finally I tracked down the reason why my early test failed, but then it just started working "by magic". The reason is this: If you: - create an ext4 filesystem - mount it WITHOUT -o discard - create and remove some big files - unmount - mount -o discard - fstrim then the fstrim has no eff

[Qemu-devel] virtio-serial broken in qemu.git (was: Re: [PULL for-2.0-rc0 25/31] virtio-console: QOM cast cleanup for VirtConsole)

2014-03-13 Thread Richard W.M. Jones
git bisect is unsure, but one of these commits seems to have completely broken virtio-serial. There are only 'skip'ped commits left to test. The first bad commit could be any of: 0399a3819b27083ba69b88a9baa9025facab85bd 2ef66625f3a8978dcbbad773e6813f747971381e We cannot bisect more! An

Re: [Qemu-devel] virtio-serial broken in qemu.git (was: Re: [PULL for-2.0-rc0 25/31] virtio-console: QOM cast cleanup for VirtConsole)

2014-03-13 Thread Richard W.M. Jones
On Thu, Mar 13, 2014 at 03:32:05PM +, Richard W.M. Jones wrote: > Anyhow, the error is: > > hw/char/virtio-console.c:132:virtconsole_realize: Object 0x7f85482fb8a0 is > not an instance of type virtconsole > > The full log including command line is attached. Sorry, I re

Re: [Qemu-devel] [PATCH qom-next] virtio-console-test: Test virtserialport as well

2014-03-13 Thread Richard W.M. Jones
On Thu, Mar 13, 2014 at 04:51:10PM +0100, Andreas Färber wrote: > A test is only as good as its coverage - testing virtserialport in > addition to virtconsole shows that commit > 0399a3819b27083ba69b88a9baa9025facab85bd (virtio-console: QOM cast > cleanup for VirtConsole) broke virtserialport. Thi

Re: [Qemu-devel] [PATCH qom-next] virtio-console: Fix VIRTIO_CONSOLE() cast macro

2014-03-13 Thread Richard W.M. Jones
rtserialport, and use virtserialport type for casting. > > Note that virtio-serial-port is the abstract base type in > virtio-serial-bus.c, whereas virtserialport is the user-instantiatable > type in virtio-console.c. Therefore using TYPE_VIRTIO_CONSOLE_SERIAL_PORT. > > Reported-by

[Qemu-devel] fstrim & upstream kernel not working

2014-03-13 Thread Richard W.M. Jones
I got fstrim happily working in Fedora 20, but it's not working with the upstream kernel. The message is: fstrim -v /sysroot/ [ 45.541339] sda: WRITE SAME failed. Manually zeroing. /sysroot/: 47.2 MiB (49466368 bytes) trimmed While this isn't technically an error, it of course doesn't tr

Re: [Qemu-devel] fstrim & upstream kernel not working

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 01:30:40PM +0100, Paolo Bonzini wrote: > Il 13/03/2014 22:49, Richard W.M. Jones ha scritto: > >- Is there any reason why virtio-scsi doesn't emulate WRITE SAME? > > Yes, the reason is that you're using QEMU 1.7. :) > > >- Can you see w

Re: [Qemu-devel] fstrim & upstream kernel not working

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 01:47:59PM +0100, Paolo Bonzini wrote: > Il 14/03/2014 13:42, Richard W.M. Jones ha scritto: > >I worked around this in any case by rearranging the test [2]: > > > >Doing: > > > > rm /a_big_file > > fstrim / > > sync > >

Re: [Qemu-devel] fstrim & upstream kernel not working

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 02:28:24PM +0100, Paolo Bonzini wrote: > Il 14/03/2014 14:24, Richard W.M. Jones ha scritto: > >>> Could be a race condition (something going on in the background > >>> between rm and fstrim). > >Not much happens in the libguestfs applianc

Re: [Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long' for VHDX 64-bit constants

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 06:50:37AM -0400, Jeff Cody wrote: > On 32-bit hosts, some compilers will warn on too large integer constants > for constants that are 64-bit in length. Explicitly put a 'ULL' suffix > on those defines. > -#define VHDX_FILE_SIGNATURE 0x656C696678646876 /* "vhdxfile" in ASC

Re: [Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long' for VHDX 64-bit constants

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 03:38:55PM +, Peter Maydell wrote: > On 14 March 2014 15:36, Richard W.M. Jones wrote: > > On Fri, Mar 14, 2014 at 06:50:37AM -0400, Jeff Cody wrote: > >> On 32-bit hosts, some compilers will warn on too large integer constants > >> for c

Re: [Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long' for VHDX 64-bit constants

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 05:26:06PM +0100, Laszlo Ersek wrote: > (b) UINT64_C() is for "uint_least64_t" (7.18.4.1 Macros for > minimum-width integer constants). "uint_least64_t" is a required type > (7.18.1.2 Minimum-width integer types). > > In practice I'd say it doesn't matter which one we use:

Re: [Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long' for VHDX 64-bit constants

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 06:27:07PM +0100, Laszlo Ersek wrote: > *Why* someone would want to use an integer constant with type > "uint_least64_t" is a separate matter. One example follows -- assume all > of the below: > - suppose you write portable C99 source code, > - hence you can't take uint64_t

Re: [Qemu-devel] virtio device error reporting best practice?

2014-03-17 Thread Richard W.M. Jones
On Mon, Mar 17, 2014 at 02:40:09PM +, Peter Maydell wrote: > On 17 March 2014 14:28, Laszlo Ersek wrote: > > On 03/17/14 07:02, Dave Airlie wrote: > >> The main reason I'm considering this stuff is for security reasons if > >> the guest asks for something really illegal or crazy what should t

Re: [Qemu-devel] virtio device error reporting best practice?

2014-03-17 Thread Richard W.M. Jones
On Mon, Mar 17, 2014 at 02:57:41PM +, Richard W.M. Jones wrote: > > On Mon, Mar 17, 2014 at 02:40:09PM +, Peter Maydell wrote: > > On 17 March 2014 14:28, Laszlo Ersek wrote: > > > On 03/17/14 07:02, Dave Airlie wrote: > > >> The main reason I'm

Re: [Qemu-devel] [PATCH 19/26] ssh: migrate ssh driver QemuOptionParameter usage

2014-03-21 Thread Richard W.M. Jones
On Thu, Mar 20, 2014 at 09:13:26PM -0300, Leandro Dorileo wrote: > Do the directly migration from QemuOptionParameter to QemuOpts on > ssh block driver. > > Signed-off-by: Leandro Dorileo > --- > block/ssh.c | 29 + > 1 file changed, 13 insertions(+), 16 deletions(-)

Re: [Qemu-devel] QEMU segfault: Booting an overlay with backing_file over NBD: nbd.c:nbd_receive_request():L756: read failed

2015-01-29 Thread Richard W.M. Jones
On Thu, Jan 29, 2015 at 05:25:09PM +0100, Kashyap Chamarthy wrote: > A simple reproducer below. > > Export a disk image over NBD (I realize port 10809 is default, thought > I'd explicitly mention anyhow): > > $ qemu-nbd --f qcow2 -p10809 \ > /var/lib/libvirt/images/cirros-0.3.3-x86_64-d

Re: [Qemu-devel] address order of virtio-mmio devices

2015-01-29 Thread Richard W.M. Jones
On Thu, Jan 29, 2015 at 07:29:09PM +0100, Laszlo Ersek wrote: > On 01/29/15 19:15, Peter Maydell wrote: > > On 29 January 2015 at 17:25, Laszlo Ersek wrote: > >> I find that virtio-mmio devices are assigned highest-to-lowest addresses > >> as they are found on the command line. IOW, this code (fro

[Qemu-devel] [PATCH] Fix comparisons between implicit booleans and integers.

2015-01-30 Thread Richard W.M. Jones
-by: Richard W.M. Jones --- hw/net/virtio-net.c | 2 +- kvm-all.c | 2 +- qemu-img.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 45da34a..ba6afb8 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Richard W.M. Jones
On Tue, Feb 03, 2015 at 02:09:22PM -0500, Gabriel L. Somlo wrote: > qemu-system-x86_64 -guest-env="VAR1=value1;VAR2=value 2" -hda image.qcow2 libguestfs does this already by passing a few environment variables on the kernel command line. This requires a Linux guest kernel and that you're usin

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Fix comparisons between implicit booleans and integers.

2015-02-10 Thread Richard W.M. Jones
On Tue, Feb 10, 2015 at 10:15:35PM +0300, Michael Tokarev wrote: > 30.01.2015 14:52, Richard W.M. Jones wrote: > > In GCC 5 there is a new warning (-Wlogical-not-parentheses) which > > prevents you from writing: > > > > if ( == ) ... > > > > A typical

Re: [Qemu-devel] [PATCH 2/2] i6300esb: Fix signed integer overflow

2015-03-20 Thread Richard W.M. Jones
here can exceed 64-bits, before we divide by 33MHz, so > + * we use a 128-bit temporary > + */ > +timeout = (__int128_t)get_ticks_per_sec() * timeout / 3300; > > i6300esb_debug("stage %d, timeout %" PRIi64 "\n", d->stage, timeout); > > -- > 2.1.0 Re

Re: [Qemu-devel] [PATCH 1/2] i6300esb: Correct endiannness

2015-03-20 Thread Richard W.M. Jones
6300esb_mem_writel, > }, > }, > -.endianness = DEVICE_NATIVE_ENDIAN, > +.endianness = DEVICE_LITTLE_ENDIAN, > }; > > static const VMStateDescription vmstate_i6300esb = { Reviewed-by: Richard W.M. Jones - - - For your amusement, the physical device only ever e

Re: [Qemu-devel] [PATCH v2 2/2] i6300esb: Fix signed integer overflow

2015-03-23 Thread Richard W.M. Jones
* 20 bits of user supplied preload, and 15 bits of scale, the > + * multiply here can exceed 64-bits, before we divide by 33MHz, so > + * we use a 128-bit temporary > + */ > +timeout = muldiv64(get_ticks_per_sec(), timeout, 3300); ACK. Reviewed-by: Richard W.M. Jone

Re: [Qemu-devel] [PATCH v2 1/2] i6300esb: Correct endiannness

2015-03-23 Thread Richard W.M. Jones
6300esb_mem_writel, > }, > }, > -.endianness = DEVICE_NATIVE_ENDIAN, > +.endianness = DEVICE_LITTLE_ENDIAN, > }; > > static const VMStateDescription vmstate_i6300esb = { ACK. Reviewed-by: Richard W.M. Jones Rich. -- Richard Jones, Virtualization Group, R

Re: [Qemu-devel] [PATCH] aio: strengthen memory barriers for bottom half scheduling

2015-04-08 Thread Richard W.M. Jones
On Tue, Apr 07, 2015 at 05:16:19PM +0200, Paolo Bonzini wrote: > This bug is, most likely, also the cause of failures in the libguestfs > testsuite on AArch64. I'm afraid I have to agree with Laszlo, that this patch unfortunately does not cure the aarch64 race. The test case I'm using is: http://

Re: [Qemu-devel] [RFC PATCH 1/2] qga: Introduce guest-get-os-version command with stubs

2015-01-02 Thread Richard W.M. Jones
On Tue, Dec 16, 2014 at 09:23:46AM -0700, Eric Blake wrote: > On 12/16/2014 12:30 AM, zhanghailiang wrote: > > +# Since: 2.3 > > +## > > +{ 'type': 'GuestOSVersion', > > + 'data': {'name': 'str', 'type': 'int'} } > > 'name' feels a bit vague; it looks like you are intending to use the > string as

Re: [Qemu-devel] [question] How to get the guest physical memory usage from host?

2015-01-02 Thread Richard W.M. Jones
On Mon, Dec 22, 2014 at 12:41:45PM +0400, Andrey Korolyov wrote: > On Mon, Dec 22, 2014 at 6:59 AM, Zhang Haoyu > wrote: > > Hi, > > > > How to get the guest physical memory usage from host? > > I don't want to introduce a guest-agent to get the info. > > > > Thanks, > > Zhang Haoyu > > > > Ther

Re: [Qemu-devel] Does kvm friendly support GPT?

2015-01-02 Thread Richard W.M. Jones
On Mon, Dec 22, 2014 at 02:39:27PM +0800, Zhang Haoyu wrote: > Hi, > > When I perform P2V from native servers with win2008 to kvm vm, > some cases failed due to the physical disk was using GPT for partition, > and QEMU doesn't support GPT by default. > > And, I see in below site that OVMF can be

Re: [Qemu-devel] implement lvm-aware P2V to reduce time cost significantly for linux server

2015-01-02 Thread Richard W.M. Jones
On Fri, Jan 02, 2015 at 10:19:29AM +, Stefan Hajnoczi wrote: > On Sat, Dec 27, 2014 at 09:28:53AM +0800, Haoyu Zhang wrote: > > I want to P2V a redhat server to kvm vm, and lvm was used to manage disks > > in the redhat server. > > I want to only migrate the really used storage to vm image, whi

Re: [Qemu-devel] implement lvm-aware P2V to reduce time cost significantly for linux server

2015-01-02 Thread Richard W.M. Jones
On Sat, Jan 03, 2015 at 12:47:10AM +, Richard W.M. Jones wrote: > On Fri, Jan 02, 2015 at 10:19:29AM +, Stefan Hajnoczi wrote: > > On Sat, Dec 27, 2014 at 09:28:53AM +0800, Haoyu Zhang wrote: > > > I want to P2V a redhat server to kvm vm, and lvm was used to manage

Re: [Qemu-devel] [PATCH] i6300esb: fix reading config registers and accept writes of all length

2014-11-30 Thread Richard W.M. Jones
On Wed, Oct 29, 2014 at 02:42:51PM +0100, Adam Hoka wrote: > Don't require configuration register write to be off a certain length, > as some PCI implementations always access them in 32bit only. This is > because it's in fact the only kind of access supported by the standard, > anything else is im

Re: [Qemu-devel] How does qemu know the virtual memory of the guest os?

2014-11-30 Thread Richard W.M. Jones
On Fri, Nov 28, 2014 at 04:17:10PM -0800, Jidong Xiao wrote: > Hi, > > I notice that Qemu supports dump virtual memory of Guest OS. As this > page suggests: > > > http://doc.opensuse.org/products/draft/SLES/SLES-kvm_sd_draft/cha.qemu.monitor.html > > To save the content of the virtual m

[Qemu-devel] [PATCH] arm: dtb: Align dtb to 64K because some kernels use 64K page size.

2014-12-01 Thread Richard W.M. Jones
Resolves: https://bugs.launchpad.net/qemu/+bug/1383857 Signed-off-by: Richard W.M. Jones --- hw/arm/boot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 0014c34..a859922 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -632,11

Re: [Qemu-devel] [PATCH] i6300esb: fix reading config registers and accept writes of all length

2014-12-02 Thread Richard W.M. Jones
On Tue, Dec 02, 2014 at 07:25:51PM +0100, Adam Hoka wrote: > On 11/30/2014 11:31 PM, Richard W.M. Jones wrote: > >http://git.annexia.org/?p=watchdog-test-framework.git;a=summary > > > >Rich. > > Thanks for the feedback. I guess I could test it on Linux. Should I > ju

Re: [Qemu-devel] Cubietruck: cannot create KVM guests: "kvm_init_vcpu failed: Invalid argument"

2014-12-09 Thread Richard W.M. Jones
On Tue, Dec 09, 2014 at 11:50:31AM +0100, Kashyap Chamarthy wrote: > Booting a minimal KVM guest throws the below error on Cubietruck: > > "kvm_init_vcpu failed: Invalid argument" > > More context and an easy reproducer in this QEMU bug[1] for Fedora. > > Context quoting Rich Jones from commen

Re: [Qemu-devel] Cubietruck: cannot create KVM guests: "kvm_init_vcpu failed: Invalid argument"

2014-12-09 Thread Richard W.M. Jones
On Tue, Dec 09, 2014 at 10:53:41AM +, Peter Maydell wrote: > On 9 December 2014 at 10:50, Kashyap Chamarthy wrote: > > Booting a minimal KVM guest throws the below error on Cubietruck: > > > > "kvm_init_vcpu failed: Invalid argument" > > > > More context and an easy reproducer in this QEMU b

Re: [Qemu-devel] [PATCH v2] arm: add fw_cfg to "virt" board

2014-12-09 Thread Richard W.M. Jones
On Tue, Dec 09, 2014 at 03:47:44PM +, Peter Maydell wrote: > On 9 December 2014 at 15:41, Laszlo Ersek wrote: > > Again, this was the idea that Rich had in 2010 (see the links in the > > discussion thus far). It was rejected back then (which is why I didn't > > even try to resurrect it now), a

Re: [Qemu-devel] [PATCH v3 6/7] hw/arm: pass pristine kernel image to guest firmware over fw_cfg

2014-12-12 Thread Richard W.M. Jones
On Fri, Dec 12, 2014 at 03:10:42PM +0100, Laszlo Ersek wrote: > Sure, if you have a kernel image (with the EFI stub) that is an > *immediately executable* EFI binary, then you can just go to the UEFI > shell, navigate to the filesystem / directory that hosts that image, and > run it. (Similarly, PX

Re: [Qemu-devel] [PATCH v4 7/8] hw/arm: pass pristine kernel image to guest firmware over fw_cfg

2014-12-16 Thread Richard W.M. Jones
On Tue, Dec 16, 2014 at 12:25:41PM +, Peter Maydell wrote: > On 16 December 2014 at 12:20, Alexander Graf wrote: > > The patch as is assumes that AArch64 images are always gzipped. I don't > > think this assumption is correct - if you do "make Image" on a kernel > > source tree, you will get a

Re: [Qemu-devel] [PATCH] watchdog: convert to QemuOpts

2015-05-27 Thread Richard W.M. Jones
On Wed, May 27, 2015 at 02:35:26PM +0200, Paolo Bonzini wrote: > case QEMU_OPTION_watchdog: > -if (watchdog) { > -fprintf(stderr, > -"qemu: only one watchdog option may be given\n"); > -return 1; > +

Re: [Qemu-devel] [PATCH] watchdog: convert to QemuOpts

2015-05-27 Thread Richard W.M. Jones
On Wed, May 27, 2015 at 02:45:29PM +0200, Paolo Bonzini wrote: > > > On 27/05/2015 14:41, Richard W.M. Jones wrote: > >> > -if (watchdog) { > >> > -fprintf(stderr, > >> > -"qem

Re: [Qemu-devel] [PATCH v2] watchdog: convert to QemuOpts

2015-05-27 Thread Richard W.M. Jones
On Wed, May 27, 2015 at 03:09:01PM +0200, Paolo Bonzini wrote: > This makes it possible to specify a watchdog action in a configuration file. > The previous behavior of "-watchdog" is moved to the (implied) "-watchdog > model" suboption. This is already more or less obsolete, since it is possible

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add jcody as blockjobs, block devices maintainer

2015-03-06 Thread Richard W.M. Jones
On Fri, Mar 06, 2015 at 03:08:29PM -0600, Stefan Hajnoczi wrote: > You don't need to do anything different. Jeff will make sure your acked > patches get merged instead of Kevin or me once this MAINTAINERS commit > is in qemu.git/master. Sounds sensible, thanks Jeff. Rich. -- Richard Jones, Vir

Re: [Qemu-devel] x86 emulation on ARM host (Samsung Chromebook)

2014-05-27 Thread Richard W.M. Jones
On Wed, May 21, 2014 at 12:57:59PM +, Violaine V. wrote: > Hi everyone, > > I’m trying to use QEMU (qemu-system-x86_64) to emulate an x86 virtual > machine on an ARM host : a Samsung Chromebook with Cortex-A15 CPU. The Chromebook only has 2 GB of RAM and a relatively slow 32 bit processor, an

Re: [Qemu-devel] Disk image fuzz testing (OPW)

2014-05-27 Thread Richard W.M. Jones
On Mon, May 26, 2014 at 01:53:57PM +0400, M.Kustova wrote: > About fuzzer effectiveness. 'qemu-img' was set as the fuzzer target, > so its commands under interest are any that modify or/and read an > image. As first step, a tested command will be selected randomly or > specified by user. qemu-io w

Re: [Qemu-devel] Disk image fuzz testing (OPW)

2014-05-27 Thread Richard W.M. Jones
A few years ago I suggested a way to use systemtap probes to do feedback-directed fuzz-testing: http://rwmj.wordpress.com/2010/11/22/half-baked-ideas-feedback-directed-fuzz-testing-of-filesystems/#content When I tried to implement it, it turned out to mainly uncover bugs in systemtap :-/ Rich.

[Qemu-devel] [PATCH] block/raw-posix: Open file descriptor O_RDWR to work around glibc posix_fallocate emulation issue.

2015-09-30 Thread Richard W.M. Jones
tly, or (this fix) work around the problem in qemu by opening the file with O_RDWR instead of O_WRONLY. Signed-off-by: Richard W.M. Jones BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1265196 --- block/raw-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/raw-pos

Re: [Qemu-devel] [PATCH] block/raw-posix: Open file descriptor O_RDWR to work around glibc posix_fallocate emulation issue.

2015-10-02 Thread Richard W.M. Jones
On Fri, Oct 02, 2015 at 03:36:04PM +0100, Peter Maydell wrote: > On 29 September 2015 at 16:54, Richard W.M. Jones wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=1265196 > > > > The following command fails on an NFS mountpoint: > > > > $ qemu-img

Re: [Qemu-devel] qemu-system-arm command line question

2015-10-02 Thread Richard W.M. Jones
On Fri, Oct 02, 2015 at 02:15:20PM -0400, Gabriel L. Somlo wrote: > Trying to adapt the command line used with 32-bit arm, I ran: > > bin/qemu-system-aarch64 -M virt,accel=tcg -m 2048 -cpu cortex-a57 \ > -kernel ./vmlinuz-4.0.4-301.fc22.aarch64 \ > -initrd ./initramfs-4.0.4-301.fc22.aarch64.im

[Qemu-devel] Safety of killing qemu when it is doing an fstrim

2015-11-03 Thread Richard W.M. Jones
I wrote a tool called virt-sparsify which runs fstrim on disks via qemu. My colleague asked me a good question: Is this safe if qemu is killed (^C)? Could it corrupt the guest? Using 'virt-sparsify --inplace disk.img' is essentially equivalent to doing: qemu-kvm \ -kernel \ -drive f

[Qemu-devel] Should 'qemu-img commit' sparsify the backing file?

2015-11-04 Thread Richard W.M. Jones
This doesn't work (I tested both qemu 2.3 and qemu from git). Should it? (1) Create a non-sparse guest image: $ virt-builder fedora-22 $ mv fedora-22.img fedora-22.img.sparse $ cp --sparse=never fedora-22.img.sparse fedora-22.img $ du -sh fedora-22.img 6.1G fedora-22.img (2) Add a snapshot on

Re: [Qemu-devel] Should 'qemu-img commit' sparsify the backing file?

2015-11-05 Thread Richard W.M. Jones
On Thu, Nov 05, 2015 at 03:14:49PM +0800, Fam Zheng wrote: > I don't think this the purpose of "qemu-img commit". Committing > "new" data in overlay.qcow2 has little to do with discarding backing > image's fragments where there are only explict zeroes. In that case, why didn't this step sparsify t

Re: [Qemu-devel] Should 'qemu-img commit' sparsify the backing file?

2015-11-05 Thread Richard W.M. Jones
On Thu, Nov 05, 2015 at 05:46:01PM +0800, Fam Zheng wrote: > Does virt-sparsify work if there is no file system present (e.g. the disk is > fully filled with zeroes) on the device? It doesn't do anything bad, but it doesn't currently do that. You could do that using: guestfish

Re: [Qemu-devel] how to setup a watchdog?

2016-01-30 Thread Richard W.M. Jones
On Mon, Jan 18, 2016 at 11:43:02AM +, lejeczek wrote: > apologies I bother devel, but.. > I tried to get help on libvirt mailing list but not luck, then qemu, > still nothing > I hope maybe somebody here? > > I'm trying Qemu's watchdog. > My understanding was that hardware (here qemu's watchdo

Re: [Qemu-devel] [PATCH v2 0/4] set the OEM fields in the RSDT and the FADT from the SLIC

2016-02-03 Thread Richard W.M. Jones
On Wed, Feb 03, 2016 at 10:02:40PM +0300, Michael Tokarev wrote: > 03.02.2016 21:51, Laszlo Ersek wrote: > > Ping #2. > > I think I asked this before, but somehow I don't see anyone > answered. Is this thing worth to have now, when windows7 is > 2 releases away, everyone is moving to windows8 or

Re: [Qemu-devel] [PATCH 0/4] set the OEM fields in the RSDT and the FADT from the SLIC

2016-01-14 Thread Richard W.M. Jones
On Thu, Jan 14, 2016 at 02:36:53AM +0100, Laszlo Ersek wrote: > This matters mostly for Win7 installations that were converted with p2v. > Testing feedback from such environments would be appreciated. Just to note first that no RHEL customer has ever reported this bug to us. To test this is going

Re: [Qemu-devel] [PATCH 0/4] set the OEM fields in the RSDT and the FADT from the SLIC

2016-01-14 Thread Richard W.M. Jones
On Thu, Jan 14, 2016 at 01:06:05PM +0300, Alex wrote: > Richard, I just posted HW test results to > https://bugzilla.redhat.com/show_bug.cgi?id=1248758. > Should I do it here instead? I saw that. Testing a virt-p2v conversion is a lot more involved. It would involve something like this: (1) Ins

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