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 kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to