diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-07-13 12:35:34 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-07-13 12:35:34 +0100 |
commit | b37d30c8fc5226203f5bb71fe79789cd8545f09b (patch) | |
tree | 029563b737d32391316a9bb7e4fd4fadd66c97fb /xen/arch/x86/hvm/stdvga.c | |
parent | 1c4e651d3f00df7e81f8dbbd123b07835d6c9ebc (diff) | |
download | xen-b37d30c8fc5226203f5bb71fe79789cd8545f09b.tar.gz xen-b37d30c8fc5226203f5bb71fe79789cd8545f09b.tar.bz2 xen-b37d30c8fc5226203f5bb71fe79789cd8545f09b.zip |
Mapping grant references into HVM guests, take 2
After some discussion, here's a second version of the patch I posted a
couple of weeks back to map grant references into HVM guests. As
before, this is done by modifying the P2M map, but this time there's
no new hypercall to do it. Instead, the existing GNTTABOP_map is
overloaded to perform a P2M mapping if called from a shadow mode
translate guest. This matches the IA64 API.
Signed-off-by: Steven Smith <steven.smith@citrix.com>
Acked-by: Tim Deegan <tim.deegan@citrix.com>
CC: Bhaskar Jayaraman <Bhaskar.Jayaraman@lsi.com>
Diffstat (limited to 'xen/arch/x86/hvm/stdvga.c')
-rw-r--r-- | xen/arch/x86/hvm/stdvga.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xen/arch/x86/hvm/stdvga.c b/xen/arch/x86/hvm/stdvga.c index dd060fbd85..3e796a57bd 100644 --- a/xen/arch/x86/hvm/stdvga.c +++ b/xen/arch/x86/hvm/stdvga.c @@ -478,8 +478,8 @@ static int mmio_move(struct hvm_hw_stdvga *s, ioreq_t *p) for ( i = 0; i < p->count; i++ ) { tmp = stdvga_mem_read(addr, p->size); - if ( hvm_copy_to_guest_phys(data, &tmp, p->size) == - HVMCOPY_bad_gfn_to_mfn ) + if ( hvm_copy_to_guest_phys(data, &tmp, p->size) != + HVMCOPY_okay ) { (void)gfn_to_mfn_current(data >> PAGE_SHIFT, &p2mt); /* @@ -500,8 +500,8 @@ static int mmio_move(struct hvm_hw_stdvga *s, ioreq_t *p) uint32_t addr = p->addr, data = p->data, tmp; for ( i = 0; i < p->count; i++ ) { - if ( hvm_copy_from_guest_phys(&tmp, data, p->size) == - HVMCOPY_bad_gfn_to_mfn ) + if ( hvm_copy_from_guest_phys(&tmp, data, p->size) != + HVMCOPY_okay ) { (void)gfn_to_mfn_current(data >> PAGE_SHIFT, &p2mt); if ( (p2mt != p2m_mmio_dm) || (data < VGA_MEM_BASE) || |