[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix xen/xenlinux to work with CONFIG_DISABLE_VHPT off
ChangeSet 1.1509.1.3, 2005/05/24 15:40:01-06:00, djm@xxxxxxxxxxxxxxx Fix xen/xenlinux to work with CONFIG_DISABLE_VHPT off and CONFIG_VIRTUAL_MEM_MAP=y Signed-off-by: Matthew Chapman <matthewc@xxxxxx> Signed-off by: Dan Magenheimer <dan.magenheimer@xxxxxx> ivt.S | 6 +++++- privop.c | 24 ++---------------------- process.c | 20 +++++++++----------- tools/README.xenia64 | 4 +--- tools/README.xenia64linux | 4 ++-- vcpu.c | 6 +++--- 6 files changed, 22 insertions(+), 42 deletions(-) diff -Nru a/xen/arch/ia64/ivt.S b/xen/arch/ia64/ivt.S --- a/xen/arch/ia64/ivt.S 2005-05-26 14:01:32 -04:00 +++ b/xen/arch/ia64/ivt.S 2005-05-26 14:01:32 -04:00 @@ -785,14 +785,18 @@ cmp.eq p7,p0=r0,r17 // is this a psuedo-cover? (p7) br.sptk.many dispatch_privop_fault ;; - cmp.ne p7,p0=r0,r19 + cmp4.ne p7,p0=r0,r19 (p7) br.sptk.many dispatch_break_fault // If we get to here, we have a hyperprivop // For now, hyperprivops are handled through the break mechanism // Later, they will be fast hand-coded assembly with psr.ic off // which means no calls, no use of r1-r15 and no memory accesses // except to pinned addresses! +#ifdef FAST_HYPERPRIVOPS + br.sptk.many fast_hyperprivop +#else br.sptk.many dispatch_break_fault +#endif ;; #endif mov r16=IA64_KR(CURRENT) // r16 = current task; 12 cycle read lat. diff -Nru a/xen/arch/ia64/privop.c b/xen/arch/ia64/privop.c --- a/xen/arch/ia64/privop.c 2005-05-26 14:01:32 -04:00 +++ b/xen/arch/ia64/privop.c 2005-05-26 14:01:32 -04:00 @@ -569,7 +569,7 @@ #endif { //printf("*** priv_handle_op: privop bundle @%p not mapped, retrying\n",iip); - return IA64_RETRY; + return vcpu_force_data_miss(vcpu,regs->cr_iip); } #if 0 if (iip==0xa000000100001820) { @@ -732,30 +732,10 @@ privlvl = (ipsr & IA64_PSR_CPL) >> IA64_PSR_CPL0_BIT; // its OK for a privified-cover to be executed in user-land fault = priv_handle_op(vcpu,regs,privlvl); - if (fault == IA64_NO_FAULT) { // success!! + if ((fault == IA64_NO_FAULT) || (fault == IA64_EXTINT_VECTOR)) { // success!! // update iip/ipsr to point to the next instruction (void)vcpu_increment_iip(vcpu); } - else if (fault == IA64_EXTINT_VECTOR) { - // update iip/ipsr before delivering interrupt - (void)vcpu_increment_iip(vcpu); - } - else if (fault == IA64_RFI_IN_PROGRESS) return fault; - // success but don't update to next instruction - else if (fault == IA64_RETRY) { - //printf("Priv emulate gets IA64_RETRY\n"); - //printf("priv_emulate: returning RETRY, not implemented!\n"); - //while (1); - // don't update iip/ipsr, deliver - - vcpu_force_data_miss(vcpu,regs->cr_iip); - return IA64_RETRY; - } - else if (priv_verbose) printf("unhandled operation from handle_op\n"); -// if (fault == IA64_ILLOP_FAULT) { -// printf("priv_emulate: returning ILLOP, not implemented!\n"); -// while (1); -// } return fault; } diff -Nru a/xen/arch/ia64/process.c b/xen/arch/ia64/process.c --- a/xen/arch/ia64/process.c 2005-05-26 14:01:32 -04:00 +++ b/xen/arch/ia64/process.c 2005-05-26 14:01:32 -04:00 @@ -170,16 +170,11 @@ if ((vector & 0xf) != IA64_FORCED_IFA) PSCB(ed,ifa) = ifa; else ifa = PSCB(ed,ifa); vector &= ~0xf; -// always deliver on ALT vector (for now?) because no VHPT -// if (!vcpu_get_rr_ve(ed,ifa)) { - if (vector == IA64_DATA_TLB_VECTOR) - vector = IA64_ALT_DATA_TLB_VECTOR; - else if (vector == IA64_INST_TLB_VECTOR) - vector = IA64_ALT_INST_TLB_VECTOR; -// } - if (vector == IA64_ALT_DATA_TLB_VECTOR || - vector == IA64_ALT_INST_TLB_VECTOR) { - vcpu_thash(ed,ifa,&PSCB(ed,iha)); + if (vector == IA64_DATA_TLB_VECTOR + || vector == IA64_ALT_DATA_TLB_VECTOR + || vector == IA64_INST_TLB_VECTOR + || vector == IA64_ALT_INST_TLB_VECTOR) { + vcpu_thash(ed,ifa,&PSCB(current,iha)); } PSCB(ed,unat) = regs->ar_unat; // not sure if this is really needed? PSCB(ed,precover_ifs) = regs->cr_ifs; @@ -367,7 +362,7 @@ vcpu_itc_no_srlz(current,is_data?2:1,address,pteval,-1UL,(trp->itir>>2)&0x3f); return; } - vector = is_data ? IA64_DATA_TLB_VECTOR : IA64_INST_TLB_VECTOR; + if (handle_lazy_cover(current, isr, regs)) return; if (!(address>>61)) { panic_domain(0,"ia64_do_page_fault: @%p???, iip=%p, itc=%p (spinning...)\n",address,iip,ia64_get_itc()); @@ -383,6 +378,9 @@ ia64_psr(regs)->ed = 1; return; } + vector = vcpu_get_rr_ve(current, address) ? + (is_data ? IA64_DATA_TLB_VECTOR : IA64_INST_TLB_VECTOR) + : (is_data ? IA64_ALT_DATA_TLB_VECTOR : IA64_ALT_INST_TLB_VECTOR); reflect_interruption(address, isr, itir, regs, vector); } diff -Nru a/xen/arch/ia64/tools/README.xenia64 b/xen/arch/ia64/tools/README.xenia64 --- a/xen/arch/ia64/tools/README.xenia64 2005-05-26 14:01:32 -04:00 +++ b/xen/arch/ia64/tools/README.xenia64 2005-05-26 14:01:32 -04:00 @@ -6,18 +6,16 @@ # unpack linux-2.6.11 in the xenXXX.bk/.. directory tar xzf linux-2.6.11.tar.gz -cd linux-2.6.11 # go back to the xen subdirectory of xenXXX.bk cd xenXXX.bk/xen # create and patch the linux/ia64 files -bash arch/ia64/tools/mkbuildtree # this should print out many patch messages but no errors bash arch/ia64/tools/mkbuildtree # build xen/ia64 # if using cross-compiler -make TARGET_ARCH=ia64 +make XEN_TARGET_ARCH=ia64 # else if native make diff -Nru a/xen/arch/ia64/tools/README.xenia64linux b/xen/arch/ia64/tools/README.xenia64linux --- a/xen/arch/ia64/tools/README.xenia64linux 2005-05-26 14:01:32 -04:00 +++ b/xen/arch/ia64/tools/README.xenia64linux 2005-05-26 14:01:32 -04:00 @@ -6,7 +6,6 @@ unset CONFIG_IA32_SUPPORT unset CONFIG_IDE [for now, need to fix later] unset CONFIG_VIRTUAL_MEM_MAP [for now, need to fix later] - set CONFIG_DISABLE_VHPT 3) if running on ski, it is useful to make the following change: a) at the beginning of drivers/acpi/motherboard.c:acpi_reserve_resources() add the line: @@ -46,5 +45,6 @@ (It may be necessary also to un-inline the routine, not sure.) c) It can be useful to modify linux/init/main.c to add a printf before or after a lot of the init calls -6) NOTE: mca currently has a problem with binary translation, +6) Start Xen from elilo, passing the Linux kernel as an initrd. + NOTE: mca currently has a problem with binary translation, must run with "nomca" as a kernel argument diff -Nru a/xen/arch/ia64/vcpu.c b/xen/arch/ia64/vcpu.c --- a/xen/arch/ia64/vcpu.c 2005-05-26 14:01:32 -04:00 +++ b/xen/arch/ia64/vcpu.c 2005-05-26 14:01:32 -04:00 @@ -1118,7 +1118,7 @@ IA64FAULT vcpu_force_data_miss(VCPU *vcpu, UINT64 ifa) { PSCB(vcpu,ifa) = ifa; // privop traps don't set ifa so do it here - return (IA64_DATA_TLB_VECTOR | IA64_FORCED_IFA); + return (vcpu_get_rr_ve(vcpu,ifa) ? IA64_DATA_TLB_VECTOR : IA64_ALT_DATA_TLB_VECTOR) | IA64_FORCED_IFA; } @@ -1617,7 +1617,7 @@ unsigned long pteval, logps = (itir >> 2) & 0x3f; unsigned long translate_domain_pte(UINT64,UINT64,UINT64); - if (((itir & 0xfcL) >> 2) < PAGE_SHIFT) { + if (logps < PAGE_SHIFT) { printf("vcpu_itc_d: domain trying to use smaller page size!\n"); //FIXME: kill domain here while(1); @@ -1635,7 +1635,7 @@ unsigned long translate_domain_pte(UINT64,UINT64,UINT64); // FIXME: validate ifa here (not in Xen space), COULD MACHINE CHECK! - if (((itir & 0xfcL) >> 2) < PAGE_SHIFT) { + if (logps < PAGE_SHIFT) { printf("vcpu_itc_i: domain trying to use smaller page size!\n"); //FIXME: kill domain here while(1); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |