From: Olaf Hering Subject: Re: [PATCH v3] xen: handle paged gfn in wrmsr_hypervisor_regs Date: Fri, 3 May 2013 17:48:26 +0200 Message-ID: <20130503154826.GB29247@aepfle.de> References: <19777301f89653c640de.1367511891@probook.site> <5183F44602000078000D330F@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <5183F44602000078000D330F@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, May 03, Jan Beulich wrote: > Apart from formatting things look okay up to here. Did you mean just the single tab in svm_msr_write_intercept? > > --- a/xen/arch/x86/traps.c > > +++ b/xen/arch/x86/traps.c > > @@ -634,25 +634,33 @@ int wrmsr_hypervisor_regs(uint32_t idx, > > unsigned long gmfn = val >> 12; > > unsigned int idx = val & 0xfff; > > struct page_info *page; > > + p2m_type_t t; > > > > if ( idx > 0 ) > > { > > gdprintk(XENLOG_WARNING, > > "Out of range index %u to MSR %08x\n", > > idx, 0x40000000); > > - return 0; > > + return -EINVAL; > > But I'd stay away from converting to actual errors both here ... I sent v4 with the -EINVAL removed. Olaf