guest PTE write emulation

Dong, Eddie
2007-05-29T07:59:13Z

Not sure if we should use PT_USER_MASK | PT_WRITABLE_MASK here.

diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index 6dd0da9..183d4ca 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -213,7 +213,7 @@ static void FNAME(update_pte)(struct kvm_vcpu *vcpu,
struct
if (~gpte & (PT_PRESENT_MASK | PT_ACCESSED_MASK))
return;
pgprintk("%s: gpte %llx spte %p\n", __FUNCTION__, (u64)gpte,
spte);
- FNAME(set_pte)(vcpu, gpte, spte, 6,
+ FNAME(set_pte)(vcpu, gpte, spte, PT_USER_MASK |
PT_WRITABLE_MASK,
(gpte & PT_BASE_ADDR_MASK) >> PAGE_SHIFT);
}

But then it seems we are not correctly emulating gpte ACCESSED bit
though it is likely harmless. Comments?

thx,eddie