All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/6] MCE: Fix the vMCE address translation for HVM guest.
@ 2010-01-28  5:55 Jiang, Yunhong
  2010-01-28  8:14 ` Christoph Egger
  0 siblings, 1 reply; 6+ messages in thread
From: Jiang, Yunhong @ 2010-01-28  5:55 UTC (permalink / raw)
  To: Keir Fraser, Frank.Vanderlinden@Sun.COM
  Cc: Christoph Egger, xen-devel@lists.xensource.com, Jan Beulich

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

Fix the vMCE address translation for HVM guest.

Fix address translation when we inject a virtual MCE to HVM guest.

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

diff -r ac2951705a86 xen/arch/x86/cpu/mcheck/mce_intel.c
--- a/xen/arch/x86/cpu/mcheck/mce_intel.c	Tue Jan 26 20:04:51 2010 +0800
+++ b/xen/arch/x86/cpu/mcheck/mce_intel.c	Tue Jan 26 22:49:11 2010 +0800
@@ -371,8 +371,8 @@ static void intel_UCR_handler(struct mci
 
                           gfn =
                               mfn_to_gmfn(d, ((bank->mc_addr) >> PAGE_SHIFT));
-                          bank->mc_addr =
-                              gfn << PAGE_SHIFT | (bank->mc_addr & PAGE_MASK);
+                          bank->mc_addr =  gfn << PAGE_SHIFT |
+                                        (bank->mc_addr & (PAGE_SIZE -1 ));
                           if (fill_vmsr_data(bank, global->mc_gstatus) == -1)
                           {
                               mce_printk(MCE_QUIET, "Fill vMCE# data for DOM%d "



[-- Attachment #2: mca_add_trans.patch --]
[-- Type: application/octet-stream, Size: 1006 bytes --]

Fix the vMCE address translation for HVM guest.

Fix address translation when we inject a virtual MCE to HVM guest.

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

diff -r ac2951705a86 xen/arch/x86/cpu/mcheck/mce_intel.c
--- a/xen/arch/x86/cpu/mcheck/mce_intel.c	Tue Jan 26 20:04:51 2010 +0800
+++ b/xen/arch/x86/cpu/mcheck/mce_intel.c	Tue Jan 26 22:49:11 2010 +0800
@@ -371,8 +371,8 @@ static void intel_UCR_handler(struct mci
 
                           gfn =
                               mfn_to_gmfn(d, ((bank->mc_addr) >> PAGE_SHIFT));
-                          bank->mc_addr =
-                              gfn << PAGE_SHIFT | (bank->mc_addr & PAGE_MASK);
+                          bank->mc_addr =  gfn << PAGE_SHIFT |
+                                        (bank->mc_addr & (PAGE_SIZE -1 ));
                           if (fill_vmsr_data(bank, global->mc_gstatus) == -1)
                           {
                               mce_printk(MCE_QUIET, "Fill vMCE# data for DOM%d "

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-29  7:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28  5:55 [PATCH 4/6] MCE: Fix the vMCE address translation for HVM guest Jiang, Yunhong
2010-01-28  8:14 ` Christoph Egger
2010-01-28  9:44   ` Jiang, Yunhong
2010-01-28 16:31     ` Christoph Egger
2010-01-29  5:55       ` Jiang, Yunhong
2010-01-29  7:44         ` Christoph Egger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.