direct-io.hg

changeset 15532:9163bea7b7bd

Enable 1to1 domain recreation. disabled assign_device hypercall, please check on a non-iommu machine
author Guy Zana <guy@neocleus.com>
date Wed Aug 29 00:53:58 2007 +0300 (2007-08-29)
parents b4d5751e8783
children ef0a4a57523c
files xen/arch/x86/domctl.c xen/arch/x86/hvm/vmx/vmx.c xen/common/page_alloc.c
line diff
     1.1 --- a/xen/arch/x86/domctl.c	Wed Aug 29 00:49:54 2007 +0300
     1.2 +++ b/xen/arch/x86/domctl.c	Wed Aug 29 00:53:58 2007 +0300
     1.3 @@ -432,6 +432,7 @@ long arch_do_domctl(
     1.4      break;
     1.5  
     1.6      case XEN_DOMCTL_assign_device:
     1.7 +#if 0
     1.8      {
     1.9          struct domain *d;
    1.10          struct hvm_iommu *hd;
    1.11 @@ -461,6 +462,7 @@ long arch_do_domctl(
    1.12              bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
    1.13          put_domain(d);
    1.14      }
    1.15 +#endif
    1.16      break;
    1.17  
    1.18      case XEN_DOMCTL_bind_pt_irq:
     2.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Wed Aug 29 00:49:54 2007 +0300
     2.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Aug 29 00:53:58 2007 +0300
     2.3 @@ -71,7 +71,9 @@ static int vmx_domain_initialise(struct 
     2.4  static void vmx_domain_destroy(struct domain *d)
     2.5  {
     2.6      vmx_free_vlapic_mapping(d);
     2.7 +#if 0
     2.8      release_devices(d);
     2.9 +#endif
    2.10  }
    2.11  
    2.12  static int vmx_vcpu_initialise(struct vcpu *v)
     3.1 --- a/xen/common/page_alloc.c	Wed Aug 29 00:49:54 2007 +0300
     3.2 +++ b/xen/common/page_alloc.c	Wed Aug 29 00:53:58 2007 +0300
     3.3 @@ -465,7 +465,11 @@ static void free_heap_pages(
     3.4  {
     3.5      unsigned long mask;
     3.6      unsigned int i, node = phys_to_nid(page_to_maddr(pg));
     3.7 -    struct domain *d;
     3.8 +    struct domain *d = page_get_owner(pg);
     3.9 +
    3.10 +    if ( (d != NULL) && (is_hvm_domain(d)) && 
    3.11 +         (d->arch.hvm_domain.params[HVM_PARAM_IS_NATIVEDOM]) )
    3.12 +        return;
    3.13  
    3.14      ASSERT(zone < NR_ZONES);
    3.15      ASSERT(order <= MAX_ORDER);
    3.16 @@ -883,6 +887,10 @@ void free_domheap_pages(struct page_info
    3.17  
    3.18      ASSERT(!in_irq());
    3.19  
    3.20 +    if ( (d != NULL) && (is_hvm_domain(d)) && 
    3.21 +         (d->arch.hvm_domain.params[HVM_PARAM_IS_NATIVEDOM]) )
    3.22 +        return;
    3.23 +
    3.24      if ( unlikely(is_xen_heap_frame(pg)) )
    3.25      {
    3.26          /* NB. May recursively lock from relinquish_memory(). */