From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [Xen-devel] [PATCH v5 7/9] x86/paravirt: Add paravirt_{read, write}_msr Date: Mon, 4 Apr 2016 17:33:14 +0100 Message-ID: <5702974A.1030003@citrix.com> References: <880eebc5dcd2ad9f310d41345f82061ea500e9fa.1459605520.git.luto@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: KVM list , Peter Zijlstra , Linus Torvalds , , xen-devel , "Borislav Petkov" , Paolo Bonzini , Andrew Morton , Arjan van de Ven To: Andy Lutomirski , X86 ML Return-path: In-Reply-To: <880eebc5dcd2ad9f310d41345f82061ea500e9fa.1459605520.git.luto@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 02/04/16 15:01, Andy Lutomirski wrote: > This adds paravirt hooks for unsafe MSR access. On native, they > call native_{read,write}_msr. On Xen, they use > xen_{read,write}_msr_safe. > > Nothing uses them yet for ease of bisection. The next patch will > use them in rdmsrl, wrmsrl, etc. > > I intentionally didn't make them warn on #GP on Xen. I think that > should be done separately by the Xen maintainers. ... > --- a/arch/x86/xen/enlighten.c > +++ b/arch/x86/xen/enlighten.c Reviewed-by: David Vrabel > @@ -1092,6 +1092,26 @@ static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high) > return ret; > } > > +static u64 xen_read_msr(unsigned int msr) > +{ > + /* > + * This will silently swallow a #GP from RDMSR. It may be worth > + * changing that. This probably isn't important. David