WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH 3/5] vti save-restore: preparetion opt_feature s

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH 3/5] vti save-restore: preparetion opt_feature support
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Tue, 20 Nov 2007 19:44:13 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Tue, 20 Nov 2007 02:45:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
# 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;

Attachment: 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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH 3/5] vti save-restore: preparetion opt_feature support, Isaku Yamahata <=