[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4D17331A.6090802@redhat.com>
Date: Sun, 26 Dec 2010 14:20:42 +0200
From: Avi Kivity <avi@...hat.com>
To: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
CC: Marcelo Tosatti <mtosatti@...hat.com>, KVM <kvm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] KVM: MMU: handle 'map_writable' in set_spte() function
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists