From: Chao Gao <chao.gao@intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Dario Faggioli <dario.faggioli@citrix.com>,
xen-devel@lists.xen.org, Jun Nakajima <jun.nakajima@intel.com>
Subject: Re: [PATCH v9 1/8] VMX: Permanently assign PI hook vmx_pi_switch_to()
Date: Wed, 1 Mar 2017 08:01:01 +0800 [thread overview]
Message-ID: <20170301000101.GA51482@skl-2s3.sh.intel.com> (raw)
In-Reply-To: <58B5B6AD020000780013E60E@prv-mh.provo.novell.com>
On Tue, Feb 28, 2017 at 09:43:09AM -0700, Jan Beulich wrote:
>>>> On 27.02.17 at 02:45, <chao.gao@intel.com> wrote:
>> --- a/xen/arch/x86/hvm/vmx/vmx.c
>> +++ b/xen/arch/x86/hvm/vmx/vmx.c
>> @@ -260,9 +260,15 @@ void vmx_pi_hooks_deassign(struct domain *d)
>>
>> ASSERT(d->arch.hvm_domain.pi_ops.vcpu_block);
>>
>> + /*
>> + * Note that we don't set 'd->arch.hvm_domain.pi_ops.switch_to' to NULL
>> + * here. If we deassign the hooks while the vCPU is runnable in the
>> + * runqueue with 'SN' set, all the future notification event will be
>> + * suppressed. Preserving the 'switch_to' hook function can make sure
>> + * event time the vCPU is running the 'SN' field is cleared.
>> + */
>
>Did we now lose the remark indicating that at least in theory
>we could remove the hook after it had run one more time? It's
I also think it only need to run one more time, because the hook
function that set 'SN' bit is already removed.
>also not really becoming clear why SN continues to matter
>after device removal, but perhaps that's just because of my
>so far limited understanding of PI.
>
>Also I think you mean "every time" on the last line, albeit that
>(as per my remark above) is irrelevant - we need it to run just
>once more.
I would like to make the comment as clear as possible.
How about the underlying comment,
Note that we don't set 'd->arch.hvm_domain.pi_ops.switch_to' to NULL
here. If we deassign the hooks while the vCPU is runnable in the
runqueue with 'SN' set, all the future notification event will be
suppressed since vmx_deliver_posted_intr() also use 'SN' bit
as the suppression flag. Preserving the 'switch_to' hook function can
clear the 'SN' bit when the vCPU becomes running next time. After
that, No matter which status(runnable, running or block) the vCPU is in,
the 'SN' bit will keep clear for the 'switch_from' hook function that set
the 'SN' bit has been removed. At that time, the 'switch_to' hook function
is also useless. Considering the function doesn't do harm to the whole
system, leave it here until we find a clean solution to deassign the
'switch_to' hook function.
Thanks,
Chao
>
>Jan
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-01 0:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 1:45 [PATCH v9 0/8] VMX: Properly handle pi descriptor and per-cpu Chao Gao
2017-02-27 1:45 ` [PATCH v9 1/8] VMX: Permanently assign PI hook vmx_pi_switch_to() Chao Gao
2017-02-28 16:43 ` Jan Beulich
2017-03-01 0:01 ` Chao Gao [this message]
2017-03-01 7:41 ` Jan Beulich
2017-03-03 8:29 ` Tian, Kevin
2017-03-03 10:49 ` Jan Beulich
2017-03-03 11:54 ` Tian, Kevin
2017-02-27 1:45 ` [PATCH v9 2/8] xen/passthrough: Reject self-(de)assignment of devices Chao Gao
2017-02-28 16:46 ` Jan Beulich
2017-02-27 1:45 ` [PATCH v9 3/8] VMX: Properly handle pi when all the assigned devices are removed Chao Gao
2017-03-03 11:51 ` Tian, Kevin
2017-02-27 1:45 ` [PATCH v9 4/8] VMX: Make sure PI is in proper state before install the hooks Chao Gao
2017-02-27 1:45 ` [PATCH v9 5/8] VT-d: Introduce a new function update_irte_for_msi_common Chao Gao
2017-03-02 8:58 ` Jan Beulich
2017-03-02 7:14 ` Chao Gao
2017-03-02 14:32 ` Jan Beulich
2017-02-27 1:45 ` [PATCH v9 6/8] VT-d: Some cleanups Chao Gao
2017-02-27 1:45 ` [PATCH v9 7/8] VMX: Fixup PI descriptor when cpu is offline Chao Gao
2017-02-27 1:45 ` [PATCH v9 8/8] VT-d: Add copy_irte_{to, from}_irt for updating irte Chao Gao
2017-03-02 9:03 ` Jan Beulich
2017-03-15 10:38 ` 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=20170301000101.GA51482@skl-2s3.sh.intel.com \
--to=chao.gao@intel.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xen.org \
/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 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).