Re: [Xen-ia64-devel] Re: [Xen-users] XEN on machines with EFI
Hi, Rodrigo You should not run new elilo.efi on bash. You should install new elilo.efi into /boot/efi of vfat filesystem. And you should run it on EFI shell. In the case of RHEL, we install it into /boot/efi/EFI/redhat/ . Best Regards, Akio Takebe Hi! I tried ./xen/arch/ia64/tools/xelilo/xlilo.efi as Xiantao said, but: debian-ia64:/home/peso/xen-ia64-unstable.hg#./xen/arch/ia64/tools/xelilo/ xlilo.efi bash: ./xen/arch/ia64/tools/xelilo/xlilo.efi: cannot execute binary file I downloaded elilo-3.6-ia64.efi in http://elilo.sourceforge.net/cgi-bin/blosxom as Akio Takebe said, but occurs the same thing: debian-ia64:/home/peso# ./elilo-3.6-ia64.efi bash: ./elilo-3.6-ia64.efi: cannot execute binary file ps: I`m root, and I do chmod +x Any solution? Thanks! :) 2006/5/26, Jones, Chris [EMAIL PROTECTED]: I have found the efibootmgr that allows you to build a new label in EFI. Every time I try to boot off this new kernel I get a file not found. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rodrigo Lord Sent: Thursday, May 25, 2006 7:32 AM To: [EMAIL PROTECTED] Subject: [Xen-users] XEN on machines with EFI Hello! I installed the xen3-unstable on an Itanium2. I`m using Debian Sarge 3.1! I configured the elilo.conf normally, but when I reboot... not shows the option XEN on my elilo! How do I boot the xen using EFI? Anything different? Thanks! ___ Xen-users mailing list [EMAIL PROTECTED] http://lists.xensource.com/xen-users ---text/plain--- ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel ---html-part included links--- mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
[Xen-ia64-devel] [FYI] Recipe of Booting up the latest Xen
Hi, Rodrigo My RHEL4 recipe is the below. This recipe is not tested, but almost correct. ;-) If you have a problem, then please let me know. My enviroment is; Machine : Tiger4 Dom0 OS : RHEL4 U2 DomU OS : RHEL4 U2 Build xen 1. Download source # hg clone http://xenbits.xensource.com/ext/xen-ia64-unstable.hg 2. # make world -j4 3. # make install-tools 4. copy kernels and xen # cp xen/xen.gz /boot/efi/efi/redhat/ # cp linux-2.6.16.13-xen0/vmlinux.gz /boot/efi/efi/redhat/vmlinuz-2.6.16.13-xen 5. make initrd for Dom0/DomU # cd linux-2.6.16.13-xen/ # make modules_install # mkinitrd -f /boot/efi/efi/redhat/initrd-2.6.16.13-xen.img 2.6.16.13-xen --builtin mptbase --builtin mptscsih # cd .. - Make OSimg for DomU 1. make file # dd if=/dev/zero of=/root/rhel4.img bs=1M count=4096 # mke2fs -F -j /root/rhel4.img # mount -o loop /root/rhel4.img /mnt # cp -ax /{dev,var,etc,usr,bin,sbin,lib} /mnt # mkdir /mnt/{root,proc,sys,home,tmp} 2. modify DomU's fstab # vi /mnt/etc/fstab /dev/hda1 /ext3defaults1 1 none/dev/pts devpts gid=5,mode=620 0 0 none/dev/shm tmpfs defaults0 0 none/procprocdefaults0 0 none/sys sysfs defaults0 0 3. modify inittab (runlevel) # vi /mnt/etc/inittab id:3:initdefault: 4. add tty0 into /etc/securetty # vi /mnt/etc/securetty (add tty0) 5. umount # umount /mnt - Boot Xen 1. replace elilo download from the below http://elilo.sourceforge.net/cgi-bin/blosxom and copy into /boot/efi/EFI/redhat/ # cp elilo-3.6-ia64.efi /boot/efi/EFI/redhat/elilo.efi 2. modify elilo.conf # vi /boot/efi/EFI/redhat/elilo.conf prompt timeout=20 default=xen relocatable image=vmlinuz-2.6.16.13-xen label=xen vmm=xen.gz initrd=initrd-2.6.16.13-xen.img read-only append=com2=115200,8n1 console=com2 -- nomca nosmp console=tty0 console=ttyS1,115200,8n1 rhgb root=/dev/sda2 image=vmlinuz-2.6.9-22.EL label=linux initrd=initrd-2.6.9-22.EL.img read-only append=rhgb root=/dev/sda2 3. make config of DomU # vi /etc/xen/rhel4 kernel = /boot/efi/efi/redhat/vmlinuz-2.6.16.13-xen memory = 384 name = rhel4 nics=0 disk = [ 'file:/root/rhel4.img,hda1,w' ] root = /dev/hda1 ro extra = 3 4. After boot xen and dom0, start xend # /etc/init.d/xend start ( In the debugging case, # XEND_DEBUG=1 xend trace_start ) 5. start domU # xm create -c rhel4 Best Regards, Akio Takebe ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
RE: [Xen-ia64-devel] [FYI] Recipe of Booting up the latest Xen
Hi, Kevin I remembered that several people ever cried for same request and some others also threw out good receipts like following. Then... is it possible to record such receipts in the repository, to avoid future duplicated post on same puzzle? :-) This is good idea. xen/arch/ia64/tools/README.* are old. I'll make patch to fix these. Best Regards, Akio Takebe ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
[Xen-ia64-devel] [PATCH 0/3] [RFC] clean up priv_handle_op() and paravirtualise vdso
priv_handle_op() caused some troubles. the 1/3 patch fixes them. However it causes performance loss because vdso area always requires priv_handle_op() and itlb reflection. System call enterance is performance critical so that it is worthwhile for paravirtualization. The 3/3 patch paravirtualizes it. There are choices to paravirtualize vdso area for transparent virtualization. A. add running_on_xen check to gate.S directly or B. prepare two version of gate.S, and use appropriate version at setup. However B. requires modification to additional several files. So My current choice is option A. Should we go for option B? ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
[Xen-ia64-devel] [PATCH 1/3][RFC] rewrite priv_handle_op()
1 / 3 # HG changeset patch # User [EMAIL PROTECTED] # Node ID a80ad3a0f2ce37c3907820f0f8282dcd5ace76b5 # Parent 2bde9ab4140b0b21ac40533dd319af66d4003841 introduce vcpu_get_domain_bundle() and replace __get_domain_handle call in priv_handle_op with it. priv_handle_op() uses __get_domain_handle to domain's bundle. it directly access guest ip with guest virtual address which may results in data tlb miss which cause some trobles. This patch also cleans up vcpu_translate(). PATCHNAME: vcpu_get_domain_bundle Signed-off-by: Isaku Yamahata [EMAIL PROTECTED] diff -r 2bde9ab4140b -r a80ad3a0f2ce xen/arch/ia64/xen/privop.c --- a/xen/arch/ia64/xen/privop.cTue May 30 11:35:19 2006 +0900 +++ b/xen/arch/ia64/xen/privop.cTue May 30 11:38:47 2006 +0900 @@ -615,16 +615,11 @@ priv_handle_op(VCPU *vcpu, REGS *regs, i int x6; // make a local copy of the bundle containing the privop -#if 1 - bundle = __get_domain_bundle(iip); - if (!bundle.i64[0] !bundle.i64[1]) -#else - if (__copy_from_user(bundle,iip,sizeof(bundle))) -#endif - { -//printf(*** priv_handle_op: privop bundle at 0x%lx not mapped, retrying\n,iip); - return vcpu_force_data_miss(vcpu,regs-cr_iip); - } + if (!vcpu_get_domain_bundle(vcpu, regs, iip, bundle)) { + //return vcpu_force_data_miss(vcpu, regs-cr_iip); + return vcpu_force_inst_miss(vcpu, regs-cr_iip); + } + #if 0 if (iip==0xa0011820) { static int firstpagefault = 1; diff -r 2bde9ab4140b -r a80ad3a0f2ce xen/arch/ia64/xen/vcpu.c --- a/xen/arch/ia64/xen/vcpu.c Tue May 30 11:35:19 2006 +0900 +++ b/xen/arch/ia64/xen/vcpu.c Tue May 30 11:38:47 2006 +0900 @@ -17,6 +17,7 @@ #include asm/vmx_vcpu.h #include asm/vhpt.h #include asm/tlbflush.h +#include asm/privop.h #include xen/event.h /* FIXME: where these declarations should be there ? */ @@ -28,6 +29,7 @@ extern void setfpreg (unsigned long regn extern void panic_domain(struct pt_regs *, const char *, ...); extern unsigned long translate_domain_mpaddr(unsigned long); +extern IA64_BUNDLE __get_domain_bundle(UINT64); typedefunion { struct ia64_psr ia64_psr; @@ -1183,14 +1185,25 @@ Privileged operation emulation routines Privileged operation emulation routines **/ +static void +vcpu_force_tlb_miss(VCPU* vcpu, UINT64 ifa) +{ + PSCB(vcpu, ifa) = ifa; + PSCB(vcpu, itir) = vcpu_get_itir_on_fault(vcpu, ifa); + vcpu_thash(current, ifa, PSCB(current, iha)); +} + +IA64FAULT vcpu_force_inst_miss(VCPU *vcpu, UINT64 ifa) +{ + vcpu_force_tlb_miss(vcpu, ifa); + return (vcpu_get_rr_ve(vcpu, ifa)? IA64_INST_TLB_VECTOR: IA64_ALT_INST_TLB_VECTOR); +} + IA64FAULT vcpu_force_data_miss(VCPU *vcpu, UINT64 ifa) { - PSCB(vcpu,ifa) = ifa; - PSCB(vcpu,itir) = vcpu_get_itir_on_fault(vcpu,ifa); - vcpu_thash(current, ifa, PSCB(current,iha)); - return (vcpu_get_rr_ve(vcpu,ifa) ? IA64_DATA_TLB_VECTOR : IA64_ALT_DATA_TLB_VECTOR); -} - + vcpu_force_tlb_miss(vcpu, ifa); + return (vcpu_get_rr_ve(vcpu, ifa)? IA64_DATA_TLB_VECTOR: IA64_ALT_DATA_TLB_VECTOR); +} IA64FAULT vcpu_rfi(VCPU *vcpu) { @@ -1302,12 +1315,117 @@ static inline int vcpu_match_tr_entry(TR return trp-pte.p vcpu_match_tr_entry_no_p(trp, ifa, rid); } +static TR_ENTRY* +vcpu_tr_lookup(VCPU* vcpu, unsigned long va, UINT64 rid, BOOLEAN is_data) +{ + unsigned int* regions; + TR_ENTRY *trp; + int tr_max; + int i; + + if (is_data) { + // data + regions = vcpu-arch.dtr_regions; + trp = vcpu-arch.dtrs; + tr_max = sizeof(vcpu-arch.dtrs)/sizeof(vcpu-arch.dtrs[0]); + } else { + // instruction + regions = vcpu-arch.itr_regions; + trp = vcpu-arch.itrs; + tr_max = sizeof(vcpu-arch.itrs)/sizeof(vcpu-arch.itrs[0]); + } + + if (!vcpu_quick_region_check(*regions, va)) { + return NULL; + } + for (i = 0; i tr_max; i++, trp++) { + if (vcpu_match_tr_entry(trp, va, rid)) { + return trp; + } + } + return NULL; +} + +// return value +// 0: failure +// 1: success +int +vcpu_get_domain_bundle(VCPU* vcpu, REGS* regs, UINT64 gip, IA64_BUNDLE* bundle) +{ + UINT64 gpip;// guest pseudo phyiscal ip + +#if 0 + // Currently xen doesn't track psr.it bits. + // it assumes always psr.it = 1. + if (!(VCPU(vcpu, vpsr) IA64_PSR_IT)) { + gpip = gip; + } else +#endif + { + unsigned long region = REGION_NUMBER(gip); + unsigned long rr = PSCB(vcpu, rrs)[region]; + unsigned long rid = rr RR_RID_MASK; + BOOLEAN swap_rr0; + TR_ENTRY* trp; + + //
[Xen-ia64-devel] [PATCH 2/3][RFC] import linux gate.S, gate.ld.S and patch.c
2 / 3 # HG changeset patch # User [EMAIL PROTECTED] # Node ID 111452ca9db3b5c8cfae0137409bff817f1a0fef # Parent a80ad3a0f2ce37c3907820f0f8282dcd5ace76b5 import gate.S, gate.ld.S and patch.c which are needed to paravirtualize vdso area. PATCHNAME: import_gate_s_gate_ld_s_patch_c Signed-off-by: Isaku Yamahata [EMAIL PROTECTED] diff -r a80ad3a0f2ce -r 111452ca9db3 linux-2.6-xen-sparse/arch/ia64/kernel/gate.S --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/gate.S Tue May 30 11:40:04 2006 +0900 @@ -0,0 +1,376 @@ +/* + * This file contains the code that gets mapped at the upper end of each task's text + * region. For now, it contains the signal trampoline code only. + * + * Copyright (C) 1999-2003 Hewlett-Packard Co + * David Mosberger-Tang [EMAIL PROTECTED] + */ + +#include linux/config.h + +#include asm/asmmacro.h +#include asm/errno.h +#include asm/asm-offsets.h +#include asm/sigcontext.h +#include asm/system.h +#include asm/unistd.h + +/* + * We can't easily refer to symbols inside the kernel. To avoid full runtime relocation, + * complications with the linker (which likes to create PLT stubs for branches + * to targets outside the shared object) and to avoid multi-phase kernel builds, we + * simply create minimalistic patch lists in special ELF sections. + */ + .section .data.patch.fsyscall_table, a + .previous +#define LOAD_FSYSCALL_TABLE(reg) \ +[1:] movl reg=0; \ + .xdata4 .data.patch.fsyscall_table, 1b-. + + .section .data.patch.brl_fsys_bubble_down, a + .previous +#define BRL_COND_FSYS_BUBBLE_DOWN(pr) \ +[1:](pr)brl.cond.sptk 0; \ + .xdata4 .data.patch.brl_fsys_bubble_down, 1b-. + +GLOBAL_ENTRY(__kernel_syscall_via_break) + .prologue + .altrp b6 + .body + /* +* Note: for (fast) syscall restart to work, the break instruction must be +* the first one in the bundle addressed by syscall_via_break. +*/ +{ .mib + break 0x10 + nop.i 0 + br.ret.sptk.many b6 +} +END(__kernel_syscall_via_break) + +/* + * On entry: + * r11 = saved ar.pfs + * r15 = system call # + * b0 = saved return address + * b6 = return address + * On exit: + * r11 = saved ar.pfs + * r15 = system call # + * b0 = saved return address + * all other scratch registers: undefined + * all preserved registers: same as on entry + */ + +GLOBAL_ENTRY(__kernel_syscall_via_epc) + .prologue + .altrp b6 + .body +{ + /* +* Note: the kernel cannot assume that the first two instructions in this +* bundle get executed. The remaining code must be safe even if +* they do not get executed. +*/ + adds r17=-1024,r15 // A + mov r10=0 // Adefault to successful syscall execution + epc // Bcauses split-issue +} + ;; + rsm psr.be | psr.i // M2 (5 cyc to srlz.d) + LOAD_FSYSCALL_TABLE(r14)// X + ;; + mov r16=IA64_KR(CURRENT)// M2 (12 cyc) + shladd r18=r17,3,r14// A + mov r19=NR_syscalls-1 // A + ;; + lfetch [r18]// M0|1 + mov r29=psr // M2 (12 cyc) + // If r17 is a NaT, p6 will be zero + cmp.geu p6,p7=r19,r17 // A(sysnr 0 sysnr 1024+NR_syscalls)? + ;; + mov r21=ar.fpsr // M2 (12 cyc) + tnat.nz p10,p9=r15 // I0 + mov.i r26=ar.pfs// I0 (would stall anyhow due to srlz.d...) + ;; + srlz.d // M0 (forces split-issue) ensure PSR.BE==0 +(p6) ld8 r18=[r18] // M0|1 + nop.i 0 + ;; + nop.m 0 +(p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with mov b7=r18!) + nop.i 0 + ;; +(p8) ssm psr.i +(p6) mov b7=r18 // I0 +(p8) br.dptk.many b7 // B + + mov r27=ar.rsc // M2 (12 cyc) +/* + * brl.cond doesn't work as intended because the linker would convert this branch + * into a branch to a PLT. Perhaps there will be a way to avoid this with some + * future version of the linker. In the meantime, we just use an indirect branch + * instead. + */ +#ifdef CONFIG_ITANIUM +(p6) add r14=-8,r14 // r14 - addr of fsys_bubble_down entry + ;; +(p6) ld8 r14=[r14] // r14 - fsys_bubble_down + ;; +(p6) mov b7=r14 +(p6) br.sptk.many b7 +#else + BRL_COND_FSYS_BUBBLE_DOWN(p6) +#endif + ssm