ia64/xen-unstable

changeset 16399:6fc79cb7934d

[IA64] vti save-restore: preparation opt_feature support

Pass struct domain* to domain_opt_feature().
This patch is preparation patch for HVM domain save/restore opt_feature.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Tue Nov 20 09:14:43 2007 -0700 (2007-11-20)
parents b444678b94ea
children e6acebec04a2
files xen/arch/ia64/vmx/mmio.c xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/hypercall.c xen/include/asm-ia64/domain.h
line diff
     1.1 --- a/xen/arch/ia64/vmx/mmio.c	Tue Nov 20 09:11:15 2007 -0700
     1.2 +++ b/xen/arch/ia64/vmx/mmio.c	Tue Nov 20 09:14:43 2007 -0700
     1.3 @@ -252,11 +252,11 @@ static inline void set_os_type(VCPU *v, 
     1.4              optf.on = XEN_IA64_OPTF_ON;
     1.5              optf.pgprot = (_PAGE_P|_PAGE_A|_PAGE_D|_PAGE_MA_WB|_PAGE_AR_RW);
     1.6              optf.key = 0;
     1.7 -            domain_opt_feature(&optf);
     1.8 +            domain_opt_feature(v->domain, &optf);
     1.9  
    1.10              optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG5;
    1.11              optf.pgprot = (_PAGE_P|_PAGE_A|_PAGE_D|_PAGE_MA_UC|_PAGE_AR_RW);
    1.12 -            domain_opt_feature(&optf);
    1.13 +            domain_opt_feature(v->domain, &optf);
    1.14          }
    1.15      }
    1.16  }
     2.1 --- a/xen/arch/ia64/xen/domain.c	Tue Nov 20 09:11:15 2007 -0700
     2.2 +++ b/xen/arch/ia64/xen/domain.c	Tue Nov 20 09:14:43 2007 -0700
     2.3 @@ -2290,9 +2290,8 @@ optf_set_identity_mapping(unsigned long*
     2.4   * The vcpu must be paused to avoid racy access to opt_feature.
     2.5   */
     2.6  int
     2.7 -domain_opt_feature(struct xen_ia64_opt_feature* f)
     2.8 +domain_opt_feature(struct domain *d, struct xen_ia64_opt_feature* f)
     2.9  {
    2.10 -	struct domain *d = current->domain;
    2.11  	struct opt_feature* optf = &d->arch.opt_feature;
    2.12  	struct vcpu *v;
    2.13  	long rc = 0;
     3.1 --- a/xen/arch/ia64/xen/hypercall.c	Tue Nov 20 09:11:15 2007 -0700
     3.2 +++ b/xen/arch/ia64/xen/hypercall.c	Tue Nov 20 09:14:43 2007 -0700
     3.3 @@ -229,7 +229,7 @@ ia64_hypercall(struct pt_regs *regs)
     3.4  		struct xen_ia64_opt_feature optf;
     3.5  		set_xen_guest_handle(arg, (void*)(vcpu_get_gr(v, 32)));
     3.6  		if (copy_from_guest(&optf, arg, 1) == 0)
     3.7 -			regs->r8 = domain_opt_feature(&optf);
     3.8 +			regs->r8 = domain_opt_feature(v->domain, &optf);
     3.9  		else
    3.10  			regs->r8 = -EFAULT;
    3.11  		break;
     4.1 --- a/xen/include/asm-ia64/domain.h	Tue Nov 20 09:11:15 2007 -0700
     4.2 +++ b/xen/include/asm-ia64/domain.h	Tue Nov 20 09:14:43 2007 -0700
     4.3 @@ -116,7 +116,7 @@ struct opt_feature {
     4.4      (1UL << XEN_IA64_OPTF_IDENT_MAP_REG5_BIT)
     4.5  
     4.6  /* Set an optimization feature in the struct arch_domain. */
     4.7 -extern int domain_opt_feature(struct xen_ia64_opt_feature*);
     4.8 +extern int domain_opt_feature(struct domain *, struct xen_ia64_opt_feature*);
     4.9  
    4.10  struct arch_domain {
    4.11      struct mm_struct mm;