Re: [Qemu-devel] [PULL 00/11] Block patches

2012-09-18 Thread Michael Tokarev
On 14.09.2012 16:39, Kevin Wolf wrote: The following changes since commit e0a1e32dbc41e6b2aabb436a9417dfd32177a3dc: Merge branch 'usb.64' of git://git.kraxel.org/qemu (2012-09-11 18:06:56 +0200) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony

[Qemu-devel] [Bug 1042654] Re: Floppy disks and network not working on NT 3.1 on Qemu 1.2 rc1

2012-09-18 Thread Michael Tokarev
It appears that the fdc issue were addressed in this patch series: http://thread.gmane.org/gmane.comp.emulators.qemu/168836 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1042654 Title: Floppy

[Qemu-devel] [PATCH] Revert serial: fix retry logic

2012-09-19 Thread Michael Tokarev
, till a better solution will be found. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- hw/serial.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/serial.c b/hw/serial.c index a421d1e..df54de2 100644 --- a/hw/serial.c +++ b/hw/serial.c @@ -327,8 +327,6 @@ static

[Qemu-devel] [PATCH] qxl/update_area_io: cleanup invalid parameters handling

2012-09-19 Thread Michael Tokarev
This cleans up two additions of almost the same code in commits 511b13e2c9 and ccc2960d654. While at it, make error paths consistent (always use 'break' instead of 'return'). Signed-off-by: Michael Tokarev m...@tls.msk.ru Cc: Dunrong Huang riegama...@gmail.com Cc: Alon Levy al...@redhat.com

Re: [Qemu-devel] [PATCH 05/10] qxl: dont update invalid area

2012-09-19 Thread Michael Tokarev
On 13.09.2012 12:45, Gerd Hoffmann wrote: From: Dunrong Huang riegama...@gmail.com This patch fixes the following error: $ ~/usr/bin/qemu-system-x86_64 -enable-kvm -m 1024 -spice port=5900,disable-ticketing -vga qxl -cdrom ~/Images/linuxmint-13-mate-dvd-32bit.iso

Re: [Qemu-devel] [PATCH] arch_init.c: Improve '-soundhw help' for non-HAS_AUDIO_CHOICE archs

2012-09-19 Thread Michael Tokarev
On 19.09.2012 17:51, Peter Maydell wrote: +#else +printf(Machine has no user-selectable audio hardware + (it may or may not have always-present audio hardware).\n); Can't we add a linefeed here the same way it is written in the code? /mjt

Re: [Qemu-devel] [PATCH 0/3] Intruduce qemu-ga-client

2012-09-19 Thread Michael Tokarev
On 20.09.2012 00:20, Luiz Capitulino wrote: On Fri, 14 Sep 2012 21:44:19 +0900 Ryota Ozaki ozaki.ry...@gmail.com wrote: This patch series adds qemu-ga-client that is a command line script to use guest agent functions easily. Can't this be implemented in the agent itself, without a need for

Re: [Qemu-devel] [PATCH] qxl/update_area_io: cleanup invalid parameters handling

2012-09-20 Thread Michael Tokarev
On 20.09.2012 10:41, Gerd Hoffmann wrote: On 09/19/12 15:41, Michael Tokarev wrote: This cleans up two additions of almost the same code in commits 511b13e2c9 and ccc2960d654. While at it, make error paths consistent (always use 'break' instead of 'return'). Other way around: should

Re: [Qemu-devel] [PATCH 2/2] tcg: add TB sanity checking

2012-09-21 Thread Michael Tokarev
On 21.09.2012 04:18, Max Filippov wrote: diff --git a/tcg/tcg.c b/tcg/tcg.c +#ifdef CONFIG_DEBUG_TCG +static void tcg_sanity_check(TCGContext *s) #ifndef CONFIG_DEBUG_TCG #define tcg_sanity_check(s) /*empty*/ #else static void tcg_sanity_check(TCGContext *s) +{ [] +} +#endif @@ -2082,6

Re: [Qemu-devel] [PATCH] net/socket: Fix compiler warning (regression for MinGW)

2012-09-22 Thread Michael Tokarev
On 22.09.2012 20:32, Stefan Hajnoczi wrote: On Thu, Sep 20, 2012 at 09:32:19PM +0200, Stefan Weil wrote: Add a type cast which was removed by commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf again. Without it, MinGW compilers complain: net/socket.c:136: warning: pointer targets in passing

[Qemu-devel] [PATCH] stop using stdio for monitor/serial/etc with -daemonize

2012-09-25 Thread Michael Tokarev
Mitake, which creates is_daemonized() routine. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- vl.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/vl.c b/vl.c index 48049ef..ae1794f 100644 --- a/vl.c +++ b/vl.c @@ -3395,17 +3395,26 @@ int main(int

Re: [Qemu-devel] [PATCH] stop using stdio for monitor/serial/etc with -daemonize

2012-09-25 Thread Michael Tokarev
On 25.09.2012 15:23, Peter Maydell wrote: On 25 September 2012 11:43, Michael Tokarev m...@tls.msk.ru wrote: --- a/vl.c +++ b/vl.c @@ -3395,17 +3395,26 @@ int main(int argc, char **argv, char **envp) if (display_type == DT_NOGRAPHIC) { if (default_parallel

Re: [Qemu-devel] [PATCH] stop using stdio for monitor/serial/etc with -daemonize

2012-09-25 Thread Michael Tokarev
On 25.09.2012 15:53, Michael Tokarev wrote: On 25.09.2012 15:23, Peter Maydell wrote: [] Would it be possible to condense this chain of ifs down a bit by having a variable which gets appropriately set to stdio, null or vc:80Cx24C and then used in a single set of add_device_config() calls

[Qemu-devel] [PATCH v2] stop using stdio for monitor/serial/etc with -daemonize

2012-09-25 Thread Michael Tokarev
. This patch depends on another patch, 995ee2bf469de6, curses: don't initialize curses when qemu is daemonized, by Hitoshi Mitake, which creates is_daemonized() routine. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- vl.c | 45 +++-- 1 file changed, 27

Re: [Qemu-devel] [PATCH v2] stop using stdio for monitor/serial/etc with -daemonize

2012-09-26 Thread Michael Tokarev
On 26.09.2012 01:19, Anthony Liguori wrote: Combining -nographic and -daemonize don't make sense. I'd rather error out with this combination. I think what the user is after is -daemonize -vga none OR -daemonize -display none. So what's the difference? I know lots of people use -nographic

Re: [Qemu-devel] [PATCH v2] stop using stdio for monitor/serial/etc with -daemonize

2012-09-26 Thread Michael Tokarev
On 26.09.2012 12:00, Peter Maydell wrote: I know lots of people use -nographic -daemonize to run headless guests in background (like, for example, a router). I guess it come way before -vga option has been introduced, but at least I know about -vga (but not about -vga none). For one, I

Re: [Qemu-devel] [PATCH v2] stop using stdio for monitor/serial/etc with -daemonize

2012-09-26 Thread Michael Tokarev
On 26.09.2012 17:46, Anthony Liguori wrote: [] This is a good example of where we need improved documentation but I agree 100% with Peter. So what do we do? We've a clear bug, I can only fix it in the patch to the Debian package, since I've been asked about this bug multiple times, and I care

Re: [Qemu-devel] Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael Tokarev
To clarify: 1. this only affects 1.1.x tree (which is a history for most developers already) 2. the same guest boots okay with 1.2 (with kvm and irqchip enabled). BTW, what is this hda-duplex device anyway? I never heard of it before now :). And I guess using QEMU_AUDIO_DRV=none with

Re: [Qemu-devel] Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael Tokarev
On 27.09.2012 20:25, Nikolai Kondrashov wrote: On 09/27/2012 06:23 PM, Michael Tokarev wrote: Please provide full command line which virt-manager uses. You can find it in virtmanager logs or in ps(1) output. Here is the command line: LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin

Re: [Qemu-devel] Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael Tokarev
On 27.09.2012 22:28, Jan Kiszka wrote: [] --- a/hw/intel-hda.c +++ b/hw/intel-hda.c @@ -1107,6 +1107,9 @@ static void intel_hda_reset(DeviceState *dev) DeviceState *qdev; HDACodecDevice *cdev; +if (d-msi) { +msi_reset(d-pci); +} intel_hda_regs_reset(d);

[Qemu-devel] [PATCH] intel_hda: do not call msi_reset when only device state needs resetting

2012-09-27 Thread Michael Tokarev
by the PCI code already. Signed-off-by: Michael Tokarev m...@tls.msk.ru Cc: Jan Kiszka jan.kis...@siemens.com Cc: 688...@bugs.debian.org --- hw/intel-hda.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/intel-hda.c b/hw/intel-hda.c index e38861e..da61323

Re: [Qemu-devel] Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael Tokarev
On 27.09.2012 23:32, Michael S. Tsirkin wrote: [] Looks good to me. I just sent another patch, now with proper S-o-b and description, which does the same but touches 2 less lines (by renaming the other half of the function), -- his is to be more like the 1.2+ version. The functionality is

Re: [Qemu-devel] qemu-kvm: remove boot=on|off drive parameter compatibility

2012-10-01 Thread Michael Tokarev
01.10.2012 17:36, Jan Kiszka wrote: On 2012-10-01 15:31, Marcelo Tosatti wrote: Default nic is rtl8139 vs. e1000. Config file (as suggested earlier on this thread). If you need to append -config bla, you can also specify the desired NIC explicitly - I see no value in the former. If we

Re: [Qemu-devel] [PATCH] kvm: Set default accelerator to kvm if the host supports it

2012-10-03 Thread Michael Tokarev
On 02.10.2012 11:46, Markus Armbruster wrote: Daniel P. Berrange berra...@redhat.com writes: IMHO, default to KVM, fallback to TCG is the most friendly default behaviour. Friendly perhaps, generating an infinite series of questions why is my guest slow as molasses? certainly. With a

[Qemu-devel] [PATCH] Consolidate reads and writes in nbd block device into one common routine

2012-02-28 Thread Michael Tokarev
This removes quite some duplicated code. Signed-off-By: Michael Tokarev m...@tls.msk.ru --- block/nbd.c | 94 +++ 1 files changed, 30 insertions(+), 64 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 161b299..82f2964 100644

[Qemu-devel] [PATCH v2] Consolidate reads and writes in nbd block device into one common routine

2012-02-28 Thread Michael Tokarev
This removes quite some duplicated code. v2 fixes a bug (uninitialized reply.error) and makes the loop more natural. Signed-off-By: Michael Tokarev m...@tls.msk.ru --- block/nbd.c | 95 +++--- 1 files changed, 31 insertions(+), 64 deletions

Re: [Qemu-devel] [PATCH v2] Consolidate reads and writes in nbd block device into one common routine

2012-02-28 Thread Michael Tokarev
On 28.02.2012 15:35, Paolo Bonzini wrote: Il 28/02/2012 11:24, Michael Tokarev ha scritto: This removes quite some duplicated code. [] +static int nbd_co_rwv(BlockDriverState *bs, int64_t sector_num, + int nb_sectors, QEMUIOVector *qiov, int iswrite) Call this nbd_co_rw

Re: [Qemu-devel] [PATCH v2] Consolidate reads and writes in nbd block device into one common routine

2012-02-28 Thread Michael Tokarev
On 28.02.2012 17:03, Paolo Bonzini wrote: Il 28/02/2012 13:35, Michael Tokarev ha scritto: On 28.02.2012 15:35, Paolo Bonzini wrote: Il 28/02/2012 11:24, Michael Tokarev ha scritto: This removes quite some duplicated code. [] +static int nbd_co_rwv(BlockDriverState *bs, int64_t sector_num

[Qemu-devel] RFC: block: combine read and write routines into rw_vector

2012-02-28 Thread Michael Tokarev
The following 3-patch series performs conversion of read and write methods of block drivers into bdrv_rw_vector with additional is_write argument. Current I/O request path is twisted so much that it becomes very difficult to follow. A read or write request goes from common io routine to

[Qemu-devel] [PATCH 3/3] Combine bdrv_co_readv and bdrv_co_writev into bdrv_co_rw_vector

2012-02-28 Thread Michael Tokarev
drivers now contains multiplexing functions (rw_vector() - readv()+writev()), since for these drivers, the read and write routines actually have very little in common. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block.c | 206

[Qemu-devel] [PATCH 1/3] Combine bdrv_read and bdrv_write to bdrv_rw

2012-02-28 Thread Michael Tokarev
multiplexors. These are: cow, vmdk, vpc, vvfat. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block.c |4 +--- block/bochs.c |9 ++--- block/cloop.c |9 ++--- block/cow.c | 21 + block/dmg.c |9 ++--- block

[Qemu-devel] [PATCH 2/3] Combine bdrv_aio_readv and bdrv_aio_writev into bdrv_aio_rw_vector

2012-02-28 Thread Michael Tokarev
as well, and once the XXX todo bounce-buffer change is complete the only difference there should go away too. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block.c | 39 ++- block.h |3 + block/blkdebug.c | 24 ++ block/blkverify.c | 74

Re: [Qemu-devel] QOM: why klass used instead of class ?

2012-02-28 Thread Michael Tokarev
On 29.02.2012 09:52, Evgeny Voevodin wrote: include/qemu/object.h: [] * void my_device_class_init(ObjectClass *klass, void *class_data) * { * DeviceClass *dc = DEVICE_CLASS(klass); * dc-reset = my_device_reset; * } * Why to use klass, not class? Because in C++, class is a

Re: [Qemu-devel] [PATCH 1/3] Combine bdrv_read and bdrv_write to bdrv_rw

2012-02-29 Thread Michael Tokarev
On 29.02.2012 19:53, Paolo Bonzini wrote: Il 29/02/2012 00:54, Michael Tokarev ha scritto: -static coroutine_fn int cow_co_write(BlockDriverState *bs, int64_t sector_num, - const uint8_t *buf, int nb_sectors) +static coroutine_fn int cow_co_rw

Re: [Qemu-devel] [PATCH 3/3] Combine bdrv_co_readv and bdrv_co_writev into bdrv_co_rw_vector

2012-02-29 Thread Michael Tokarev
On 29.02.2012 20:01, Paolo Bonzini wrote: Il 29/02/2012 00:54, Michael Tokarev ha scritto: BlockDriver *drv = bs-drv; BdrvTrackedRequest req; +bool is_write = flags (BDRV_REQ_WRITE|BDRV_REQ_ZERO_WRITE); int ret; You can do BDRV_REQ_WRITE|BDRV_REQ_ZERO_WRITE

Re: [Qemu-devel] [PATCH 2/3] Combine bdrv_aio_readv and bdrv_aio_writev into bdrv_aio_rw_vector

2012-02-29 Thread Michael Tokarev
On 29.02.2012 19:54, Paolo Bonzini wrote: Il 29/02/2012 00:54, Michael Tokarev ha scritto: iscsi block driver may receive some additional work. For now, some common code has been moved out of iscsi_aio_writev() and iscsi_aio_readv() into iscsi_aio_rw_vector(). Leftovers there can

Re: [Qemu-devel] [PATCH 1/3] Combine bdrv_read and bdrv_write to bdrv_rw

2012-02-29 Thread Michael Tokarev
On 29.02.2012 20:07, Paolo Bonzini wrote: Il 29/02/2012 17:00, Michael Tokarev ha scritto: And how it will be a cleanup? The whole cow code (and a few others) is not reenterant. Merely moving this lock/unlock stuff inth actual methods eliminates two current wrappers in cow_co_write

Re: [Qemu-devel] [PATCH 3/3] Combine bdrv_co_readv and bdrv_co_writev into bdrv_co_rw_vector

2012-02-29 Thread Michael Tokarev
On 29.02.2012 20:24, Paolo Bonzini wrote: Il 29/02/2012 17:12, Michael Tokarev ha scritto: On 29.02.2012 20:01, Paolo Bonzini wrote: Il 29/02/2012 00:54, Michael Tokarev ha scritto: BlockDriver *drv = bs-drv; BdrvTrackedRequest req; +bool is_write = flags (BDRV_REQ_WRITE

Re: [Qemu-devel] [PATCH v2] VMXNET3 paravirtual NIC device implementation

2012-03-01 Thread Michael Tokarev
On 29.02.2012 16:49, Dmitry Fleytman wrote: Implementation of VMWare VMXNET3 paravirtual NIC device. Supports of all the device features including offload capabilties, VLANs and etc. [..] Not a review or anything (I don't know qemu networking internals much), just a question: does it support

Re: [Qemu-devel] Use getaddrinfo for migration

2012-03-02 Thread Michael Tokarev
Not a reply to the patch but a general observation. I noticed that the tcp migration uses gethostname (or getaddrinfo after this patch) from the main thread - is it really the way to go? Note that DNS query which is done may block for a large amount of time. Is it really safe in this context?

Re: [Qemu-devel] Bug#660154: qemu-keymaps: Finnish keyboard mapping broken

2012-03-02 Thread Michael Tokarev
On 17.02.2012 01:58, Timo Sirainen wrote: Subject: qemu-keymaps: Finnish keyboard mapping broken Package: qemu-keymaps Version: 1.0+dfsg-3 Severity: normal With -k fi -vnc :1 the keyboard layout works pretty well, except the key between left shift and z key, which generates characters

Re: [Qemu-devel] [PATCH] Change library from libiscsi to libiscsiclient to match library rename in libiscsi

2012-03-03 Thread Michael Tokarev
On 03.03.2012 10:38, Ronnie Sahlberg wrote: Signed-off-by: Ronnie Sahlberg ronniesahlb...@gmail.com --- configure |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index fb0e18e..294c0c1 100755 --- a/configure +++ b/configure @@ -2503,9

Re: [Qemu-devel] QEMU desired libiscsi.so clashes with libiscsi.so from iscsi-initiator-utils

2012-03-03 Thread Michael Tokarev
On 03.03.2012 15:15, Andreas Färber wrote: Am 03.03.2012 07:43, schrieb ronnie sahlberg: Yes, Very unfortuante since libiscsi is such a nice name for a multiplatform library what even works on win32 :-( I have so renamed it to libiscsiclient and sent a patch to qemu to this list to use

[Qemu-devel] restart a coroutine?

2012-03-04 Thread Michael Tokarev
Since all block (bdrv) layer is now implemented using coroutines, I thought I'd give it a try. But immediately hit a question to which I don't know a good answer. Suppose we've some networking block device (like NBD) and want to be able to support reconnection - this is actually very useful

Re: [Qemu-devel] restart a coroutine?

2012-03-04 Thread Michael Tokarev
On 04.03.2012 20:08, Avi Kivity wrote: On 03/04/2012 02:41 PM, Michael Tokarev wrote: Since all block (bdrv) layer is now implemented using coroutines, I thought I'd give it a try. But immediately hit a question to which I don't know a good answer. Suppose we've some networking block device

Re: [Qemu-devel] QEMU desired libiscsi.so clashes with libiscsi.so from iscsi-initiator-utils

2012-03-06 Thread Michael Tokarev
On 06.03.2012 14:07, Daniel P. Berrange wrote: On Sat, Mar 03, 2012 at 03:54:19PM +0400, Michael Tokarev wrote: It looks like iscsi-initiator-utils package in fedora is built using shared libiscsi which appears to be package-specific, e.g. Yes, it is the iscsi-initiator-utils package I'd

Re: [Qemu-devel] QEMU desired libiscsi.so clashes with libiscsi.so from iscsi-initiator-utils

2012-03-06 Thread Michael Tokarev
06.03.2012 15:15, Daniel P. Berrange wrote: On Tue, Mar 06, 2012 at 10:06:38PM +1100, ronnie sahlberg wrote: Sorry about this. First, libiscsi is a really good name for a general purpose multiplatform library, like libiscsi. Second, a generic name like this is a horribly poor idea for a

Re: [Qemu-devel] XP install cores with SCSI LSI 53C895A disks

2012-03-08 Thread Michael Tokarev
On 08.03.2012 11:44, Gerd Hoffmann wrote: On 03/07/12 20:58, Gerhard Wiesinger wrote: On Wed, 7 Mar 2012, Brian Jackson wrote: I think most people trying to use qemu for anything useful have given up on if=scsi. Some distros even disable support because they don't want to QA it. That should

[Qemu-devel] [PATCH 0/5] cleanup/consolidate some iovec functions

2012-03-10 Thread Michael Tokarev
in patch 2), changes the types to be size_t instead of int, and consolidates send and recv paths into one (with one extra argument, do_send), since the code is exactly the same. This also lets us to use common read/write code paths in upper layer. Michael Tokarev (5): Consolidate

[Qemu-devel] [PATCH 1/5] Consolidate qemu_iovec_memset{, _skip}() into single, simplified function

2012-03-10 Thread Michael Tokarev
This patch combines two functions into one, simplifies the implementation and adds some assert()s into place. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block/qcow2.c |4 +- block/qed.c|4 +- cutils.c | 54

[Qemu-devel] [PATCH 2/5] change prototypes of qemu_sendv() and qemu_recvv()

2012-03-10 Thread Michael Tokarev
of qemu_sendv() and qemu_recvv() and related, like qemu_co_sendv() and qemu_co_recvv(), were checked to verify that it is safe to use unsigned datatype instead of int. While at it, clean up misleading comment near do_sendv_recvv(). Signed-off-by: Michael Tokarev m...@tls.msk.ru --- cutils.c

[Qemu-devel] [PATCH 4/5] cleanup qemu_co_sendv(), qemu_co_recvv() and friends

2012-03-10 Thread Michael Tokarev
() directly. Also constify buf arg of qemu_co_send(). qemu_co_sendv(), qemu_co_recvv(), and qemu_co_recv() are now trivial #define's merely adding one extra arg. qemu_co_send() is an inline function due to `buf' arg de-constification. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- qemu-common.h

[Qemu-devel] [PATCH 5/5] rewrite and comment qemu_sendv_recvv()

2012-03-10 Thread Michael Tokarev
and verifying the receiving data is the same. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- cutils.c | 119 +--- qemu-common.h |2 +- 2 files changed, 63 insertions(+), 58 deletions(-) diff --git a/cutils.c b/cutils.c index 6d9175f

[Qemu-devel] [PATCH 3/5] Export qemu_sendv_recvv() and use it in (inlined) qemu_sendv() and qemu_recvv()

2012-03-10 Thread Michael Tokarev
Rename do_sendv_recvv() to qemu_sendv_recvv(), change its last arg (do_send) from int to bool, export it in qemu-common.h, and made the two callers of it (qemu_sendv() and qemu_recvv()) to be trivial #defines just adding 5th arg. qemu_sendv_recvv() will be used later. Signed-off-by: Michael

[Qemu-devel] [PATCHv2 5/7] Export qemu_sendv_recvv() and use it in qemu_sendv() and qemu_recvv()

2012-03-10 Thread Michael Tokarev
Rename do_sendv_recvv() to qemu_sendv_recvv(), change its last arg (do_send) from int to bool, export it in qemu-common.h, and made the two callers of it (qemu_sendv() and qemu_recvv()) to be trivial #defines just adding 5th arg. qemu_sendv_recvv() will be used later. Signed-off-by: Michael

[Qemu-devel] [PATCHv2 1/7] Consolidate qemu_iovec_memset{, _skip}() into single, simplified function

2012-03-10 Thread Michael Tokarev
functions to be consistent with it too: first how much to skip, second what, and 3rd how many of it. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block/qcow2.c |4 ++-- block/qed.c|4 ++-- cutils.c | 50

[Qemu-devel] [PATCHv2 7/7] rewrite and comment qemu_sendv_recvv()

2012-03-10 Thread Michael Tokarev
and verifying the receiving data is the same. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- cutils.c | 119 +--- qemu-common.h |2 +- 2 files changed, 63 insertions(+), 58 deletions(-) diff --git a/cutils.c b/cutils.c index b6f8eb8

[Qemu-devel] [PATCHv2 2/7] allow qemu_iovec_from_buffer() to specify offset from which to start copying

2012-03-10 Thread Michael Tokarev
Similar to qemu_iovec_memset(QEMUIOVector *qiov, size_t offset, int c, size_t bytes); the new prototype is: qemu_iovec_from_buffer(QEMUIOVector *qiov, size_t offset, const void *buf, size_t bytes); The processing starts at offset bytes within qiov. This way, we may copy a bounce buffer

[Qemu-devel] [PATCHv2 0/7] cleanup/consolidate some iovec functions

2012-03-10 Thread Michael Tokarev
() (this optimization/simplification isn't done in this series) Michael Tokarev (7): Consolidate qemu_iovec_memset{,_skip}() into single, simplified function allow qemu_iovec_from_buffer() to specify offset from which to start copying consolidate qemu_iovec_copy() and qemu_iovec_concat() and make

[Qemu-devel] [PATCHv2 4/7] change prototypes of qemu_sendv() and qemu_recvv()

2012-03-10 Thread Michael Tokarev
and iov_offset) are swapped with each other. This is to make them consistent with very similar functions from qemu_iovec family, where offset always follows qiov, to mean the place in it to start from. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- cutils.c| 34

[Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends

2012-03-10 Thread Michael Tokarev
to different argument order. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block/nbd.c |4 +- block/sheepdog.c|6 ++-- qemu-common.h | 38 +++--- qemu-coroutine-io.c | 83 +- 4 files changed, 46 insertions

[Qemu-devel] [PATCHv2 3/7] consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent

2012-03-10 Thread Michael Tokarev
qemu_iovec_concat() is currently a wrapper for qemu_iovec_copy(), use the former (with extra 0 arg) in a few places where it is used. Change skip argument of qemu_iovec_copy() from uint64_t to size_t, since size of qiov itself is size_t, so there's no way to skip larger sizes. Rename it to

Re: [Qemu-devel] [PATCHv2 0/7] cleanup/consolidate some iovec functions

2012-03-10 Thread Michael Tokarev
On 11.03.2012 05:49, Michael Tokarev wrote: This is a little cleanup/consolidation for some iovec-related low-level routines in qemu. The plan is to make library functions more understandable, consistent and useful. The patch changes prototypes of several iov and qiov functions to match

Re: [Qemu-devel] [PATCH 1/2] Support @documentencoding in scripts/texi2pod.pl

2012-03-11 Thread Michael Tokarev
Ping? It's been more than a month since this patch has been posted. Maybe it is a good candidate for -trivial queue? Thanks, /mjt On 02.02.2012 18:16, Michael Tokarev wrote: Currently our texi2pod ignores @documentencoding even if it is set properly in *.texi files. This results

Re: [Qemu-devel] [PATCH 2/2] Run pod2man with --utf8 option to enable utf8 in manpages

2012-03-11 Thread Michael Tokarev
Ping? It's been more than a month since this patch has been posted. Maybe it is a good candidate for -trivial queue? Thanks, /mjt On 02.02.2012 18:16, Michael Tokarev wrote: This option makes no difference for manpages which contains only ascii chars. But for manpages with actual UTF8

[Qemu-devel] [PATCH] virtio-serial-bus: use correct lengths in control_out() message

2012-03-11 Thread Michael Tokarev
In case of more than one control message, the code will use size of the largest message so far for all subsequent messages, instead of using size of current one. Fix it. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- hw/virtio-serial-bus.c |6 +++--- 1 files changed, 3 insertions(+), 3

Re: [Qemu-devel] [PATCHv2 5/7] Export qemu_sendv_recvv() and use it in qemu_sendv() and qemu_recvv()

2012-03-11 Thread Michael Tokarev
On 11.03.2012 19:00, Paolo Bonzini wrote: Il 11/03/2012 02:49, Michael Tokarev ha scritto: Rename do_sendv_recvv() to qemu_sendv_recvv(), change its last arg (do_send) from int to bool, export it in qemu-common.h, and made the two callers of it (qemu_sendv() and qemu_recvv()) to be trivial

Re: [Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends

2012-03-11 Thread Michael Tokarev
On 11.03.2012 19:01, Paolo Bonzini wrote: Il 11/03/2012 02:49, Michael Tokarev ha scritto: The same as for non-coroutine versions in previous patches: rename arguments to be more obvious, change type of arguments from int to size_t where appropriate, and use common code for send and receive

Re: [Qemu-devel] [PATCH] virtio-serial-bus: use correct lengths in control_out() message

2012-03-12 Thread Michael Tokarev
On 12.03.2012 12:59, Amit Shah wrote: On (Sun) 11 Mar 2012 [17:52:59], Michael Tokarev wrote: In case of more than one control message, the code will use size of the largest message so far for all subsequent messages, instead of using size of current one. Fix it. Makes sense. How did you

Re: [Qemu-devel] [PATCH 1/2] Support @documentencoding in scripts/texi2pod.pl

2012-03-12 Thread Michael Tokarev
On 12.03.2012 12:21, Stefan Hajnoczi wrote: On Sun, Mar 11, 2012 at 01:56:41PM +0400, Michael Tokarev wrote: Ping? It's been more than a month since this patch has been posted. Maybe it is a good candidate for -trivial queue? One thing I don't understand is where you actually use

Re: [Qemu-devel] [PATCH] virtio-serial-bus: use correct lengths in control_out() message

2012-03-12 Thread Michael Tokarev
On 12.03.2012 15:06, Amit Shah wrote: On (Mon) 12 Mar 2012 [13:22:22], Michael Tokarev wrote: On 12.03.2012 12:59, Amit Shah wrote: On (Sun) 11 Mar 2012 [17:52:59], Michael Tokarev wrote: In case of more than one control message, the code will use size of the largest message so far for all

Re: [Qemu-devel] [PATCHv2 6/7] cleanup qemu_co_sendv(), qemu_co_recvv() and friends

2012-03-12 Thread Michael Tokarev
On 12.03.2012 17:30, Paolo Bonzini wrote: Il 11/03/2012 16:26, Michael Tokarev ha scritto: Note that - I still hope - in the end there will be no sendv or recv calls at all, only common sendv_recvv with is_write passed as an argument from upper layer. It will be easier to remove that #define

[Qemu-devel] [PATCHv3 2/9] consolidate qemu_iovec_memset{, _skip}() into single function and use existing iov_memset()

2012-03-12 Thread Michael Tokarev
at it, use utility function iov_memset() from iov.h in posix-aio-compat.c, where qiov was used. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block/qcow2.c |4 ++-- block/qed.c|4 ++-- cutils.c | 44 linux-aio.c

[Qemu-devel] [PATCHv3 1/9] refresh iov_* functions

2012-03-12 Thread Michael Tokarev
and a few others in subsequent patches. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- hw/rtl8139.c |2 +- hw/usb.c |6 ++-- hw/virtio-balloon.c|4 +- hw/virtio-net.c|4 +- hw/virtio-serial-bus.c |6 ++-- iov.c | 89

[Qemu-devel] [PATCHv3 0/9] cleanup/consolidate some iovec functions

2012-03-12 Thread Michael Tokarev
into there (and ditto for cutils.c = (qemu-)iov.c). Michael Tokarev (9): refresh iov_* functions consolidate qemu_iovec_memset{,_skip}() into single function and use existing iov_memset() allow qemu_iovec_from_buffer() to specify offset from which to start copying consolidate qemu_iovec_copy

[Qemu-devel] [PATCHv3 4/9] consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent

2012-03-12 Thread Michael Tokarev
() with the same arguments but which calls qemu_iovec_reset() before _concat(). This needs to be done later, so that any current out-of-tree code which uses _copy(). Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block.c |4 +- block/qcow2.c |4 +- block/qed.c |6

[Qemu-devel] [PATCHv3 7/9] export qemu_sendv_recvv() and use it in qemu_sendv() and qemu_recvv()

2012-03-12 Thread Michael Tokarev
Rename do_sendv_recvv() to qemu_sendv_recvv(), change its last arg (do_sendv) from int to bool, export it in qemu-common.h, and made the two callers of it (qemu_sendv() and qemu_recvv()) to be trivial #defines just adding 5th arg. qemu_sendv_recvv() will be used later. Signed-off-by: Michael

[Qemu-devel] [PATCHv3 3/9] allow qemu_iovec_from_buffer() to specify offset from which to start copying

2012-03-12 Thread Michael Tokarev
). Signed-off-by: Michael Tokarev m...@tls.msk.ru Cc: Kevin Wolf kw...@redhat.com --- block.c |6 +++--- block/curl.c |6 +++--- block/qcow.c |2 +- block/qcow2.c |9 +++-- block/vdi.c |2 +- cutils.c | 16 +++- qemu-common.h |3 ++- 7 files changed

[Qemu-devel] [PATCHv3 8/9] cleanup qemu_co_sendv(), qemu_co_recvv() and friends

2012-03-12 Thread Michael Tokarev
. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block/nbd.c |4 +- block/sheepdog.c|6 ++-- qemu-common.h | 39 qemu-coroutine-io.c | 82 +++--- 4 files changed, 49 insertions(+), 82 deletions(-) diff

[Qemu-devel] [PATCHv3 9/9] rewrite and comment qemu_sendv_recvv()

2012-03-12 Thread Michael Tokarev
Make it much more understandable, and add comments to it. The new implementation has been extensively tested by splitting a large buffer into many small randomly-sized chunks, sending it over socket to another, slow process and verifying the receiving data is the same. Signed-off-by: Michael

[Qemu-devel] [PATCHv3 5/9] change qemu_iovec_to_buf() to match other to, from_buf functions

2012-03-12 Thread Michael Tokarev
It now allows specifying offset within qiov to start from and amount of bytes to copy. Actual implementation is just a call to iov_to_buf(). Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block.c |2 +- block/iscsi.c |2 +- block/qcow.c |2 +- block/qcow2.c |2

[Qemu-devel] [PATCHv3 6/9] change prototypes of qemu_sendv() and qemu_recvv()

2012-03-12 Thread Michael Tokarev
) are swapped with each other. This is to make them consistent with very similar functions from qemu_iovec family, where offset always follows qiov, to mean the place in it to start from. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- cutils.c| 37

Re: [Qemu-devel] [PATCHv3 0/9] cleanup/consolidate some iovec functions

2012-03-13 Thread Michael Tokarev
it in this series. Thanks, /mjt On 12.03.2012 23:14, Michael Tokarev wrote: This is a little cleanup/consolidation for some iovec-related low-level routines in qemu. The plan is to make library functions more understandable, consistent and useful, and to drop numerous implementations

[Qemu-devel] [PATCH (trivial)] no need to use bdrv_pread() in format guessing code when we can use bdrv_read() directly

2012-03-13 Thread Michael Tokarev
block.c:find_image_format() calls bdrv_pread() to read first 2048 bytes from the device to guess its format. This function can use bdrv_read() directly since the the read is done on sector boundary. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block.c |2 +- 1 files changed, 1

[Qemu-devel] [PATCH (trivial)] no need to use bdrv_pread() in format guessing code when we can use bdrv_read() directly

2012-03-13 Thread Michael Tokarev
. Signed-off-by: Michael Tokarev m...@tls.msk.ru --- block.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index b88ee90..b3af1f6 100644 --- a/block.c +++ b/block.c @@ -469,7 +469,7 @@ static int find_image_format(const char *filename, BlockDriver **pdrv

Re: [Qemu-devel] [PATCHv3 1/9] refresh iov_* functions

2012-03-13 Thread Michael Tokarev
On 13.03.2012 21:44, Paolo Bonzini wrote: Il 12/03/2012 20:14, Michael Tokarev ha scritto: +for (i = 0, done = 0; done bytes i iov_cnt; i++) { +if (offset iov[i].iov_len) { +size_t len = MIN(iov[i].iov_len - offset, bytes - done); +memcpy(iov[i

Re: [Qemu-devel] [PATCHv3 8/9] cleanup qemu_co_sendv(), qemu_co_recvv() and friends

2012-03-13 Thread Michael Tokarev
On 13.03.2012 22:01, Paolo Bonzini wrote: ssize_t qemu_sendv_recvv(int sockfd, struct iovec *iov, size_t offset, size_t bytes, bool do_sendv); Hmm, since you are at it however, perhaps you could add an argument to these functions and qemu_sendv_recvv for the length

Re: [Qemu-devel] ahci drive: how to make it non-bootable?

2012-05-08 Thread Michael Tokarev
On 08.05.2012 10:43, Gerd Hoffmann wrote: Hi, bootindex=1 for virtio -drive file=winguest.raw,if=virtio,bootindex=1 -- this does not work: Oops. I through it does, but seems this is only the case for the old deprecated boot=on (and maybe even that only in qemu-kvm). boot=on has

Re: [Qemu-devel] coroutine-ucontext broken for x86-32

2012-05-09 Thread Michael Tokarev
On 08.05.2012 23:35, Jan Kiszka wrote: Hi, I hunted down a fairly subtle corruption of the VCPU thread signal mask in KVM mode when using the ucontext version of coroutines: coroutine_new calls getcontext, makecontext, swapcontext. Those functions get/set also the signal mask of the

[Qemu-devel] qemu 1.0+ (up to current git) aborts with -vga std -M pc-0.12

2012-05-09 Thread Michael Tokarev
This one works: $ ./x86_64-softmmu/qemu-system-x86_64 -vga cirrus -M pc-0.12 But this does not: $ ./x86_64-softmmu/qemu-system-x86_64 -vga std -M pc-0.12 qemu-system-x86_64: /build/qemu/git/memory.c:1259: memory_region_add_subregion_common: Assertion `!subregion-parent' failed. Aborted Can we

Re: [Qemu-devel] ahci drive: how to make it non-bootable?

2012-05-09 Thread Michael Tokarev
On 09.05.2012 12:02, Gleb Natapov wrote: On Tue, May 08, 2012 at 09:56:10PM +0400, Michael Tokarev wrote: [] It's two only: -drive if=none,id=name,... -device virtio-blk-pci,drive=name Ok, at least it is not entirely insane :) That's the way you suppose to do that. Does it work if you

Re: [Qemu-devel] [PATCH] vga: fix vram double-mapping with -vga std and -M pc-0.12

2012-05-09 Thread Michael Tokarev
-0.12 -vga std, a win7 guest boots and works (before qemu were aborting at startup). So you can add Tested-By: Michael Tokarev m...@tls.msk.ru if necessary. Thank you for the quick fix! /mjt

[Qemu-devel] default qemu64 Co CPUs makes no sense?

2012-05-09 Thread Michael Tokarev
Default qemu64 x86 CPU in qemu is somewhat interesting. It has fixed family=6, model=2, and uses host CPUID if kvm is enabled, or AMD CPUID if not. So for case when it is run on intel box with kvm enabled, it corresponds to PentiumII CPU, which has no suppot of 64bits whatsoever, at all. Ie, it

Re: [Qemu-devel] coroutine-ucontext broken for x86-32

2012-05-09 Thread Michael Tokarev
On 08.05.2012 23:35, Jan Kiszka wrote: Hi, I hunted down a fairly subtle corruption of the VCPU thread signal mask in KVM mode when using the ucontext version of coroutines: coroutine_new calls getcontext, makecontext, swapcontext. Those functions get/set also the signal mask of the

Re: [Qemu-devel] [PATCH 1.1] coroutine: Avoid ucontext usage on i386 Linux host

2012-05-09 Thread Michael Tokarev
On 09.05.2012 23:21, Jan Kiszka wrote: On i386, glibc only saves/restores the signal mask via sigprocmask, excluding RT signal. A Linux bug in the compat version of this syscall corrupts the RT signal state, which will cause lockups of QEMU's VCPU threads. This should obviously be fixed in

Re: [Qemu-devel] [PATCH 1.1] coroutine: Avoid ucontext usage on i386 Linux host

2012-05-09 Thread Michael Tokarev
On 09.05.2012 23:21, Jan Kiszka wrote: [] --- a/configure +++ b/configure @@ -2777,17 +2777,22 @@ fi # windows autodetected by make if test $coroutine = -o $coroutine = ucontext; then if test $darwin != yes; then -cat $TMPC EOF +if test $linux = yes -a $cpu = i386; then +

[Qemu-devel] [PATCH, repost 2] qemu-keymaps: Finnish keyboard mapping broken

2012-05-09 Thread Michael Tokarev
As mentioned in http://bugs.debian.org/660154 , finnish keyboard mapping is kind of broken. Fix it as Timo Sirainen suggests in #660154. Signed-off-By: Michael Tokarev m...@tls.msk.ru index 2a4e0f0..4be7586 100644 --- a/pc-bios/keymaps/fi +++ b/pc-bios/keymaps/fi @@ -99,9 +99,7 @@ asterisk 0x2b

Re: [Qemu-devel] default qemu64 Co CPUs makes no sense?

2012-05-10 Thread Michael Tokarev
On 10.05.2012 11:30, Paolo Bonzini wrote: Il 09/05/2012 18:54, Michael Tokarev ha scritto: And in case kvm is enabled, and we run on some other CPU (not intel and not amd), we'll have some other CPU model, which might exist or might not, which may make some sense or may not, etc - we simple

[Qemu-devel] [Bug 498035] Re: qemu hangs on shutdown or reboot (XP guest)

2012-05-17 Thread Michael Tokarev
Confirming what? 0.14 version of qemu (there was no 14.0 version) is very old. Very frustrating that people just confirm bugs using old versions without trying current version which has a lot of changes within. I can confirm that this prob - winXP (or win7 for that matter) getting stuck on

Re: [Qemu-devel] Weird iscsi/fd-event issue since recent merge of event system changes

2012-05-22 Thread Michael Tokarev
On 22.05.2012 14:03, ronnie sahlberg wrote: [] Doh, now I remember. Whenever you change the aio handlers you need to call qemu_notify_event() afterwards, if the handler may fire right away. Thanks. I just confirmed that qemu_notify_event() fixes the issue. Ill send a patch that uses

<    5   6   7   8   9   10   11   12   13   14   >