From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/2] KVM: VMX: Initialize vm86 TSS only once. Date: Sun, 27 Feb 2011 18:31:13 +0200 Message-ID: <4D6A7C51.1000000@redhat.com> References: <1298282879-23075-1-git-send-email-gleb@redhat.com> <1298282879-23075-2-git-send-email-gleb@redhat.com> <4D6A710B.7070705@redhat.com> <20110227155219.GA22252@redhat.com> <4D6A74BE.6020303@redhat.com> <4D6A7600.8030606@redhat.com> <20110227162710.GC22252@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49147 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751440Ab1B0QbR (ORCPT ); Sun, 27 Feb 2011 11:31:17 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1RGVHoX014583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 27 Feb 2011 11:31:17 -0500 In-Reply-To: <20110227162710.GC22252@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/27/2011 06:27 PM, Gleb Natapov wrote: > > > > Or we can keep the old behaviour. If KVM_SET_TSS_ADDR hasn't been > > called by the time of the first entry into real mode (the first > > KVM_CREATE_VCPU?), use the top of the first slot. > > > Do we require that KVM_SET_TSS_ADDR is called before first KVM_CREATE_VCPU? > We may still break some theoretical userspaces this way. The documentation doesn't say, but I think it's unlikely that userspace will start a guest and then configure it. > > > We can avoid the SMP problem by initializing the memory in a single > > pass, writing each byte exactly once with its final value. This way > > concurrent initialization doesn't corrupt an in-use TSS. > > > Sounds hackish, but may work. Doing so will make entering pmode much > more slow. Why? do it at most once per vcpu. -- error compiling committee.c: too many arguments to function