WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 1/6] MCE: Handle the vMCA bank correctly

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Frank.Vanderlinden@xxxxxxx" <Frank.Vanderlinden@xxxxxxx>
Subject: [Xen-devel] [PATCH 1/6] MCE: Handle the vMCA bank correctly
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Thu, 28 Jan 2010 13:55:50 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Jan, Christoph Egger <Christoph.Egger@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Wed, 27 Jan 2010 22:00:38 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acqf3or6WxH6HD2FT0GCZUpz/xZ+Rg==
Thread-topic: [PATCH 1/6] MCE: Handle the vMCA bank correctly
Handle the vMCA bank correctly

Currently the virtual MCE MSR assume all MSRs range from 0 to MAX_NR_BANKS are 
always MCE MSR, this is not always correct. With this patch, the 
mce_rdmsr/mce_wrmsr will only handle vMCE MSR range from 0 to the MCA banks in 
the host platform.
Please notice that some MSR beyond current MCA banks in the host platform are 
really MCA MSRs, that should be handled by general MSR handler.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>

diff -r 221c9b796e32 xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c     Tue Jan 26 00:33:03 2010 +0800
+++ b/xen/arch/x86/cpu/mcheck/mce.c     Tue Jan 26 00:52:04 2010 +0800
@@ -716,8 +716,8 @@ int mce_rdmsr(uint32_t msr, uint64_t *va
         bank = (msr - MSR_IA32_MC0_CTL) / 4;
         if ( bank >= (d->arch.vmca_msrs.mcg_cap & MCG_CAP_COUNT) )
         {
-            mce_printk(MCE_QUIET, "MCE: bank %u does not exist\n", bank);
-            ret = -1;
+            mce_printk(MCE_QUIET, "MCE: MSR %x is not MCA MSR\n", msr);
+            ret = 0;
             break;
         }
         switch (msr & (MSR_IA32_MC0_CTL | 3))
@@ -848,8 +848,8 @@ int mce_wrmsr(u32 msr, u64 val)
         bank = (msr - MSR_IA32_MC0_CTL) / 4;
         if ( bank >= (d->arch.vmca_msrs.mcg_cap & MCG_CAP_COUNT) )
         {
-            mce_printk(MCE_QUIET, "MCE: bank %u does not exist\n", bank);
-            ret = -1;
+            mce_printk(MCE_QUIET, "MCE: MSR %x is not MCA MSR\n", msr);
+            ret = 0;
             break;
         }
         switch ( msr & (MSR_IA32_MC0_CTL | 3) )


Attachment: bank.patch
Description: bank.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>