Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf

2016-04-18 Thread Richard W.M. Jones
On Mon, Apr 18, 2016 at 09:10:36AM +0800, Fam Zheng wrote: > On Sun, 04/17 20:27, Richard W.M. Jones wrote: > > On Fri, Apr 15, 2016 at 11:27:55AM +0800, Fam Zheng wrote: > > > virtlockd in libvirt locks the first byte, we lock byte 1 to avoid > > > the intervene.

Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf

2016-04-17 Thread Richard W.M. Jones
On Fri, Apr 15, 2016 at 11:27:55AM +0800, Fam Zheng wrote: > virtlockd in libvirt locks the first byte, we lock byte 1 to avoid > the intervene. > +static int raw_lockf(BlockDriverState *bs, BdrvLockfCmd cmd) > +{ > + > +BDRVRawState *s = bs->opaque; > +int ret; > +struct flock fl = (st

Re: [Qemu-devel] [PATCH for-2.7 00/15] block: Lock images when opening

2016-04-17 Thread Richard W.M. Jones
On Wed, Apr 13, 2016 at 05:09:49PM +0800, Fam Zheng wrote: > Underneath is the fcntl syscall that locks the local file, similar to what is > already used in libvirt virtlockd. Also because of that, we cannot directly > apply fcntl lock on the image file itself, instead we open and lock > "/var/tm

Re: [Qemu-devel] [libvirt] RFC: virtio-rng and /dev/urandom

2016-04-15 Thread Richard W.M. Jones
On Fri, Apr 15, 2016 at 12:46:46PM +0100, Richard W.M. Jones wrote: > On Fri, Apr 15, 2016 at 06:41:34AM -0400, Cole Robinson wrote: > > Libvirt currently rejects using host /dev/urandom as an input source for a > > virtio-rng device. The only accepted sources are /dev/random

Re: [Qemu-devel] RFC: virtio-rng and /dev/urandom

2016-04-15 Thread Richard W.M. Jones
On Fri, Apr 15, 2016 at 06:41:34AM -0400, Cole Robinson wrote: > Libvirt currently rejects using host /dev/urandom as an input source for a > virtio-rng device. The only accepted sources are /dev/random and /dev/hwrng. > This is the result of discussions on qemu-devel around when the feature was >

[Qemu-devel] [PATCH v2 REPOST 1/2] Add dynamic module loading for block drivers

2016-04-12 Thread Richard W.M. Jones
From: Marc Marí Extend the current module interface to allow for block drivers to be loaded dynamically on request. The only block drivers that can be converted into modules are the drivers that don't perform any init operation except for registering themselves. This is why libiscsi has been dis

[Qemu-devel] [PATCH v2 REPOST 2/2] Add dynamic generation of module_block.h

2016-04-12 Thread Richard W.M. Jones
From: Marc Marí To simplify the addition of new block modules, add a script that generates include/qemu/module_block.h automatically from the modules' source code. This script assumes that the QEMU coding style rules are followed. Signed-off-by: Marc Marí --- .gitignore |

[Qemu-devel] [PATCH v2 REPOST 0/2] Add dynamic module loading for block drivers

2016-04-12 Thread Richard W.M. Jones
This is a repost of the support for dynamically loaded block drivers. It is identical to how it was posted last summer, except that I have rebased it and checked that it still works. It was last posted here: https://lists.gnu.org/archive/html/qemu-devel/2015-09/threads.html#01995 Last time this

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

2016-04-05 Thread Richard W.M. Jones
> > OK so this reminds me of the second problem. How to detect what > > bioses are available, given a qemu binary. It would be nice if qemu > > had an option like: > > > > qemu -bios \? I didn't really think this one through. The extra time taken (in the link loader) to run the above query c

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

2016-04-05 Thread Richard W.M. Jones
On Tue, Apr 05, 2016 at 06:38:36AM +0200, Kevin Wolf wrote: > Am 01.04.2016 um 13:20 hat Richard W.M. Jones geschrieben: > > > > My patch, plus the configuration and comments from your patch, > > combined. Plus I tested it with libguestfs boot-analysis and it works

Re: [Qemu-devel] [PATCH v4.1] Add optionrom compatible with fw_cfg DMA version

2016-04-04 Thread Richard W.M. Jones
On Mon, Apr 04, 2016 at 04:02:04PM +0100, Stefan Hajnoczi wrote: > (1) initrd loading is broken, kernel complains it finds only gibberish: > > [0.934582] Unpacking initramfs... > [1.166983] Initramfs unpacking failed: junk in compressed archive > [1.168458] Freeing initrd memor

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

2016-04-02 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 06:25:24PM -0400, Kevin O'Connor wrote: > I'm getting different results. When you have time we should probably > track down the discrepancy. Some of the difference is likely due to > different hardware (I'm using kvm on an old AMD machine) and some is > likely due to diffe

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

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 04:05:46PM -0400, Kevin O'Connor wrote: > On Fri, Apr 01, 2016 at 07:41:31PM +0100, Richard W.M. Jones wrote: > > On Fri, Apr 01, 2016 at 11:35:40AM -0400, Kevin O'Connor wrote: > > > > +# general stuff > > > > +CONFIG_QEMU=y &g

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

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 03:44:14PM -0400, Kevin O'Connor wrote: [...] I ran all the tests again, but this time I ran the test program 3 times (so 30 passes for each setting). As you can see from the results below the test is not very stable, so that could easily have accounted for the variation I

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

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 08:10:48PM +0100, Richard W.M. Jones wrote: > On Fri, Apr 01, 2016 at 03:04:15PM -0400, Kevin O'Connor wrote: > > Otherwise, it doesn't make > > sense that disabling CONFIG_BOOTORDER=n would change the boot time. > > Could it be explained by

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

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 03:04:15PM -0400, Kevin O'Connor wrote: > On Fri, Apr 01, 2016 at 07:59:02PM +0100, Richard W.M. Jones wrote: > > On Fri, Apr 01, 2016 at 07:41:31PM +0100, Richard W.M. Jones wrote: > > > Below are some benchmarks of the other things you mentioned. T

[Qemu-devel] [PATCH v4] bios: Add fast variant of SeaBIOS for use with -kernel on x86.

2016-04-01 Thread Richard W.M. Jones
The previous version was posted and discussed on this thread: https://lists.nongnu.org/archive/html/qemu-devel/2016-04/threads.html#00013 Since v3: - CONFIG_ROM_SIZE=0 (it chooses 64K automatically) - CONFIG_RELOCATE_INIT=n - CONFIG_BOOTORDER=n Knocks another 10ms off the boot time. Ric

[Qemu-devel] [PATCH v4] bios: Add fast variant of SeaBIOS for use with -kernel on x86.

2016-04-01 Thread Richard W.M. Jones
he -kernel option to use this. You have to specify it by doing something like this: -kernel vmlinuz -bios bios-fast.bin Signed-off-by: Richard W.M. Jones --- Makefile | 3 ++- roms/Makefile| 4 +++- roms/config.seabios-fast | 27 +++

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

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 07:41:31PM +0100, Richard W.M. Jones wrote: > Below are some benchmarks of the other things you mentioned. These > are complete appliance boot-to-shutdown times [*not* just SeaBIOS]. > All debugging has been disabled, and I'm using a slightly different > k

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

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 11:35:40AM -0400, Kevin O'Connor wrote: > > +# general stuff > > +CONFIG_QEMU=y > > +CONFIG_ROM_SIZE=128 > > Why force a size of 128K - I would think 64K would be fine. Agreed. Setting this to =0 seems the best thing, and it does fit fine inside 64K. > > +# no input, no

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

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 10:58:19AM -0400, Kevin O'Connor wrote: > On Fri, Apr 01, 2016 at 09:44:56AM +0100, 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: > > > >

[Qemu-devel] [PATCH v4.1] Add optionrom compatible with fw_cfg DMA version

2016-04-01 Thread Richard W.M. Jones
From: Marc Marí This optionrom is based on linuxboot.S. Signed-off-by: Marc Marí Signed-off-by: Richard W.M. Jones --- .gitignore| 4 + hw/i386/pc.c | 9 +- hw/nvram/fw_cfg.c | 2 +- include/hw/nvram/fw_cfg.h | 1

[Qemu-devel] [PATCH v4.1] Add optionrom compatible with fw_cfg DMA version

2016-04-01 Thread Richard W.M. Jones
This is an updated version of Marc Marí's Linux DMA patch, based on version 4 from: https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg05891.html All I have done for my "4.1" version is: - Modify it so it compiles against the latest qemu. There was a change to how fw_cfg.h is split (6

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

2016-04-01 Thread Richard W.M. Jones
oup, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html >From 8cdf91f13949ab46c6a5804b968400d404c4e00e Mon Sep 17 00:00:00 2001 From: "Richard W.M.

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

2016-04-01 Thread Richard W.M. Jones
On Fri, Apr 01, 2016 at 01:21:38PM +0200, Paolo Bonzini wrote: > > > 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_PIRTA

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

2016-04-01 Thread Richard W.M. Jones
tion blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html >From 28a442fdf8036bde075c75088f8dae8d8568243a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 1 Apr 2016 11:35:09 +0100 Subject: [PATCH] bios: Add fast var

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

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] 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 wa

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 con

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

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 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=

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 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? >

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

2016-03-31 Thread Richard W.M. Jones
[This time without the massive attachment] On Thu, Mar 31, 2016 at 12:22:23PM -0400, Kevin O'Connor wrote: > On Thu, Mar 31, 2016 at 10:21:25AM +0100, Stefan Hajnoczi wrote: > > On Sat, Mar 19, 2016 at 08:31:24PM +0000, Richard W.M. Jones wrote: > > > Is there something I&

[Qemu-devel] [PATCH] exec: Rename and fix trace events for tracing I/O port access.

2016-03-29 Thread Richard W.M. Jones
Back in the day you used to be able to set DEBUG_IOPORT in ioport.c and get qemu to dump what (x86) I/O ports were being accessed by the guest. This was rather useful for finding out what closed source device drivers were up to. Now you're supposed to use cpu_in/cpu_out tracepoints instead. Howev

[Qemu-devel] [PATCH] exec: Rename and fix trace events for tracing I/O port access.

2016-03-29 Thread Richard W.M. Jones
re obvious what they do. Also: - they now work for 64 bit accesses - print the read/written value in hexadecimal Signed-off-by: Richard W.M. Jones --- exec.c | 10 +- ioport.c | 7 --- trace-events | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v4] Add optionrom compatible with fw_cfg DMA version

2016-03-21 Thread Richard W.M. Jones
My notes on this patch: * It applies and compiles fine with current qemu on Linux/x86_64 host. However after building I had to do: cp pc-bios/optionrom/linuxboot_dma.bin pc-bios/ I wasn't sure if that was supposed to be done automatically. * It reduces libguestfs appliance boot time by ab

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

2016-03-21 Thread Richard W.M. Jones
On Mon, Mar 21, 2016 at 08:58:27AM +0100, Gerd Hoffmann wrote: > On Sa, 2016-03-19 at 20:31 +0000, Richard W.M. Jones wrote: > > I've been analyzing the libguestfs appliance[1] boot time. See > > attached file, especially the end of it. > > > > About 50% of the

[Qemu-devel] [PATCH] docs: Update documentation for stderr (now log) tracing backend.

2016-03-20 Thread Richard W.M. Jones
This fixes commit ed7f5f1d8db06fc31352a5ef4f54985e630c575a. Signed-off-by: Richard W.M. Jones. Cc: Paolo Bonzini Cc: Stefan Hajnoczi --- docs/tracing.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tracing.txt b/docs/tracing.txt index 3182ee8..0bd6b9c 100644

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

2016-03-19 Thread Richard W.M. Jones
I've been analyzing the libguestfs appliance[1] boot time. See attached file, especially the end of it. About 50% of the boot time is because of SeaBIOS. I'm using the qemu -kernel option. I understand that the kernel needs some BIOS features, eg. video stuff, E820. But kvmtool comes with a r

[Qemu-devel] Is 'hwclock -u -s' in a modern Linux guest necessary?

2016-03-19 Thread Richard W.M. Jones
I've been examining the time taken to launch the libguestfs appliance[1]. One of the commands we run in our custom init is: hwclock -u -s This takes 0.3 seconds, which is over 10% of the total launch time, and as far as I can tell it does nothing useful. It was added many years ago, and no on

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] 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 0/4] set the OEM fields in the RSDT and the FADT from the SLIC

2016-01-21 Thread Richard W.M. Jones
On Thu, Jan 21, 2016 at 02:42:02PM +0300, Michael Tokarev wrote: > 21.01.2016 14:37, Richard W.M. Jones wrote: > > > I'm afraid I gave up on this -- did give it my best. It turns out > > that the machine that I thought supported UEFI boot does not. I'll > >

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

2016-01-21 Thread Richard W.M. Jones
On Thu, Jan 14, 2016 at 05:35:21PM +0100, Laszlo Ersek wrote: > On 01/14/16 11:23, Richard W.M. Jones wrote: > > 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=124875

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

2016-01-15 Thread Richard W.M. Jones
On Thu, Jan 14, 2016 at 05:35:21PM +0100, Laszlo Ersek wrote: > On 01/14/16 11:23, Richard W.M. Jones wrote: > > 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=124875

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

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

[Qemu-devel] ANNOUNCE: libguestfs 1.32 released

2016-01-06 Thread Richard W.M. Jones
I'm pleased to announce libguestfs 1.32, a library and set of tools for accessing and modifying virtual machine disk images. This release took 6 months of work by many people - see release notes below. You can get libguestfs 1.32 here: Main website: http://libguestfs.org/ Source: http://li

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] 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

[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

[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

Re: [Qemu-devel] [PATCH v5 3/4] pcie: Add some SR/IOV API documentation in docs/pcie_sriov.txt

2015-10-16 Thread Richard W.M. Jones
On Fri, Oct 16, 2015 at 01:54:48PM +0300, Michael S. Tsirkin wrote: > On Fri, Oct 16, 2015 at 11:56:39AM +0200, Knut Omang wrote: > > But feel free to just skip this patch, the most important is to get the > > generic SR/IOV code in there for others to use. > > That's my question. Is it for others

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

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

[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 2/2] target-ppc: fix xscmpodp and xscmpudp decoding

2015-09-20 Thread Richard W.M. Jones
), > +GEN_XX2IFORM(xscmpudp, 0x0C, 0x04, PPC2_VSX), > GEN_XX3FORM(xsmaxdp, 0x00, 0x14, PPC2_VSX), > GEN_XX3FORM(xsmindp, 0x00, 0x15, PPC2_VSX), > GEN_XX2FORM(xscvdpsp, 0x12, 0x10, PPC2_VSX), This particular patch fixed a number of crashes I was experiencing in libm in Fedora 22

Re: [Qemu-devel] [PATCH] block/ssh: remove dead code

2015-09-14 Thread Richard W.M. Jones
On Mon, Sep 14, 2015 at 01:12:34PM +0200, Paolo Bonzini wrote: > The "err" label cannot be reached with qp != NULL. Remove the free-ing > of qp and avoid future regressions by removing the initializer. > > Signed-off-by: Paolo Bonzini > --- > block/ssh.c | 5 + > 1 file changed, 1 insertion

Re: [Qemu-devel] [PATCH 1/2] acpi: Allow ACPI default OEM ID and OEM table ID fields to be set.

2015-09-03 Thread Richard W.M. Jones
Long comment from the bug reporter in case anyone isn't following that bug: https://bugzilla.redhat.com/show_bug.cgi?id=1248758#c15 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt

Re: [Qemu-devel] [PATCH 1/2] acpi: Allow ACPI default OEM ID and OEM table ID fields to be set.

2015-09-02 Thread Richard W.M. Jones
On Wed, Sep 02, 2015 at 08:03:37PM +0100, Richard W.M. Jones wrote: > When using qemu's internal ACPI table generation, qemu sets the fields > OEM ID and OEM table ID to arbitrary default values. OEM ID is set to > "BOCHS " and OEM table ID is set to "BXPC"

[Qemu-devel] [PATCH 1/2] acpi: Allow ACPI default OEM ID and OEM table ID fields to be set.

2015-09-02 Thread Richard W.M. Jones
he ACPI table name. This does not affect the -acpitable option (for user-defined ACPI tables), which has its own method for setting these fields. Signed-off-by: Richard W.M. Jones BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1248758 --- hw/acpi/aml-build.c | 44 +

[Qemu-devel] [PATCH 2/2] acpi: Remove unused definition.

2015-09-02 Thread Richard W.M. Jones
Signed-off-by: Richard W.M. Jones --- include/hw/acpi/aml-build.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 85a3c2c..7392aca 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -9,8 +9,6

[Qemu-devel] [PATCH 1/2] acpi: Allow ACPI default OEM ID and OEM table ID fields to be set.

2015-09-02 Thread Richard W.M. Jones
A couple of patches allowing two default fields in the ACPI table headers to be set. The motivation for this is to avoid the need for the following patch which Debian is carrying downstream to fix some Windows guests that have been converted to KVM using virt-p2v (or direct copy of disks): Patch

Re: [Qemu-devel] qemu-system-s390x command line

2015-08-31 Thread Richard W.M. Jones
On Mon, Aug 31, 2015 at 07:09:34PM +0200, Thomas Huth wrote: > On 30/08/15 23:27, Richard W.M. Jones wrote: > > On Sun, Aug 30, 2015 at 11:02:17PM +0200, Alexander Graf wrote: > >> > >> > >>> Am 30.08.2015 um 22:11 schrieb Richard W.M. Jones : > >>&g

Re: [Qemu-devel] qemu-system-s390x command line

2015-08-30 Thread Richard W.M. Jones
On Sun, Aug 30, 2015 at 11:02:17PM +0200, Alexander Graf wrote: > > > > Am 30.08.2015 um 22:11 schrieb Richard W.M. Jones : > > > > Hi Alex, > > > > Do you or anyone have a working qemu-system-s390x command line I can > > use as a starting point to

[Qemu-devel] qemu-system-s390x command line

2015-08-30 Thread Richard W.M. Jones
Hi Alex, Do you or anyone have a working qemu-system-s390x command line I can use as a starting point to boot a [TCG] guest? So far I have tried variations of: ~/d/qemu/s390x-softmmu/qemu-system-s390x -M s390-ccw-virtio -m 1024 -smp 1 -drive file=s390x.img,if=none,id=disk0 -device virtio-blk-c

Re: [Qemu-devel] [PATCH][TRIVIAL] i6300esb: fix timer overflow

2015-08-04 Thread Richard W.M. Jones
On Tue, Aug 04, 2015 at 10:27:31AM +0200, Laurent Vivier wrote: > --- a/hw/watchdog/wdt_i6300esb.c > +++ b/hw/watchdog/wdt_i6300esb.c > @@ -136,7 +136,7 @@ static void i6300esb_restart_timer(I6300State *d, int > stage) > * multiply here can exceed 64-bits, before we divide by 33MHz, so >

Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds

2015-08-04 Thread Richard W.M. Jones
On Mon, Aug 03, 2015 at 03:52:28PM +0200, Laurent Vivier wrote: > +/* A 33 Mhz clock gives a 30 ns tick, > + * convert timeout from ticks to ns > */ > -timeout = muldiv64(get_ticks_per_sec(), timeout, 3300); > +timeout *= 30; I see that you've just posted a v2 of this pat

Re: [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds

2015-08-03 Thread Richard W.M. Jones
On Mon, Aug 03, 2015 at 04:28:14PM +0200, Laurent Vivier wrote: > > > On 03/08/2015 15:52, Laurent Vivier wrote: > > Originally, qemu_mod_timer() was using ticks to count time. > > And i6300esb was converting internal clock ticks (33 MHz) to > > QEMU timer ticks. > > > > The timer has been chang

[Qemu-devel] [PATCH v3] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
d in the Error** errp struct, so it is printed correctly: $ ./qemu-img create -f qcow2 overlay -b ssh://xen/ qemu-img: overlay: address resolution failed for xen:22: No address associated with hostname Signed-off-by: Richard W.M. Jones Reported-by: Jun Li BZ: https://bugzilla.redhat.com/sh

[Qemu-devel] [PATCH v3] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
v3: Same as v2 but set the return value to -EIO.

Re: [Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
On Wed, Jul 22, 2015 at 09:17:49AM -0400, Jeff Cody wrote: > Both nbd and sheepdog handle it in a similar fashion (i.e. not relying > on errno being set on inet_connect failure). However, both nbd and > sheepdog use -EIO as the error return, and I think that makes more > sense. What do you think?

Re: [Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
On Wed, Jul 22, 2015 at 02:10:51PM +0100, Daniel P. Berrange wrote: > There are a reasonable number of other uses of inet_connect() in QEMU, > so can't we fix inet_connect() itself to set EINVAL in the error case > instead of just fixing one caller. The only users I can find are block/nbd.c and bl

Re: [Qemu-devel] [PATCH] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
On Wed, Jul 22, 2015 at 01:07:53PM +0100, Richard W.M. Jones wrote: > On some (but not all) systems: > > $ qemu-img create -f qcow2 overlay -b ssh://xen/ > Segmentation fault > > It turns out this happens when inet_connect returns NULL in the > following code, bu

[Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
s printed correctly: $ ./qemu-img create -f qcow2 overlay -b ssh://xen/ qemu-img: overlay: address resolution failed for xen:22: No address associated with hostname Signed-off-by: Richard W.M. Jones Reported-by: Jun Li BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1147343 --- block/ssh.c | 2

[Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
v2: I fixed several mistakes in the commit message. The code change is the same as before. Rich.

[Qemu-devel] [PATCH] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-22 Thread Richard W.M. Jones
create -f qcow2 overlay -b ssh://xen/ qemu-img: overlay: address resolution failed for xen:22: No address associated with hostname BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1147343 Signed-off-by: Richard W.M. Jones --- block/ssh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

Re: [Qemu-devel] [PATCH v4 0/6] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-22 Thread Richard W.M. Jones
ifier_test_and_clear I ran this overnight through many iterations with no problems seen. Therefore: Tested-by: Richard W.M. Jones Rich. -- $ while true; do echo -n .; LIBGUESTFS_HV=/home/rjone

[Qemu-devel] ANNOUNCE: libguestfs 1.30 released

2015-07-21 Thread Richard W.M. Jones
nial of service problems when using qemu-img info When using the American Fuzzy Lop fuzzer (afl-fuzz) on the qemu-img info command, Richard W.M. Jones found that certain files can cause the qemu-img program to use lots of memory and time (for example 6GB of heap and 14

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-19 Thread Richard W.M. Jones
I tested this patch series, plus 'AioContext: fix missing wakeups due to event_notifier_test_and_clear' overnight, and there were no failures after something like 2500 iterations. So: Tested-by: Richard W.M. Jones Rich. -- Richard Jones, Virtualization Group, Re

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-17 Thread Richard W.M. Jones
On Fri, Jul 17, 2015 at 02:48:40PM +0100, Marc Zyngier wrote: > Still: there is nothing in the registers that remotely points to that > area. X0 is the closest, but it'd take a big negative offset to get > there. > > Is that a Linux kernel? or something else? You're sure it's not this one? https:

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-17 Thread Richard W.M. Jones
On Fri, Jul 17, 2015 at 11:30:38AM +0200, Paolo Bonzini wrote: > error: kvm run failed Function not implemented > PC=bf671210 SP=c1f0 > X00=0a003e70 X01= X02=bf680548 > X03=0030 > X04=bbb5fc18 X05=004b7770 X06=000

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-16 Thread Richard W.M. Jones
Sorry to spoil things, but I'm still seeing this bug, although it is now a lot less frequent with your patch. I would estimate it happens more often than 1 in 5 runs with qemu.git, and probably 1 in 200 runs with qemu.git + the v2 patch series. It's the exact same hang in both cases. Is it poss

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-16 Thread Richard W.M. Jones
Sorry for the very long delay in replying to this. I wanted to be absolutely sure I was reproducing the bug. Unfortunately I'm only able to reproduce the bug with qemu 2.3.0 (both the version in Fedora Rawhide, or the tagged v2.3.0 from git). I cannot currently reproduce it at all with upstream

Re: [Qemu-devel] [PATCH] crypto/cipher-nettle.c: Pass correct function type to cbc_encrypt and cbc_decrypt.

2015-07-16 Thread Richard W.M. Jones
On Thu, Jul 16, 2015 at 11:04:15AM +0100, Peter Maydell wrote: > Is this the same issue that Radim's patchset from a few days > back is addressing? Yes, looks like it, so ignore this patch. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programmin

[Qemu-devel] [PATCH] crypto/cipher-nettle.c: Pass correct function type to cbc_encrypt and cbc_decrypt.

2015-07-16 Thread Richard W.M. Jones
‘void (*)(void *, size_t, uint8_t *, const uint8_t *) {aka void (*)(void *, long unsigned int, unsigned char *, const unsigned char *)}’ cbc_decrypt(const void *ctx, nettle_cipher_func *f, Signed-off-by: Richard W.M. Jones --- crypto/cipher-nettle.c | 12 ++-- 1 file changed, 6 i

Re: [Qemu-devel] RFC: guest-side retrieval of fw_cfg file

2015-07-14 Thread Richard W.M. Jones
On Tue, Jul 14, 2015 at 07:48:29PM +0100, Richard W.M. Jones wrote: > On aarch64 kernel loading is really slow because it can only transfer > (IIRC) 8 bytes at a time, and there are no string instructions we can > use to speed it up. I should note here I'm talking about AAVMF (

Re: [Qemu-devel] RFC: guest-side retrieval of fw_cfg file

2015-07-14 Thread Richard W.M. Jones
On Tue, Jul 14, 2015 at 02:23:14PM -0400, Gabriel L. Somlo wrote: > On Tue, Jul 14, 2015 at 10:43:46AM +0100, Richard W.M. Jones wrote: > > On Mon, Jul 13, 2015 at 04:09:37PM -0400, Gabriel L. Somlo wrote: > > > 3. I'm currently only handling x86 and I/O

Re: [Qemu-devel] RFC: guest-side retrieval of fw_cfg file

2015-07-14 Thread Richard W.M. Jones
On Mon, Jul 13, 2015 at 04:09:37PM -0400, Gabriel L. Somlo wrote: > 3. I'm currently only handling x86 and I/O ports. I could drop the >fw_cfg_dmi_whitelist and just check the signature, using mmio where >appropriate, but I don't have a handy-dandy set of VMs for those >architectures on

[Qemu-devel] [PATCH v4] block/curl: Don't lose original error when a connection

2015-07-08 Thread Richard W.M. Jones
Since v3: Ditch the generalized anti-flood protection, and just use a simple variable. Rich.

[Qemu-devel] [PATCH v4] block/curl: Don't lose original error when a connection fails.

2015-07-08 Thread Richard W.M. Jones
sed with 469989 bytes remaining to read qemu-img: error while reading sector 16384: Protocol error Signed-off-by: Richard W.M. Jones Reviewed-by: Stefan Hajnoczi --- block/curl.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.

[Qemu-devel] [PATCH v3 0/2] block/curl: Don't lose original error when a connection fails.

2015-07-08 Thread Richard W.M. Jones
Since v2: This adds a generalized anti-flooding mechanism, and then uses it to ensure that curl errors wouldn't flood the log files. Rich.

[Qemu-devel] [PATCH v3 1/2] Add a simple mechanism to protect against error message floods.

2015-07-08 Thread Richard W.M. Jones
imes, followed by the "further errors suppressed" message once, and then nothing else. Signed-off-by: Richard W.M. Jones --- include/qemu/no-flood.h | 34 ++ 1 file changed, 34 insertions(+) create mode 100644 include/qemu/no-flood.h diff --git a/i

[Qemu-devel] [PATCH v3 2/2] block/curl: Don't lose original error when a connection fails.

2015-07-08 Thread Richard W.M. Jones
sed with 469989 bytes remaining to read qemu-img: error while reading sector 16384: Protocol error Signed-off-by: Richard W.M. Jones Reviewed-by: Stefan Hajnoczi --- block/curl.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.

Re: [Qemu-devel] [PATCH v2] block/curl: Don't lose original error when a connection fails.

2015-07-08 Thread Richard W.M. Jones
On Wed, Jul 08, 2015 at 02:01:30PM +0200, Kevin Wolf wrote: > The guest can't cause it, but once the connection is down, I expect > every request to fail. You don't have to have a malicious guest for > filling up the log file, it just needs to be careless enough to continue > trying new requests in

Re: [Qemu-devel] [PATCH v2] block/curl: Don't lose original error when a connection fails.

2015-07-08 Thread Richard W.M. Jones
On Wed, Jul 08, 2015 at 12:23:37PM +0200, Kevin Wolf wrote: > Am 03.07.2015 um 14:35 hat Markus Armbruster geschrieben: > > "Richard W.M. Jones" writes: > > > > > Currently if qemu is connected to a curl source (eg. web server), and > > > the web server

[Qemu-devel] [PATCH] block/raw-posix: Don't think /dev/fd/ is a floppy drive.

2015-07-01 Thread Richard W.M. Jones
: Illegal seek Signed-off-by: Richard W.M. Jones Fixes: https://bugs.launchpad.net/qemu/+bug/1470536 --- block/raw-posix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index cbe6574..855febe 100644 --- a/block/raw-posix.c +++

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