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 17:43:07 +0200 Message-ID: <4D6A710B.7070705@redhat.com> References: <1298282879-23075-1-git-send-email-gleb@redhat.com> <1298282879-23075-2-git-send-email-gleb@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]:2613 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752161Ab1B0PnK (ORCPT ); Sun, 27 Feb 2011 10:43:10 -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 p1RFhAMW032190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 27 Feb 2011 10:43:10 -0500 In-Reply-To: <1298282879-23075-2-git-send-email-gleb@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/21/2011 12:07 PM, Gleb Natapov wrote: > Currently vm86 task is initialized on each real mode entry and vcpu > reset. Initialization is done by zeroing TSS and updating relevant > fields. But since all vcpus are using the same TSS there is a race where > one vcpu may use TSS while other vcpu is initializing it, so the vcpu > that uses TSS will see wrong TSS content and will behave incorrectly. > Fix that by initializing TSS only once. Applied, thanks. According to my reading of the code, if KVM_SET_TSS_ADDR is not invoked, the guest would fail both before and after the patch, yes? -- error compiling committee.c: too many arguments to function