From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 3/4] x86/mce: Translate passed-in GPA to host machine address Date: Tue, 15 Sep 2015 14:50:27 +0100 Message-ID: <55F82223.8010305@citrix.com> References: <1442305780-12790-1-git-send-email-haozhong.zhang@intel.com> <1442305780-12790-4-git-send-email-haozhong.zhang@intel.com> <55F8383202000078000A2EE1@prv-mh.provo.novell.com> <20150915134242.GA2747@hzzhang-OptiPlex-9020.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150915134242.GA2747@hzzhang-OptiPlex-9020.sh.intel.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 , Liu Jinsong , Christoph Egger , Ian Campbell , Wei Liu , Ian Jackson , Stefano Stabellini , xen-devel@lists.xen.org, Keir Fraser List-Id: xen-devel@lists.xenproject.org On 15/09/15 14:42, Haozhong Zhang wrote: > >>> + mfn = mfn_x(get_gfn(d, gpfn, &t)); >>> + >>> + if (mfn == INVALID_MFN) { >>> + put_domain(d); >>> + return x86_mcerr("do_mca inject: illegal MSR value", >>> + -EINVAL); >> This message should be better distinguishable from the one further >> down (or else it's pretty pointless) - perhaps you mean GPFN instead >> of MSR? >> > Yes, I'll change it to "do_mca_inject: illegal GPFN". Please always always always write useful error messages. "illegal GPFN" is useless without also stating which value is believed to be invalid. Furthermore, per the clarification in c/s e758ed1, "gfn" is the correct term to use here. ~Andrew