From: Gleb Natapov <gleb@redhat.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>,
Alex Williamson <alex.williamson@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] kvm: IOMMU read-only mapping support
Date: Mon, 28 Jan 2013 12:59:03 +0200 [thread overview]
Message-ID: <20130128105903.GA22871@redhat.com> (raw)
In-Reply-To: <5101FBE8.9000206@linux.vnet.ibm.com>
On Fri, Jan 25, 2013 at 11:28:40AM +0800, Xiao Guangrong wrote:
> On 01/25/2013 09:17 AM, Takuya Yoshikawa wrote:
> > On Thu, 24 Jan 2013 15:03:57 -0700
> > Alex Williamson <alex.williamson@redhat.com> wrote:
> >
> >> A couple patches to make KVM IOMMU support honor read-only mappings.
> >> This causes an un-map, re-map when the read-only flag changes and
> >> makes use of it when setting IOMMU attributes. Thanks,
> >
> > Looks good to me.
> >
> > I think I can naturally update my patch after this gets merged.
> >
>
> Please wait.
>
> The commit c972f3b1 changed the write-protect behaviour - it does
> wirte-protection only when dirty flag is set.
> [ I did not see this commit when we discussed the problem before. ]
>
> Further more, i notice that write-protect is not enough, when do sync
> shadow page:
>
> FNAME(sync_page):
>
> host_writable = sp->spt[i] & SPTE_HOST_WRITEABLE;
>
> set_spte(vcpu, &sp->spt[i], pte_access,
> PT_PAGE_TABLE_LEVEL, gfn,
> spte_to_pfn(sp->spt[i]), true, false,
> host_writable);
>
> It sets spte based on the old value that means the readonly flag check
> is missed. We need to call kvm_arch_flush_shadow_all under this case.
Why not just disallow changing memory region KVM_MEM_READONLY flag
without deleting the region?
--
Gleb.
next prev parent reply other threads:[~2013-01-28 10:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-24 22:03 [PATCH 0/2] kvm: IOMMU read-only mapping support Alex Williamson
2013-01-24 22:04 ` [PATCH 1/2] kvm: Force IOMMU remapping on memory slot read-only flag changes Alex Williamson
2013-01-25 2:58 ` Xiao Guangrong
2013-01-24 22:04 ` [PATCH 2/2] kvm: Obey read-only mappings in iommu Alex Williamson
2013-01-25 1:17 ` [PATCH 0/2] kvm: IOMMU read-only mapping support Takuya Yoshikawa
2013-01-25 3:28 ` Xiao Guangrong
2013-01-25 3:59 ` Takuya Yoshikawa
2013-01-25 4:28 ` Takuya Yoshikawa
2013-01-28 10:59 ` Gleb Natapov [this message]
2013-01-28 12:25 ` Takuya Yoshikawa
2013-01-28 15:36 ` Alex Williamson
2013-01-29 2:12 ` Takuya Yoshikawa
2013-01-29 3:06 ` Xiao Guangrong
2013-01-29 6:50 ` Gleb Natapov
2013-01-29 7:37 ` Xiao Guangrong
[not found] ` <20130129074852.GH22871@redhat.com>
2013-01-30 4:06 ` Xiao Guangrong
2013-01-30 4:26 ` Takuya Yoshikawa
2013-01-27 15:29 ` Gleb Natapov
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=20130128105903.GA22871@redhat.com \
--to=gleb@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiaoguangrong@linux.vnet.ibm.com \
--cc=yoshikawa_takuya_b1@lab.ntt.co.jp \
/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;
as well as URLs for NNTP newsgroup(s).