All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: "Xuquan (Quan Xu)" <xuquan8@huawei.com>, Jan Beulich <JBeulich@suse.com>
Cc: "yang.zhang.wz@gmail.com" <yang.zhang.wz@gmail.com>,
	"Hanweidong (Randy)" <hanweidong@huawei.com>,
	"George.Dunlap@eu.citrix.com" <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Tim Deegan <tim@xen.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Jiangyifei <jiangyifei@huawei.com>,
	"Nakajima, Jun" <jun.nakajima@intel.com>
Subject: Re: [PATCH v2] x86/apicv: fix RTC periodic timer and apicv issue
Date: Mon, 24 Oct 2016 07:02:18 +0000	[thread overview]
Message-ID: <AADFC41AFE54684AB9EE6CBC0274A5D18DFDA5DB@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <E0A769A898ADB6449596C41F51EF62C6ABB33E@SZXEMI506-MBX.china.huawei.com>

> From: Xuquan (Quan Xu) [mailto:xuquan8@huawei.com]
> Sent: Monday, October 17, 2016 5:28 PM
> 
> >>
> >>Back to the main open before holiday - multiple EOIs may come to clear
> >>irq_issued before guest actually handles the very vpt injection
> >>(possible if vpt vector is shared with other sources). I don't see a
> >>good solution on that open... :/
> >>
> >>We've discussed various options which all fail in one or another place
> >>- either miss an injection, or incur undesired injections.
> >>Possibly we should consider another direction - fall back to non-apicv
> >>path when we see vpt vector pending but it's not the highest one.
> >>
> >>Original condition to enter virtual intr delivery:
> >>	    else if ( cpu_has_vmx_virtual_intr_delivery &&
> >>              intack.source != hvm_intsrc_pic &&
> >>              intack.source != hvm_intsrc_vector )
> >>
> >>now new condition:
> >>	    else if ( cpu_has_vmx_virtual_intr_delivery &&
> >>              intack.source != hvm_intsrc_pic &&
> >>              intack.source != hvm_intsrc_vector &&
> >>			(pt_vector == -1 || intack.vector == pt_vector) )
> >>
> >>Thoughts?
> >>
> >Kevin,
> >When I try to fix it as your suggestion, I cannot boot the guest, with below
> >message(from xl dmesg):
> 
> with Kevin's patch, the hypervisor always calls ' vmx_inject_extint() ->
> __vmx_inject_exception()' to inject exception, then vm-entry on loop..
> the interrupt (PT or IPI, or others) can't deliver to guest..
> 
> and so far, we suppress MSR-based APIC suggestion when having APIC-V by
> http://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=7f2e992b824ec62a2818e643
> 90ac2ccfbd74e6b7
> so I think we couldn't fallback to non-apicv dynamically here..
> 

What about setting EOI exit bitmap for intack.vector when it's higher
than pending pt_vector? This way we can guarantee there's always a
chance to post pt_vector when pt_vector becomes the highest one...

(of course you need make later pt_intr_post conditionally then, only
when intack.vector==pt_vector)

Thanks
Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-10-24  7:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 13:30 [PATCH v2] x86/apicv: fix RTC periodic timer and apicv issue Xuquan (Euler)
2016-09-23 15:33 ` Jan Beulich
2016-09-23 23:34   ` Tian, Kevin
2016-09-24  1:06     ` Xuquan (Euler)
2016-09-26  6:39       ` Jan Beulich
2016-10-10  9:21         ` Xuquan (Quan Xu)
2016-10-10  9:39           ` Jan Beulich
2016-10-10 10:49             ` Xuquan (Quan Xu)
2016-10-11  7:48               ` Tian, Kevin
2016-10-11 11:12                 ` Xuquan (Quan Xu)
2016-10-17  9:27                 ` Xuquan (Quan Xu)
2016-10-21  8:43                   ` Tian, Kevin
2016-10-24  7:02                   ` Tian, Kevin [this message]
2016-10-25  8:36                     ` Xuquan (Quan Xu)
2016-10-25 13:01                       ` Konrad Rzeszutek Wilk
2016-10-26  8:42                         ` Xuquan (Quan Xu)
2016-10-26  5:19                       ` Tian, Kevin
2016-10-26  8:38                         ` Xuquan (Quan Xu)
2016-10-26  9:35                           ` Tian, Kevin
2016-10-26 12:02                             ` Xuquan (Quan Xu)
2016-10-25  9:01                     ` Xuquan (Quan Xu)
2016-09-26  6:35     ` Jan Beulich
2016-09-26 19:34       ` Tian, Kevin

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=AADFC41AFE54684AB9EE6CBC0274A5D18DFDA5DB@SHSMSX101.ccr.corp.intel.com \
    --to=kevin.tian@intel.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=hanweidong@huawei.com \
    --cc=jiangyifei@huawei.com \
    --cc=jun.nakajima@intel.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    --cc=xuquan8@huawei.com \
    --cc=yang.zhang.wz@gmail.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.