Re: [Qemu-devel] [PATCH 18/41] buffered_file: opaque is MigrationState

2012-09-28 Thread Juan Quintela
Orit Wasserman wrote: > On 09/21/2012 11:47 AM, Juan Quintela wrote: >> It always have that type, just change it. >> -QEMUFile *qemu_fopen_ops_buffered(void *opaque, size_t xfer_limit, >> +QEMUFile *qemu_fopen_ops_buffered(MigrationState *migration_state, >> + size

Re: [Qemu-devel] [PATCH 18/41] buffered_file: opaque is MigrationState

2012-09-28 Thread Orit Wasserman
On 09/28/2012 09:33 AM, Juan Quintela wrote: > Orit Wasserman wrote: >> On 09/21/2012 11:47 AM, Juan Quintela wrote: >>> It always have that type, just change it. >>> -QEMUFile *qemu_fopen_ops_buffered(void *opaque, size_t xfer_limit, >>> +QEMUFile *qemu_fopen_ops_buffered(MigrationState *migratio

Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines

2012-09-28 Thread Paolo Bonzini
Il 28/09/2012 05:00, Wenchao Xia ha scritto: >> >> >> uint64_t qblock_get_virt_size(QBlockFmtInfo *fmt); >> QBlockProtInfo *qblock_get_backing_loc(QBlockFmtInfo *fmt); >> bool qblock_get_encrypt(QBlockFmtInfo *fmt); >> >> etc. that include the switch statement. >> > I think it is reasonable use g

Re: [Qemu-devel] [PATCH V4 4/5] libqblock test build system

2012-09-28 Thread Paolo Bonzini
Il 28/09/2012 05:04, Wenchao Xia ha scritto: > +$(LIBQBLOCK_TEST_DIR): > +@echo "Make libqblock test directory" > +mkdir $(LIBQBLOCK_TEST_DIR) You can leave the files in tests/ directly, and avoid this as well. >>>Having a new directory will make clean easier, othe

Re: [Qemu-devel] [PATCH] Add option to mlock guest and qemu memory

2012-09-28 Thread Jan Kiszka
On 2012-09-28 01:21, Satoru Moriya wrote: > This is a first time for me to post a patch to qemu-devel. > If there is something missing/wrong, please let me know. > > We have some plans to migrate old enterprise systems which require > low latency (msec order) to kvm virtualized environment. Usuall

Re: [Qemu-devel] [PATCH v10 3/5] qemu: URI parsing library

2012-09-28 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 05:55:15PM +0200, Paolo Bonzini wrote: > Il 27/09/2012 16:36, Daniel P. Berrange ha scritto: > >> > qemu: URI parsing library > >> > > >> > From: Paolo Bonzini > >> > > >> > Add a new URI parsing library to QEMU. The code has been borrowed from > >> > libxml2 and libvirt.

[Qemu-devel] [PATCH qemu] virtio-net: add feature bit for any header s/g

2012-09-28 Thread Michael S. Tsirkin
Old qemu versions required that 1st s/g entry is the header. My recent patchset titled "virtio-net: iovec handling cleanup" removed this limitation but a feature bit is needed so guests know it's safe to lay out header differently. This patch applies on top and adds such a feature bit. virtio net

Re: [Qemu-devel] [PATCH v10 3/5] qemu: URI parsing library

2012-09-28 Thread Paolo Bonzini
Il 28/09/2012 10:39, Daniel P. Berrange ha scritto: >>> > > IMHO, you should also be importing the URI code test suite from libvirt >>> > > to verify that the way you merged/changed the codebases did not break >>> > > anything. >> > >> > Yes, can be done separately though. > In this case I disagre

Re: [Qemu-devel] [PATCH V4 4/5] libqblock test build system

2012-09-28 Thread Wenchao Xia
于 2012-9-28 15:52, Paolo Bonzini 写道: Il 28/09/2012 05:04, Wenchao Xia ha scritto: +$(LIBQBLOCK_TEST_DIR): +@echo "Make libqblock test directory" +mkdir $(LIBQBLOCK_TEST_DIR) You can leave the files in tests/ directly, and avoid this as well. Having a new directory will make clean

Re: [Qemu-devel] [PATCH 10/14] qxl: add QXL_IO_MONITORS_CONFIG_ASYNC

2012-09-28 Thread Paolo Bonzini
Il 06/09/2012 09:21, Gerd Hoffmann ha scritto: > +#ifndef CONFIG_QXL_IO_MONITORS_CONFIG_ASYNC > +/* spice-protocol is too old, add missing definitions */ > +#define QXL_IO_MONITORS_CONFIG_ASYNC (QXL_IO_FLUSH_RELEASE + 1) > +#endif > + I don't see the need for this, why can't you just bump the mini

[Qemu-devel] a user here - pci-assign

2012-09-28 Thread lejeczek
hi everybody, I've decided to bother you guys for user list seems.. quiet, no, really. so, novice type of question, where/how do I get hold of the values for below options? I don't read the code, ain't no programmer, I can't figure out how to get hold of the values for pci-assign.host=pci

Re: [Qemu-devel] [PATCH RESEND 0/3] Introduce virtqueue_get_avail_bytes()

2012-09-28 Thread Michael S. Tsirkin
On Tue, Sep 25, 2012 at 12:05:13AM +0530, Amit Shah wrote: > This is a rebased version of the patchset sent earlier. > > The current virtqueue_avail_bytes() is a weird API: it's oddly-named: > doesn't tell us what the API is going to do, and also suits just one > use-case (that in virtio-net.c). >

Re: [Qemu-devel] [PATCH 0/2] add pci-serial device.

2012-09-28 Thread Michael S. Tsirkin
On Thu, Sep 27, 2012 at 07:53:47AM +0200, Gerd Hoffmann wrote: > Hi, > > > Understood, but I'd really prefer a file in docs/. We should be > > rigorous about having formal specs for all of our paravirtual devices. > > The code shouldn't be the spec. > > Well, pci-serial and pci-bridge are *not

Re: [Qemu-devel] [PATCH 0/2] add pci-serial device.

2012-09-28 Thread Michael S. Tsirkin
On Wed, Sep 26, 2012 at 08:01:39AM -0500, Anthony Liguori wrote: > Gerd Hoffmann writes: > > > On 09/26/12 01:43, Anthony Liguori wrote: > >> Gerd Hoffmann writes: > >> > >>> Hi, > >>> > >>> Two patches, first split up serial.c a bit, > >>> then actually add the pci-based serial device. > >>

Re: [Qemu-devel] [PULL 13/15] qmp: qmp_send_key(): accept key codes in hex

2012-09-28 Thread Amos Kong
On 27/09/12 21:28, Luiz Capitulino wrote: Sorry the delay review. Before the qapi conversion, the sendkey command could be used to send key codes in hex directly to the guest. In HMP, this would be like: (qemu) sendkey 0xdc '0xdc' is not a available keycode, I didn't find '0xdc' in old

[Qemu-devel] [PULL] virtio fixes

2012-09-28 Thread Michael S. Tsirkin
The following changes since commit 6f8fd2530e9a530f237240daf1c981fa5df7f978: Merge branch 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm (2012-09-27 21:48:56 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for

Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines

2012-09-28 Thread Wenchao Xia
于 2012-9-28 15:51, Paolo Bonzini 写道: Il 28/09/2012 05:00, Wenchao Xia ha scritto: uint64_t qblock_get_virt_size(QBlockFmtInfo *fmt); QBlockProtInfo *qblock_get_backing_loc(QBlockFmtInfo *fmt); bool qblock_get_encrypt(QBlockFmtInfo *fmt); etc. that include the switch statement. I think it

Re: [Qemu-devel] [PATCH V4 2/5] libqblock type defines

2012-09-28 Thread Paolo Bonzini
Il 28/09/2012 12:52, Wenchao Xia ha scritto: >> No problem for the implementation, but please make this function static. > > Do you mean declaring it as static function? I think user may need > call it to get information so it need to be public. The user can use the accessors. Let's not add a f

Re: [Qemu-devel] [PATCH v2 09/45] block: rename block_job_complete to block_job_completed

2012-09-28 Thread Paolo Bonzini
Il 27/09/2012 22:31, Jeff Cody ha scritto: > > block_job_completed(): cleans up when a job is done It also raises a BLOCK_JOB_COMPLETED event. > block_job_complete(): requests that a block job be completed > > How about renaming both of them, respectively, to: > > block_job_cleanup(): cleans

Re: [Qemu-devel] [PATCH 0/2] add pci-serial device.

2012-09-28 Thread Gerd Hoffmann
Hi, >> For pci-serial windows needs a "driver" (which is just a inf file, the >> driver itself is shipped by windows). So in that case it is easier to >> go with our own ids I think, as we can simply ship a inf file then. >> When picking the IDs of other cards, existing as real hardware, users

Re: [Qemu-devel] [PATCH] Add option to mlock guest and qemu memory

2012-09-28 Thread Anthony Liguori
Jan Kiszka writes: > On 2012-09-28 01:21, Satoru Moriya wrote: >> This is a first time for me to post a patch to qemu-devel. >> If there is something missing/wrong, please let me know. >> >> We have some plans to migrate old enterprise systems which require >> low latency (msec order) to kvm vir

Re: [Qemu-devel] [PULL 13/15] qmp: qmp_send_key(): accept key codes in hex

2012-09-28 Thread Eric Blake
On 09/28/2012 04:36 AM, Amos Kong wrote: > On 27/09/12 21:28, Luiz Capitulino wrote: >> > > Sorry the delay review. > > > hex isn't support when using qmp monitor. > >> +{ 'union': 'KeyValue', >> + 'data': { >> +'number': 'int', > > It's 'int' not hex format. Indeed - I just re-read th

Re: [Qemu-devel] [PATCH] Add option to mlock guest and qemu memory

2012-09-28 Thread Jan Kiszka
On 2012-09-28 14:33, Anthony Liguori wrote: > Jan Kiszka writes: > >> On 2012-09-28 01:21, Satoru Moriya wrote: >>> This is a first time for me to post a patch to qemu-devel. >>> If there is something missing/wrong, please let me know. >>> >>> We have some plans to migrate old enterprise systems

Re: [Qemu-devel] [PULL 13/15] qmp: qmp_send_key(): accept key codes in hex

2012-09-28 Thread Luiz Capitulino
On Fri, 28 Sep 2012 18:36:53 +0800 Amos Kong wrote: > On 27/09/12 21:28, Luiz Capitulino wrote: > > > > Sorry the delay review. > > > Before the qapi conversion, the sendkey command could be used to > > send key codes in hex directly to the guest. In HMP, this would > > be like: > > > > (qemu

Re: [Qemu-devel] [PULL 13/15] qmp: qmp_send_key(): accept key codes in hex

2012-09-28 Thread Luiz Capitulino
On Fri, 28 Sep 2012 07:01:31 -0600 Eric Blake wrote: > On 09/28/2012 04:36 AM, Amos Kong wrote: > > On 27/09/12 21:28, Luiz Capitulino wrote: > >> > > > > Sorry the delay review. > > > > > > > hex isn't support when using qmp monitor. > > > > >> +{ 'union': 'KeyValue', > >> + 'data': { > >

Re: [Qemu-devel] [PULL 13/15] qmp: qmp_send_key(): accept key codes in hex

2012-09-28 Thread Amos Kong
- Original Message - > On Fri, 28 Sep 2012 18:36:53 +0800 > Amos Kong wrote: > > > On 27/09/12 21:28, Luiz Capitulino wrote: > > > > > > > Sorry the delay review. > > > > > Before the qapi conversion, the sendkey command could be used to > > > send key codes in hex directly to the guest

Re: [Qemu-devel] [PATCH v2 4/4] serial: add 2x + 4x pci variant

2012-09-28 Thread Paolo Bonzini
Il 26/09/2012 14:14, Gerd Hoffmann ha scritto: > Add multiport serial card implementation, with two variants, > one featuring two and one featuring four ports. > > Signed-off-by: Gerd Hoffmann > --- > docs/qemupciserial.inf |2 + > hw/serial-pci.c| 157 > +++

Re: [Qemu-devel] [PATCH 135/147] softfloat: Fix uint64_to_float64

2012-09-28 Thread Peter Maydell
On 28 September 2012 02:12, Richard Henderson wrote: > The interface to normalizeRoundAndPackFloat64 requires that the > high bit be clear. Perform one shift-right-and-jam if needed. > > Signed-off-by: Richard Henderson > --- > fpu/softfloat.c | 9 +++-- > 1 file changed, 7 insertions(+), 2

Re: [Qemu-devel] [PATCH 136/147] softfloat: Implement uint64_to_float128

2012-09-28 Thread Peter Maydell
On 28 September 2012 02:13, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > fpu/softfloat.c | 6 ++ > fpu/softfloat.h | 1 + > 2 files changed, 7 insertions(+) > > diff --git a/fpu/softfloat.c b/fpu/softfloat.c > index 45f105a..8df3a32 100644 > --- a/fpu/softfloat.c > +++

[Qemu-devel] [PATCH] tcg/arm: Use tcg_out_mov_reg rather than inline equivalent code

2012-09-28 Thread Peter Maydell
Use the recently introduced tcg_out_mov_reg() function rather than the equivalent inline code. Signed-off-by: Peter Maydell --- This is a minor follow-on cleanup patch after commit 9716ef3b1. tcg/arm/tcg-target.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --g

[Qemu-devel] [PATCH] fpu/softfloat.c: Return correctly signed values from uint64_to_float32

2012-09-28 Thread Peter Maydell
The uint64_to_float32() conversion function was incorrectly always returning numbers with the sign bit set (ie negative numbers). Correct this so we return positive numbers instead. Signed-off-by: Peter Maydell --- As far as I can see we use this function only in the three PPC SPE insns efscfuf,

Re: [Qemu-devel] [PATCH] tcg/arm: Use tcg_out_mov_reg rather than inline equivalent code

2012-09-28 Thread Peter Maydell
On 28 September 2012 16:05, Peter Maydell wrote: > Use the recently introduced tcg_out_mov_reg() function rather than > the equivalent inline code. > > Signed-off-by: Peter Maydell Whoops, used git send-email on wrong file; please ignore this email. Correct patch should arrive shortly. -- PMM

[Qemu-devel] [PATCH 01/19] qerror/block: introduce QERR_BLOCK_JOB_NOT_ACTIVE

2012-09-28 Thread Paolo Bonzini
The DeviceNotActive text is not a particularly good match, add a separate text while keeping the same class. Signed-off-by: Paolo Bonzini --- blockdev.c | 4 ++-- qerror.h | 3 +++ 2 file modificati, 5 inserzioni(+), 2 rimozioni(-) diff --git a/blockdev.c b/blockdev.c index e5d450f..de5457d 1

[Qemu-devel] [PULL for Kevin 00/19] Block job improvements part 1

2012-09-28 Thread Paolo Bonzini
Kevin, the following changes since commit ac05f3492421caeb05809ffa02c6198ede179e43: add a boot parameter to set reboot timeout (2012-09-25 20:05:04 -0500) are available in the git repository at: git://github.com/bonzini/qemu.git blkmirror-job-1.3-part1 for you to fetch changes up to ed306a

[Qemu-devel] [PATCH 05/19] block: add block_job_query

2012-09-28 Thread Paolo Bonzini
Extract it out of the implementation of info block-jobs. Signed-off-by: Paolo Bonzini --- blockdev.c | 15 ++- blockjob.c | 11 +++ blockjob.h | 8 3 file modificati, 21 inserzioni(+), 13 rimozioni(-) diff --git a/blockdev.c b/blockdev.c index 7ab7d5e..5772c11 1006

[Qemu-devel] [PATCH 04/19] block: move job APIs to separate files

2012-09-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- Makefile.objs | 5 +- block.c | 128 + block.h | 2 + block/Makefile.objs | 3 +- block/stream.c | 1 + block_int.h | 151 blockdev.

[Qemu-devel] [PATCH 10/19] block: rename block_job_complete to block_job_completed

2012-09-28 Thread Paolo Bonzini
The imperative will be used for the QMP command. Signed-off-by: Paolo Bonzini --- block/stream.c | 4 ++-- blockjob.c | 2 +- blockjob.h | 4 ++-- 3 file modificati, 5 inserzioni(+), 5 rimozioni(-) diff --git a/block/stream.c b/block/stream.c index 57e4be7..a8f585a 100644 --- a/block/st

[Qemu-devel] [PATCH 08/19] qmp: add block-job-pause and block-job-resume

2012-09-28 Thread Paolo Bonzini
Add QMP commands matching the functionality. Paused jobs cannot be canceled without first resuming them. This ensures that I/O errors are never missed by management. However, an optional force argument can be specified to allow that. Signed-off-by: Paolo Bonzini --- blockdev.c | 35

[Qemu-devel] [PATCH 19/19] qemu-iotests: add tests for streaming error handling

2012-09-28 Thread Paolo Bonzini
Add a test for each of report/ignore/stop. The tests use blkdebug to generate an error in the middle of a script. The error is recoverable (once = "on") so that we can test resuming a job after stopping for an error. Signed-off-by: Paolo Bonzini --- tests/qemu-iotests/030| 220

[Qemu-devel] [PATCH 17/19] blkdebug: process all set_state rules in the old state

2012-09-28 Thread Paolo Bonzini
Currently it is impossible to write a blkdebug script that ping-pongs between two states, because the second set-state rule will use the state that is set in the first. If you have [set-state] event = "..." state = "1" new_state = "2" [set-state] event = "..." state =

[Qemu-devel] [PATCH 15/19] block: introduce block job error

2012-09-28 Thread Paolo Bonzini
The following behaviors are possible: 'report': The behavior is the same as in 1.1. An I/O error, respectively during a read or a write, will complete the job immediately with an error code. 'ignore': An I/O error, respectively during a read or a write, will be ignored. For streaming, the job w

[Qemu-devel] [PATCH 14/19] iostatus: reorganize io error code

2012-09-28 Thread Paolo Bonzini
Move the common part of IDE/SCSI/virtio error handling to the block layer. The new function bdrv_error_action subsumes all three of bdrv_emit_qmp_error_event, vm_stop, bdrv_iostatus_set_err. The same scheme will be used for errors in block jobs. Signed-off-by: Paolo Bonzini --- block.c

Re: [Qemu-devel] [PATCH] fpu/softfloat.c: Return correctly signed values from uint64_to_float32

2012-09-28 Thread Peter Maydell
On 28 September 2012 16:17, Peter Maydell wrote: > The uint64_to_float32() conversion function was incorrectly always > returning numbers with the sign bit set (ie negative numbers). Correct > this so we return positive numbers instead. > > Signed-off-by: Peter Maydell > --- > As far as I can see

Re: [Qemu-devel] [PATCH] Add option to mlock guest and qemu memory

2012-09-28 Thread Anthony Liguori
Jan Kiszka writes: > On 2012-09-28 14:33, Anthony Liguori wrote: >> Jan Kiszka writes: >> >>> On 2012-09-28 01:21, Satoru Moriya wrote: This is a first time for me to post a patch to qemu-devel. If there is something missing/wrong, please let me know. We have some plans to m

Re: [Qemu-devel] [PULL for Kevin 00/19] Block job improvements part 1

2012-09-28 Thread Eric Blake
On 09/28/2012 09:22 AM, Paolo Bonzini wrote: > Kevin, > > the following changes since commit ac05f3492421caeb05809ffa02c6198ede179e43: > > add a boot parameter to set reboot timeout (2012-09-25 20:05:04 -0500) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git

[Qemu-devel] [PATCH 13/19] iostatus: change is_read to a bool

2012-09-28 Thread Paolo Bonzini
Do this while we are touching this part of the code, before introducing more uses of "int is_read". Signed-off-by: Paolo Bonzini --- block.c | 4 ++-- block.h | 4 ++-- blockdev.c | 2 +- hw/ide/core.c | 2 +- hw/ide/pci.c| 4 ++-- hw/scsi-disk.c | 2 +- hw/virtio-blk

Re: [Qemu-devel] a user here - pci-assign

2012-09-28 Thread Alex Williamson
On Fri, 2012-09-28 at 10:54 +0100, lejeczek wrote: > hi everybody, > > I've decided to bother you guys for user list seems.. quiet, > no, really. > > so, novice type of question, where/how do I get hold of the > values for below options? > I don't read the code, ain't no programmer, I can't fig

[Qemu-devel] [PATCH 06/19] qmp: add 'busy' member to BlockJobInfo

2012-09-28 Thread Paolo Bonzini
Because pausing a job is asynchronous, we need to know whether it has completed. This is described by the "busy" field of BlockJob; copy it to BlockJobInfo. Signed-off-by: Paolo Bonzini --- blockjob.c | 1 + qapi-schema.json | 5 - 2 file modificati, 5 inserzioni(+). 1 rimozione(-) d

[Qemu-devel] [PATCH 02/19] blockdev: rename block_stream_cb to a generic block_job_cb

2012-09-28 Thread Paolo Bonzini
From: Jeff Cody Signed-off-by: Jeff Cody Signed-off-by: Paolo Bonzini --- blockdev.c | 6 +++--- trace-events | 2 +- 2 file modificati, 4 inserzioni(+), 4 rimozioni(-) diff --git a/blockdev.c b/blockdev.c index de5457d..fa338fb 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1065,12 +1065,12

[Qemu-devel] [PATCH 18/19] qemu-iotests: map underscore to dash in QMP argument names

2012-09-28 Thread Paolo Bonzini
iotests.py provides a convenience function that uses Python keyword arguments to represent QMP command arguments. However, almost all QMP commands use dashes for argument names (the sole exception is block_set_io_throttle), and dashes are not allowed in a keyword argument name. Hence provide auto

[Qemu-devel] [PATCH 11/19] iostatus: rename BlockErrorAction, BlockQMPEventAction

2012-09-28 Thread Paolo Bonzini
We want to remove knowledge of BLOCK_ERR_STOP_ENOSPC from drivers; drivers should only be told whether to stop/report/ignore the error. On the other hand, we want to keep using the nicer BlockErrorAction name in the drivers. So rename the enums, while leaving aside the names of the enum values for

[Qemu-devel] [PATCH 07/19] block: add support for job pause/resume

2012-09-28 Thread Paolo Bonzini
Job pausing reuses the existing support for cancellable sleeps. A pause happens at the next sleeping point and lasts until the coroutine is re-entered explicitly. Cancellation was already doing a forced resume, so implement it explicitly in terms of resume. Paused jobs cannot be canceled without

[Qemu-devel] [PATCH 16/19] stream: add on-error argument

2012-09-28 Thread Paolo Bonzini
This patch adds support for error management to streaming. Signed-off-by: Paolo Bonzini --- block/stream.c | 28 +++- block_int.h | 3 ++- blockdev.c | 11 --- hmp.c| 3 ++- qapi-schema.json | 9 +++-- qmp-commands.hx | 2 +- 6 fi

[Qemu-devel] [PATCH 03/19] block: fix documentation of block_job_cancel_sync

2012-09-28 Thread Paolo Bonzini
Do this in a separate commit before we move the functions to blockjob.h. Signed-off-by: Paolo Bonzini --- block_int.h | 12 +--- 1 file modificato, 5 inserzioni(+), 7 rimozioni(-) diff --git a/block_int.h b/block_int.h index ac4245c..b025fa0 100644 --- a/block_int.h +++ b/block_int.h @@

[Qemu-devel] [PATCH 12/19] iostatus: move BlockdevOnError declaration to QAPI

2012-09-28 Thread Paolo Bonzini
This will let block-stream reuse the enum. Places that used the enums are renamed accordingly. Signed-off-by: Paolo Bonzini --- block.c | 6 +++--- block.h | 5 - blockdev.c| 12 ++-- hw/fdc.c | 4 ++-- hw/ide/core.c | 6 +++--- hw/scsi-d

[Qemu-devel] [PATCH 09/19] qemu-iotests: add test for pausing a streaming operation

2012-09-28 Thread Paolo Bonzini
These check that a paused streaming job does not advance its offset. Sometimes the new test fails; the map is different between the source and the destination of the streaming because qemu-io does not always pack adjacent clusters that have the same allocated/unallocated state. However, this also

[Qemu-devel] [PATCH] qemu-sockets: Fix compiler warning (regression for MinGW)

2012-09-28 Thread Stefan Weil
setsockopt needs a type cast for MinGW. That type cast is missing in a recent commit which results in a compiler warning. Like for other socket related functions which have the same problem, we add a 'qemu_setsockopt' macro which provides that type cast where needed and use the new macro to avoid

Re: [Qemu-devel] [PULL 11/15] hmp: dump-guest-memory: hardcode protocol argument to "file:"

2012-09-28 Thread Eric Blake
On 09/27/2012 07:28 AM, Luiz Capitulino wrote: > Today, it's necessary to specify the protocol you want to use > when dumping the guest memory, for example: > > (qemu) dump-guest-memory file:/tmp/guest-memory > > This has a few issues: > > 1. It's cumbersome to type > 2. We loose file path au

[Qemu-devel] Bug: When setting hardware clock on linux guest, hwclock shows crazy date (in the year 2043)

2012-09-28 Thread Lucas Meneghel Rodrigues
Very easy to reproduce: 1) Build the latest qemu.git (we've captured this on internal automated testing, verified manually), the commit for reference is: 14:07:02 INFO | git commit ID is 6f8fd2530e9a530f237240daf1c981fa5df7f978 (tag v1.2.0-461-g6f8fd25) 2) Install a linux guest in it (caugh

[Qemu-devel] [Bug 1058225] [NEW] When setting hardware clock on linux guest, hwclock shows crazy date (in the year 2043)

2012-09-28 Thread Lucas Meneghel Rodrigues
Public bug reported: Very easy to reproduce: 1) Build the latest qemu.git (we've captured this on internal automated testing, verified manually), the commit for reference is: 14:07:02 INFO | git commit ID is 6f8fd2530e9a530f237240daf1c981fa5df7f978 (tag v1.2.0-461-g6f8fd25) 2) Install a linux g

[Qemu-devel] [PATCH 07/30] block: Support GlusterFS as a QEMU block backend.

2012-09-28 Thread Kevin Wolf
From: Bharata B Rao This patch adds gluster as the new block backend in QEMU. This gives QEMU the ability to boot VM images from gluster volumes. Its already possible to boot from VM images on gluster volumes using FUSE mount, but this patchset provides the ability to boot VM images from gluster

[Qemu-devel] [PATCH 11/30] block: helper function, to find the base image of a chain

2012-09-28 Thread Kevin Wolf
From: Jeff Cody This is a simple helper function, that will return the base image of a given image chain. Signed-off-by: Jeff Cody Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block.c | 16 block.h |1 + 2 files changed, 17 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 09/30] block: add live block commit functionality

2012-09-28 Thread Kevin Wolf
From: Jeff Cody This adds the live commit coroutine. This iteration focuses on the commit only below the active layer, and not the active layer itself. The behaviour is similar to block streaming; the sectors are walked through, and anything that exists above 'base' is committed back down into

[Qemu-devel] [PATCH 17/30] block: add block_job_query

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini Extract it out of the implementation of info block-jobs. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- blockdev.c | 15 ++- blockjob.c | 11 +++ blockjob.h |8 3 files changed, 21 insertions(+), 13

[Qemu-devel] [PATCH 18/30] qmp: add 'busy' member to BlockJobInfo

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini Because pausing a job is asynchronous, we need to know whether it has completed. This is described by the "busy" field of BlockJob; copy it to BlockJobInfo. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- blockjob.c |1 + qapi

[Qemu-devel] [PATCH 30/30] qemu-iotests: add tests for streaming error handling

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini Add a test for each of report/ignore/stop. The tests use blkdebug to generate an error in the middle of a script. The error is recoverable (once = "on") so that we can test resuming a job after stopping for an error. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Si

[Qemu-devel] [PATCH 27/30] stream: add on-error argument

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini This patch adds support for error management to streaming. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/stream.c | 28 +++- block_int.h |3 ++- blockdev.c | 11 --- hmp.c

[Qemu-devel] [PATCH] vnc: Fix spelling (hellmen -> hellman) in comment

2012-09-28 Thread Stefan Weil
The algorithm was named after Martin E. Hellman. Signed-off-by: Stefan Weil --- ui/vnc-tls.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c index 3aaa939..a7f7d07 100644 --- a/ui/vnc-tls.c +++ b/ui/vnc-tls.c @@ -49,7 +49,7 @@ static int vnc_tls

Re: [Qemu-devel] [PATCH v3 0/6] Live block commit

2012-09-28 Thread Kevin Wolf
Am 27.09.2012 19:29, schrieb Jeff Cody: > This series adds the basic case, of a live commit between two > images below the active layer, e.g.: > > [base] <--- [snp-1] <--- [snp-2] <--- [snp-3] <--- [active] > > can be collapsed down via commit, into: > > [base] <--- [active] > > or, > > [base]

Re: [Qemu-devel] [PULL for Kevin 00/19] Block job improvements part 1

2012-09-28 Thread Kevin Wolf
Am 28.09.2012 17:22, schrieb Paolo Bonzini: > Kevin, > > the following changes since commit ac05f3492421caeb05809ffa02c6198ede179e43: > > add a boot parameter to set reboot timeout (2012-09-25 20:05:04 -0500) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git

Re: [Qemu-devel] [PATCH v10 0/5] GlusterFS support in QEMU - v10

2012-09-28 Thread Kevin Wolf
Am 27.09.2012 15:55, schrieb Bharata B Rao: > Hi, > > This is v10 of the patchset to support GlusterFS backend from QEMU. > > Changes in v10 > -- > - Included another fix to qemu_aio_wait() from Paolo in the series. > - A few more fixes to the volume and image parsing code. > - Remove

[Qemu-devel] [PATCH 14/30] qerror/block: introduce QERR_BLOCK_JOB_NOT_ACTIVE

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini The DeviceNotActive text is not a particularly good match, add a separate text while keeping the same class. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- blockdev.c |4 ++-- qerror.h |3 +++ 2 files changed, 5 insertions(+),

[Qemu-devel] [PATCH 16/30] block: move job APIs to separate files

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- Makefile.objs |5 +- block.c | 128 + block.h |2 + block/Makefile.objs |5 +- block/commit.c |1 + bl

[Qemu-devel] [PATCH 20/30] qmp: add block-job-pause and block-job-resume

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini Add QMP commands matching the functionality. Paused jobs cannot be canceled without first resuming them. This ensures that I/O errors are never missed by management. However, an optional force argument can be specified to allow that. Signed-off-by: Paolo Bonzini Reviewed-

Re: [Qemu-devel] a user here - pci-assign

2012-09-28 Thread lejeczek
thanks Alex for your patience, appreciate it I do what would be the droids I need? I'm experiencing guests' "puzzling" behavior and was suggested that command line arguments were wrong/incomplete. same box/hardware and radeon 5450 and ... - winXP-32bit -> OK - I assumed getting the guest on a

[Qemu-devel] [PATCH 02/30] block: after creating a live snapshot, make old image read-only

2012-09-28 Thread Kevin Wolf
From: Jeff Cody Currently, after a live snapshot of a drive, the image that has been 'demoted' to be below the new active layer remains r/w. This patch reopens it read-only. Note that we do not check for error on the reopen(), because we will not abort the snapshots if the reopen fails. This pa

[Qemu-devel] [PATCH 05/30] aio: Another fix to the walking_handlers logic

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini The AIO dispatch loop will call QLIST_REMOVE and g_free even if there are other pending calls to qemu_aio_wait outside the current one. Signed-off-by: Paolo Bonzini Signed-off-by: Bharata B Rao Signed-off-by: Kevin Wolf --- aio.c | 10 +- 1 files changed, 5 inse

[Qemu-devel] [PATCH 28/30] blkdebug: process all set_state rules in the old state

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini Currently it is impossible to write a blkdebug script that ping-pongs between two states, because the second set-state rule will use the state that is set in the first. If you have [set-state] event = "..." state = "1" new_state = "2" [set-state] eve

[Qemu-devel] [PATCH 24/30] iostatus: change is_read to a bool

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini Do this while we are touching this part of the code, before introducing more uses of "int is_read". Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block.c |4 ++-- block.h |4 ++-- blockdev.c |2 +- hw/i

[Qemu-devel] [PATCH 23/30] iostatus: move BlockdevOnError declaration to QAPI

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini This will let block-stream reuse the enum. Places that used the enums are renamed accordingly. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block.c |6 +++--- block.h |5 - block/commit.c| 14 +++

[Qemu-devel] [PATCH 03/30] aio: Fix qemu_aio_wait() to maintain correct walking_handlers count

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini Fix qemu_aio_wait() to ensure that registered aio handlers don't get deleted when they are still active. This is ensured by maintaning the right count of walking_handlers. Signed-off-by: Paolo Bonzini Signed-off-by: Bharata B Rao Signed-off-by: Kevin Wolf --- aio.c |8

[Qemu-devel] [PATCH 19/30] block: add support for job pause/resume

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini Job pausing reuses the existing support for cancellable sleeps. A pause happens at the next sleeping point and lasts until the coroutine is re-entered explicitly. Cancellation was already doing a forced resume, so implement it explicitly in terms of resume. Paused jobs cann

[Qemu-devel] [PATCH 26/30] block: introduce block job error

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini The following behaviors are possible: 'report': The behavior is the same as in 1.1. An I/O error, respectively during a read or a write, will complete the job immediately with an error code. 'ignore': An I/O error, respectively during a read or a write, will be ignored. Fo

[Qemu-devel] [PATCH 06/30] configure: Add a config option for GlusterFS as block backend

2012-09-28 Thread Kevin Wolf
From: Bharata B Rao GlusterFS support in QEMU depends on libgfapi, libgfrpc and libgfxdr provided by GlusterFS. Signed-off-by: Bharata B Rao Signed-off-by: Kevin Wolf --- configure | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/conf

[Qemu-devel] [PATCH 25/30] iostatus: reorganize io error code

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini Move the common part of IDE/SCSI/virtio error handling to the block layer. The new function bdrv_error_action subsumes all three of bdrv_emit_qmp_error_event, vm_stop, bdrv_iostatus_set_err. The same scheme will be used for errors in block jobs. Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 15/30] block: fix documentation of block_job_cancel_sync

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini Do this in a separate commit before we move the functions to blockjob.h. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block_int.h | 12 +--- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/block_int.h b/block_

[Qemu-devel] [PATCH 29/30] qemu-iotests: map underscore to dash in QMP argument names

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini iotests.py provides a convenience function that uses Python keyword arguments to represent QMP command arguments. However, almost all QMP commands use dashes for argument names (the sole exception is block_set_io_throttle), and dashes are not allowed in a keyword argument nam

[Qemu-devel] [PATCH 12/30] QAPI: add command for live block commit, 'block-commit'

2012-09-28 Thread Kevin Wolf
From: Jeff Cody The command for live block commit is added, which has the following arguments: device: the block device to perform the commit on (mandatory) base: the base image to commit into; optional (if not specified, it is the underlying original image) top:the top image of th

[Qemu-devel] [PATCH 01/30] block-migration: Flush requests in blk_mig_cleanup

2012-09-28 Thread Kevin Wolf
When cancelling block migration, all in-flight requests of the block migration must be completed before the data can be freed. This was visible as failing assertions and segfaults. Reported-by: Peter Lieven Signed-off-by: Kevin Wolf --- block-migration.c |2 ++ 1 files changed, 2 insertions

[Qemu-devel] [PATCH 10/30] blockdev: rename block_stream_cb to a generic block_job_cb

2012-09-28 Thread Kevin Wolf
From: Jeff Cody Signed-off-by: Jeff Cody Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- blockdev.c |6 +++--- trace-events |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/blockdev.c b/blockdev.c index 0267fa3..f910ac5 100644 --- a/blockdev.c +++ b/blockd

[Qemu-devel] [PATCH 13/30] qemu-iotests: add initial tests for live block commit

2012-09-28 Thread Kevin Wolf
From: Jeff Cody Derived from the streaming test cases (030), this adds the following 9 tests: 1. For the following image chain, commit [mid] into [backing], and use qemu-io to verify [backing] has its original data, as well as the data from [mid] [backing] <-- [mid] <-- [test]

[Qemu-devel] [PATCH 22/30] iostatus: rename BlockErrorAction, BlockQMPEventAction

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini We want to remove knowledge of BLOCK_ERR_STOP_ENOSPC from drivers; drivers should only be told whether to stop/report/ignore the error. On the other hand, we want to keep using the nicer BlockErrorAction name in the drivers. So rename the enums, while leaving aside the names

[Qemu-devel] [PATCH 08/30] block: add support functions for live commit, to find and delete images.

2012-09-28 Thread Kevin Wolf
From: Jeff Cody Add bdrv_find_overlay(), and bdrv_drop_intermediate(). bdrv_find_overlay(): given 'bs' and the active (topmost) BDS of an image chain, find the image that is the immediate top of 'bs' bdrv_drop_intermediate(): Given 3 BDS (active, top, ba

[Qemu-devel] [PATCH 21/30] qemu-iotests: add test for pausing a streaming operation

2012-09-28 Thread Kevin Wolf
From: Paolo Bonzini These check that a paused streaming job does not advance its offset. Sometimes the new test fails; the map is different between the source and the destination of the streaming because qemu-io does not always pack adjacent clusters that have the same allocated/unallocated stat

[Qemu-devel] [PULL 00/30] Block patches

2012-09-28 Thread Kevin Wolf
The following changes since commit 6f8fd2530e9a530f237240daf1c981fa5df7f978: Merge branch 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm (2012-09-27 21:48:56 +0200) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Bharata B Rao (

Re: [Qemu-devel] a user here - pci-assign

2012-09-28 Thread Alex Williamson
On Fri, 2012-09-28 at 19:46 +0100, lejeczek wrote: > thanks Alex for your patience, appreciate it I do > > what would be the droids I need? > I'm experiencing guests' "puzzling" behavior and was > suggested that command line arguments were wrong/incomplete. > > same box/hardware and radeon 5450

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] PPC: e500: calculate initrd_base like dt_base

2012-09-28 Thread Scott Wood
On 09/28/2012 02:52:15 PM, folkert wrote: On Tue, Sep 25, 2012 at 09:49:08AM +0200, Alexander Graf wrote: > > While investigating dtb pad issues, I noticed that initrd_base wasn't taking > > loadaddr into account the way dt_base was. This seems wrong. > > > > Signed-off-by: Scott Wood > > Ah

[Qemu-devel] [PATCH] Removing O_LARGEFILE from block layer

2012-09-28 Thread Richa Marwaha
QEMU by default configures -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE so there is not need to mention O_LARGEFILE in the block layer. Signed-off-by: Richa Marwaha --- block/raw-posix.c |2 +- block/vdi.c |2 +- block/vmdk.c |6 +++--- block/vvfat.c |2 +- 4 files c

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] PPC: e500: calculate initrd_base like dt_base

2012-09-28 Thread folkert
On Tue, Sep 25, 2012 at 09:49:08AM +0200, Alexander Graf wrote: > > While investigating dtb pad issues, I noticed that initrd_base wasn't taking > > loadaddr into account the way dt_base was. This seems wrong. > > > > Signed-off-by: Scott Wood > > Ah, all the images I tested start off from addr

Re: [Qemu-devel] [PATCH] Removing O_LARGEFILE from block layer

2012-09-28 Thread Eric Blake
On 09/28/2012 10:45 AM, Richa Marwaha wrote: > QEMU by default configures -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > so there is not need to mention O_LARGEFILE in the block layer. > > Signed-off-by: Richa Marwaha > --- > block/raw-posix.c |2 +- > block/vdi.c |2 +- > block/vmdk

  1   2   >