[PATCH] posix-timers: RCU conversion

2011-03-22 Thread Eric Dumazet
Ben Nagy reported a scalability problem with KVM/QEMU that hit very hard a single spinlock (idr_lock) in posix-timers code, on its 48 core machine. Even on a 16 cpu machine (2x4x2), a single test can show 98% of cpu time used in ticket_spin_lock, from lock_timer Ref: http://www.spinics.net/lists/

Re: [PATCH] posix-timers: RCU conversion

2011-03-22 Thread Ben Nagy
On Tue, Mar 22, 2011 at 12:54 PM, Eric Dumazet wrote: > Ben Nagy reported a scalability problem with KVM/QEMU that hit very hard > a single spinlock (idr_lock) in posix-timers code, on its 48 core > machine. Hi all, Thanks a lot for all the help so far. We've tested with Eric's patch. First up,

Re: [PATCH 4/6] KVM: Use syscore_ops instead of sysdev class and sysdev

2011-03-22 Thread Avi Kivity
On 03/22/2011 01:37 AM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki KVM uses a sysdev class and a sysdev for executing kvm_suspend() after interrupts have been turned off on the boot CPU (during system suspend) and for executing kvm_resume() before turning on interrupts on the boot CPU (dur

Re: Biweekly KVM Test report, kernel a72e315c... qemu b73357ec...

2011-03-22 Thread Avi Kivity
On 03/21/2011 06:51 PM, Avi Kivity wrote: > On 03/21/2011 06:26 PM, Avi Kivity wrote: > > On 03/21/2011 02:35 PM, Avi Kivity wrote: > > > On 03/21/2011 04:47 AM, Ren, Yongjie wrote: > > > > Hi all, > > > > This is KVM test result against kvm.git > > > > a72e315c509376bbd1e121219c3ad9f23973923f bas

Re: [PATCH 1/3] alleviate time drift with HPET periodic timers

2011-03-22 Thread Ulrich Obergfell
>> Part 1 of the patch implements the following QEMU command line option. >> >> -hpet [device=none|present][,driftfix=none|slew] > > Just define driftfix as property of the hpet device. That way it can be > controlled both globally (-global hpet.driftfix=...) and per hpet block > (once we support

Re: [PATCH 3/3] alleviate time drift with HPET periodic timers

2011-03-22 Thread Ulrich Obergfell
>> Part 3 of the patch implements the following options for the >> 'configure' script. >> >> --disable-hpet-driftfix >> --enable-hpet-driftfix > > I see no benefit in this configurability. Just make the driftfix > unconditionally available, runtime-disabled by default for now until it > matured a

RE: [COMMIT] [WIN-GUEST-DRIVERS] Balloon - remove WMI usage. Remove wmi.c.

2011-03-22 Thread Yan Vugenfirer
Hello Vadim, Can you check this issues? Thanks, Yan. > -Original Message- > From: ya su [mailto:suya94...@gmail.com] > Sent: Saturday, March 19, 2011 5:28 AM > To: Yan Vugenfirer > Cc: kvm@vger.kernel.org > Subject: Re: [COMMIT] [WIN-GUEST-DRIVERS] Balloon - remove WMI usage. > Remove wm

Re: [PATCH 0/3] alleviate time drift with HPET periodic timers

2011-03-22 Thread Avi Kivity
On 03/18/2011 05:54 PM, Ulrich Obergfell wrote: Please review and please comment. Some procedural remarks: - put all patches in the same thread. 'git send-email' can do that automatically for you. This really helps reviewers, at least with some email readers - give individual patches meani

Re: [PATCH 3/3] alleviate time drift with HPET periodic timers

2011-03-22 Thread Jan Kiszka
On 2011-03-22 11:03, Ulrich Obergfell wrote: > >>> Part 3 of the patch implements the following options for the >>> 'configure' script. >>> >>> --disable-hpet-driftfix >>> --enable-hpet-driftfix >> >> I see no benefit in this configurability. Just make the driftfix >> unconditionally available, ru

Re: [PATCH 0/6] Do not use sysdevs for implementing "core" PM operations on x86

2011-03-22 Thread Ingo Molnar
* Rafael J. Wysocki wrote: > > If there are no objectsions, I'd like to push these patches through the > > suspend > > tree. > > [1/8] has been merged in the meantime and [3/8] has been included into the > ACPI tree. if there are no objections, I'm going to push the following > patches to Lin

Re: [PATCH] posix-timers: RCU conversion

2011-03-22 Thread Avi Kivity
On 03/22/2011 10:59 AM, Ben Nagy wrote: On Tue, Mar 22, 2011 at 12:54 PM, Eric Dumazet wrote: > Ben Nagy reported a scalability problem with KVM/QEMU that hit very hard > a single spinlock (idr_lock) in posix-timers code, on its 48 core > machine. Hi all, Thanks a lot for all the help so fa

Re: "KVM internal error. Suberror: 1" with ancient 2.4 kernel as guest

2011-03-22 Thread Jiri Kosina
On Mon, 21 Mar 2011, Wei Xu wrote: > Avi and Jiri: > > I implemented emulation of movq(64bit) and movdqa(128 bit). If you guys > still need it let me know and I can post somewhere... I found a way around it, so I don't need it any more in the setup that has been affected. But it is definitely

Re: [PATCH 3/6] PCI / Intel IOMMU: Use syscore_ops instead of sysdev class and sysdev

2011-03-22 Thread Joerg Roedel
On Mon, Mar 21, 2011 at 07:36:17PM -0400, Rafael J. Wysocki wrote: > drivers/pci/intel-iommu.c | 38 +- > 1 file changed, 9 insertions(+), 29 deletions(-) Looks good. I prepare a patch to convert AMD IOMMU to syscore_ops too. Joerg -- AMD Operating

kvm, emulation hangs when using some usb device

2011-03-22 Thread slavik
I have some troubles with passing usb into kvm virtual machine. I trying to provide the usb device 2022:0008 (Amikon vpn key) or 19d2:2000 (ZTE MF112 hsdpa modem) into virtual machine with windows xp iax32. kvm virtual machine was hung completely, and stop responding to anything. Maybe I need ther

Re: Pull request (QMP enhancements)

2011-03-22 Thread Avi Kivity
On 03/16/2011 12:26 PM, Dmitry Konishchev wrote: Hi! I use QEMU via QMP and discovered that for some tasks there is no proper way to do them via QMP. I've written few patches: * One of them modifies "pci_add" command to return pci address of the added device, when user hasn't specified it (to be

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-22 Thread Michael S. Tsirkin
On Mon, Mar 21, 2011 at 11:03:07AM -0700, Shirley Ma wrote: > On Fri, 2011-03-18 at 18:41 -0700, Shirley Ma wrote: > > > > + /* Drop packet instead of stop queue for better > > performance > > > */ > > > > > > I would like to see some justification as to why this is the right > > > way to go

Re: [PATCH] kvm: fix crash on irqfd deassign

2011-03-22 Thread Avi Kivity
On 03/17/2011 10:53 AM, Michael S. Tsirkin wrote: irqfd in kvm used flush_work incorrectly: it assumed that work scheduled previously can't run after flush_work, but since kvm uses a non-reentrant workqueue (by means of schedule_work) we need flush_work_sync to get that guarantee. Signed-off-by:

Re: [PATCH] KVM:PPC Issue in exit timing clearance

2011-03-22 Thread Avi Kivity
On 03/16/2011 06:37 PM, Bharat Bhushan wrote: Following dump is observed on host when clearing the exit timing counters [root@p1021mds kvm]# echo -n 'c'> vm1200_vcpu0_timing INFO: task echo:1276 blocked for more than 120 seconds. "echo 0> /proc/sys/kernel/hung_task_timeout_secs" disables this

Re: [PATCH] kvm: fix crash on irqfd deassign

2011-03-22 Thread Michael S. Tsirkin
On Tue, Mar 22, 2011 at 02:37:27PM +0200, Avi Kivity wrote: > On 03/17/2011 10:53 AM, Michael S. Tsirkin wrote: > >irqfd in kvm used flush_work incorrectly: > >it assumed that work scheduled previously can't run > >after flush_work, but since kvm uses a non-reentrant > >workqueue (by means of sched

Re: [PATCH 1/5] KVM: x86 emulator: Use single stage decoding for Group 1 instructions

2011-03-22 Thread Avi Kivity
On 03/15/2011 04:06 PM, Takuya Yoshikawa wrote: > > So I just decided to treat CMPS and SCAS in another patch. > > I mean I may introduce em_cmps or em_scas later if needed. > > > scas will likely just call em_cmp. > > > You prefer to treat these in this patch? > > > If there will be ot

RE: [COMMIT] [WIN-GUEST-DRIVERS] Balloon - remove WMI usage. Remove wmi.c.

2011-03-22 Thread Vadim Rozenfeld
On Tue, 2011-03-22 at 06:06 -0400, Yan Vugenfirer wrote: > Hello Vadim, > > Can you check this issues? > http://www.mail-archive.com/kvm@vger.kernel.org/msg51061.html > Thanks, > Yan. > > > -Original Message- > > From: ya su [mailto:suya94...@gmail.com] > > Sent: Saturday, March 19, 201

Re: [PATCH 1/5] KVM: x86 emulator: Use single stage decoding for Group 1 instructions

2011-03-22 Thread Avi Kivity
On 03/13/2011 05:17 PM, Takuya Yoshikawa wrote: From: Takuya Yoshikawa ADD, OR, ADC, SBB, AND, SUB, XOR, CMP are converted using a new macro I6ALU(_f, _e). CMPS, SCAS will be converted later. @@ -2337,10 +2401,20 @@ static int em_mov(struct x86_emulate_ctxt *ctxt) #define D6ALU(_f) D2bv((_

Re: [Qemu-devel] KVM call agenda for Mars 21th

2011-03-22 Thread Luiz Capitulino
On Mon, 21 Mar 2011 13:58:35 +0100 Juan Quintela wrote: > > Please, send in any agenda items you are interested in covening. > > - Merge patches speed. I just "feel", that patches are not being > handled fast enough, so ... I looked how much patches have been > integrated since Mars 1st:

Re: [PATCH 2/5] KVM: x86 emulator: Use single stage decoding for PUSH/POP XS instructions

2011-03-22 Thread Avi Kivity
On 03/13/2011 05:19 PM, Takuya Yoshikawa wrote: From: Takuya Yoshikawa PUSH ES/CS/SS/DS/FS/GS and POP ES/SS/DS/FS/GS are converted. +static int em_push_es(struct x86_emulate_ctxt *ctxt) +{ + emulate_push_sreg(ctxt, ctxt->ops, VCPU_SREG_ES); + return X86EMUL_CONTINUE; +} I thought

Re: [PATCH 3/5] KVM: x86 emulator: Use single stage decoding for POP instructions

2011-03-22 Thread Avi Kivity
On 03/13/2011 05:20 PM, Takuya Yoshikawa wrote: From: Takuya Yoshikawa POP is converted. RET will be converted later. There is also POP r/m (8F /0); could be done later. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscri

Re: [PATCH 4/5] KVM: x86 emulator: Use single stage decoding for PUSHA and POPA instructions

2011-03-22 Thread Avi Kivity
On 03/13/2011 05:21 PM, Takuya Yoshikawa wrote: From: Takuya Yoshikawa PUSHA and POPA are converted. Signed-off-by: Takuya Yoshikawa --- arch/x86/kvm/emulate.c | 19 --- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/em

Re: [PATCH] KVM:PPC Issue in exit timing clearance

2011-03-22 Thread Alexander Graf
On 03/22/2011 01:43 PM, Avi Kivity wrote: On 03/16/2011 06:37 PM, Bharat Bhushan wrote: Following dump is observed on host when clearing the exit timing counters [root@p1021mds kvm]# echo -n 'c'> vm1200_vcpu0_timing INFO: task echo:1276 blocked for more than 120 seconds. "echo 0> /proc/sys/k

KVM call minutes Mars 22

2011-03-22 Thread Juan Quintela
Minutes of today call: - Patch integration * Anthony thinks that we need more reviews * chicken-eng problem to become a maintainer * more patch reviews * need for autotest to run faster * not everybody use autotest * use patches for infrastructure * we need to get better integrating

Re: [PATCH 1/5] KVM: x86 emulator: Use single stage decoding for Group 1 instructions

2011-03-22 Thread Takuya Yoshikawa
On Tue, 22 Mar 2011 14:53:21 +0200 Avi Kivity wrote: > > I prefer to have the patchset fully updated, even if it takes a while. > Good luck with the recovery! Things already got back as usual, thanks. I had expected much longer time. BTW, is it better to wait until rc1 is released when we se

Re: [PATCH 1/5] KVM: x86 emulator: Use single stage decoding for Group 1 instructions

2011-03-22 Thread Takuya Yoshikawa
On Tue, 22 Mar 2011 14:55:57 +0200 Avi Kivity wrote: > > @@ -2337,10 +2401,20 @@ static int em_mov(struct x86_emulate_ctxt *ctxt) > > #define D6ALU(_f) D2bv((_f) | DstMem | SrcReg | ModRM), > > \ > > D2bv(((_f) | DstReg | SrcMem | ModRM)& ~Lock), \ > >

Re: [PATCH 2/5] KVM: x86 emulator: Use single stage decoding for PUSH/POP XS instructions

2011-03-22 Thread Takuya Yoshikawa
On Tue, 22 Mar 2011 15:03:11 +0200 Avi Kivity wrote: > > +static int em_push_es(struct x86_emulate_ctxt *ctxt) > > +{ > > + emulate_push_sreg(ctxt, ctxt->ops, VCPU_SREG_ES); > > + return X86EMUL_CONTINUE; > > +} > > I thought of adding generic sreg decoding, so we can use > em_push()/em_pop

Re: [PATCH 3/5] KVM: x86 emulator: Use single stage decoding for POP instructions

2011-03-22 Thread Takuya Yoshikawa
On Tue, 22 Mar 2011 15:06:33 +0200 Avi Kivity wrote: > > POP is converted. RET will be converted later. > > There is also POP r/m (8F /0); could be done later. > OK, I'll recheck. I want to put related things into one patch if possible. Takuya -- To unsubscribe from this list: send the line

Re: [PATCH 1/5] KVM: x86 emulator: Use single stage decoding for Group 1 instructions

2011-03-22 Thread Avi Kivity
On 03/22/2011 05:35 PM, Takuya Yoshikawa wrote: On Tue, 22 Mar 2011 14:53:21 +0200 Avi Kivity wrote: I prefer to have the patchset fully updated, even if it takes a while. Good luck with the recovery! Things already got back as usual, thanks. I had expected much longer time. Good to hear.

Re: [PATCH 4/5] KVM: x86 emulator: Use single stage decoding for PUSHA and POPA instructions

2011-03-22 Thread Takuya Yoshikawa
On Tue, 22 Mar 2011 15:07:20 +0200 Avi Kivity wrote: > > +static int em_pusha(struct x86_emulate_ctxt *ctxt) > > +{ > > + return emulate_pusha(ctxt, ctxt->ops); > > +} > > + > > You can simply rename/update emulate_pusha/emulate_popa, since they have > no other callers. > I intentionally le

Re: [PATCH 4/5] KVM: x86 emulator: Use single stage decoding for PUSHA and POPA instructions

2011-03-22 Thread Avi Kivity
On 03/22/2011 05:54 PM, Takuya Yoshikawa wrote: I intentionally left emulate_* in this version because I thought there might be some reason for introducing new em_* naming. It's just that their signatures are all the same, and to conserve space in the decode tables. -- error compiling commi

Re: [PATCH] kvm: fix crash on irqfd deassign

2011-03-22 Thread Avi Kivity
On 03/17/2011 10:53 AM, Michael S. Tsirkin wrote: irqfd in kvm used flush_work incorrectly: it assumed that work scheduled previously can't run after flush_work, but since kvm uses a non-reentrant workqueue (by means of schedule_work) we need flush_work_sync to get that guarantee. Applied, and

Re: kvm, emulation hangs when using some usb device

2011-03-22 Thread David Ahern
On 03/22/11 05:03, slavik wrote: > I have some troubles with passing usb into kvm virtual machine. > I trying to provide the usb device 2022:0008 (Amikon vpn key) or 19d2:2000 > (ZTE MF112 hsdpa modem) into virtual machine with windows xp iax32. > kvm virtual machine was hung completely, and sto

Re: kvm, emulation hangs when using some usb device

2011-03-22 Thread Erik Rull
slavik wrote: I have some troubles with passing usb into kvm virtual machine. I trying to provide the usb device 2022:0008 (Amikon vpn key) or 19d2:2000 (ZTE MF112 hsdpa modem) into virtual machine with windows xp iax32. kvm virtual machine was hung completely, and stop responding to anything. M

BUG: 0.14.0 -device usb-host supports only one device

2011-03-22 Thread Erik Rull
When enabling the -device usb-host option support for adding automatically USB devices from the host to the guest, only one device gets detected. It does not matter if it is added via commandline or via device_add on the qemu console. Curious: If a second devices is plugged into the host, nothi

Re: kvm, emulation hangs when using some usb device

2011-03-22 Thread slavik
i suggest this is synonyms for single function, doesn't it? On Tue, Mar 22, 2011 at 11:07 PM, David Ahern wrote: > > > On 03/22/11 11:53, slavik wrote: >> hi, as usual >> kvm -boot d   -usbdevice tablet  -vnc :8 -monitor >> telnet:0.0.0.0:4008,server,nowait -drive >> file="/winxp.img",cache=unsaf

Re: kvm, emulation hangs when using some usb device

2011-03-22 Thread David Ahern
On 03/22/11 12:20, slavik wrote: > i suggest this is synonyms for single function, doesn't it? > It's the legacy syntax - you are already using it with the tablet option. If it cleared your problem then it is also synonymous for bug in the -device route. > On Tue, Mar 22, 2011 at 11:07 PM, Da

msix_unset_mask_notifier: Assertion `dev->msix_mask_notifier' failed.

2011-03-22 Thread Nikola Ciprich
Hello, I wanted to give vhost_net a try, but I can't make it work, when I try to start qemu-kvm with vhost interface, it crashers with msix_unset_mask_notifier: Assertion `dev->msix_mask_notifier' failed. according to some threads I've digged up, it is related to missing eventfd support (I'm using

Re: [PATCH 0/6] Do not use sysdevs for implementing "core" PM operations on x86

2011-03-22 Thread Rafael J. Wysocki
On Tuesday, March 22, 2011, Ingo Molnar wrote: > > * Rafael J. Wysocki wrote: > > > > If there are no objectsions, I'd like to push these patches through the > > > suspend > > > tree. > > > > [1/8] has been merged in the meantime and [3/8] has been included into the > > ACPI tree. if there ar

Re: [PATCH 3/6] PCI / Intel IOMMU: Use syscore_ops instead of sysdev class and sysdev

2011-03-22 Thread Rafael J. Wysocki
On Tuesday, March 22, 2011, Joerg Roedel wrote: > On Mon, Mar 21, 2011 at 07:36:17PM -0400, Rafael J. Wysocki wrote: > > drivers/pci/intel-iommu.c | 38 +- > > 1 file changed, 9 insertions(+), 29 deletions(-) > > Looks good. May I take that as an ACK? > I p

Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-22 Thread Shirley Ma
On Tue, 2011-03-22 at 13:36 +0200, Michael S. Tsirkin wrote: > diff --git a/drivers/virtio/virtio_ring.c > b/drivers/virtio/virtio_ring.c > index cc2f73e..6106017 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -185,11 +185,6 @@ int virtqueue_add_buf_gfp(struct

KVM make error--drivers/usb/serial/usb_wwan.c

2011-03-22 Thread Ren, Yongjie
Hi folks, Kvm.git: commit 2ee44a580db58f98d85b57bfc468bbc5729ec9b3  Author: Avi Kivity    Date:   Mon Mar 21 12:53:58 2011 +0200 My build system: RHEL5u5,  Linux kvm-build 2.6.38-rc4+ #1 SMP Sat Feb 19 15:35:09 CST 2011 x86_64 x86_64 x86_64 GNU/Linux When I make kvm, I get the following error. d

[PATCH 08/18] savevm: introduce util functions to control ft_trans_file from savevm layer.

2011-03-22 Thread Yoshiaki Tamura
To utilize ft_trans_file function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |5 ++ savevm.c | 150 ++ 2 files changed, 155 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h ind

[PATCH 18/18] Introduce "kemari:" to enable FT migration mode (Kemari).

2011-03-22 Thread Yoshiaki Tamura
When "kemari:" is set in front of URI of migrate command, it will turn on ft_mode to start FT migration mode (Kemari). On the receiver side, the option looks like, -incoming kemari::: Signed-off-by: Yoshiaki Tamura Acked-by: Paolo Bonzini --- hmp-commands.hx |4 +++- migration.c | 12

[PATCH 13/18] net: insert event-tap to qemu_send_packet() and qemu_sendv_packet_async().

2011-03-22 Thread Yoshiaki Tamura
event-tap function is called only when it is on. Signed-off-by: Yoshiaki Tamura --- net.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index ddcca97..a541ede 100644 --- a/net.c +++ b/net.c @@ -37,6 +37,7 @@ #include "qemu_socket.h" #include "hw

[PATCH 15/18] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-03-22 Thread Yoshiaki Tamura
Introduce qemu_savevm_trans_{begin,commit} to send the memory and device info together, while avoiding cancelling memory state tracking. This patch also abstracts common code between qemu_savevm_state_{begin,iterate,commit}. Signed-off-by: Yoshiaki Tamura --- savevm.c | 157

[PATCH 00/18] [PATCH 00/18] Kemari for KVM v0.2.13

2011-03-22 Thread Yoshiaki Tamura
Hi, This patch series is a revised version of Kemari for KVM, which applied comments for the previous post. The current code is based on qemu.git 4ac8e585c85079f6fd2b2b6da3cb845e3e19459c. The changes from v0.2.12 -> v0.2.13 are: - replaced qemu_get_timer() with qemu_get_timer_ns() - check check

[PATCH 03/18] Introduce qemu_loadvm_state_no_header() and make qemu_loadvm_state() a wrapper.

2011-03-22 Thread Yoshiaki Tamura
Introduce qemu_loadvm_state_no_header() so that it can be called iteratively without reading the header, and qemu_loadvm_state() becomes a wrapper of it. Signed-off-by: Yoshiaki Tamura --- savevm.c | 45 +++-- 1 files changed, 27 insertions(+), 18 deleti

[PATCH 17/18] migration-tcp: modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2011-03-22 Thread Yoshiaki Tamura
When ft_mode is set in the header, tcp_accept_incoming_migration() sets ft_trans_incoming() as a callback, and call qemu_file_get_notify() to receive FT transaction iteratively. We also need a hack no to close fd before moving to ft_transaction mode, so that we can reuse the fd for it. vm_change_

[PATCH 09/18] Introduce event-tap.

2011-03-22 Thread Yoshiaki Tamura
event-tap controls when to start FT transaction, and provides proxy functions to called from net/block devices. While FT transaction, it queues up net/block requests, and flush them when the transaction gets completed. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.targe

[PATCH 04/18] qemu-char: export socket_set_nodelay().

2011-03-22 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- qemu-char.c |2 +- qemu_socket.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 31c9e79..fa16d36 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2111,7 +2111,7 @@ static void tcp_chr_telnet_init(int

[PATCH 07/18] Introduce fault tolerant VM transaction QEMUFile and ft_mode.

2011-03-22 Thread Yoshiaki Tamura
This code implements VM transaction protocol. Like buffered_file, it sits between savevm and migration layer. With this architecture, VM transaction protocol is implemented mostly independent from other existing code. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.objs

[PATCH 01/18] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2011-03-22 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |2 ++ savevm.c | 20 +++- 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 1b09039..f90ff15 100644 --- a/hw/

[PATCH 16/18] migration: introduce migrate_ft_trans_{put,get}_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2011-03-22 Thread Yoshiaki Tamura
Introduce migrate_ft_trans_put_ready() which kicks the FT transaction cycle. When ft_mode is on, migrate_fd_put_ready() would open ft_trans_file and turn on event_tap. To end or cancel FT transaction, ft_mode and event_tap is turned off. migrate_ft_trans_get_ready() is called to receive ack from

[PATCH 06/18] virtio: decrement last_avail_idx with inuse before saving.

2011-03-22 Thread Yoshiaki Tamura
For regular migration inuse == 0 always as requests are flushed before save. However, event-tap log when enabled introduces an extra queue for requests which is not being flushed, thus the last inuse requests are left in the event-tap queue. Move the last_avail_idx value sent to the remote back to

[PATCH 14/18] block: insert event-tap to bdrv_aio_writev(), bdrv_aio_flush() and bdrv_flush().

2011-03-22 Thread Yoshiaki Tamura
event-tap function is called only when it is on, and requests were sent from device emulators. Signed-off-by: Yoshiaki Tamura Acked-by: Kevin Wolf --- block.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index c8e2f97..952543a 100644

[PATCH 12/18] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c.

2011-03-22 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- exec.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index 964ce31..be71464 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7 @@ #include "osdep.h" #include "kvm.h

[PATCH 10/18] Call init handler of event-tap at main() in vl.c.

2011-03-22 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 483e2e3..6ed9b20 100644 --- a/vl.c +++ b/vl.c @@ -160,6 +160,7 @@ int main(int argc, char **argv) #include "qemu-queue.h" #include "cpus.h" #include "arch_init.h

[PATCH 11/18] ioport: insert event_tap_ioport() to ioport_write().

2011-03-22 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- ioport.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ioport.c b/ioport.c index 2e971fa..f485bab 100644 --- a/ioport.c +++ b/ioport.c @@ -27,6 +27,7 @@ #include "ioport.h" #include

[PATCH 05/18] vl.c: add deleted flag for deleting the handler.

2011-03-22 Thread Yoshiaki Tamura
Make deleting handlers robust against deletion of any elements in a handler by using a deleted flag like in file descriptors. Signed-off-by: Yoshiaki Tamura --- vl.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index dbb927d..483e2e3 100644

[PATCH 02/18] Introduce read() to FdMigrationState.

2011-03-22 Thread Yoshiaki Tamura
Currently FdMigrationState doesn't support read(), and this patch introduces it to get response from the other side. Note that this won't change the existing migration protocol to be bi-directional. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 15 +++ migration.c | 1