From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM: x86: vcpu state writeback should be aware of REQ_NMI Date: Tue, 29 Mar 2011 15:36:04 +0200 Message-ID: <4D91E044.7080400@redhat.com> References: <20110324124700.GA26882@amt.cnet> <20110324132716.GA13195@redhat.com> <20110324145910.GB26882@amt.cnet> <20110324151935.GB14544@redhat.com> <4D8B64BF.6050900@redhat.com> <20110329131249.GA2675@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11358 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751682Ab1C2NgH (ORCPT ); Tue, 29 Mar 2011 09:36:07 -0400 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.14.4/8.14.4) with ESMTP id p2TDa7YB032628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 29 Mar 2011 09:36:07 -0400 In-Reply-To: <20110329131249.GA2675@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 03/29/2011 03:12 PM, Marcelo Tosatti wrote: > On Thu, Mar 24, 2011 at 05:35:27PM +0200, Avi Kivity wrote: > > On 03/24/2011 05:19 PM, Gleb Natapov wrote: > > >> Two patches one to revert REQ_NMI then another to fix the original problem > > >> makes backporting easier. > > >If we agree this is the way to go will do that. > > > > > > > Not sure, want to think about it for a bit. > > Ping? > I think Gleb's approach is better. ->requests is fine for notifications but not for state. I'd like to see ACCESS_ONCE() semantics for the vcpu variable, so we don't introduce races, even if they are benign. A problem with benign races is that you have to re-think about them later to be sure they are still benign. We also need to document which vcpu variables are asynchronous. -- error compiling committee.c: too many arguments to function