Re: [Qemu-devel] [PATCH 28/47] qmp: add drive-mirror command

2012-07-27 Thread Paolo Bonzini
Il 27/07/2012 01:42, Eric Blake ha scritto: > On 07/24/2012 05:04 AM, Paolo Bonzini wrote: >> This adds the monitor commands that start the mirroring job. >> >> Signed-off-by: Paolo Bonzini >> --- >> blockdev.c | 133 >> -- >> hmp-comman

Re: [Qemu-devel] [PATCH 31/47] qemu-iotests: add mirroring test case

2012-07-27 Thread Paolo Bonzini
Il 27/07/2012 01:46, Eric Blake ha scritto: > On 07/24/2012 05:04 AM, Paolo Bonzini wrote: >> The tests are not meant to offer full coverage; in particular, there is >> no concurrent I/O going on from the guest. However, especially in the >> case of blkdebug-based tests (introduced later in the se

Re: [Qemu-devel] Plan for error handling in QMP

2012-07-27 Thread Markus Armbruster
anth...@codemonkey.ws writes: > Hi, > > We had a violent^Wheated discussion on IRC about how to move forward > with Luiz's proposed error series. I think we reached consensus. This > note attempts to outline that. > > Principles > -- > 1. Errors should be free formed strings with a class

Re: [Qemu-devel] Plan for error handling in QMP

2012-07-27 Thread Paolo Bonzini
Il 26/07/2012 22:41, Eric Blake ha scritto: >> > 5. The following errors are used by libvirt: >> >- CommandNotFound: QMP parsing >> >- DeviceNotActive/KVMMissingCap: ballooning >> >- DeviceNotFound: drive_del >> >- MigrationExpected: cont > DeviceInUse, NotSupported: block-stream >

Re: [Qemu-devel] Plan for error handling in QMP

2012-07-27 Thread Paolo Bonzini
Il 26/07/2012 20:22, anth...@codemonkey.ws ha scritto: > 7. We need to make sure that anything we expose in 1.2 stays that way. >If we're dropping 'InvalidParameterType' as a class code, it should be >dropped in 1.2. This could be achieved by making all existing codes >except for those

Re: [Qemu-devel] [PATCH 2/2] ahci: Fix sglist memleak in ahci_dma_rw_buf()

2012-07-27 Thread Paolo Bonzini
Il 26/07/2012 21:40, Jason Baron ha scritto: > I noticed that in hw/ide/ahci:ahci_dma_rw_buf() does not appear to free the > sglist. Thus, I've added a call to qemu_sglist_destroy() to fix this memory > leak. > > I'm wondering though if 'ahci_populate_sglist()' can return 0, and not > populate the

Re: [Qemu-devel] [GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-27 Thread Paul Mackerras
On Wed, Jul 25, 2012 at 08:53:06AM -0600, Alex Williamson wrote: > Hi Linus, > > This series includes the VFIO userspace driver interface for the > 3.6 kernel merge window. This driver is intended to provide a > secure interface for device access using IOMMU protection for > applications like ass

Re: [Qemu-devel] [PATCH 2/2] qemu-config: convert all QemuOpts to use dashes instead of underscores

2012-07-27 Thread Markus Armbruster
Anthony Liguori writes: > Luiz Capitulino writes: > >> On Wed, 25 Jul 2012 11:25:43 -0500 >> Anthony Liguori wrote: >> >>> Signed-off-by: Anthony Liguori >> >> What about the man page? Should it be updated or are we going to let it >> list options with "_"? > > The man page is generated from q

Re: [Qemu-devel] [PATCH 1/2] qemu-opts: introduce a function to compare option names

2012-07-27 Thread Markus Armbruster
Anthony Liguori writes: > We don't use the standard C functions for conversion because we don't want to > depend on the user's locale. All option names in QEMU are en_US in plain > ASCII. Fails to explain the important part, namely the actual change to option comparison! > Signed-off-by: Anth

[Qemu-devel] [PATCH v3 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test

2012-07-27 Thread Stefan Hajnoczi
This tests establishes the basic post-conditions of the qcow2 lazy refcounts features: 1. If the image was closed normally, it is marked clean. 2. If an allocating write was performed and the image was not closed normally, then it is marked dirty. a. Written data can be read back s

Re: [Qemu-devel] [PATCH v2 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test

2012-07-27 Thread Stefan Hajnoczi
On Thu, Jul 26, 2012 at 2:28 PM, Kevin Wolf wrote: > Am 25.07.2012 14:21, schrieb Stefan Hajnoczi: >> This tests establishes the basic post-conditions of the qcow2 lazy >> refcounts features: >> >> 1. If the image was closed normally, it is marked clean. >> >> 2. If an allocating write was per

Re: [Qemu-devel] [PATCH 1/2] ahci: Fix ahci cdrom read corruptions for reads > 128k

2012-07-27 Thread Kevin Wolf
Am 26.07.2012 21:40, schrieb Jason Baron: > While testing q35, which has its cdrom attached to the ahci controller, I > found > that the Fedora 17 install would panic on boot. The panic occurs while > squashfs is trying to read from the cdrom. The errors are: > > [8.622711] SQUASHFS error: xz

[Qemu-devel] [PATCH v4] qemu-iotests: add qed.py image manipulation utility

2012-07-27 Thread Stefan Hajnoczi
The qed.py utility can inspect and manipulate QED image files. It can be used for testing to see the state of image metadata and also to inject corruptions into the image file. It also has a scrubbing feature to copy just the metadata out of an image file, allowing users to share broken image fil

[Qemu-devel] [PATCH v3 0/7] qcow2: implement lazy refcounts optimization

2012-07-27 Thread Stefan Hajnoczi
[Resend because most of the emails seem to have been dropped] This series aims to improve qcow2 performance with cache=writethrough and cache=directsync. In particular it reduces the impact of metadata updates for allocating writes. This optimization should help make qcow2 a good choice even for

[Qemu-devel] [PATCH v3 5/7] qcow2: implement lazy refcounts

2012-07-27 Thread Stefan Hajnoczi
Lazy refcounts is a performance optimization for qcow2 that postpones refcount metadata updates and instead marks the image dirty. In the case of crash or power failure the image will be left in a dirty state and repaired next time it is opened. Reducing metadata I/O is important for cache=writet

[Qemu-devel] [PATCH v3 4/7] qemu-iotests: ignore qemu-img create lazy_refcounts output

2012-07-27 Thread Stefan Hajnoczi
Hide the default lazy_refcounts=off output from qemu-img like we do with other image creation options. This ensures that existing golden outputs continue to pass despite the new option that has been added. Note that this patch applies before the one that actually introduces the lazy_refcounts=on|

Re: [Qemu-devel] [PATCH v2 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test

2012-07-27 Thread Kevin Wolf
Am 27.07.2012 09:56, schrieb Stefan Hajnoczi: > On Thu, Jul 26, 2012 at 2:28 PM, Kevin Wolf wrote: >> Am 25.07.2012 14:21, schrieb Stefan Hajnoczi: >>> +== Read-only access must still work == >>> +read 512/512 bytes at offset 0 >>> +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) >>> +i

[Qemu-devel] [PATCH v3 6/7] qemu-io: add "abort" command to simulate program crash

2012-07-27 Thread Stefan Hajnoczi
Avoiding data loss and corruption is the top requirement for image file formats. The qemu-io "abort" command makes it possible to simulate program crashes and does not give the image format a chance to cleanly shut down. This command is useful for data integrity test cases. Signed-off-by: Stefan

[Qemu-devel] [PATCH v3 2/7] qcow2: introduce dirty bit

2012-07-27 Thread Stefan Hajnoczi
This patch adds an incompatible feature bit to mark images that have not been closed cleanly. When a dirty image file is opened a consistency check and repair is performed. Update qemu-iotests 031 and 036 since the extension header size changes when we add feature bit table entries. Signed-off-b

[Qemu-devel] [PATCH v3 1/7] docs: add dirty bit to qcow2 specification

2012-07-27 Thread Stefan Hajnoczi
The dirty bit will make it possible to perform lazy refcount updates, where the image file is not kept consistent all the time. Upon opening a dirty image file, it is necessary to perform a consistency check and repair any incorrect refcounts. Therefore the dirty bit must be an incompatible featu

Re: [Qemu-devel] [PATCH 0/2] Allow '-' or '_' for all QemuOpts

2012-07-27 Thread Markus Armbruster
Anthony Liguori writes: > This is an alternative to Luiz's series that allows either '-' or '_' to be > used when specifying QemuOpts. This is nicer than aliases because it's > universal. Unlike aliases, it permits '_' where it wasn't permitted before. Tolerable. > We don't expose qemu-config

[Qemu-devel] [PATCH v3 3/7] docs: add lazy refcounts bit to qcow2 specification

2012-07-27 Thread Stefan Hajnoczi
The lazy refcounts bit indicates that this image can take advantage of the dirty bit and that refcount updates can be postponed. Signed-off-by: Stefan Hajnoczi --- docs/specs/qcow2.txt |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/

[Qemu-devel] [PATCH v3 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test

2012-07-27 Thread Stefan Hajnoczi
This tests establishes the basic post-conditions of the qcow2 lazy refcounts features: 1. If the image was closed normally, it is marked clean. 2. If an allocating write was performed and the image was not closed normally, then it is marked dirty. a. Written data can be read back s

Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-27 Thread Yoshihiro YUNOMAE
Hi Amit, Thank you for commenting on our work. (2012/07/26 20:35), Amit Shah wrote: On (Tue) 24 Jul 2012 [11:36:57], Yoshihiro YUNOMAE wrote: [...] Therefore, we propose a new system "virtio-trace", which uses enhanced virtio-serial and existing ring-buffer of ftrace, for collecting guest

Re: [Qemu-devel] [PATCH v4] qemu-iotests: add qed.py image manipulation utility

2012-07-27 Thread Kevin Wolf
Am 27.07.2012 10:01, schrieb Stefan Hajnoczi: > The qed.py utility can inspect and manipulate QED image files. It can > be used for testing to see the state of image metadata and also to > inject corruptions into the image file. It also has a scrubbing feature > to copy just the metadata out of a

Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-27 Thread Amit Shah
On (Fri) 27 Jul 2012 [17:55:11], Yoshihiro YUNOMAE wrote: > Hi Amit, > > Thank you for commenting on our work. > > (2012/07/26 20:35), Amit Shah wrote: > >On (Tue) 24 Jul 2012 [11:36:57], Yoshihiro YUNOMAE wrote: > > [...] > > >> > >>Therefore, we propose a new system "virtio-trace", which uses

[Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Wenchao Xia
This patch would add option -j in qemu-img info command, which would generate json output in stdout. Signed-off-by: Wenchao Xia --- qemu-img.c | 306 +++ 1 files changed, 264 insertions(+), 42 deletions(-) diff --git a/qemu-img.c b/qemu

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Daniel P. Berrange
On Fri, Jul 27, 2012 at 06:20:48PM +0800, Wenchao Xia wrote: > This patch would add option -j in qemu-img info command, which > would generate json output in stdout. I like this idea in general, because currently apps (oVirt, OpenStack, etc) rely on parsing the human format, which is just as evi

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Paolo Bonzini
Il 27/07/2012 12:33, Daniel P. Berrange ha scritto: > #qemu-img info -j /var/lib/libvirt/images/bar.qcow2 > { > "information": { > "actual_size": "139264", > "fmt": "qcow2", > "virtual_size": "10485760", > "filename": "/var/lib/libvirt/images/bar.qcow2", >

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Daniel P. Berrange
On Fri, Jul 27, 2012 at 12:49:53PM +0200, Paolo Bonzini wrote: > Il 27/07/2012 12:33, Daniel P. Berrange ha scritto: > > #qemu-img info -j /var/lib/libvirt/images/bar.qcow2 > > { > > "information": { > > "actual_size": "139264", > > "fmt": "qcow2", > > "virtual_size":

Re: [Qemu-devel] Fwd: [RFC 00/27] Migration thread (WIP)

2012-07-27 Thread Juan Quintela
Chegu Vinod wrote: > On 7/26/2012 11:41 AM, Chegu Vinod wrote: > > > > > Original Message > > > Subject: [Qemu-devel] [RFC 00/27] Migration thread (WIP) >

Re: [Qemu-devel] [PATCH 2/2] qemu-config: convert all QemuOpts to use dashes instead of underscores

2012-07-27 Thread Andreas Färber
Am 25.07.2012 18:25, schrieb Anthony Liguori: > Signed-off-by: Anthony Liguori > --- > qemu-config.c | 38 +++--- > 1 files changed, 19 insertions(+), 19 deletions(-) > > diff --git a/qemu-config.c b/qemu-config.c > index 5c3296b..1616547 100644 > --- a/qemu-con

Re: [Qemu-devel] [PATCH 1/2] qemu-opts: introduce a function to compare option names

2012-07-27 Thread Peter Maydell
On 27 July 2012 08:44, Markus Armbruster wrote: > The implementation is too longwinded for my taste :) > > static unsigned char opt_canon_ch(char ch) > { > if (ch >= 'A' && ch <= 'Z') { > return 'a' + (ch - 'A'); > } else if (ch == '_') { > return '-'; > } > > retur

Re: [Qemu-devel] [PATCH] vl: add -libvirt-caps option for libvirt to stop parsing help output

2012-07-27 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Wed, Jul 25, 2012 at 02:47:57PM -0500, Anthony Liguori wrote: >> The help output is going to change dramatically for 0.13. We've >> spent too long >> waiting for a perfect solution to capabilities handling and the end loser is >> the direct consumer of QEMU beca

Re: [Qemu-devel] [PATCH 1/2] ahci: Fix ahci cdrom read corruptions for reads > 128k

2012-07-27 Thread Andreas Färber
Hi Jason, Am 26.07.2012 21:40, schrieb Jason Baron: > While testing q35, which has its cdrom attached to the ahci controller, I > found > that the Fedora 17 install would panic on boot. The panic occurs while > squashfs is trying to read from the cdrom. The errors are: > > [8.622711] SQUASHF

Re: [Qemu-devel] [PATCH] vl: add -libvirt-caps option for libvirt to stop parsing help output

2012-07-27 Thread Daniel P. Berrange
On Fri, Jul 27, 2012 at 01:23:03PM +0200, Markus Armbruster wrote: > > Assuming version X (according to query-version) supports no less than > upstream version X sounds fair. > > If a command line option has a corresponding QMP command, probing QMP > for the feature suffices. For instance, query

Re: [Qemu-devel] Qemu crashed with lsi booting

2012-07-27 Thread Frediano Ziglio
2012/7/27 Paolo Bonzini : > Il 26/07/2012 10:31, Frediano Ziglio ha scritto: >> sudo ./x86_64-softmmu/qemu-system-x86_64 -m 1024 -hda test.qcow >> -device lsi -drive file=/dev/sdb,if=none,id=XXX -device >> scsi-block,drive=XXX -enable-kvm -bios ~/seabios/out/bios.bin -serial >> file:out.txt >> lsi_

Re: [Qemu-devel] [PATCH] vl: add -libvirt-caps option for libvirt to stop parsing help output

2012-07-27 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Fri, Jul 27, 2012 at 01:23:03PM +0200, Markus Armbruster wrote: >> >> Assuming version X (according to query-version) supports no less than >> upstream version X sounds fair. >> >> If a command line option has a corresponding QMP command, probing QMP >> for the

[Qemu-devel] [PATCH 0/2] small virtio-scsi fixes

2012-07-27 Thread Paolo Bonzini
A couple of small mistakes in virtio-scsi-pci, noticed by code inspection. Paolo Bonzini (2): virtio-scsi: add ioeventfd support virtio-scsi: enable MSI-X support hw/virtio-pci.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 1.7.10.4

[Qemu-devel] [PATCH 2/2] virtio-scsi: enable MSI-X support

2012-07-27 Thread Paolo Bonzini
While virtio-scsi does support multiqueue, the default number of interrupt vectors is not enough to actually enable usage of multiple queues in the driver; this is because with only 2 vectors the driver will not be able to use a separate interrupt for each request queue. Derive the desired number

[Qemu-devel] [PATCH 1/2] virtio-scsi: add ioeventfd support

2012-07-27 Thread Paolo Bonzini
Probably due to bad merge months ago, virtio-scsi-pci did not have ioeventfd support. Fix this and enable it by default, as is the case for other virtio-pci devices. Signed-off-by: Paolo Bonzini --- hw/virtio-pci.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio-pci.c b/hw/virt

Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set()

2012-07-27 Thread Andreas Färber
Am 26.07.2012 18:37, schrieb Luiz Capitulino: > On Thu, 26 Jul 2012 18:03:20 +0200 > Paolo Bonzini wrote: > >> Il 26/07/2012 17:54, Markus Armbruster ha scritto: >>> Unlike Anthony, I think this is a move in the right direction. >> >> Me too, but I would like to understand how it fits with the >>

Re: [Qemu-devel] [PATCH v3 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test

2012-07-27 Thread Kevin Wolf
Am 27.07.2012 10:05, schrieb Stefan Hajnoczi: > This tests establishes the basic post-conditions of the qcow2 lazy > refcounts features: > > 1. If the image was closed normally, it is marked clean. > > 2. If an allocating write was performed and the image was not closed > normally, then

[Qemu-devel] [PATCH] qemu-iotests: Be more flexible with image creation options

2012-07-27 Thread Kevin Wolf
qemu-iotests already filters out image creation options that may be present or not in order to get the same output in both cases. However, often it only considers the default value of the option. Cover all valid values instead so that ./check -o name=value can be used successfull for all of them.

[Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Anthony Liguori
This lets us provide a default implementation of a symbol which targets can override. Signed-off-by: Anthony Liguori --- compiler.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/compiler.h b/compiler.h index 736e770..f76921e 100644 --- a/compiler.h +++ b/compiler.h @@

[Qemu-devel] [PATCH 3/7] qapi: add query-machines command

2012-07-27 Thread Anthony Liguori
This provides the same output as -M ? but in a structured way. Signed-off-by: Anthony Liguori --- qapi-schema.json | 28 qmp-commands.hx |6 ++ vl.c | 31 +++ 3 files changed, 65 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need to parse -help output

2012-07-27 Thread Anthony Liguori
This series implements the necessary commands to implements danpb's idea to remove -help parsing in libvirt. We would introduce all of these commands in 1.2 and then change the -help output starting in 1.3. Here is Dan's plan from a previous thread: Basically I'd sum up my new idea as "just u

Re: [Qemu-devel] [SeaBIOS PATCH 2/2] allow CPUs to have non-contiguous Local APIC IDs (v2)

2012-07-27 Thread Laszlo Ersek
On 07/25/12 20:45, Eduardo Habkost wrote: > Extract Local APIC IDs directly from the CPUs, and instead of check for > "i < CountCPUs", check if the APIC ID was present on boot, when building > ACPI tables and the MP-Table. > > This keeps ACPI Processor ID == APIC ID, but allows the > hardware<->Se

Re: [Qemu-devel] [SeaBIOS PATCH 2/2] allow CPUs to have non-contiguous Local APIC IDs (v2)

2012-07-27 Thread Laszlo Ersek
On 07/27/12 15:42, Laszlo Ersek wrote: > The series looks to me; ^ good L.

[Qemu-devel] [PATCH 1/7] qmp: introduce device-list-properties command

2012-07-27 Thread Anthony Liguori
This can be used in conjunction with qom-list-types to determine the supported set of devices and their parameters. Signed-off-by: Anthony Liguori --- qapi-schema.json | 28 qmp-commands.hx |7 +++ qmp.c| 50 ++

[Qemu-devel] [PATCH 2/7] qapi: mark QOM commands stable

2012-07-27 Thread Anthony Liguori
We've had a cycle to tweak. It is time to commit to supporting them. Signed-off-by: Anthony Liguori --- qapi-schema.json | 19 --- 1 files changed, 4 insertions(+), 15 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index 015a84a..28e9914 100644 --- a/qapi-schem

[Qemu-devel] [PATCH 5/7] qapi: add query-cpudefs command

2012-07-27 Thread Anthony Liguori
This command attempts to map to the behavior of -cpu ?. Unfortunately, the output of this command differs wildly across targets. To accomodate this, we use a weak symbol to implement a default version of the command that fails with a QERR_NOT_SUPPORTED error code. Targets can then override and i

Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set()

2012-07-27 Thread Anthony Liguori
Andreas Färber writes: > Am 26.07.2012 18:37, schrieb Luiz Capitulino: >> On Thu, 26 Jul 2012 18:03:20 +0200 >> Paolo Bonzini wrote: >> >>> Il 26/07/2012 17:54, Markus Armbruster ha scritto: Unlike Anthony, I think this is a move in the right direction. >>> >>> Me too, but I would like to

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Peter Maydell
On 27 July 2012 14:37, Anthony Liguori wrote: > --- a/compiler.h > +++ b/compiler.h > @@ -45,6 +45,7 @@ > # define GCC_ATTR __attribute__((__unused__, format(gnu_printf, 1, 2))) > # define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m))) > # endif > +#define GCC_WEAK __attribute__

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Anthony Liguori
Wenchao Xia writes: > This patch would add option -j in qemu-img info command, which > would generate json output in stdout. This is a great idea. > > Signed-off-by: Wenchao Xia > --- > qemu-img.c | 306 +++ > 1 files changed, 264 ins

Re: [Qemu-devel] [PATCH] let qemu-img info genereate json output

2012-07-27 Thread Anthony Liguori
"Daniel P. Berrange" writes: > On Fri, Jul 27, 2012 at 12:49:53PM +0200, Paolo Bonzini wrote: >> Il 27/07/2012 12:33, Daniel P. Berrange ha scritto: >> > #qemu-img info -j /var/lib/libvirt/images/bar.qcow2 >> > { >> > "information": { >> > "actual_size": "139264", >> > "fmt"

Re: [Qemu-devel] [PATCH] Detect zero writes (for discussion only, not to be applied)

2012-07-27 Thread Anthony Liguori
"Richard W.M. Jones" writes: > [Applies against qemu 1.1.0, not HEAD, because qemu from git seems to > be broken at the moment. But the patch is easy to rebase.] How's it broken? Regards, Anthony Liguori > This patch adds a -drive detect_zero=on|off flag (defaults to "off"). > > Setting this

Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes.

2012-07-27 Thread Anthony Liguori
"Richard W.M. Jones" writes: > From: "Richard W.M. Jones" > > This change adds a new block device option, "detect_zero=on|off". > > If "detect_zero=on" then when a guest writes sectors that contain all > zero bytes, we call the internal "bdrv_co_write_zeroes" function > instead of the standard "

Re: [Qemu-devel] [PATCH 5/7] qapi: add query-cpudefs command

2012-07-27 Thread Peter Maydell
On 27 July 2012 14:37, Anthony Liguori wrote: > This command attempts to map to the behavior of -cpu ?. Unfortunately, the > output of this command differs wildly across targets. I've never really understood why so much of the cpu selection logic is deferred to target-*... > To accomodate this,

[Qemu-devel] [PATCH 7/7] target-ppc: add implementation of query-cpudefs

2012-07-27 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- target-ppc/translate_init.c | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 5742229..7e025cb 100644 --- a/target-ppc/translate_init.c +++ b/target-p

[Qemu-devel] [PATCH 6/7] target-i386: add implementation of query-cpudefs

2012-07-27 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- target-i386/cpu.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 6b9659f..b398439 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -28,6 +28,7 @@ #include "qemu

[Qemu-devel] [PATCH] Fixing sh4 serial abort

2012-07-27 Thread Rob Landley
If you grab the current aboriginal linux build scripts: http://landley.net/hg/aboriginal/archive/tip.tar.bz2 And "./build.sh sh4", then cd to build/system-image-sh4 and "./run-emulator.sh" you get this: sh_serial: unsupported read from 0x18 Aborted The bug was triggered by linux kernel co

Re: [Qemu-devel] FW: Fwd: [RFC 00/27] Migration thread (WIP)

2012-07-27 Thread Chegu Vinod
On 7/27/2012 7:11 AM, Vinod, Chegu wrote: -Original Message- From: Juan Quintela [mailto:quint...@redhat.com] Sent: Friday, July 27, 2012 4:06 AM To: Vinod, Chegu Cc: qemu-devel@nongnu.org; Orit Wasserman Subject: Re: Fwd: [RFC 00/27] Migration thread (WIP) Chegu Vinod wrote: On 7/26/

Re: [Qemu-devel] Plan for error handling in QMP

2012-07-27 Thread Luiz Capitulino
On Thu, 26 Jul 2012 17:47:25 -0500 Anthony Liguori wrote: > Luiz Capitulino writes: > > > On Thu, 26 Jul 2012 16:08:54 -0500 > > Anthony Liguori wrote: > > > >> Luiz Capitulino writes: > >> > >> > On Thu, 26 Jul 2012 15:43:58 -0300 > >> > Luiz Capitulino wrote: > >> > > >> >> On Thu, 26 Jul

Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set()

2012-07-27 Thread Luiz Capitulino
On Fri, 27 Jul 2012 15:17:15 +0200 Andreas Färber wrote: > Am 26.07.2012 18:37, schrieb Luiz Capitulino: > > On Thu, 26 Jul 2012 18:03:20 +0200 > > Paolo Bonzini wrote: > > > >> Il 26/07/2012 17:54, Markus Armbruster ha scritto: > >>> Unlike Anthony, I think this is a move in the right directio

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Anthony Liguori
Peter Maydell writes: > On 27 July 2012 14:37, Anthony Liguori wrote: >> --- a/compiler.h >> +++ b/compiler.h >> @@ -45,6 +45,7 @@ >> # define GCC_ATTR __attribute__((__unused__, format(gnu_printf, 1, 2))) >> # define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m))) >> # endif >

Re: [Qemu-devel] [PATCH] fixup! qapi: qapi.py: allow the "'" character be escaped

2012-07-27 Thread Luiz Capitulino
On Thu, 26 Jul 2012 19:09:13 +0200 Markus Armbruster wrote: > Support escaping the escape character, and make more robust (don't die > for '', handle ' without matching '. > > Signed-off-by: Markus Armbruster Can you please do you it on top of master so that I can apply it on the qmp branch?

Re: [Qemu-devel] [PATCH] Fixing sh4 serial abort

2012-07-27 Thread Peter Maydell
On 27 July 2012 14:45, Rob Landley wrote: > I.E. sci_getreg(port, SCFCR) move to before checking whether or not > we'll ever possibly use the result. SCFCR is 0x18 and QEMU calls abort() > on an attempt to read from an unimplemented register. > > I can patch the kernel to work around this (and pro

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Peter Maydell
On 27 July 2012 15:27, Anthony Liguori wrote: > Peter Maydell writes: >> The GCC manual says "Weak symbols are supported for ELF targets, >> and also for a.out targets when using the GNU assembler and linker". >> Have you tested this on Windows and MacOSX ? > > Weak symbols are supposed to be sup

Re: [Qemu-devel] [PATCH 1/2] ahci: Fix ahci cdrom read corruptions for reads > 128k

2012-07-27 Thread Jason Baron
On Fri, Jul 27, 2012 at 09:59:01AM +0200, Kevin Wolf wrote: > Am 26.07.2012 21:40, schrieb Jason Baron: > > While testing q35, which has its cdrom attached to the ahci controller, I > > found > > that the Fedora 17 install would panic on boot. The panic occurs while > > squashfs is trying to read

[Qemu-devel] [PULL 00/32] SCSI patches for 2012-08-27

2012-07-27 Thread Paolo Bonzini
Anthony, The following changes since commit a21143486b9c6d7a50b7b62877c02b3c686943cb: Merge remote-tracking branch 'stefanha/net' into staging (2012-07-23 13:15:34 -0500) are available in the git repository at: git://github.com/bonzini/qemu.git scsi-next for you to fetch changes up to 4c2

[Qemu-devel] [PATCH 17/32] scsi-disk: support toggling the write cache

2012-07-27 Thread Paolo Bonzini
Finally, this uses the "plumbing" in the previous patch to add support for toggling the WCE bit of the caching mode page. Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index ad

Re: [Qemu-devel] [PATCH 5/7] qapi: add query-cpudefs command

2012-07-27 Thread Anthony Liguori
Peter Maydell writes: > On 27 July 2012 14:37, Anthony Liguori wrote: >> This command attempts to map to the behavior of -cpu ?. Unfortunately, the >> output of this command differs wildly across targets. > > I've never really understood why so much of the cpu selection > logic is deferred to t

Re: [Qemu-devel] [PATCH] Detect zero writes (for discussion only, not to be applied)

2012-07-27 Thread Richard W.M. Jones
On Fri, Jul 27, 2012 at 08:55:31AM -0500, Anthony Liguori wrote: > "Richard W.M. Jones" writes: > > > [Applies against qemu 1.1.0, not HEAD, because qemu from git seems to > > be broken at the moment. But the patch is easy to rebase.] > > How's it broken? I take this back -- it was a seabios i

[Qemu-devel] [PATCH 08/32] scsi-disk: let the user customize vendor and product name

2012-07-27 Thread Paolo Bonzini
From: Dmitry Fleytman This patch adds two new properties vendor and product to SCSI disks. These options let the user customize the inquiry data returned by the disk. Signed-off-by: Yan Vugenfirer Signed-off-by: Dmitry Fleytman [ Use vendor and product property names, avoid "if" statements. -

Re: [Qemu-devel] [PATCH 33/47] mirror: add support for on-source-error/on-target-error

2012-07-27 Thread Eric Blake
On 07/24/2012 05:04 AM, Paolo Bonzini wrote: > Error management is important for mirroring; otherwise, an error on the > target (even something as "innocent" as ENOSPC) requires to start again > with a full copy. Similar to on_read_error/on_write_error, two separate > knobs are provided for on_sou

Re: [Qemu-devel] [PATCH] vl: add -libvirt-caps option for libvirt to stop parsing help output

2012-07-27 Thread Anthony Liguori
Paolo Bonzini writes: > Il 26/07/2012 16:10, Anthony Liguori ha scritto: >> Yup. >> >> You could do: >> >> qom-list-types implements=TYPE_DEVICE >> >> And that will give you the various types. We'll need to add a: >> >> device-list-properties typename=FOO >> >> I've got a patch locally for

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Anthony Liguori
Peter Maydell writes: > On 27 July 2012 15:27, Anthony Liguori wrote: >> Peter Maydell writes: >>> The GCC manual says "Weak symbols are supported for ELF targets, >>> and also for a.out targets when using the GNU assembler and linker". >>> Have you tested this on Windows and MacOSX ? >> >> Wea

[Qemu-devel] [PATCH 07/32] cutils: add strpadcpy()

2012-07-27 Thread Paolo Bonzini
From: Dmitry Fleytman Signed-off-by: Yan Vugenfirer Signed-off-by: Dmitry Fleytman Signed-off-by: Paolo Bonzini --- cutils.c |7 +++ qemu-common.h |1 + 2 files changed, 8 insertions(+) diff --git a/cutils.c b/cutils.c index e2bc1b8..9d4c570 100644 --- a/cutils.c +++ b/cutil

Re: [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols

2012-07-27 Thread Anthony Liguori
Peter Maydell writes: > On 27 July 2012 14:37, Anthony Liguori wrote: >> --- a/compiler.h >> +++ b/compiler.h >> @@ -45,6 +45,7 @@ >> # define GCC_ATTR __attribute__((__unused__, format(gnu_printf, 1, 2))) >> # define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m))) >> # endif >

[Qemu-devel] [PATCH 32/32] virtio-scsi: enable MSI-X support

2012-07-27 Thread Paolo Bonzini
While virtio-scsi does support multiqueue, the default number of interrupt vectors is not enough to actually enable usage of multiple queues in the driver; this is because with only 2 vectors the driver will not be able to use a separate interrupt for each request queue. Derive the desired number

[Qemu-devel] [PATCH 14/32] scsi-disk: adjust offsets in MODE SENSE by 2

2012-07-27 Thread Paolo Bonzini
This will make offsets the same when implementing MODE SELECT. This is because MODE SELECT has to deal with both 2-byte and 4-byte headers. Unfortunately, this means that the offsets are now off by two compared to the descriptions in the SCSI specs, which include the header. Signed-off-by: Paolo

[Qemu-devel] [PATCH 15/32] scsi-disk: fix changeable values for MODE_PAGE_R_W_ERROR

2012-07-27 Thread Paolo Bonzini
The changeable values were not all-zeros for this mode page, fix it. Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index dca9866..7015420 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -1059,6 +1059,

Re: [Qemu-devel] [PATCH] vl: add -libvirt-caps option for libvirt to stop parsing help output

2012-07-27 Thread Paolo Bonzini
Il 26/07/2012 16:10, Anthony Liguori ha scritto: > Yup. > > You could do: > > qom-list-types implements=TYPE_DEVICE > > And that will give you the various types. We'll need to add a: > > device-list-properties typename=FOO > > I've got a patch locally for that that I'm testing right now. Pao

[Qemu-devel] [PATCH 29/32] virtio-scsi: do not report dropped events after reset

2012-07-27 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/virtio-scsi.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index d5c5984..bf18861 100644 --- a/hw/virtio-scsi.c +++ b/hw/virtio-scsi.c @@ -563,6 +563,7 @@ static void virtio_scsi_reset(VirtIODevice *vdev) s->

[Qemu-devel] [PATCH 06/32] scsi-block: remove properties that are not relevant for passthrough

2012-07-27 Thread Paolo Bonzini
scsi-block is a passthrough device and does not allow customization of vendor, product, removable, DPOFUA, block size or any other piece of information. Thus, drop DEFINE_SCSI_DISK_PROPERTIES() from the list of qdev properties. Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c |2 +- 1 file c

[Qemu-devel] [PATCH 10/32] scsi-disk: move all non-DMA commands to scsi_disk_emulate_command

2012-07-27 Thread Paolo Bonzini
We want to use separate SCSIReqOps for emulated commands needing an allocated buffer vs. those that are zerocopy when the HBA supports S/G lists. Ensure that all of the former are in scsi_disk_emulate_command. Commands that do not have any parameters are more similar to emulated commands, so also

[Qemu-devel] [PATCH 04/32] lsi: introduce lsi_request_free

2012-07-27 Thread Paolo Bonzini
Split the common bits of lsi_request_cancelled and lsi_command_complete out to a new function. Signed-off-by: Paolo Bonzini --- hw/lsi53c895a.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index f04cc68.

[Qemu-devel] [PATCH 02/32] megasas: fix misuse of scsi_req_abort

2012-07-27 Thread Paolo Bonzini
scsi_req_abort is for terminating a command with a non-zero status. The ABORT task management function is invoked by scsi_req_cancel. In fact, ABORTED_COMMAND is a sense key, not a SAM status code. Signed-off-by: Paolo Bonzini --- hw/megasas.c |2 +- 1 file changed, 1 insertion(+), 1 deletio

[Qemu-devel] [PATCH 18/32] scsi-disk: rd/wr/vr-protect !=0 is an error

2012-07-27 Thread Paolo Bonzini
From: Ronnie Sahlberg The QEMU SCSI emulation does not support protection information, so any READ/WRITE/VERIFY commands that has the protect bits set to non-zero should fail with ILLEGAL_REQUEST/INVALID_FIELD_IN_CDB >From SCSI SBC : If the logical unit does not support protection information, t

[Qemu-devel] [PATCH 11/32] scsi-disk: split scsi-disk reqops

2012-07-27 Thread Paolo Bonzini
Only checks for present medium were still done in scsi_send_command for emulated commands. So move those to scsi_disk_emulate_command and return different SCSIReqOps depending on the kind of command. Checks for present medium can be done unconditionally for the scsi_disk_dma_reqops case. Signed-

[Qemu-devel] [PATCH 13/32] scsi-disk: support emulated TO_DEV requests

2012-07-27 Thread Paolo Bonzini
This adds the implementation of write_data for the emulated command case. The first time through it asks for more data, the second time it finishes the processing of the command. MODE SELECT and MODE SELECT(10) can now be re-enabled, but they will not do much. Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [PATCH 21/32] scsi-disk: removable hard disks support load/eject

2012-07-27 Thread Paolo Bonzini
Support for the LOEJ bit of the START/STOP UNIT command right now is limited to CD-ROMs. This is wrong, since removable hard disks (in the real world: SD card readers) also support it in pretty much the same way. Without the LOEJ bit, START/STOP UNIT does nothing for all devices. Signed-off-by:

[Qemu-devel] [PATCH 28/32] virtio-scsi: Report missed events

2012-07-27 Thread Paolo Bonzini
When an event is reported but no buffers are present in the event vq, we can set a flag and report a dummy event as soon as one is added. Signed-off-by: Paolo Bonzini --- hw/virtio-scsi.c | 54 -- 1 file changed, 36 insertions(+), 18 deletion

[Qemu-devel] [PATCH 27/32] virtio-scsi: Implement hotplug support for virtio-scsi

2012-07-27 Thread Paolo Bonzini
From: Cong Meng Implement the hotplug() and hot_unplug() interfaces in virtio-scsi, by signal the virtio_scsi.ko in guest kernel via event virtual queue. The counterpart patch of virtio_scsi.ko will be sent soon in another thread. Signed-off-by: Sen Wang Signed-off-by: Cong Meng [ Add memset,

[Qemu-devel] [PATCH 16/32] scsi-disk: parse MODE SELECT commands and parameters

2012-07-27 Thread Paolo Bonzini
This adds the bulk of the parsing code for MODE SELECT, including breaking out changes to different mode pages, and checking that only changeable values are modified. In order to report errors correctly two passes are made through the parameters; the first only looks for errors, the second actuall

[Qemu-devel] [PATCH 19/32] scsi-disk: improve the lba-out-of-range tests for read/write/verify

2012-07-27 Thread Paolo Bonzini
From: Ronnie Sahlberg Improve the tests for the LBA to cover more cases. For the 16 byte opcodes, the lba is a uint64, so we need to check is to make sure that we do not wrap. For example if an opcode would specify the LBA:0x and LEN:2 then lba+len would wrap to 1. Also verify

[Qemu-devel] [PATCH 25/32] scsi-disk: report resized disk via sense codes

2012-07-27 Thread Paolo Bonzini
Linux will not use these, but a very similar mechanism will be used to report the condition via virtio-scsi events. Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c |5 + hw/scsi-disk.c | 24 ++-- hw/scsi.h |2 ++ 3 files changed, 29 insertions(+), 2 deletio

[Qemu-devel] [PATCH 26/32] scsi: report parameter changes to HBA drivers

2012-07-27 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c | 10 ++ hw/scsi-disk.c |1 + hw/scsi.h |2 ++ 3 files changed, 13 insertions(+) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 04262de..e4ec19e 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -1072,6 +1072,16 @@ int scsi

[Qemu-devel] [PATCH 31/32] virtio-scsi: add ioeventfd support

2012-07-27 Thread Paolo Bonzini
Probably due to bad merge months ago, virtio-scsi-pci did not have ioeventfd support. Fix this and enable it by default, as is the case for other virtio-pci devices. Signed-off-by: Paolo Bonzini --- hw/virtio-pci.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio-pci.c b/hw/virt

  1   2   3   >