public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Roman Kagan <rkagan@virtuozzo.com>
To: Steve Rutherford <srutherford@google.com>
Cc: KVM list <kvm@vger.kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Denis V. Lunev" <den@openvz.org>
Subject: Re: [PATCH] kvm:vmx: update secondary controls when disabling APICv
Date: Tue, 17 May 2016 11:46:27 +0300	[thread overview]
Message-ID: <20160517084626.GA13638@rkaganb.sw.ru> (raw)
In-Reply-To: <CABayD+f0+4s6eGS8dicZkQEmx4oYLmJYy001Zkj71FeSVBULQw@mail.gmail.com>

On Mon, May 16, 2016 at 01:15:39PM -0700, Steve Rutherford wrote:
> After updating the secondary execution controls, the MSR bitmaps need
> to be updated to enable APIC MSR intercepts (i.e. start treating APIC
> MSRs as if the guest's APICs are back in xAPIC mode by calling
> vmx_set_msr_bitmap, given that updating the execution controls should
> disable "virtualize x2APIC mode").

Indeed.  I didn't notice that in my tests because Windows doesn't use
x2apic (they use their own apic access msrs).

> The function vmx_set_msr_bitmap needs to look at the state of APICv to
> know that "virtualize x2APIC mode" was disabled.

OK

> Also, calling vmx_secondary_exec_control clobbers /all/ dynamic bits
> in the secondary controls (including the shadow VMCS bits). Those bits
> needs to be respected (ideally this patch should just whack all of the
> APICv related secondary execution controls).

I probably misunderstood the intent of vmx_*exec_control functions.  OK
I'll clear the relevant bits in vmcs directly instead.  I wonder if I
should also do so for PIN_BASED_POSTED_INTR?

> I can put together a patch if you'd like.

I'll try myself but I won't mind if you beat me to it :)

Roman.

      parent reply	other threads:[~2016-05-17 12:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-16 15:38 [PATCH] kvm:vmx: update secondary controls when disabling APICv Roman Kagan
2016-05-16 20:15 ` Steve Rutherford
2016-05-17  5:25   ` Denis V. Lunev
2016-05-17  8:46   ` Roman Kagan [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=20160517084626.GA13638@rkaganb.sw.ru \
    --to=rkagan@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=srutherford@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox