From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCHv2 7/7] kvm: host side for eoi optimization Date: Sun, 13 May 2012 13:04:26 +0300 Message-ID: <20120513100426.GG4296@redhat.com> References: <20120513093317.GE4296@redhat.com> <20120513100127.GB23273@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: x86@kernel.org, kvm@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" , Avi Kivity , Marcelo Tosatti , Linus Torvalds , linux-kernel@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:65256 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323Ab2EMKE3 (ORCPT ); Sun, 13 May 2012 06:04:29 -0400 Content-Disposition: inline In-Reply-To: <20120513100127.GB23273@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, May 13, 2012 at 01:01:28PM +0300, Michael S. Tsirkin wrote: > > > + if (eoi_enabled(vcpu)) > > > + eoi_clr_pending(vcpu); > > > + vcpu->arch.eoi.msr_val = data; > > > + kvm_gfn_to_hva_cache_init(vcpu->kvm, &vcpu->arch.eoi.data, addr); > > This may fail. > > On invalid address, yes. Then the cache hva will be set to invalid > so accesses will fail too. So a malicious guest is only hurting > itself. > Maybe add a comment here? > Kill it with #GP like other MSRs do. -- Gleb.