# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1198584659 -32400
# Node ID 2767d660e895dd4a62930d26b698f86affbe2256
# Parent 7c7f9fd34531fb7e66e1ea26733370f4eb52085f
don't reference current->domain->arch.shadow_bitmap in dirty_bit fault handler.
instead copy it to arch_vcpu.
PATCHNAME: dont_ref_domain_arch_shadow_bitmap
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
diff -r 7c7f9fd34531 -r 2767d660e895 xen/arch/ia64/asm-offsets.c
--- a/xen/arch/ia64/asm-offsets.c Tue Dec 25 20:53:01 2007 +0900
+++ b/xen/arch/ia64/asm-offsets.c Tue Dec 25 21:10:59 2007 +0900
@@ -55,7 +55,6 @@ void foo(void)
DEFINE(IA64_TASK_THREAD_KSP_OFFSET, offsetof (struct vcpu,
arch._thread.ksp));
DEFINE(IA64_TASK_THREAD_ON_USTACK_OFFSET, offsetof (struct vcpu,
arch._thread.on_ustack));
- DEFINE(IA64_VCPU_DOMAIN_OFFSET, offsetof (struct vcpu, domain));
DEFINE(IA64_VCPU_HYPERCALL_CONTINUATION_OFS, offsetof (struct vcpu,
arch.hypercall_continuation));
DEFINE(IA64_VCPU_FP_PSR_OFFSET, offsetof (struct vcpu, arch.fp_psr));
DEFINE(IA64_VCPU_META_RID_DT_OFFSET, offsetof (struct vcpu,
arch.metaphysical_rid_dt));
@@ -78,7 +77,7 @@ void foo(void)
BLANK();
- DEFINE(IA64_DOMAIN_SHADOW_BITMAP_OFFSET, offsetof (struct domain,
arch.shadow_bitmap));
+ DEFINE(IA64_VCPU_SHADOW_BITMAP_OFFSET, offsetof (struct vcpu,
arch.shadow_bitmap));
BLANK();
diff -r 7c7f9fd34531 -r 2767d660e895 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c Tue Dec 25 20:53:01 2007 +0900
+++ b/xen/arch/ia64/xen/domain.c Tue Dec 25 21:10:59 2007 +0900
@@ -1745,6 +1745,10 @@ int shadow_mode_control(struct domain *d
case XEN_DOMCTL_SHADOW_OP_OFF:
if (shadow_mode_enabled (d)) {
u64 *bm = d->arch.shadow_bitmap;
+ struct vcpu *v;
+
+ for_each_vcpu(d, v)
+ v->arch.shadow_bitmap = NULL;
/* Flush vhpt and tlb to restore dirty bit usage. */
domain_flush_tlb_vhpt(d);
@@ -1780,9 +1784,12 @@ int shadow_mode_control(struct domain *d
rc = -ENOMEM;
}
else {
+ struct vcpu *v;
memset(d->arch.shadow_bitmap, 0,
d->arch.shadow_bitmap_size / 8);
-
+
+ for_each_vcpu(d, v)
+ v->arch.shadow_bitmap = d->arch.shadow_bitmap;
/* Flush vhtp and tlb to enable dirty bit
virtualization. */
domain_flush_tlb_vhpt(d);
diff -r 7c7f9fd34531 -r 2767d660e895 xen/arch/ia64/xen/ivt.S
--- a/xen/arch/ia64/xen/ivt.S Tue Dec 25 20:53:01 2007 +0900
+++ b/xen/arch/ia64/xen/ivt.S Tue Dec 25 21:10:59 2007 +0900
@@ -394,11 +394,7 @@ ENTRY(dirty_bit)
;;
ld8 r22=[r22]
;;
- add r22=IA64_VCPU_DOMAIN_OFFSET,r22
- ;;
- ld8 r22=[r22] // read domain
- ;;
- add r22=IA64_DOMAIN_SHADOW_BITMAP_OFFSET,r22
+ add r22=IA64_VCPU_SHADOW_BITMAP_OFFSET,r22
;;
ld8 r22=[r22]
;;
diff -r 7c7f9fd34531 -r 2767d660e895 xen/include/asm-ia64/domain.h
--- a/xen/include/asm-ia64/domain.h Tue Dec 25 20:53:01 2007 +0900
+++ b/xen/include/asm-ia64/domain.h Tue Dec 25 21:10:59 2007 +0900
@@ -260,6 +260,7 @@ struct arch_vcpu {
unsigned long metaphysical_saved_rr0; // from arch_domain (so is
pinned)
unsigned long metaphysical_saved_rr4; // from arch_domain (so is
pinned)
unsigned long fp_psr; // used for lazy float register
+ u64 *shadow_bitmap; // from arch_domain (so is pinned)
int breakimm; // from arch_domain (so is pinned)
int starting_rid; /* first RID assigned to domain */
int ending_rid; /* one beyond highest RID assigned to domain */
16704_2767d660e895_dont_ref_domain_arch_shadow_bitmap.patch
Description: Text Data
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|