From: Olaf Hering <olaf@aepfle.de>
To: "Zhang, Yang Z" <yang.z.zhang@intel.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>, Keir Fraser <keir@xen.org>,
"Nakajima, Jun" <jun.nakajima@intel.com>,
"Dong, Eddie" <eddie.dong@intel.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
"Xu, Dongxiao" <dongxiao.xu@intel.com>,
Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH] x86/hvm: implement save/restore for posted interrupts
Date: Mon, 4 Aug 2014 09:50:08 +0200 [thread overview]
Message-ID: <20140804075007.GA11609@aepfle.de> (raw)
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E0AB4E9C0@SHSMSX104.ccr.corp.intel.com>
On Mon, Aug 04, Zhang, Yang Z wrote:
> This is really strange. With this patch, i cannot reproduce the issue with sles11sp3 on latest Xen.
>
> Besides, according the response from John, the issue they observed is exactly the eoi bitmap update issue.
>
> BTW, my patch is based on your sync_pir_to_irr changes. I am not sure
> whether you applied the following changes when doing testing. But you
> should see the failure ratio is reduced obviously even without it,
> right?
I have used this patch now, the sync_pir_to_irr part was indeed missing.
But, still no joy for me. This is what I used:
---
xen/arch/x86/hvm/vlapic.c | 3 +++
xen/arch/x86/hvm/vmx/vmx.c | 10 ++++++++++
xen/include/asm-x86/hvm/vlapic.h | 2 ++
3 files changed, 15 insertions(+)
Index: xen-4.2.4-testing/xen/arch/x86/hvm/vlapic.c
===================================================================
--- xen-4.2.4-testing.orig/xen/arch/x86/hvm/vlapic.c
+++ xen-4.2.4-testing/xen/arch/x86/hvm/vlapic.c
@@ -1164,6 +1164,9 @@ static int lapic_save_regs(struct domain
for_each_vcpu ( d, v )
{
+ if ( hvm_funcs.sync_pir_to_irr )
+ hvm_funcs.sync_pir_to_irr(v);
+
s = vcpu_vlapic(v);
if ( (rc = hvm_save_entry(LAPIC_REGS, v->vcpu_id, h, s->regs)) != 0 )
break;
Index: xen-4.2.4-testing/xen/arch/x86/hvm/vmx/vmx.c
===================================================================
--- xen-4.2.4-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
+++ xen-4.2.4-testing/xen/arch/x86/hvm/vmx/vmx.c
@@ -1606,6 +1606,8 @@ static void vmx_process_isr(int isr, str
{
unsigned long status;
u8 old;
+ int vector;
+ struct vlapic *s = vcpu_vlapic(v);
if ( !cpu_has_vmx_virtual_intr_delivery )
return;
@@ -1622,6 +1624,14 @@ static void vmx_process_isr(int isr, str
status |= isr << VMX_GUEST_INTR_STATUS_SVI_OFFSET;
__vmwrite(GUEST_INTR_STATUS, status);
}
+ for ( vector = 0; vector < NR_VECTORS; vector++ )
+ if (vlapic_test_vector(vector, &s->regs->data[APIC_ISR]))
+ set_bit(vector, v->arch.hvm_vmx.eoi_exit_bitmap);
+
+ __vmwrite(0x201c, v->arch.hvm_vmx.eoi_exit_bitmap[0]);
+ __vmwrite(0x201e, v->arch.hvm_vmx.eoi_exit_bitmap[1]);
+ __vmwrite(0x2020, v->arch.hvm_vmx.eoi_exit_bitmap[2]);
+ __vmwrite(0x2022, v->arch.hvm_vmx.eoi_exit_bitmap[3]);
vmx_vmcs_exit(v);
}
Index: xen-4.2.4-testing/xen/include/asm-x86/hvm/vlapic.h
===================================================================
--- xen-4.2.4-testing.orig/xen/include/asm-x86/hvm/vlapic.h
+++ xen-4.2.4-testing/xen/include/asm-x86/hvm/vlapic.h
@@ -60,6 +60,8 @@
#define VEC_POS(v) ((v) % 32)
#define REG_POS(v) (((v) / 32) * 0x10)
+#define vlapic_test_vector(vec, bitmap) \
+ test_bit(VEC_POS(vec), (uint32_t *)((bitmap) + REG_POS(vec)))
#define vlapic_test_and_set_vector(vec, bitmap) \
test_and_set_bit(VEC_POS(vec), (uint32_t *)((bitmap) + REG_POS(vec)))
#define vlapic_test_and_clear_vector(vec, bitmap) \
Olaf
next prev parent reply other threads:[~2014-08-04 7:50 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 15:09 [PATCH] x86/hvm: implement save/restore for posted interrupts Olaf Hering
2014-07-03 15:27 ` Jan Beulich
2014-07-09 11:24 ` Zhang, Yang Z
2014-07-09 21:14 ` Tian, Kevin
2014-07-16 14:28 ` Olaf Hering
2014-07-16 16:11 ` Tian, Kevin
2014-07-17 7:11 ` Olaf Hering
2014-07-17 9:29 ` Zhang, Yang Z
2014-07-18 13:58 ` Olaf Hering
2014-07-22 23:06 ` Zhang, Yang Z
2014-07-23 8:03 ` Olaf Hering
2014-07-25 21:38 ` Tian, Kevin
2014-07-28 6:52 ` Olaf Hering
2014-07-29 7:48 ` Zhang, Yang Z
2014-07-29 8:27 ` Jan Beulich
2014-08-02 10:59 ` Olaf Hering
2014-08-04 1:08 ` Zhang, Yang Z
2014-08-04 7:50 ` Olaf Hering [this message]
2014-08-04 7:57 ` Zhang, Yang Z
2014-08-05 10:32 ` Olaf Hering
2014-08-08 0:18 ` Zhang, Yang Z
2014-09-01 6:44 ` Zhang, Yang Z
2014-09-18 3:29 ` Zhang, Yang Z
2014-09-19 13:32 ` Olaf Hering
2014-09-19 13:39 ` Jan Beulich
2014-09-19 17:51 ` Andrew Cooper
2014-09-22 22:43 ` Tian, Kevin
2014-09-24 16:26 ` Malcolm Crossley
2014-09-30 16:19 ` Jan Beulich
2014-10-01 8:07 ` Olaf Hering
2014-10-01 8:29 ` Jan Beulich
2014-10-01 20:13 ` Olaf Hering
2014-10-02 6:51 ` Jan Beulich
2014-10-02 8:10 ` Andrew Cooper
2014-10-02 8:20 ` Olaf Hering
2014-10-08 7:37 ` Zhang, Yang Z
2014-10-08 7:40 ` Olaf Hering
2014-10-08 7:55 ` Zhang, Yang Z
2014-10-08 8:28 ` Olaf Hering
2014-10-08 8:35 ` Zhang, Yang Z
2014-10-08 8:54 ` Olaf Hering
2014-10-09 7:24 ` Zhang, Yang Z
2014-10-09 8:41 ` Fabio Fantoni
2014-10-09 8:43 ` Zhang, Yang Z
2014-10-09 12:49 ` Fabio Fantoni
2014-10-09 11:35 ` Malcolm Crossley
2014-10-09 13:19 ` Andrew Cooper
2014-10-10 0:48 ` Zhang, Yang Z
2014-10-09 13:31 ` Olaf Hering
2014-10-09 14:11 ` Olaf Hering
2014-10-10 0:52 ` Zhang, Yang Z
2014-07-25 9:40 ` Jan Beulich
2014-07-25 12:49 ` Tian, Kevin
2014-07-25 13:59 ` Jan Beulich
2014-07-25 21:31 ` Tian, Kevin
2014-07-28 6:46 ` Jan Beulich
2014-07-28 7:52 ` Wu, Feng
2014-07-28 8:17 ` Zhang, Yang Z
2014-07-28 9:02 ` Jan Beulich
2014-07-28 9:50 ` Liuqiming (John)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140804075007.GA11609@aepfle.de \
--to=olaf@aepfle.de \
--cc=dongxiao.xu@intel.com \
--cc=eddie.dong@intel.com \
--cc=jbeulich@suse.com \
--cc=jun.nakajima@intel.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xen.org \
--cc=yang.z.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.