From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 22/24] KVM: x86 emulator: restart string instruction without going back to a guest. Date: Wed, 10 Mar 2010 11:13:33 +0200 Message-ID: <4B9762BD.4050000@redhat.com> References: <1268143762-4000-1-git-send-email-gleb@redhat.com> <1268143762-4000-23-git-send-email-gleb@redhat.com> <4B966035.2050904@redhat.com> <20100309181157.GF9066@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:29711 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142Ab0CJJNg (ORCPT ); Wed, 10 Mar 2010 04:13:36 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2A9DZYD011353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Mar 2010 04:13:35 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2A9DXpT001512 for ; Wed, 10 Mar 2010 04:13:34 -0500 In-Reply-To: <20100309181157.GF9066@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/09/2010 08:11 PM, Gleb Natapov wrote: > On Tue, Mar 09, 2010 at 04:50:29PM +0200, Avi Kivity wrote: > >> On 03/09/2010 04:09 PM, Gleb Natapov wrote: >> >>> Currently when string instruction is only partially complete we go back >>> to a guest mode, guest tries to reexecute instruction and exits again >>> and at this point emulation continues. Avoid all of this by restarting >>> instruction without going back to a guest mode. >>> >> What happens if rcx is really big? Going back into the guest gave >> us a preemption point. >> >> > Two solutions. We can check if reschedule is required and yield cpu if > needed. Or we can enter guest from time to time. > I'd stick with the current solution, reentering the guest every page or so. -- error compiling committee.c: too many arguments to function