ia64/xen-unstable

changeset 11001:857e7b864bb0

[hvm] Move the mapping of the shared IO page slightly earlier
in the initialisation sequence for HVM guests, so that we can
write vp_eport into the shared after creating the port.

Signed-off-by: Steven Smith <ssmith@xensource.com>
author sos22@douglas.cl.cam.ac.uk
date Tue Aug 08 11:17:52 2006 +0100 (2006-08-08)
parents abd14c5c5496
children 415614d3a1ee
files xen/arch/x86/hvm/hvm.c xen/include/asm-x86/hvm/hvm.h
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Tue Aug 08 10:36:32 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Tue Aug 08 11:17:52 2006 +0100
     1.3 @@ -175,7 +175,6 @@ void hvm_setup_platform(struct domain* d
     1.4      }
     1.5  
     1.6      hvm_zap_iommu_pages(d);
     1.7 -    hvm_map_io_shared_page(v);
     1.8  
     1.9      platform = &d->arch.hvm_domain;
    1.10      pic_init(&platform->vpic, pic_irq_request, &platform->interrupt_request);
     2.1 --- a/xen/include/asm-x86/hvm/hvm.h	Tue Aug 08 10:36:32 2006 +0100
     2.2 +++ b/xen/include/asm-x86/hvm/hvm.h	Tue Aug 08 11:17:52 2006 +0100
     2.3 @@ -77,12 +77,17 @@ hvm_disable(void)
     2.4          hvm_funcs.disable();
     2.5  }
     2.6  
     2.7 +void hvm_map_io_shared_page(struct vcpu *v);
     2.8 +
     2.9  static inline int
    2.10  hvm_initialize_guest_resources(struct vcpu *v)
    2.11  {
    2.12 +    int ret = 1;
    2.13      if ( hvm_funcs.initialize_guest_resources )
    2.14 -        return hvm_funcs.initialize_guest_resources(v);
    2.15 -    return 0;
    2.16 +        ret = hvm_funcs.initialize_guest_resources(v);
    2.17 +    if ( ret == 1 )
    2.18 +        hvm_map_io_shared_page(v);
    2.19 +    return ret;
    2.20  }
    2.21  
    2.22  static inline void