From: Keir Fraser <keir.xen@gmail.com>
To: "Zhang, Yang Z" <yang.z.zhang@intel.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: "Zhang, Xiantao" <xiantao.zhang@intel.com>,
"JBeulich@suse.com" <JBeulich@suse.com>
Subject: Re: [PATCH 3/4] VMX: Add posted interrupt supporting
Date: Tue, 09 Apr 2013 09:40:15 +0100 [thread overview]
Message-ID: <CD89927F.2058F%keir.xen@gmail.com> (raw)
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E09A04400@SHSMSX101.ccr.corp.intel.com>
On 09/04/2013 09:23, "Zhang, Yang Z" <yang.z.zhang@intel.com> wrote:
> Keir Fraser wrote on 2013-04-09:
>> On 09/04/2013 08:58, "Zhang, Yang Z" <yang.z.zhang@intel.com> wrote:
>>
>>> If posted interrupt arrived after vmx_intr_assit() and before vmentry, then
>>> the interrupt cannot be inject to guest in time.
>>
>> But pending virtual interrupts are picked up during vmentry aren't they?
> Yes. But in this case, the interrupt still in PIR not in vIRR, and vmentry
> cannot pick up interrupt from PIR. So we must sync PIR to vIRR before vmentry.
Ah, I see. That makes sense.
I think I would like more code sharing of vcpu_kick(), but I know how to
make that change myself easier than explaining it. So I'm happy for this
part of the patch to go in as-is, and I'd clean up after.
-- Keir
>> So if the IPI occurs before vmentry, why is there a race? Isn't the only
>> purpose of __vmx_deliver_posted_interrupt() to ensure that the pending
>> virtual interrupts of the given vcpu get scanned/handled by the
>> appropriate processor?
>>
>> -- Keir
>>
>>> vmx_asm_do_vmentry:
>>> call vmx_intr_assist
>>> call nvmx_switch_guest
>>> ASSERT_NOT_IN_ATOMIC
>>> <---------if posted interrupt arrived here and
>>> we don't set softirq, then the interrupt will be delay until next vmentry.
>>> GET_CURRENT(%rbx)
>>> cli
>>>
>>> mov VCPU_processor(%rbx),%eax
>>> shl $IRQSTAT_shift,%eax
>>> lea irq_stat+IRQSTAT_softirq_pending(%rip),%rdx
>>> cmpl $0,(%rdx,%rax,1)
>>> jnz .Lvmx_process_softirqs
>>> Actually, the posted interrupt is same with a normal vcpu kick IPI, except
>>> that if cpu received it in non-root mode, it will not cause vmext. So we
>>> must
>>> follow the vcpu_kick logic.
>>
>
>
> Best regards,
> Yang
>
>
next prev parent reply other threads:[~2013-04-09 8:40 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-09 6:01 [PATCH 0/4] Add posted interrupt supporting Yang Zhang
2013-04-09 6:01 ` [PATCH 1/4] VMX: Detect posted interrupt capability Yang Zhang
2013-04-09 6:01 ` [PATCH 2/4] VMX: Turn on posted interrupt bit in vmcs Yang Zhang
2013-04-09 8:04 ` Jan Beulich
2013-04-09 8:30 ` Zhang, Yang Z
2013-04-09 8:55 ` Jan Beulich
2013-04-09 9:53 ` Zhang, Yang Z
2013-04-09 8:23 ` Jan Beulich
2013-04-09 8:38 ` Keir Fraser
2013-04-09 8:48 ` Zhang, Yang Z
2013-04-09 6:01 ` [PATCH 3/4] VMX: Add posted interrupt supporting Yang Zhang
2013-04-09 7:39 ` Keir Fraser
2013-04-09 7:58 ` Zhang, Yang Z
2013-04-09 8:14 ` Keir Fraser
2013-04-09 8:23 ` Zhang, Yang Z
2013-04-09 8:40 ` Keir Fraser [this message]
2013-04-09 8:17 ` Jan Beulich
2013-04-09 8:40 ` Zhang, Yang Z
2013-04-09 8:59 ` Keir Fraser
2013-04-09 8:53 ` Zhang, Yang Z
2013-04-09 9:00 ` Jan Beulich
2013-04-09 9:18 ` Keir Fraser
2013-04-09 6:01 ` [PATCH 4/4] VMX: Use posted interrupt to deliver virutal interrupt Yang Zhang
2013-04-09 7:40 ` Keir Fraser
2013-04-09 8:25 ` Zhang, Yang Z
2013-04-09 20:26 ` [PATCH 0/4] Add posted interrupt supporting Konrad Rzeszutek Wilk
2013-04-10 2:51 ` Zhang, Yang Z
2013-04-10 13:22 ` Konrad Rzeszutek Wilk
2013-04-10 13:32 ` Zhang, Yang Z
2013-04-10 13:42 ` Konrad Rzeszutek Wilk
2013-04-19 11:49 ` Stefano Stabellini
2013-04-19 13:10 ` Jan Beulich
2013-04-19 14:16 ` Stefano Stabellini
2013-04-19 14:23 ` Jan Beulich
2013-04-20 7:26 ` Zhang, Yang Z
2013-04-20 13:33 ` Stefano Stabellini
2013-04-10 13:58 ` Zhang, Yang Z
2013-04-10 14:34 ` Jan Beulich
2013-04-10 16:18 ` Keir Fraser
2013-04-11 1:04 ` Zhang, Yang Z
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=CD89927F.2058F%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xen.org \
--cc=xiantao.zhang@intel.com \
--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.