debuggers.hg
changeset 16833:09cd682ac68e
[IA64] Remove is_vti arch flag
arch.is_vti is a duplicate of is_hvm.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
arch.is_vti is a duplicate of is_hvm.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
author | Alex Williamson <alex.williamson@hp.com> |
---|---|
date | Fri Dec 14 12:53:03 2007 -0700 (2007-12-14) |
parents | bf828db8d017 |
children | 54ed70d1dd11 |
files | tools/libxc/ia64/xc_ia64_hvm_build.c xen/arch/ia64/linux-xen/unwind.c xen/arch/ia64/xen/dom0_ops.c xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/vhpt.c xen/include/asm-ia64/domain.h |
line diff
1.1 --- a/tools/libxc/ia64/xc_ia64_hvm_build.c Thu Jan 17 16:39:14 2008 +0000 1.2 +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c Fri Dec 14 12:53:03 2007 -0700 1.3 @@ -980,7 +980,7 @@ setup_guest(int xc_handle, uint32_t dom, 1.4 goto error_out; 1.5 } 1.6 1.7 - domctl.u.arch_setup.flags = XEN_DOMAINSETUP_hvm_guest; 1.8 + domctl.u.arch_setup.flags = 0; 1.9 domctl.u.arch_setup.bp = 0; 1.10 domctl.u.arch_setup.maxmem = GFW_START + GFW_SIZE; 1.11 if (dom_memsize > MMIO_START)
2.1 --- a/xen/arch/ia64/linux-xen/unwind.c Thu Jan 17 16:39:14 2008 +0000 2.2 +++ b/xen/arch/ia64/linux-xen/unwind.c Fri Dec 14 12:53:03 2007 -0700 2.3 @@ -2012,7 +2012,7 @@ unw_unwind_to_user (struct unw_frame_inf 2.4 return 0; 2.5 #else 2.6 if (unw_is_intr_frame(info) && 2.7 - !info->task->domain->arch.is_vti && 2.8 + !is_hvm_vcpu(info->task) && 2.9 (pr & (1UL << PRED_USER_STACK))) 2.10 return 0; 2.11 /* 2.12 @@ -2021,7 +2021,7 @@ unw_unwind_to_user (struct unw_frame_inf 2.13 * we need to stop unwinding somehow. 2.14 */ 2.15 if (unw_is_intr_frame(info) && 2.16 - info->task->domain->arch.is_vti && 2.17 + is_hvm_vcpu(info->task) && 2.18 info->pr_loc == &vcpu_regs(info->task)->pr) 2.19 return 0; 2.20 #endif
3.1 --- a/xen/arch/ia64/xen/dom0_ops.c Thu Jan 17 16:39:14 2008 +0000 3.2 +++ b/xen/arch/ia64/xen/dom0_ops.c Fri Dec 14 12:53:03 2007 -0700 3.3 @@ -89,7 +89,7 @@ long arch_do_domctl(xen_domctl_t *op, XE 3.4 3.5 if (ds->flags & XEN_DOMAINSETUP_query) { 3.6 /* Set flags. */ 3.7 - if (d->arch.is_vti) 3.8 + if (is_hvm_domain(d)) 3.9 ds->flags |= XEN_DOMAINSETUP_hvm_guest; 3.10 /* Set params. */ 3.11 ds->bp = 0; /* unknown. */ 3.12 @@ -104,12 +104,12 @@ long arch_do_domctl(xen_domctl_t *op, XE 3.13 ret = -EFAULT; 3.14 } 3.15 else { 3.16 - if (ds->flags & XEN_DOMAINSETUP_hvm_guest) { 3.17 + if (is_hvm_domain(d) || (ds->flags & XEN_DOMAINSETUP_hvm_guest)) { 3.18 if (!vmx_enabled) { 3.19 printk("No VMX hardware feature for vmx domain.\n"); 3.20 ret = -EINVAL; 3.21 } else { 3.22 - d->arch.is_vti = 1; 3.23 + d->is_hvm = 1; 3.24 xen_ia64_set_convmem_end(d, ds->maxmem); 3.25 ret = vmx_setup_platform(d); 3.26 }
4.1 --- a/xen/arch/ia64/xen/domain.c Thu Jan 17 16:39:14 2008 +0000 4.2 +++ b/xen/arch/ia64/xen/domain.c Fri Dec 14 12:53:03 2007 -0700 4.3 @@ -516,7 +516,7 @@ int vcpu_late_initialise(struct vcpu *v) 4.4 4.5 void vcpu_destroy(struct vcpu *v) 4.6 { 4.7 - if (v->domain->arch.is_vti) 4.8 + if (is_hvm_vcpu(v)) 4.9 vmx_relinquish_vcpu_resources(v); 4.10 else 4.11 relinquish_vcpu_resources(v); 4.12 @@ -988,12 +988,12 @@ void arch_get_info_guest(struct vcpu *v, 4.13 c.nat->event_callback_ip = v->arch.event_callback_ip; 4.14 4.15 /* If PV and privregs is not set, we can't read mapped registers. */ 4.16 - if (!v->domain->arch.is_vti && v->arch.privregs == NULL) 4.17 + if (!is_hvm_vcpu(v) && v->arch.privregs == NULL) 4.18 return; 4.19 4.20 vcpu_get_dcr(v, &c.nat->regs.cr.dcr); 4.21 4.22 - c.nat->regs.cr.itm = v->domain->arch.is_vti ? 4.23 + c.nat->regs.cr.itm = is_hvm_vcpu(v) ? 4.24 vmx_vcpu_get_itm(v) : PSCBX(v, domain_itm); 4.25 vcpu_get_iva(v, &c.nat->regs.cr.iva); 4.26 vcpu_get_pta(v, &c.nat->regs.cr.pta); 4.27 @@ -1006,7 +1006,7 @@ void arch_get_info_guest(struct vcpu *v, 4.28 vcpu_get_iha(v, &c.nat->regs.cr.iha); 4.29 4.30 //XXX change irr[] and arch.insvc[] 4.31 - if (v->domain->arch.is_vti) 4.32 + if (is_hvm_vcpu(v)) 4.33 /* c.nat->regs.cr.ivr = vmx_vcpu_get_ivr(v)*/;//XXXnot SMP-safe 4.34 else 4.35 vcpu_get_ivr (v, &c.nat->regs.cr.ivr); 4.36 @@ -1184,7 +1184,7 @@ int arch_set_info_guest(struct vcpu *v, 4.37 4.38 /* Finish vcpu initialization. */ 4.39 if (!was_initialised) { 4.40 - if (d->arch.is_vti) 4.41 + if (is_hvm_domain(d)) 4.42 rc = vmx_final_setup_guest(v); 4.43 else 4.44 rc = vcpu_late_initialise(v); 4.45 @@ -1233,7 +1233,7 @@ int arch_set_info_guest(struct vcpu *v, 4.46 uregs->r10 = c.nat->regs.r[10]; 4.47 uregs->r11 = c.nat->regs.r[11]; 4.48 4.49 - if (!d->arch.is_vti) 4.50 + if (!is_hvm_domain(d)) 4.51 vcpu_set_psr(v, c.nat->regs.psr); 4.52 else 4.53 vmx_vcpu_set_psr(v, c.nat->regs.psr); 4.54 @@ -1472,7 +1472,7 @@ int arch_set_info_guest(struct vcpu *v, 4.55 !!(c.nat->regs.nats & (1UL << 7))); 4.56 } 4.57 4.58 - if (!d->arch.is_vti) { 4.59 + if (!is_hvm_domain(d)) { 4.60 /* domain runs at PL2/3 */ 4.61 uregs->cr_ipsr = vcpu_pl_adjust(uregs->cr_ipsr, 4.62 IA64_PSR_CPL0_BIT); 4.63 @@ -1480,7 +1480,7 @@ int arch_set_info_guest(struct vcpu *v, 4.64 } 4.65 4.66 for (i = 0; i < IA64_NUM_DBG_REGS; i++) { 4.67 - if (d->arch.is_vti) { 4.68 + if (is_hvm_domain(d)) { 4.69 vmx_vcpu_set_dbr(v, i, c.nat->regs.dbr[i]); 4.70 vmx_vcpu_set_ibr(v, i, c.nat->regs.ibr[i]); 4.71 } else { 4.72 @@ -1497,7 +1497,7 @@ int arch_set_info_guest(struct vcpu *v, 4.73 4.74 if (rrval == 0) 4.75 continue; 4.76 - if (d->arch.is_vti) { 4.77 + if (is_hvm_domain(d)) { 4.78 //without VGCF_EXTRA_REGS check, 4.79 //VTi domain doesn't boot. 4.80 if (c.nat->flags & VGCF_EXTRA_REGS) 4.81 @@ -1514,7 +1514,7 @@ int arch_set_info_guest(struct vcpu *v, 4.82 for (i = 0; 4.83 (i < sizeof(tr->itrs) / sizeof(tr->itrs[0])) && i < NITRS; 4.84 i++) { 4.85 - if (d->arch.is_vti) 4.86 + if (is_hvm_domain(d)) 4.87 vmx_vcpu_itr_i(v, i, tr->itrs[i].pte, 4.88 tr->itrs[i].itir, 4.89 tr->itrs[i].vadr); 4.90 @@ -1527,7 +1527,7 @@ int arch_set_info_guest(struct vcpu *v, 4.91 for (i = 0; 4.92 (i < sizeof(tr->dtrs) / sizeof(tr->dtrs[0])) && i < NDTRS; 4.93 i++) { 4.94 - if (d->arch.is_vti) 4.95 + if (is_hvm_domain(d)) 4.96 vmx_vcpu_itr_d(v, i, tr->dtrs[i].pte, 4.97 tr->dtrs[i].itir, 4.98 tr->dtrs[i].vadr); 4.99 @@ -1542,7 +1542,7 @@ int arch_set_info_guest(struct vcpu *v, 4.100 vcpu_set_iva(v, c.nat->regs.cr.iva); 4.101 } 4.102 4.103 - if (d->arch.is_vti) 4.104 + if (is_hvm_domain(d)) 4.105 rc = vmx_arch_set_info_guest(v, c); 4.106 4.107 return rc; 4.108 @@ -1628,7 +1628,7 @@ int domain_relinquish_resources(struct d 4.109 switch (d->arch.relres) { 4.110 case RELRES_not_started: 4.111 /* Relinquish guest resources for VT-i domain. */ 4.112 - if (d->arch.is_vti) 4.113 + if (is_hvm_domain(d)) 4.114 vmx_relinquish_guest_resources(d); 4.115 d->arch.relres = RELRES_mm_teardown; 4.116 /*fallthrough*/ 4.117 @@ -1664,7 +1664,7 @@ int domain_relinquish_resources(struct d 4.118 BUG(); 4.119 } 4.120 4.121 - if (d->arch.is_vti && d->arch.sal_data) 4.122 + if (is_hvm_domain(d) && d->arch.sal_data) 4.123 xfree(d->arch.sal_data); 4.124 4.125 /* Free page used by xen oprofile buffer */
5.1 --- a/xen/arch/ia64/xen/vhpt.c Thu Jan 17 16:39:14 2008 +0000 5.2 +++ b/xen/arch/ia64/xen/vhpt.c Fri Dec 14 12:53:03 2007 -0700 5.3 @@ -498,7 +498,7 @@ static void flush_tlb_vhpt_all (struct d 5.4 void domain_flush_tlb_vhpt(struct domain *d) 5.5 { 5.6 /* Very heavy... */ 5.7 - if (HAS_PERVCPU_VHPT(d) || d->arch.is_vti) 5.8 + if (HAS_PERVCPU_VHPT(d) || is_hvm_domain(d)) 5.9 on_each_cpu((void (*)(void *))local_flush_tlb_all, NULL, 1, 1); 5.10 else 5.11 on_each_cpu((void (*)(void *))flush_tlb_vhpt_all, d, 1, 1);
6.1 --- a/xen/include/asm-ia64/domain.h Thu Jan 17 16:39:14 2008 +0000 6.2 +++ b/xen/include/asm-ia64/domain.h Fri Dec 14 12:53:03 2007 -0700 6.3 @@ -133,13 +133,12 @@ struct arch_domain { 6.4 /* Flags. */ 6.5 union { 6.6 unsigned long flags; 6.7 +#ifdef CONFIG_XEN_IA64_PERVCPU_VHPT 6.8 struct { 6.9 - unsigned int is_vti : 1; 6.10 -#ifdef CONFIG_XEN_IA64_PERVCPU_VHPT 6.11 unsigned int has_pervcpu_vhpt : 1; 6.12 unsigned int vhpt_size_log2 : 6; 6.13 + }; 6.14 #endif 6.15 - }; 6.16 }; 6.17 6.18 /* maximum metaphysical address of conventional memory */