ChangeSet 1.1668.1.6, 2005/06/09 08:43:55-06:00, djm@xxxxxxxxxxxxxxx
Fast reflecting now working for breaks
Signed-off by: Dan Magenheimer <dan.magenheimer@xxxxxx>
hyperprivop.S | 14 +++++++++++++-
patch/linux-2.6.11/efi.c | 6 ++----
process.c | 14 ++++++++++----
3 files changed, 25 insertions(+), 9 deletions(-)
diff -Nru a/xen/arch/ia64/hyperprivop.S b/xen/arch/ia64/hyperprivop.S
--- a/xen/arch/ia64/hyperprivop.S 2005-06-10 14:04:14 -04:00
+++ b/xen/arch/ia64/hyperprivop.S 2005-06-10 14:04:14 -04:00
@@ -221,7 +221,7 @@
// r19 == vpsr.ic (low 32 bits) | vpsr.i (high 32 bits)
// r31 == pr
GLOBAL_ENTRY(fast_break_reflect)
-//#define FAST_BREAK
+#define FAST_BREAK
#ifndef FAST_BREAK
br.sptk.many dispatch_break_fault ;;
#endif
@@ -233,6 +233,18 @@
extr.u r21=r30,IA64_PSR_PP_BIT,1 ;;
cmp.ne p7,p0=r21,r0 ;;
(p7) br.sptk.many dispatch_break_fault ;;
+#if 1 /* special handling in case running on simulator */
+ movl r20=first_break;;
+ ld4 r23=[r20];;
+ movl r21=0x80001;
+ movl r22=0x80002;;
+ cmp.ne p7,p0=r23,r0;;
+(p7) br.sptk.many dispatch_break_fault ;;
+ cmp.eq p7,p0=r21,r17;
+(p7) br.sptk.many dispatch_break_fault ;;
+ cmp.eq p7,p0=r22,r17;
+(p7) br.sptk.many dispatch_break_fault ;;
+#endif
#ifdef FAST_REFLECT_CNT
movl r20=fast_reflect_count+((0x2c00>>8)*8);;
ld8 r21=[r20];;
diff -Nru a/xen/arch/ia64/patch/linux-2.6.11/efi.c
b/xen/arch/ia64/patch/linux-2.6.11/efi.c
--- a/xen/arch/ia64/patch/linux-2.6.11/efi.c 2005-06-10 14:04:14 -04:00
+++ b/xen/arch/ia64/patch/linux-2.6.11/efi.c 2005-06-10 14:04:14 -04:00
@@ -1,19 +1,23 @@
--- ../../linux-2.6.11/arch/ia64/kernel/efi.c 2005-03-02 00:37:47.000000000
-0700
-+++ arch/ia64/efi.c 2005-06-08 20:23:39.000000000 -0600
-@@ -320,6 +320,12 @@
++++ arch/ia64/efi.c 2005-06-09 06:15:36.000000000 -0600
+@@ -320,6 +320,16 @@
if (!(md->attribute & EFI_MEMORY_WB))
continue;
+#ifdef XEN
+// this works around a problem in the ski bootloader
-+ if (md->type != EFI_CONVENTIONAL_MEMORY) continue;
++{
++ extern long running_on_sim;
++ if (running_on_sim && md->type != EFI_CONVENTIONAL_MEMORY)
++ continue;
++}
+// this is a temporary hack to avoid CONFIG_VIRTUAL_MEM_MAP
+ if (md->phys_addr >= 0x100000000) continue;
+#endif
/*
* granule_addr is the base of md's first granule.
* [granule_addr - first_non_wb_addr) is guaranteed to
-@@ -719,6 +725,30 @@
+@@ -719,6 +729,30 @@
return 0;
}
diff -Nru a/xen/arch/ia64/process.c b/xen/arch/ia64/process.c
--- a/xen/arch/ia64/process.c 2005-06-10 14:04:14 -04:00
+++ b/xen/arch/ia64/process.c 2005-06-10 14:04:14 -04:00
@@ -774,18 +774,19 @@
vcpu_increment_iip(current);
}
+int first_break = 1;
+
void
ia64_handle_break (unsigned long ifa, struct pt_regs *regs, unsigned long isr,
unsigned long iim)
{
- static int first_time = 1;
struct domain *d = (struct domain *) current->domain;
struct vcpu *v = (struct domain *) current;
extern unsigned long running_on_sim;
- if (first_time) {
+ if (first_break) {
if (platform_is_hp_ski()) running_on_sim = 1;
else running_on_sim = 0;
- first_time = 0;
+ first_break = 0;
}
if (iim == 0x80001 || iim == 0x80002) { //FIXME: don't hardcode constant
if (running_on_sim) do_ssc(vcpu_get_gr(current,36), regs);
@@ -821,6 +822,8 @@
#define INTR_TYPE_MAX 10
UINT64 int_counts[INTR_TYPE_MAX];
+void dis_foo(void) { }
+
void
ia64_handle_reflection (unsigned long ifa, struct pt_regs *regs, unsigned long
isr, unsigned long iim, unsigned long vector)
{
@@ -854,7 +857,10 @@
check_lazy_cover = 1;
vector = IA64_DATA_ACCESS_RIGHTS_VECTOR; break;
case 25:
- vector = IA64_DISABLED_FPREG_VECTOR; break;
+ vector = IA64_DISABLED_FPREG_VECTOR;
+//printf("*** Attempting to handle disabled_fpreg\n");
+ dis_foo();
+ break;
case 26:
printf("*** NaT fault... attempting to handle as privop\n");
vector = priv_emulate(v,regs,isr);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|