diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-08-09 16:46:42 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-08-09 16:46:42 +0100 |
commit | 74aeab42a37ad74d65fc182b96d57251458f7ab4 (patch) | |
tree | ca3d5844ec4218c63e2310a67a1bc27164a09523 /xen/arch/x86/hvm/stdvga.c | |
parent | c92aec02ad55858cd5767f37ee7a9069ba2f248b (diff) | |
download | xen-74aeab42a37ad74d65fc182b96d57251458f7ab4.tar.gz xen-74aeab42a37ad74d65fc182b96d57251458f7ab4.tar.bz2 xen-74aeab42a37ad74d65fc182b96d57251458f7ab4.zip |
Nested Virtualization: p2m infrastructure
Change p2m infrastructure to operate on per-p2m instead of per-domain.
This allows us to use multiple p2m tables per-domain.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/stdvga.c')
-rw-r--r-- | xen/arch/x86/hvm/stdvga.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/stdvga.c b/xen/arch/x86/hvm/stdvga.c index ff9b3f68dc..c71ae31aa3 100644 --- a/xen/arch/x86/hvm/stdvga.c +++ b/xen/arch/x86/hvm/stdvga.c @@ -469,6 +469,7 @@ static int mmio_move(struct hvm_hw_stdvga *s, ioreq_t *p) int i; int sign = p->df ? -1 : 1; p2m_type_t p2mt; + struct p2m_domain *p2m = p2m_get_hostp2m(current->domain); if ( p->data_is_ptr ) { @@ -481,7 +482,7 @@ static int mmio_move(struct hvm_hw_stdvga *s, ioreq_t *p) if ( hvm_copy_to_guest_phys(data, &tmp, p->size) != HVMCOPY_okay ) { - (void)gfn_to_mfn_current(data >> PAGE_SHIFT, &p2mt); + (void)gfn_to_mfn(p2m, data >> PAGE_SHIFT, &p2mt); /* * The only case we handle is vga_mem <-> vga_mem. * Anything else disables caching and leaves it to qemu-dm. @@ -503,7 +504,7 @@ static int mmio_move(struct hvm_hw_stdvga *s, ioreq_t *p) if ( hvm_copy_from_guest_phys(&tmp, data, p->size) != HVMCOPY_okay ) { - (void)gfn_to_mfn_current(data >> PAGE_SHIFT, &p2mt); + (void)gfn_to_mfn(p2m, data >> PAGE_SHIFT, &p2mt); if ( (p2mt != p2m_mmio_dm) || (data < VGA_MEM_BASE) || ((data + p->size) > (VGA_MEM_BASE + VGA_MEM_SIZE)) ) return 0; |