public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	Bandan Das <bsd@redhat.com>
Subject: Re: [PATCH v1 0/2] KVM: VMX: require EPTP WB (write-back) support
Date: Thu, 10 Aug 2017 18:34:29 +0200	[thread overview]
Message-ID: <20170810163429.GB22461@flask> (raw)
In-Reply-To: <8cdac71b-8d69-e789-082d-fd32b3591755@redhat.com>

2017-08-10 16:25+0200, David Hildenbrand:
> On 10.08.2017 16:23, Radim Krčmář wrote:
> > 2017-08-10 15:35+0200, David Hildenbrand:
> >> I also have a patch that allows VMX and nVMX to use the UC (unchached)
> >> memory type.
> >> .
> >> However I am not sure if we have to take care of anything special in that
> >> case? Any insights?
> > 
> > We're modifying the EPT structure through cache in root mode and I think
> > the cache would have to be manually flushed before entering non-root
> > mode.
> > 
> > And UC accesses are going to be slower, so I don't see the benefits for
> > VMX.  We can allow UC in nVMX as it will make no difference.
> > 
> 
> That would mean, even fake it's existence but always create EPTP with WB
> for nVMX?

Yes, although I just realized a case where I can't find any code nor
hardware guarantees that handle it:

KVM allows UC access to a page that the guest wanted as UC if
kvm_arch_has_noncoherent_dma().  The guest can bypass the cache when
accessing EPT pages, set UC in EPTP and expect it to work, but KVM would
access the EPT pages through cache and might therefore shadow stale
data.

      reply	other threads:[~2017-08-10 16:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 13:35 [PATCH v1 0/2] KVM: VMX: require EPTP WB (write-back) support David Hildenbrand
2017-08-10 13:35 ` [PATCH v1 1/2] KVM: VMX: cleanup EPTP definitions David Hildenbrand
2017-08-10 19:38   ` Bandan Das
2017-08-10 19:53     ` David Hildenbrand
2017-08-10 20:58   ` David Hildenbrand
2017-08-10 13:35 ` [PATCH v1 2/2] KVM: VMX: always require WB memory type for EPT David Hildenbrand
2017-08-10 14:42   ` Paolo Bonzini
2017-08-10 18:30     ` Konrad Rzeszutek Wilk
2017-08-10 20:09       ` David Hildenbrand
2017-08-10 19:40   ` Bandan Das
2017-08-10 19:54     ` David Hildenbrand
2017-08-10 14:23 ` [PATCH v1 0/2] KVM: VMX: require EPTP WB (write-back) support Radim Krčmář
2017-08-10 14:25   ` David Hildenbrand
2017-08-10 16:34     ` Radim Krčmář [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=20170810163429.GB22461@flask \
    --to=rkrcmar@redhat.com \
    --cc=bsd@redhat.com \
    --cc=david@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@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