diff options
author | Tim Deegan <Tim.Deegan@xensource.com> | 2007-06-11 14:35:52 +0100 |
---|---|---|
committer | Tim Deegan <Tim.Deegan@xensource.com> | 2007-06-11 14:35:52 +0100 |
commit | c8123f7439fc42b33c8a6c3a9a89973133b83da0 (patch) | |
tree | cf0a18b3be33881f990c06a2bb39f7eb18d2b9cd /xen/arch/x86/hvm | |
parent | bc47ea384baadc8fc704f23a302da3d5ed80d39c (diff) | |
download | xen-c8123f7439fc42b33c8a6c3a9a89973133b83da0.tar.gz xen-c8123f7439fc42b33c8a6c3a9a89973133b83da0.tar.bz2 xen-c8123f7439fc42b33c8a6c3a9a89973133b83da0.zip |
[XEN] Make common log-dirty paging code and add HAP log-dirty support.
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Diffstat (limited to 'xen/arch/x86/hvm')
-rw-r--r-- | xen/arch/x86/hvm/hvm.c | 2 | ||||
-rw-r--r-- | xen/arch/x86/hvm/io.c | 2 | ||||
-rw-r--r-- | xen/arch/x86/hvm/svm/svm.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 1d70e4a399..ae1c7a2521 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -568,7 +568,7 @@ static int __hvm_copy(void *buf, paddr_t addr, int size, int dir, int virt) if ( dir ) { memcpy(p, buf, count); /* dir == TRUE: *to* guest */ - mark_dirty(current->domain, mfn); + paging_mark_dirty(current->domain, mfn); } else memcpy(buf, p, count); /* dir == FALSE: *from guest */ diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c index 0c3027a20c..0a99dd27d6 100644 --- a/xen/arch/x86/hvm/io.c +++ b/xen/arch/x86/hvm/io.c @@ -865,7 +865,7 @@ void hvm_io_assist(void) if ( (p->dir == IOREQ_READ) && p->data_is_ptr ) { gmfn = get_mfn_from_gpfn(paging_gva_to_gfn(v, p->data)); - mark_dirty(d, gmfn); + paging_mark_dirty(d, gmfn); } out: diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 27e6d1c8f6..64d0f0023f 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1027,8 +1027,8 @@ static int svm_do_nested_pgfault(paddr_t gpa, struct cpu_user_regs *regs) return 1; } - /* We should not reach here. Otherwise, P2M table is not correct.*/ - return 0; + paging_mark_dirty(current->domain, get_mfn_from_gpfn(gpa >> PAGE_SHIFT)); + return p2m_set_flags(current->domain, gpa, __PAGE_HYPERVISOR|_PAGE_USER); } static void svm_do_no_device_fault(struct vmcb_struct *vmcb) |