From: Sean Christopherson <sean.j.christopherson@intel.com>
To: "Singh, Brijesh" <brijesh.singh@amd.com>
Cc: Liran Alon <liran.alon@oracle.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"rkrcmar@redhat.com" <rkrcmar@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH 1/2] KVM: SVM: Fix workaround for AMD Errata 1096
Date: Tue, 16 Jul 2019 13:54:27 -0700 [thread overview]
Message-ID: <20190716205427.GD28096@linux.intel.com> (raw)
In-Reply-To: <17d102bd-74ef-64f8-0237-3a49d64ea344@amd.com>
On Tue, Jul 16, 2019 at 08:27:12PM +0000, Singh, Brijesh wrote:
>
> On 7/16/19 3:09 PM, Liran Alon wrote:
> >>
> >> We are discussing reserved NPF so we need to be at CPL3.
> >
> > I don’t see the connection between a reserved #NPF and the need to be at
> > CPL3. A vCPU can execute at CPL<3 a page that is mapped user-accessible in
> > guest page-tables in case CR4.SMEP=0 and then instruction will execute
> > successfully and can dereference a page that is mapped in NPT using an
> > entry with a reserved bit set. Thus, reserved #NPF will be raised while
> > vCPU is at CPL<3 and DecodeAssist microcode will still raise SMAP violation
> > as CR4.SMAP=1 and microcode perform data-fetch with CPL<3. This leading
> > exactly to Errata condition as far as I understand.
> >
>
> Yes, vCPU at CPL<3 can raise the SMAP violation. When SMEP is disabled,
> the guest kernel never should be executing from code in user-mode pages,
> that'd be insecure. So I am not sure if kernel code can cause this
> errata.
From KVM's perspective, it's not a question of what is *likely* to happen
so much as it's a question of what *can* happen. Architecturally there is
nothing that prevents CPL<3 code from encountering the SMAP fault.
next prev parent reply other threads:[~2019-07-16 20:54 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 20:30 KVM: SVM: Fix workaround for AMD Errata 1096 Liran Alon
2019-07-15 20:30 ` [PATCH 1/2] " Liran Alon
2019-07-16 15:48 ` Singh, Brijesh
2019-07-16 15:56 ` Liran Alon
2019-07-16 16:07 ` Liran Alon
2019-07-16 16:10 ` Singh, Brijesh
2019-07-16 16:20 ` Liran Alon
2019-07-16 16:41 ` Sean Christopherson
2019-07-16 16:56 ` Liran Alon
2019-07-16 17:27 ` Sean Christopherson
2019-07-16 17:27 ` Paolo Bonzini
2019-07-16 17:35 ` Liran Alon
2019-07-16 19:28 ` Singh, Brijesh
2019-07-16 19:34 ` Liran Alon
2019-07-16 19:39 ` Paolo Bonzini
2019-07-16 19:45 ` Sean Christopherson
2019-07-16 19:50 ` Liran Alon
2019-07-16 19:47 ` Liran Alon
2019-07-16 19:41 ` Sean Christopherson
2019-07-16 19:52 ` Liran Alon
2019-07-16 20:02 ` Singh, Brijesh
2019-07-16 20:07 ` Sean Christopherson
2019-07-16 20:13 ` Paolo Bonzini
2019-07-16 20:09 ` Liran Alon
2019-07-16 20:27 ` Singh, Brijesh
2019-07-16 20:54 ` Sean Christopherson [this message]
2019-07-16 21:53 ` Liran Alon
2019-07-16 18:05 ` Singh, Brijesh
2019-07-16 18:06 ` Singh, Brijesh
2019-07-15 20:30 ` [PATCH 2/2] KVM: x86: Rename need_emulation_on_page_fault() to handle_no_insn_on_page_fault() Liran Alon
2019-07-16 15:48 ` Sean Christopherson
2019-07-16 16:01 ` Liran Alon
2019-07-16 16:10 ` Sean Christopherson
2019-07-16 19:33 ` Singh, Brijesh
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=20190716205427.GD28096@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=boris.ostrovsky@oracle.com \
--cc=brijesh.singh@amd.com \
--cc=kvm@vger.kernel.org \
--cc=liran.alon@oracle.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.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