All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andersen, John S" <john.s.andersen@intel.com>
To: "liran.alon@oracle.com" <liran.alon@oracle.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>
Cc: "jmattson@google.com" <jmattson@google.com>,
	"joro@8bytes.org" <joro@8bytes.org>,
	"bp@alien8.de" <bp@alien8.de>, "x86@kernel.org" <x86@kernel.org>,
	"vkuznets@redhat.com" <vkuznets@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"Christopherson, Sean J" <sean.j.christopherson@intel.com>,
	"wanpengli@tencent.com" <wanpengli@tencent.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND RFC 0/2] Paravirtualized Control Register pinning
Date: Mon, 23 Dec 2019 17:27:04 +0000	[thread overview]
Message-ID: <26f2b7e58fd45eede50f845a57761d1f01aff3f7.camel@intel.com> (raw)
In-Reply-To: <15b57d6b-0f46-01f5-1f75-b9b55db0611a@redhat.com>

On Mon, 2019-12-23 at 18:09 +0100, Paolo Bonzini wrote:
> On 23/12/19 15:48, Liran Alon wrote:
> > > Should userspace expose the CR pining CPUID feature bit, it must
> > > zero CR
> > > pinned MSRs on reboot. If it does not, it runs the risk of having
> > > the
> > > guest enable pinning and subsequently cause general protection
> > > faults on
> > > next boot due to early boot code setting control registers to
> > > values
> > > which do not contain the pinned bits.
> > 
> > Why reset CR pinned MSRs by userspace instead of KVM INIT handling?
> 
> Most MSRs are not reset by INIT, are they?
> 

As far as I can tell, KVM doesn't know if the guest is rebooted.
Userspace uses the sregs and set MSRs ioctls to reset state.
kvm_vcpu_reset is called on non-boot CPUs. kvm_vcpu_init isn't called
on reboot.

  reply	other threads:[~2019-12-23 17:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 19:26 [RESEND RFC 0/2] Paravirtualized Control Register pinning John Andersen
2019-12-20 19:27 ` [RESEND RFC 1/2] KVM: X86: Add CR pin MSRs John Andersen
2019-12-20 19:27 ` [RESEND RFC 2/2] X86: Use KVM " John Andersen
2019-12-23  7:39   ` Andy Lutomirski
2019-12-23 12:06     ` Borislav Petkov
2019-12-24 21:18     ` Andersen, John S
2019-12-24  6:45   ` kbuild test robot
2019-12-21 13:59 ` [RESEND RFC 0/2] Paravirtualized Control Register pinning Paolo Bonzini
2019-12-23 17:28   ` Andersen, John S
2019-12-23 14:30 ` Liran Alon
2019-12-24 22:56   ` Liran Alon
2019-12-25  2:04   ` Andy Lutomirski
2019-12-25 13:05     ` Liran Alon
2019-12-23 14:48 ` Liran Alon
2019-12-23 17:09   ` Paolo Bonzini
2019-12-23 17:27     ` Andersen, John S [this message]
2019-12-23 17:28     ` Liran Alon
2019-12-23 17:46       ` Paolo Bonzini
2019-12-23 22:49         ` Liran Alon
2019-12-24 19:44   ` Andersen, John S
2019-12-24 20:35     ` Liran Alon
2019-12-24 21:17       ` Andersen, John S

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=26f2b7e58fd45eede50f845a57761d1f01aff3f7.camel@intel.com \
    --to=john.s.andersen@intel.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liran.alon@oracle.com \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=x86@kernel.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 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.