xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Chao Gao <chao.gao@intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v3] VT-d PI: disable VT-d PI when APICv is disabled
Date: Fri, 9 Jun 2017 16:58:00 +0800	[thread overview]
Message-ID: <20170609085757.GA9201@skl-2s3.sh.intel.com> (raw)
In-Reply-To: <593A7BD202000078001612FC@prv-mh.provo.novell.com>

On Fri, Jun 09, 2017 at 02:43:30AM -0600, Jan Beulich wrote:
>>>> On 09.06.17 at 08:22, <chao.gao@intel.com> wrote:
>> --- a/xen/arch/x86/hvm/vmx/vmcs.c
>> +++ b/xen/arch/x86/hvm/vmx/vmcs.c
>> @@ -351,6 +351,13 @@ static int vmx_init_vmcs_config(void)
>>            || !(_vmx_vmexit_control & VM_EXIT_ACK_INTR_ON_EXIT) )
>>          _vmx_pin_based_exec_control  &= ~ PIN_BASED_POSTED_INTERRUPT;
>>  
>> +    if ( iommu_intpost && !cpu_has_vmx_posted_intr_processing )
>> +    {
>> +        printk("Intel VT-d Posted Interrupt is disabled for CPU-side Posted "
>> +               "Interrupt is not enabled\n");
>> +        iommu_intpost = 0;
>> +    }
>
>So simply clearing iommu_intpost here indeed looks to be fine (at
>least for all current uses of the flag). However, previously you
>had a dependency on APIC-V being enabled, and there not longer
>is such a dependency with the check above -
>posted_intr_processing is being forced to off only when
>!vmx_virtual_intr_delivery or ACK_INTR_ON_EXIT not being set
>(the latter btw is strange as a check, as that feature is being
>requested as "minimum", not "optional").

Yes. the relevant description is improper now. I will remove all of
them and think more about the ACK_INTR_ON_EXIT. If it can be
removed, I will take this change to do this.

>
>And then I have a flow question here:
>cpu_has_vmx_posted_intr_processing expands to a reference to
>vmx_pin_based_exec_control, yet that variable is being written
>only later in the function, so it would seem to me that now you
>turn off iommu_intpost unconditionally. Am I overlooking anything?
>Otherwise I think you need to use _vmx_pin_based_exec_control
>here instead, just like the code visible in context does.

Agree. It should be. Thanks you. I forgot to test with 'apicv=true'.
I only tested this patch with 'apicv=false'.

Thanks
chao

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

      reply	other threads:[~2017-06-09  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09  6:22 [PATCH v3] VT-d PI: disable VT-d PI when APICv is disabled Chao Gao
2017-06-09  8:43 ` Jan Beulich
2017-06-09  8:58   ` Chao Gao [this message]

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=20170609085757.GA9201@skl-2s3.sh.intel.com \
    --to=chao.gao@intel.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@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).