xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hvm/x86: fix x2APIC APIC_ID read emulation
@ 2013-06-09  2:20 Wangzhenguo
  2013-06-09  9:19 ` Wei Liu
  2013-06-10  9:07 ` [PATCH v2] x86/HVM: " Jan Beulich
  0 siblings, 2 replies; 4+ messages in thread
From: Wangzhenguo @ 2013-06-09  2:20 UTC (permalink / raw)
  To: xen-devel@lists.xen.org; +Cc: Yangxiaowei, keir@xen.org

>From 769b64a379c9b447cf5ad8a6f93560dedeb26f2a Mon Sep 17 00:00:00 2001
From: Zhenguo Wang <wangzhenguo@huawei.com>
Date: Sun, 9 Jun 2013 10:08:48 +0800
Subject: [PATCH] hvm/x86: fix x2APIC APIC_ID read emulation

APIC and x2APIC have different format for APIC_ID register. Need translation.

Signed-off-by: Zhenguo Wang <wangzhenguo@huawei.com>
Signed-off-by: Xiaowei Yang <xiaowei.yang@huawei.com>
---
 xen/arch/x86/hvm/vlapic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index 8c6a7e2..e0f6f06 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -584,6 +584,8 @@ int hvm_x2apic_msr_read(struct vcpu *v, unsigned int msr, uint64_t *msr_content)
     vlapic_read_aligned(vlapic, offset, &low);
     if ( offset == APIC_ICR )
         vlapic_read_aligned(vlapic, APIC_ICR2, &high);
+    else if ( offset == APIC_ID)
+        low = VLAPIC_ID(vlapic);
 
     *msr_content = (((uint64_t)high) << 32) | low;
     return 0;
--

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

end of thread, other threads:[~2013-06-10 12:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-09  2:20 [PATCH] hvm/x86: fix x2APIC APIC_ID read emulation Wangzhenguo
2013-06-09  9:19 ` Wei Liu
2013-06-10  9:07 ` [PATCH v2] x86/HVM: " Jan Beulich
2013-06-10 12:23   ` Keir Fraser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).