mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiao Guangrong <guangrong.xiao@gmail.com>
To: Haozhong Zhang <haozhong.zhang@intel.com>,
	kvm@vger.kernel.org, x86@kernel.org
Cc: linux-kernel@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	rkrcmar@redhat.com, Xiao Guangrong <xiaoguangrong.eric@gmail.com>,
	Dan Williams <dan.j.williams@intel.com>,
	ivan.d.cuevas.escareno@intel.com, karthik.kumar@intel.com,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Borislav Petkov <bp@suse.de>,
	Mikulas Patocka <mpatocka@redhat.com>,
	Tom Lendacky <thomas.lendacky@amd.com>
Subject: Re: [PATCH 0/3] KVM: MMU: fix kvm_is_mmio_pfn()
Date: Tue, 31 Oct 2017 16:12:29 +0800	[thread overview]
Message-ID: <6828fd44-f883-3f90-3e7c-1246300f4c41@gmail.com> (raw)
In-Reply-To: <20171027022524.22589-1-haozhong.zhang@intel.com>



On 10/27/2017 10:25 AM, Haozhong Zhang wrote:
> [I just copy the commit message from patch 3]
> 
> By default, KVM treats a reserved page as for MMIO purpose, and maps
> it to guest with UC memory type.  However, some reserved pages are not
> for MMIO, such as pages of DAX device (e.g., /dev/daxX.Y). Mapping
> them with UC memory type will harm the performance.  In order to
> exclude those cases, we check the host cache mode in addition and only
> treat UC/UC- pages as MMIO.
> 

I am afraid that is not only a performance issue but also a architecture
bug - it could trigger MCE as there is alias memory mapping (a page mapped
as both WB and UC).

It may hurt mdev device as well as the device memory may be both mapped
at host and VM.

      parent reply	other threads:[~2017-10-31  8:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27  2:25 Haozhong Zhang
2017-10-27  2:25 ` [PATCH 1/3] x86/mm: expose track_pfn_insert() Haozhong Zhang
2017-10-27  2:25 ` [PATCH 2/3] KVM: add converters between pfn_t and kvm_pfn_t Haozhong Zhang
2017-10-27  2:25 ` [PATCH 3/3] KVM: MMU: consider host cache type in MMIO pfn check Haozhong Zhang
2017-10-27  8:40   ` Ingo Molnar
2017-10-31  7:35     ` Haozhong Zhang
2017-10-31  8:12 ` Xiao Guangrong [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=6828fd44-f883-3f90-3e7c-1246300f4c41@gmail.com \
    --to=guangrong.xiao@gmail.com \
    --cc=bp@suse.de \
    --cc=dan.j.williams@intel.com \
    --cc=haozhong.zhang@intel.com \
    --cc=hpa@zytor.com \
    --cc=ivan.d.cuevas.escareno@intel.com \
    --cc=karthik.kumar@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpatocka@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    --cc=xiaoguangrong.eric@gmail.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

all inboxes | Powered by JetHome®