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-changelog

[Xen-changelog] [xen-unstable] [IA64] Remove is_vti arch flag

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Remove is_vti arch flag
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 01:10:32 -0800
Delivery-date: Wed, 23 Jan 2008 01:12:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1197661983 25200
# Node ID 09cd682ac68e51506940721ad9fb02224e8f3de4
# Parent  bf828db8d0174896d078fcc6dce12427b6b64cc5
[IA64] Remove is_vti arch flag

arch.is_vti is a duplicate of is_hvm.

Signed-off-by: Tristan Gingold <tgingold@xxxxxxx>
---
 tools/libxc/ia64/xc_ia64_hvm_build.c |    2 +-
 xen/arch/ia64/linux-xen/unwind.c     |    4 ++--
 xen/arch/ia64/xen/dom0_ops.c         |    6 +++---
 xen/arch/ia64/xen/domain.c           |   28 ++++++++++++++--------------
 xen/arch/ia64/xen/vhpt.c             |    2 +-
 xen/include/asm-ia64/domain.h        |    5 ++---
 6 files changed, 23 insertions(+), 24 deletions(-)

diff -r bf828db8d017 -r 09cd682ac68e tools/libxc/ia64/xc_ia64_hvm_build.c
--- a/tools/libxc/ia64/xc_ia64_hvm_build.c      Thu Jan 17 16:39:14 2008 +0000
+++ b/tools/libxc/ia64/xc_ia64_hvm_build.c      Fri Dec 14 12:53:03 2007 -0700
@@ -980,7 +980,7 @@ setup_guest(int xc_handle, uint32_t dom,
         goto error_out;
     }
 
-    domctl.u.arch_setup.flags = XEN_DOMAINSETUP_hvm_guest;
+    domctl.u.arch_setup.flags = 0;
     domctl.u.arch_setup.bp = 0;
     domctl.u.arch_setup.maxmem = GFW_START + GFW_SIZE;
     if (dom_memsize > MMIO_START)
diff -r bf828db8d017 -r 09cd682ac68e xen/arch/ia64/linux-xen/unwind.c
--- a/xen/arch/ia64/linux-xen/unwind.c  Thu Jan 17 16:39:14 2008 +0000
+++ b/xen/arch/ia64/linux-xen/unwind.c  Fri Dec 14 12:53:03 2007 -0700
@@ -2012,7 +2012,7 @@ unw_unwind_to_user (struct unw_frame_inf
                        return 0;
 #else
                if (unw_is_intr_frame(info) &&
-                   !info->task->domain->arch.is_vti &&
+                   !is_hvm_vcpu(info->task) &&
                    (pr & (1UL << PRED_USER_STACK)))
                        return 0;
                /*
@@ -2021,7 +2021,7 @@ unw_unwind_to_user (struct unw_frame_inf
                 * we need to stop unwinding somehow.
                 */
                if (unw_is_intr_frame(info) &&
-                   info->task->domain->arch.is_vti &&
+                   is_hvm_vcpu(info->task) &&
                    info->pr_loc == &vcpu_regs(info->task)->pr)
                        return 0;
 #endif
diff -r bf828db8d017 -r 09cd682ac68e xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c      Thu Jan 17 16:39:14 2008 +0000
+++ b/xen/arch/ia64/xen/dom0_ops.c      Fri Dec 14 12:53:03 2007 -0700
@@ -89,7 +89,7 @@ long arch_do_domctl(xen_domctl_t *op, XE
 
         if (ds->flags & XEN_DOMAINSETUP_query) {
             /* Set flags.  */
-            if (d->arch.is_vti)
+            if (is_hvm_domain(d))
                 ds->flags |= XEN_DOMAINSETUP_hvm_guest;
             /* Set params.  */
             ds->bp = 0;                /* unknown.  */
@@ -104,12 +104,12 @@ long arch_do_domctl(xen_domctl_t *op, XE
                 ret = -EFAULT;
         }
         else {
-            if (ds->flags & XEN_DOMAINSETUP_hvm_guest) {
+            if (is_hvm_domain(d) || (ds->flags & XEN_DOMAINSETUP_hvm_guest)) {
                 if (!vmx_enabled) {
                     printk("No VMX hardware feature for vmx domain.\n");
                     ret = -EINVAL;
                 } else {
-                    d->arch.is_vti = 1;
+                    d->is_hvm = 1;
                     xen_ia64_set_convmem_end(d, ds->maxmem);
                     ret = vmx_setup_platform(d);
                 }
diff -r bf828db8d017 -r 09cd682ac68e xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Thu Jan 17 16:39:14 2008 +0000
+++ b/xen/arch/ia64/xen/domain.c        Fri Dec 14 12:53:03 2007 -0700
@@ -516,7 +516,7 @@ int vcpu_late_initialise(struct vcpu *v)
 
 void vcpu_destroy(struct vcpu *v)
 {
-       if (v->domain->arch.is_vti)
+       if (is_hvm_vcpu(v))
                vmx_relinquish_vcpu_resources(v);
        else
                relinquish_vcpu_resources(v);
@@ -988,12 +988,12 @@ void arch_get_info_guest(struct vcpu *v,
        c.nat->event_callback_ip = v->arch.event_callback_ip;
 
        /* If PV and privregs is not set, we can't read mapped registers.  */
-       if (!v->domain->arch.is_vti && v->arch.privregs == NULL)
+       if (!is_hvm_vcpu(v) && v->arch.privregs == NULL)
                return;
 
        vcpu_get_dcr(v, &c.nat->regs.cr.dcr);
 
-       c.nat->regs.cr.itm = v->domain->arch.is_vti ?
+       c.nat->regs.cr.itm = is_hvm_vcpu(v) ?
                vmx_vcpu_get_itm(v) : PSCBX(v, domain_itm);
        vcpu_get_iva(v, &c.nat->regs.cr.iva);
        vcpu_get_pta(v, &c.nat->regs.cr.pta);
@@ -1006,7 +1006,7 @@ void arch_get_info_guest(struct vcpu *v,
        vcpu_get_iha(v, &c.nat->regs.cr.iha);
 
        //XXX change irr[] and arch.insvc[]
-       if (v->domain->arch.is_vti)
+       if (is_hvm_vcpu(v))
                /* c.nat->regs.cr.ivr = vmx_vcpu_get_ivr(v)*/;//XXXnot SMP-safe
        else
                vcpu_get_ivr (v, &c.nat->regs.cr.ivr);
@@ -1184,7 +1184,7 @@ int arch_set_info_guest(struct vcpu *v, 
 
        /* Finish vcpu initialization.  */
        if (!was_initialised) {
-               if (d->arch.is_vti)
+               if (is_hvm_domain(d))
                        rc = vmx_final_setup_guest(v);
                else
                        rc = vcpu_late_initialise(v);
@@ -1233,7 +1233,7 @@ int arch_set_info_guest(struct vcpu *v, 
        uregs->r10 = c.nat->regs.r[10];
        uregs->r11 = c.nat->regs.r[11];
 
-       if (!d->arch.is_vti)
+       if (!is_hvm_domain(d))
                vcpu_set_psr(v, c.nat->regs.psr);
        else
                vmx_vcpu_set_psr(v, c.nat->regs.psr);
@@ -1472,7 +1472,7 @@ int arch_set_info_guest(struct vcpu *v, 
                           !!(c.nat->regs.nats & (1UL << 7)));
        }
        
-       if (!d->arch.is_vti) {
+       if (!is_hvm_domain(d)) {
                /* domain runs at PL2/3 */
                uregs->cr_ipsr = vcpu_pl_adjust(uregs->cr_ipsr,
                                                IA64_PSR_CPL0_BIT);
@@ -1480,7 +1480,7 @@ int arch_set_info_guest(struct vcpu *v, 
        }
 
        for (i = 0; i < IA64_NUM_DBG_REGS; i++) {
-               if (d->arch.is_vti) {
+               if (is_hvm_domain(d)) {
                        vmx_vcpu_set_dbr(v, i, c.nat->regs.dbr[i]);
                        vmx_vcpu_set_ibr(v, i, c.nat->regs.ibr[i]);
                } else {
@@ -1497,7 +1497,7 @@ int arch_set_info_guest(struct vcpu *v, 
 
                if (rrval == 0)
                        continue;
-               if (d->arch.is_vti) {
+               if (is_hvm_domain(d)) {
                        //without VGCF_EXTRA_REGS check,
                        //VTi domain doesn't boot.
                        if (c.nat->flags & VGCF_EXTRA_REGS)
@@ -1514,7 +1514,7 @@ int arch_set_info_guest(struct vcpu *v, 
                for (i = 0;
                     (i < sizeof(tr->itrs) / sizeof(tr->itrs[0])) && i < NITRS;
                     i++) {
-                       if (d->arch.is_vti)
+                       if (is_hvm_domain(d))
                                vmx_vcpu_itr_i(v, i, tr->itrs[i].pte,
                                               tr->itrs[i].itir,
                                               tr->itrs[i].vadr);
@@ -1527,7 +1527,7 @@ int arch_set_info_guest(struct vcpu *v, 
                for (i = 0;
                     (i < sizeof(tr->dtrs) / sizeof(tr->dtrs[0])) && i < NDTRS;
                     i++) {
-                       if (d->arch.is_vti)
+                       if (is_hvm_domain(d))
                                vmx_vcpu_itr_d(v, i, tr->dtrs[i].pte,
                                               tr->dtrs[i].itir,
                                               tr->dtrs[i].vadr);
@@ -1542,7 +1542,7 @@ int arch_set_info_guest(struct vcpu *v, 
                vcpu_set_iva(v, c.nat->regs.cr.iva);
        }
 
-       if (d->arch.is_vti)
+       if (is_hvm_domain(d))
                rc = vmx_arch_set_info_guest(v, c);
 
        return rc;
@@ -1628,7 +1628,7 @@ int domain_relinquish_resources(struct d
        switch (d->arch.relres) {
        case RELRES_not_started:
                /* Relinquish guest resources for VT-i domain. */
-               if (d->arch.is_vti)
+               if (is_hvm_domain(d))
                        vmx_relinquish_guest_resources(d);
                d->arch.relres = RELRES_mm_teardown;
                /*fallthrough*/
@@ -1664,7 +1664,7 @@ int domain_relinquish_resources(struct d
                BUG();
        }
 
-       if (d->arch.is_vti && d->arch.sal_data)
+       if (is_hvm_domain(d) && d->arch.sal_data)
                xfree(d->arch.sal_data);
 
        /* Free page used by xen oprofile buffer */
diff -r bf828db8d017 -r 09cd682ac68e xen/arch/ia64/xen/vhpt.c
--- a/xen/arch/ia64/xen/vhpt.c  Thu Jan 17 16:39:14 2008 +0000
+++ b/xen/arch/ia64/xen/vhpt.c  Fri Dec 14 12:53:03 2007 -0700
@@ -498,7 +498,7 @@ void domain_flush_tlb_vhpt(struct domain
 void domain_flush_tlb_vhpt(struct domain *d)
 {
        /* Very heavy...  */
-       if (HAS_PERVCPU_VHPT(d) || d->arch.is_vti)
+       if (HAS_PERVCPU_VHPT(d) || is_hvm_domain(d))
                on_each_cpu((void (*)(void *))local_flush_tlb_all, NULL, 1, 1);
        else
                on_each_cpu((void (*)(void *))flush_tlb_vhpt_all, d, 1, 1);
diff -r bf828db8d017 -r 09cd682ac68e xen/include/asm-ia64/domain.h
--- a/xen/include/asm-ia64/domain.h     Thu Jan 17 16:39:14 2008 +0000
+++ b/xen/include/asm-ia64/domain.h     Fri Dec 14 12:53:03 2007 -0700
@@ -133,13 +133,12 @@ struct arch_domain {
     /* Flags.  */
     union {
         unsigned long flags;
+#ifdef CONFIG_XEN_IA64_PERVCPU_VHPT
         struct {
-            unsigned int is_vti : 1;
-#ifdef CONFIG_XEN_IA64_PERVCPU_VHPT
             unsigned int has_pervcpu_vhpt : 1;
             unsigned int vhpt_size_log2 : 6;
-#endif
         };
+#endif
     };
 
     /* maximum metaphysical address of conventional memory */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Remove is_vti arch flag, Xen patchbot-unstable <=