# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1195551707 -32400
# Node ID c886374409acdddcf38d428f115faab65489df19
# Parent 02d9248aadb7c0a18776c732569f3fe9530e1e93
pass struct domain* to domain_opt_feature().
This patch is preparation patch for HVM domain save/restore opt_feature.
PATCHNAME: opt_feature_domain_argument
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
diff -r 02d9248aadb7 -r c886374409ac xen/arch/ia64/vmx/mmio.c
--- a/xen/arch/ia64/vmx/mmio.c Tue Nov 20 18:35:49 2007 +0900
+++ b/xen/arch/ia64/vmx/mmio.c Tue Nov 20 18:41:47 2007 +0900
@@ -252,11 +252,11 @@ static inline void set_os_type(VCPU *v,
optf.on = XEN_IA64_OPTF_ON;
optf.pgprot = (_PAGE_P|_PAGE_A|_PAGE_D|_PAGE_MA_WB|_PAGE_AR_RW);
optf.key = 0;
- domain_opt_feature(&optf);
+ domain_opt_feature(v->domain, &optf);
optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG5;
optf.pgprot = (_PAGE_P|_PAGE_A|_PAGE_D|_PAGE_MA_UC|_PAGE_AR_RW);
- domain_opt_feature(&optf);
+ domain_opt_feature(v->domain, &optf);
}
}
}
diff -r 02d9248aadb7 -r c886374409ac xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c Tue Nov 20 18:35:49 2007 +0900
+++ b/xen/arch/ia64/xen/domain.c Tue Nov 20 18:41:47 2007 +0900
@@ -2290,9 +2290,8 @@ optf_set_identity_mapping(unsigned long*
* the vcpu must be paused to avoid racy access to opt_feature.
*/
int
-domain_opt_feature(struct xen_ia64_opt_feature* f)
-{
- struct domain *d = current->domain;
+domain_opt_feature(struct domain *d, struct xen_ia64_opt_feature* f)
+{
struct opt_feature* optf = &d->arch.opt_feature;
struct vcpu *v;
long rc = 0;
diff -r 02d9248aadb7 -r c886374409ac xen/arch/ia64/xen/hypercall.c
--- a/xen/arch/ia64/xen/hypercall.c Tue Nov 20 18:35:49 2007 +0900
+++ b/xen/arch/ia64/xen/hypercall.c Tue Nov 20 18:41:47 2007 +0900
@@ -229,7 +229,7 @@ ia64_hypercall(struct pt_regs *regs)
struct xen_ia64_opt_feature optf;
set_xen_guest_handle(arg, (void*)(vcpu_get_gr(v, 32)));
if (copy_from_guest(&optf, arg, 1) == 0)
- regs->r8 = domain_opt_feature(&optf);
+ regs->r8 = domain_opt_feature(v->domain, &optf);
else
regs->r8 = -EFAULT;
break;
diff -r 02d9248aadb7 -r c886374409ac xen/include/asm-ia64/domain.h
--- a/xen/include/asm-ia64/domain.h Tue Nov 20 18:35:49 2007 +0900
+++ b/xen/include/asm-ia64/domain.h Tue Nov 20 18:41:47 2007 +0900
@@ -116,7 +116,7 @@ struct opt_feature {
(1UL << XEN_IA64_OPTF_IDENT_MAP_REG5_BIT)
/* Set an optimization feature in the struct arch_domain. */
-extern int domain_opt_feature(struct xen_ia64_opt_feature*);
+extern int domain_opt_feature(struct domain *, struct xen_ia64_opt_feature*);
struct arch_domain {
struct mm_struct mm;
16399_c886374409ac_opt_feature_domain_argument.patch
Description: Text Data
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|