All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH 4/4] KVM: MMU: cleanup update_pte, pte_prefetch and sync_page functions
Date: Wed, 17 Nov 2010 09:58:20 +0800	[thread overview]
Message-ID: <4CE336BC.4070905@cn.fujitsu.com> (raw)
In-Reply-To: <20101116205223.GB24156@amt.cnet>

On 11/17/2010 04:52 AM, Marcelo Tosatti wrote:

>> +	else
>> +		mmu_set_spte(vcpu, spte, sp->role.access, pte_access, 0, 0,
>> +			     dirty, NULL, PT_PAGE_TABLE_LEVEL, gfn,
>> +			     pfn, true, host_writeable);
> 
> For example, the update path should always go through mmu_set_spte to
> update last_pte_updated, last_pte_gfn.
> 

Actually, the set_spte() just works for sync path ;-)

> Also the callbacks make it harder to read the code. Maybe the
> unification works if you use common functions for common parts.
> 

Um. your advice is reasonable, i'll improve it. Thanks.


  reply	other threads:[~2010-11-17  1:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-12 10:30 [PATCH 1/4] KVM: MMU: don't drop spte if overwrite it from W to RO Xiao Guangrong
2010-11-12 10:33 ` [PATCH 2/4] KVM: MMU: rename 'reset_host_protection' to 'host_writeable' Xiao Guangrong
2010-11-12 10:37   ` Xiao Guangrong
2010-11-12 10:34 ` [PATCH 3/4] KVM: MMU: notrap it if gpte's reserved is set Xiao Guangrong
2010-11-14 10:56   ` Avi Kivity
2010-11-15  5:41     ` Xiao Guangrong
2010-11-15  9:17       ` Avi Kivity
2010-11-17  1:45         ` Xiao Guangrong
2010-11-12 10:35 ` [PATCH 4/4] KVM: MMU: cleanup update_pte, pte_prefetch and sync_page functions Xiao Guangrong
2010-11-16 20:52   ` Marcelo Tosatti
2010-11-17  1:58     ` Xiao Guangrong [this message]
2010-11-14 10:52 ` [PATCH 1/4] KVM: MMU: don't drop spte if overwrite it from W to RO Avi Kivity
2010-11-15  5:34   ` Xiao Guangrong
2010-11-16 20:24 ` Marcelo Tosatti
2010-11-17  1:42   ` Xiao Guangrong

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=4CE336BC.4070905@cn.fujitsu.com \
    --to=xiaoguangrong@cn.fujitsu.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@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.