From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] xen: handle paged gfn in wrmsr_hypervisor_regs Date: Fri, 3 May 2013 14:58:26 +0200 Message-ID: <20130503125826.GA18763@aepfle.de> References: <19777301f89653c640de.1367511891@probook.site> <51837F6802000078000D2F27@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: <51837F6802000078000D2F27@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: > >>> On 02.05.13 at 18:24, Olaf Hering wrote: > > @@ -1682,14 +1682,15 @@ static int svm_msr_write_intercept(unsig > > if ( wrmsr_viridian_regs(msr, msr_content) ) > > break; > > > > - wrmsr_hypervisor_regs(msr, msr_content); > > + ret = wrmsr_hypervisor_regs(msr, msr_content); > > + retry = ret == -EAGAIN; > > If you add error handling, don't constrain this to a single error code > please. For the case here, the easiest would appear to be a switch > converting to X86EMUL_OKAY, X86EMUL_RETRY, or > X86EMUL_UNHANDLEABLE. If the function had ways to fail before, > it would have been a bug anyway to not check the return value. I just sent v2 of this patch. Olaf