# HG changeset patch
# User djm@xxxxxxxxxxxxxxx
# Node ID 2d5c57be196d7db66157d3f820858c7acf9dbe58
# Parent b57ed8182812de2c521d791a6806e740910c460b
Remove some unused VTI code segments
Signed-off-by Anthony Xu <anthony.xu@xxxxxxxxx>
diff -r b57ed8182812 -r 2d5c57be196d xen/arch/ia64/vmx/vmx_entry.S
--- a/xen/arch/ia64/vmx/vmx_entry.S Thu Dec 15 22:09:19 2005
+++ b/xen/arch/ia64/vmx/vmx_entry.S Thu Dec 15 22:10:22 2005
@@ -373,34 +373,6 @@
br.cond.sptk b0 // call the service
;;
switch_rr7:
-#ifdef XEN_DBL_MAPPING
-// switch rr7 and rr5
- adds r24=SWITCH_MRR5_OFFSET, r21
- adds r26=SWITCH_MRR6_OFFSET, r21
- adds r16=SWITCH_MRR7_OFFSET ,r21
- movl r25=(5<<61)
- movl r27=(6<<61)
- movl r17=(7<<61)
- ;;
- ld8 r24=[r24]
- ld8 r26=[r26]
- ld8 r16=[r16]
- ;;
- mov rr[r25]=r24
- mov rr[r27]=r26
- mov rr[r17]=r16
- ;;
- srlz.i
- ;;
- add r24=SWITCH_MPTA_OFFSET, r21
- ;;
- ld8 r24=[r24]
- ;;
- mov cr.pta=r24
- ;;
- srlz.i
- ;;
-#endif
// fall through
GLOBAL_ENTRY(ia64_vmm_entry)
/*
diff -r b57ed8182812 -r 2d5c57be196d xen/arch/ia64/vmx/vmx_init.c
--- a/xen/arch/ia64/vmx/vmx_init.c Thu Dec 15 22:09:19 2005
+++ b/xen/arch/ia64/vmx/vmx_init.c Thu Dec 15 22:10:22 2005
@@ -133,10 +133,6 @@
else
ASSERT(tmp_base != __vsa_base);
-#ifdef XEN_DBL_MAPPING
- /* Init stub for rr7 switch */
- vmx_init_double_mapping_stub();
-#endif
}
typedef union {
@@ -198,25 +194,6 @@
panic("ia64_pal_vp_create failed. \n");
}
-#ifdef XEN_DBL_MAPPING
-void vmx_init_double_mapping_stub(void)
-{
- u64 base, psr;
- extern void vmx_switch_rr7(void);
-
- base = (u64) &vmx_switch_rr7;
- base = *((u64*)base);
-
- psr = ia64_clear_ic();
- ia64_itr(0x1, IA64_TR_RR7_SWITCH_STUB, XEN_RR7_SWITCH_STUB,
- pte_val(pfn_pte(__pa(base) >> PAGE_SHIFT, PAGE_KERNEL)),
- RR7_SWITCH_SHIFT);
- ia64_set_psr(psr);
- ia64_srlz_i();
- printk("Add TR mapping for rr7 switch stub, with physical: 0x%lx\n",
(u64)(__pa(base)));
-}
-#endif
-
/* Other non-context related tasks can be done in context switch */
void
vmx_save_state(struct vcpu *v)
@@ -229,14 +206,6 @@
if (status != PAL_STATUS_SUCCESS)
panic("Save vp status failed\n");
-#ifdef XEN_DBL_MAPPING
- /* FIXME: Do we really need purge double mapping for old vcpu?
- * Since rid is completely different between prev and next,
- * it's not overlap and thus no MCA possible... */
- dom_rr7 = vmx_vrrtomrr(v, VMX(v, vrr[7]));
- vmx_purge_double_mapping(dom_rr7, KERNEL_START,
- (u64)v->arch.vtlb->ts->vhpt->hash);
-#endif
/* Need to save KR when domain switch, though HV itself doesn;t
* use them.
@@ -264,15 +233,6 @@
if (status != PAL_STATUS_SUCCESS)
panic("Restore vp status failed\n");
-#ifdef XEN_DBL_MAPPING
- dom_rr7 = vmx_vrrtomrr(v, VMX(v, vrr[7]));
- pte_xen = pte_val(pfn_pte((xen_pstart >> PAGE_SHIFT), PAGE_KERNEL));
- pte_vhpt = pte_val(pfn_pte((__pa(v->arch.vtlb->ts->vhpt->hash) >>
PAGE_SHIFT), PAGE_KERNEL));
- vmx_insert_double_mapping(dom_rr7, KERNEL_START,
- (u64)v->arch.vtlb->ts->vhpt->hash,
- pte_xen, pte_vhpt);
-#endif
-
ia64_set_kr(0, v->arch.arch_vmx.vkr[0]);
ia64_set_kr(1, v->arch.arch_vmx.vkr[1]);
ia64_set_kr(2, v->arch.arch_vmx.vkr[2]);
@@ -285,25 +245,6 @@
* anchored in vcpu */
}
-#ifdef XEN_DBL_MAPPING
-/* Purge old double mapping and insert new one, due to rr7 change */
-void
-vmx_change_double_mapping(struct vcpu *v, u64 oldrr7, u64 newrr7)
-{
- u64 pte_xen, pte_vhpt, vhpt_base;
-
- vhpt_base = (u64)v->arch.vtlb->ts->vhpt->hash;
- vmx_purge_double_mapping(oldrr7, KERNEL_START,
- vhpt_base);
-
- pte_xen = pte_val(pfn_pte((xen_pstart >> PAGE_SHIFT), PAGE_KERNEL));
- pte_vhpt = pte_val(pfn_pte((__pa(vhpt_base) >> PAGE_SHIFT),
PAGE_KERNEL));
- vmx_insert_double_mapping(newrr7, KERNEL_START,
- vhpt_base,
- pte_xen, pte_vhpt);
-}
-#endif // XEN_DBL_MAPPING
-
/*
* Initialize VMX envirenment for guest. Only the 1st vp/vcpu
* is registered here.
diff -r b57ed8182812 -r 2d5c57be196d xen/arch/ia64/vmx/vmx_minstate.h
--- a/xen/arch/ia64/vmx/vmx_minstate.h Thu Dec 15 22:09:19 2005
+++ b/xen/arch/ia64/vmx/vmx_minstate.h Thu Dec 15 22:10:22 2005
@@ -125,31 +125,8 @@
* Note that psr.ic is NOT turned on by this macro. This is so that
* we can pass interruption state as arguments to a handler.
*/
-#ifdef XEN_DBL_MAPPING
-#define SAVE_MIN_CHANGE_RR \
-/* switch rr7 */ \
- movl r16=((ia64_rid(IA64_REGION_ID_KERNEL, (7<<61)) << 8) |
(IA64_GRANULE_SHIFT << 2)); \
- movl r17=(7<<61); \
- movl r20=((ia64_rid(IA64_REGION_ID_KERNEL, (6<<61)) << 8) |
(IA64_GRANULE_SHIFT << 2)); \
- movl r22=(6<<61); \
- movl r18=((ia64_rid(IA64_REGION_ID_KERNEL, (5<<61)) << 8) | (PAGE_SHIFT <<
2) | 1); \
- movl r23=(5<<61); \
- ;; \
- mov rr[r17]=r16; \
- mov rr[r22]=r20; \
- mov rr[r23]=r18; \
- ;; \
- srlz.i; \
- ;;
-
-#else
-
-#define SAVE_MIN_CHANGE_RR
-
-#endif
#define VMX_DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) \
- SAVE_MIN_CHANGE_RR; \
VMX_MINSTATE_GET_CURRENT(r16); /* M (or M;;I) */ \
mov r27=ar.rsc; /* M */ \
mov r20=r1; /* A */ \
diff -r b57ed8182812 -r 2d5c57be196d xen/arch/ia64/vmx/vmx_phy_mode.c
--- a/xen/arch/ia64/vmx/vmx_phy_mode.c Thu Dec 15 22:09:19 2005
+++ b/xen/arch/ia64/vmx/vmx_phy_mode.c Thu Dec 15 22:10:22 2005
@@ -260,7 +260,6 @@
vmx_vrrtomrr(vcpu, VMX(vcpu, vrr[VRN4])));
}
-#if 1
/* rr567 will be postponed to last point when resuming back to guest */
ia64_set_rr((VRN1 << VRN_SHIFT),
vmx_vrrtomrr(vcpu, VMX(vcpu, vrr[VRN1])));
@@ -268,18 +267,15 @@
vmx_vrrtomrr(vcpu, VMX(vcpu, vrr[VRN2])));
ia64_set_rr((VRN3 << VRN_SHIFT),
vmx_vrrtomrr(vcpu, VMX(vcpu, vrr[VRN3])));
-#endif
-#ifndef XEN_DBL_MAPPING
- extern void * pal_vaddr;
ia64_set_rr((VRN5 << VRN_SHIFT),
vmx_vrrtomrr(vcpu, VMX(vcpu, vrr[VRN5])));
ia64_set_rr((VRN6 << VRN_SHIFT),
vmx_vrrtomrr(vcpu, VMX(vcpu, vrr[VRN6])));
+ extern void * pal_vaddr;
vmx_switch_rr7(vmx_vrrtomrr(vcpu,VMX(vcpu, vrr[VRN7])),(void
*)vcpu->domain->shared_info,
(void *)vcpu->arch.privregs,
( void *)vcpu->arch.vtlb->ts->vhpt->hash, pal_vaddr );
ia64_set_pta(vcpu->arch.arch_vmx.mpta);
-#endif
ia64_srlz_d();
ia64_set_psr(psr);
diff -r b57ed8182812 -r 2d5c57be196d xen/arch/ia64/vmx/vmx_vcpu.c
--- a/xen/arch/ia64/vmx/vmx_vcpu.c Thu Dec 15 22:09:19 2005
+++ b/xen/arch/ia64/vmx/vmx_vcpu.c Thu Dec 15 22:10:22 2005
@@ -227,27 +227,11 @@
VMX(vcpu,vrr[reg>>61]) = val;
switch((u64)(reg>>61)) {
-#ifdef XEN_DBL_MAPPING
- case VRN5:
- VMX(vcpu,mrr5)=vmx_vrrtomrr(vcpu,val);
- break;
- case VRN6:
- VMX(vcpu,mrr6)=vmx_vrrtomrr(vcpu,val);
- break;
- case VRN7:
- VMX(vcpu,mrr7)=vmx_vrrtomrr(vcpu,val);
- /* Change double mapping for this domain */
- vmx_change_double_mapping(vcpu,
- vmx_vrrtomrr(vcpu,oldrr.rrval),
- vmx_vrrtomrr(vcpu,newrr.rrval));
- break;
-#else
case VRN7:
vmx_switch_rr7(vmx_vrrtomrr(vcpu,val),vcpu->domain->shared_info,
(void *)vcpu->arch.privregs,
( void *)vcpu->arch.vtlb->ts->vhpt->hash, pal_vaddr );
break;
-#endif
default:
ia64_set_rr(reg,vmx_vrrtomrr(vcpu,val));
break;
diff -r b57ed8182812 -r 2d5c57be196d xen/include/asm-ia64/vmx.h
--- a/xen/include/asm-ia64/vmx.h Thu Dec 15 22:09:19 2005
+++ b/xen/include/asm-ia64/vmx.h Thu Dec 15 22:10:22 2005
@@ -32,13 +32,6 @@
extern void vmx_save_state(struct vcpu *v);
extern void vmx_load_state(struct vcpu *v);
extern void vmx_setup_platform(struct domain *d, struct vcpu_guest_context *c);
-#ifdef XEN_DBL_MAPPING
-extern vmx_insert_double_mapping(u64,u64,u64,u64,u64);
-extern void vmx_purge_double_mapping(u64, u64, u64);
-extern void vmx_change_double_mapping(struct vcpu *v, u64 oldrr7, u64 newrr7);
-extern void vmx_init_double_mapping_stub(void);
-#endif
-
extern void vmx_wait_io(void);
extern void vmx_io_assist(struct vcpu *v);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|