From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [Patch v4] x86/traps: improvements to {rd, wr}msr_hypervisor_regs() Date: Tue, 08 Oct 2013 09:52:24 +0100 Message-ID: <5253E3E802000078000F97CC@nat28.tlf.novell.com> References: <5252D51402000078000F943A@nat28.tlf.novell.com> <1381153604-30042-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VTT1n-0002xc-Rt for xen-devel@lists.xenproject.org; Tue, 08 Oct 2013 08:52:27 +0000 In-Reply-To: <1381153604-30042-1-git-send-email-andrew.cooper3@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel , Paul Durrant , Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 07.10.13 at 15:46, Andrew Cooper wrote: > --- a/xen/arch/x86/traps.c > +++ b/xen/arch/x86/traps.c > @@ -595,55 +595,50 @@ DO_ERROR_NOCODE(TRAP_copro_error, coprocessor_error) > DO_ERROR( TRAP_alignment_check, alignment_check) > DO_ERROR_NOCODE(TRAP_simd_error, simd_coprocessor_error) > > +/* > + * Returns 0 if not handled, and non-0 for error. (The calling semantics are > + * in need of some work) > + */ > int rdmsr_hypervisor_regs(uint32_t idx, uint64_t *val) > { The comment here still isn't in line with the existing callers. Non- zero means success afaict. There simply is no path resulting in an error here so far. > + switch ( idx - base ) > { > - case 0: > + case 0: /* Write hypercall page. Reads are invalid. Hand a #GP back. */ > { > *val = 0; > - break; > + return 1; And the above means that there's no #GP being "handed back" here either. Jan