From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [patch 2/3] KVM: x86: disallow KVM_{SET,GET}_LAPIC without in kernel irqchip Date: Wed, 28 Oct 2009 12:20:42 +0200 Message-ID: <20091028102041.GA24238@redhat.com> References: <20091027151042.118902183@redhat.com> <20091027151125.345664553@redhat.com> <20091027175026.GC14421@redhat.com> <4AE80F90.8010303@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Marcelo Tosatti , kvm , stable@kernel.org To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:31169 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752929AbZJ1KXW (ORCPT ); Wed, 28 Oct 2009 06:23:22 -0400 Content-Disposition: inline In-Reply-To: <4AE80F90.8010303@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Oct 28, 2009 at 11:32:00AM +0200, Avi Kivity wrote: > On 10/27/2009 07:50 PM, Michael S. Tsirkin wrote: >> Can the value of irqchip_in_kernel be changed by userspace >> after we have checked it? If yes, this check won't help ... >> > > A change from false to true is possible, but not the reverse. Hmm. If we want to rely on this, we have to play with memory barriers to write/read it. Doable, but hard to get right. Can we always have the irqchip object exist? It doesn't use a lot of memory, does it? Maybe have it inline, save an extra indirection on fastpath ... > -- > error compiling committee.c: too many arguments to function