LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Wincy Van <fanwenyi0529@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "gleb@kernel.org" <gleb@kernel.org>,
	"Zhang, Yang Z" <yang.z.zhang@intel.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Wanpeng Li <wanpeng.li@linux.intel.com>,
	Jan Kiszka <jan.kiszka@web.de>
Subject: Re: [PATCH v3 6/6] KVM: nVMX: Enable nested posted interrupt processing.
Date: Wed, 28 Jan 2015 13:54:30 +0800	[thread overview]
Message-ID: <CACzj_yUn8yMY1iW2Umd_nYX29jw1vyuPd=m+jfx55ZwXXUPTBw@mail.gmail.com> (raw)
In-Reply-To: <54C80955.4070305@redhat.com>

On Wed, Jan 28, 2015 at 5:55 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> On 24/01/2015 11:24, Wincy Van wrote:
>>         if (!nested_cpu_has_virt_x2apic_mode(vmcs12) &&
>>             !nested_cpu_has_apic_reg_virt(vmcs12) &&
>> -           !nested_cpu_has_vid(vmcs12))
>> +           !nested_cpu_has_vid(vmcs12) &&
>> +           !nested_cpu_has_posted_intr(vmcs12))
>>                 return 0;
>>
>>         if (nested_cpu_has_virt_x2apic_mode(vmcs12))
>>                 r = nested_vmx_check_virt_x2apic(vcpu, vmcs12);
>>         if (nested_cpu_has_vid(vmcs12))
>>                 r |= nested_vmx_check_vid(vcpu, vmcs12);
>> +       if (nested_cpu_has_posted_intr(vmcs12))
>> +               r |= nested_vmx_check_posted_intr(vcpu, vmcs12);
>
> These "if"s are always true.
>

Why? L1 may config these features seperately, we should check them one by one.
e.g.  L1 may enable posted interrupt processing and virtual interrupt
delivery, but leaving virtualize x2apic mode disabled, then
nested_cpu_has_virt_x2apic_mode will return false.

> Paolo

  reply	other threads:[~2015-01-28  5:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-24 10:24 Wincy Van
2015-01-27 21:55 ` Paolo Bonzini
2015-01-28  5:54   ` Wincy Van [this message]
2015-01-28  7:07     ` Paolo Bonzini

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='CACzj_yUn8yMY1iW2Umd_nYX29jw1vyuPd=m+jfx55ZwXXUPTBw@mail.gmail.com' \
    --to=fanwenyi0529@gmail.com \
    --cc=gleb@kernel.org \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=wanpeng.li@linux.intel.com \
    --cc=yang.z.zhang@intel.com \
    --subject='Re: [PATCH v3 6/6] KVM: nVMX: Enable nested posted interrupt processing.' \
    /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

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).