From: Izik Eidus <ieidus@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: avi@redhat.com, kvm@vger.kernel.org, aarcange@redhat.com
Subject: Re: [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes
Date: Sat, 12 Sep 2009 09:35:59 +0300 [thread overview]
Message-ID: <4AAB414F.9070101@redhat.com> (raw)
In-Reply-To: <20090911211458.GB6244@amt.cnet>
Marcelo Tosatti wrote:
> On Thu, Sep 10, 2009 at 07:38:57PM +0300, Izik Eidus wrote:
>
>> this flag notify that the host physical page we are pointing to from
>> the spte is write protected, and therefore we cant change its access
>> to be write unless we run get_user_pages(write = 1).
>>
>> (this is needed for change_pte support in kvm)
>>
>> Signed-off-by: Izik Eidus <ieidus@redhat.com>
>> ---
>> arch/x86/kvm/mmu.c | 15 +++++++++++----
>> arch/x86/kvm/paging_tmpl.h | 18 +++++++++++++++---
>> 2 files changed, 26 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
>> index 62d2f86..a7151b8 100644
>> --- a/arch/x86/kvm/mmu.c
>> +++ b/arch/x86/kvm/mmu.c
>> @@ -156,6 +156,8 @@ module_param(oos_shadow, bool, 0644);
>> #define CREATE_TRACE_POINTS
>> #include "mmutrace.h"
>>
>> +#define SPTE_HOST_WRITEABLE (1ULL << PT_FIRST_AVAIL_BITS_SHIFT)
>> +
>> #define SHADOW_PT_INDEX(addr, level) PT64_INDEX(addr, level)
>>
>> struct kvm_rmap_desc {
>> @@ -1754,7 +1756,7 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
>> unsigned pte_access, int user_fault,
>> int write_fault, int dirty, int level,
>> gfn_t gfn, pfn_t pfn, bool speculative,
>> - bool can_unsync)
>> + bool can_unsync, bool reset_host_protection)
>>
> bool host_pte_writeable ?
>
>
>
Sure.
next prev parent reply other threads:[~2009-09-12 6:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-10 16:38 [PATCH 0/3] ksm support for kvm Izik Eidus
2009-09-10 16:38 ` [PATCH 1/3] kvm: dont hold pagecount reference for mapped sptes pages Izik Eidus
2009-09-10 16:38 ` [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes Izik Eidus
2009-09-10 16:38 ` [PATCH 3/3] add support for change_pte mmu notifiers Izik Eidus
2009-09-11 21:24 ` Marcelo Tosatti
2009-09-12 6:41 ` Izik Eidus
2009-09-12 16:18 ` Marcelo Tosatti
2009-09-12 17:04 ` Izik Eidus
2009-09-12 16:59 ` Marcelo Tosatti
2009-09-11 21:14 ` [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes Marcelo Tosatti
2009-09-12 6:35 ` Izik Eidus [this message]
2009-09-14 5:18 ` Avi Kivity
2009-09-14 8:34 ` Marcelo Tosatti
2009-09-14 16:51 ` Izik Eidus
-- strict thread matches above, loose matches on Subject: below --
2009-09-23 18:25 [PATCH 0/3] ksm support for kvm v2 Izik Eidus
2009-09-23 18:25 ` [PATCH 1/3] kvm: dont hold pagecount reference for mapped sptes pages Izik Eidus
2009-09-23 18:25 ` [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes Izik Eidus
2009-09-23 18:47 [PATCH 0/3] kvm ksm support v3 Izik Eidus
2009-09-23 18:47 ` [PATCH 1/3] kvm: dont hold pagecount reference for mapped sptes pages Izik Eidus
2009-09-23 18:47 ` [PATCH 2/3] add SPTE_HOST_WRITEABLE flag to the shadow ptes Izik Eidus
2009-09-24 16:55 ` Andrea Arcangeli
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=4AAB414F.9070101@redhat.com \
--to=ieidus@redhat.com \
--cc=aarcange@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@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 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.