From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haozhong Zhang Subject: [PATCH 0/4] Fix tools/xen-mceinj to handle >=4GB guest memory Date: Tue, 15 Sep 2015 16:29:36 +0800 Message-ID: <1442305780-12790-1-git-send-email-haozhong.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Haozhong Zhang , Wei Liu , Ian Campbell , Stefano Stabellini , Liu Jinsong , Christoph Egger , Ian Jackson , Jan Beulich , Andrew Cooper , Keir Fraser List-Id: xen-devel@lists.xenproject.org The existing xen-mceinj can not inject MCE through MSR_MCI_ADDR to a domain w/ more than 4GB memory, e.g. if domain 0 has more than 4GB memory, the execution of the command xen-mceinj -d 0 -t 0 -p 0x2721a900 will fail w/ a message "Failed to get pfn list ffffffff: Operation not supported". The cause is that the hypercall XEN_DOMCTL_getmemlist used by xen-mceinj to translate the guest physical address (argument of '-p') to the host machine address always fails if the domain has more than 4GB memory due to the mitigation of XSA-74. This patchset fixes this problem by moving the translation from xen-mceinj to the hypervisor, so that it is not necessary to use XEN_DOMCTL_getmemlist. The first two patches just fix serval code-style issues, while the other two are the actual fix. Haozhong Zhang (4): x86/mce: Fix code style tools/mceinject: Fix code style x86/mce: Translate passed-in GPA to host machine address tools/xen-mceinj: Pass in GPA when injecting through MSR_MCI_ADDR tools/tests/mce-test/tools/xen-mceinj.c | 141 +++++--------------------------- xen/arch/x86/cpu/mcheck/mce.c | 43 ++++++++-- xen/include/public/arch-x86/xen-mca.h | 31 +++---- 3 files changed, 77 insertions(+), 138 deletions(-) -- 2.4.8