public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, KVM <kvm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] KVM: MMU: handle 'map_writable' in set_spte() function
Date: Sun, 26 Dec 2010 14:20:42 +0200	[thread overview]
Message-ID: <4D17331A.6090802@redhat.com> (raw)
In-Reply-To: <4D1303B9.3080801@cn.fujitsu.com>

On 12/23/2010 10:09 AM, Xiao Guangrong wrote:
> Move the operation of 'writable' to set_spte() to clean up code
>

Thanks, applied.
> @@ -809,12 +806,8 @@ static int FNAME(sync_page)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp)
>
>   		nr_present++;
>   		pte_access = sp->role.access&  FNAME(gpte_access)(vcpu, gpte);
> -		if (!(sp->spt[i]&  SPTE_HOST_WRITEABLE)) {
> -			pte_access&= ~ACC_WRITE_MASK;
> -			host_writable = 0;
> -		} else {
> -			host_writable = 1;
> -		}
> +		host_writable = !!(sp->spt[i]&  SPTE_HOST_WRITEABLE);
> + 		

Note, !! is unneeded when assigning to a boolean variable.  I removed it.

-- 
error compiling committee.c: too many arguments to function


      reply	other threads:[~2010-12-26 12:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-23  8:08 [PATCH 1/2 RESEND] KVM: MMU: audit: allow audit more guests at the same time Xiao Guangrong
2010-12-23  8:09 ` [PATCH 2/2] KVM: MMU: handle 'map_writable' in set_spte() function Xiao Guangrong
2010-12-26 12:20   ` Avi Kivity [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=4D17331A.6090802@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=xiaoguangrong@cn.fujitsu.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