From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] KVM: unbreak userspace that does not sets tss address Date: Mon, 7 Mar 2011 18:20:30 +0200 Message-ID: <20110307162030.GB22987@redhat.com> References: <20110307151936.GA10151@redhat.com> <4D74FE88.9060708@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, avi@redhat.com, mtosatti@redhat.com To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:12291 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754212Ab1CGQUe (ORCPT ); Mon, 7 Mar 2011 11:20:34 -0500 Content-Disposition: inline In-Reply-To: <4D74FE88.9060708@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Mar 07, 2011 at 04:49:28PM +0100, Jan Kiszka wrote: > On 2011-03-07 16:19, Gleb Natapov wrote: > > Commit 6440e5967bc broke old userspaces that do not set tss address > > before entering vcpu. Unbreak it by setting tss address to a safe > > value on the first vcpu entry. New userspaces should set tss address, > > so print warning in case it doesn't. > > Wouldn't allow runtime warnings but wouldn't it be cleaner otherwise to > start vcpus with a default tss address like that, ie. add the logic to > vmx_create_vcpu? > Userspace can create VCPU before setting tss address. We will have to have logic that removes default tss slot in set_tss_address callback. Also this default slot may prevent userspace from creating another slot at this physical address which is perfectly legitimate thing for userspace to do. -- Gleb.