From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Question on skip_emulated_instructions() Date: Thu, 08 Apr 2010 14:49:08 +0300 Message-ID: <4BBDC2B4.20203@redhat.com> References: <4BBAB46B.9010405@lab.ntt.co.jp> <20100406100522.GW5235@redhat.com> <20100407154324.GF303@redhat.com> <4BBCC2C9.1040301@redhat.com> <4BBD6959.6080003@lab.ntt.co.jp> <4BBD82ED.9010105@redhat.com> <20100408071953.GI303@redhat.com> <4BBD8F74.8070401@lab.ntt.co.jp> <4BBD966D.7060801@redhat.com> <4BBD9E84.6040307@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm@vger.kernel.org, Marcelo Tosatti To: Yoshiaki Tamura Return-path: Received: from mx1.redhat.com ([209.132.183.28]:25295 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756025Ab0DHLtM (ORCPT ); Thu, 8 Apr 2010 07:49:12 -0400 In-Reply-To: <4BBD9E84.6040307@lab.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: On 04/08/2010 12:14 PM, Yoshiaki Tamura wrote: >> I don't think you can in the general case. But if you gate output at the >> device level, instead of the instruction level, the problem goes >> away, no? > > Yes, it should. > To implement this, we need to make No.3 to be called asynchronously. > If qemu is already handling I/O asynchronously, it would be relatively > easy to make this. Yes, you can release the I/O from the iothread instead of the vcpu thread. You can make virtio_net_handle_tx() disable virtio notifications and initiate state sync and return, when state sync continues you can call the original virtio_net_handle_tx(). If the secondary takes over, it needs to call the original virtio_net_handle_tx() as well. -- error compiling committee.c: too many arguments to function