|
List Info
Thread: ia64/pv_ops take 6
|
|
| ia64/pv_ops take 6 |

|
2008-05-19 08:13:27 |
Hi. This patchset implements ia64/pv_ops support which is
the
framework for virtualization support.
Changes from take 5 are rebased to Linux 2.6.26-rc3,
bug fix ivt.S paravirtualization and multi entry point
support.
I believe these patches can be applied to the linux ia64
repository.
On x86 various ways to support virtualization were proposed,
and
eventually pv_ops won. So on ia64 the pv_ops strategy is
appropriate too.
Later I'll post the patchset which implements xen domU based
on
ia64/pv_ops. Currently only ia64/xen pv_ops implementation
exists,
but I believe ia64/kvm can also obtain benefits from this
ia64/pv_ops
frame work.
linux/ia64 has the machine vector interface and another
approach might be
to utilize it. However pv_ops is better for some reasons.
Please see
the thread of the mailing list from
http://www.spinics.net/lists/linux-ia64/msg05238.html
This patchset does the followings.
- some preparation work. Mainly make the kernel
virtualization friendly.
- introduce multi entry point support.
- introduce pv_info which describes the execution
environment.
- introduce macros for hand written assembly code to
paravirtualize
hand written code to replace sensitive/privileged
instructions.
- introduce various hooks to replace the implementation
with
paravirtualized.
They are defined as function tables called, pv_init_ops,
pv_cpu_ops,
pv_irq_ops, pv_iosapic_ops and, pv_time_ops.
They represent
pv_init_ops: hooks for various initialization.
pv_cpu_ops: hooks for ia64 intrinsics.
pv_irq_ops: hooks for irq related operations.
pv_iosapic_ops: hooks for paravirtualized iosapic.
pv_time_ops: hooks for steal time accounting
The working full source is available from
http://people.valinux.co.jp/~yamahata/xen-
ia64/linux-2.6-xen-ia64.git/
branch: xen-ia64-2008may19
At this phase, we don't address the following issues.
Those will be addressed after the first merge.
- optimization by binary patch
In fact, we had the patch to do that, but we intentionally
dropped
for patch size/readability/cleanness.
- freeing the unused pages, i.e. pages for unused ivt.S.
Changes from take 5:
- rebased to Linux 2.6.26-rc3
- fix ivt.S paravirtualization.
One instruction was wrongly paravirtualized.
It wasn't revealed with Xen HVM domain so far, but with
real hw
- multi entry point support.
- revised changelog to add CCs.
Changes from take 4:
- refined NR_IRQS paravirtualization according to Jes
Soresen's comment
- rebased and fixed the breakage due to the upstream
change.
- fixed various compilation errors.
Changes from take 3:
- split the patch set into pv_op part and xen domU part.
- many clean ups.
- introduced pv_ops: pv_cpu_ops and pv_time_ops.
Changes from take 2:
- many clean ups following to comments.
- clean up:assembly instruction macro.
- introduced pv_ops: pv_info, pv_init_ops, pv_iosapic_ops,
pv_irq_ops.
Changes from take 1:
Single IVT source code. compile multitimes using assembler
macros.
thanks,
arch/ia64/Makefile | 6 +
arch/ia64/kernel/Makefile | 44 +++++
arch/ia64/kernel/entry.S | 115 +++++++----
arch/ia64/kernel/head.S | 41 ++++
arch/ia64/kernel/iosapic.c | 45 +++--
arch/ia64/kernel/irq_ia64.c | 19 ++-
arch/ia64/kernel/ivt.S | 249
++++++++++++------------
arch/ia64/kernel/minstate.h | 13 +-
arch/ia64/kernel/nr-irqs.c | 24 +++
arch/ia64/kernel/paravirt.c | 369
++++++++++++++++++++++++++++++++++++
arch/ia64/kernel/paravirt_inst.h | 29 +++
arch/ia64/kernel/paravirtentry.S | 60 ++++++
arch/ia64/kernel/setup.c | 10 +
arch/ia64/kernel/smpboot.c | 2 +
arch/ia64/kernel/time.c | 23 +++
arch/ia64/kernel/vmlinux.lds.S | 1 -
include/asm-ia64/Kbuild | 2 +-
include/asm-ia64/gcc_intrin.h | 24 ++--
include/asm-ia64/hw_irq.h | 23 ++-
include/asm-ia64/intel_intrin.h | 41 ++--
include/asm-ia64/intrinsics.h | 55 ++++++
include/asm-ia64/iosapic.h | 18 ++-
include/asm-ia64/irq.h | 9 +-
include/asm-ia64/mmu_context.h | 6 +-
include/asm-ia64/native/inst.h | 175
+++++++++++++++++
include/asm-ia64/native/irq.h | 35 ++++
include/asm-ia64/paravirt.h | 255
+++++++++++++++++++++++++
include/asm-ia64/paravirt_privop.h | 114 +++++++++++
include/asm-ia64/smp.h | 2 +
include/asm-ia64/system.h | 11 +-
30 files changed, 1567 insertions(+), 253 deletions(-)
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel lists.xensource.com
http://list
s.xensource.com/xen-ia64-devel
|
|
| ia64/pv_ops: paravirtualize minstate.h. |

|
2008-05-19 08:13:37 |
paravirtualize minstate.h which are hand written assembly
code.
They include sensitive or performance critical privileged
instructions. So that they are appropriate for
paravirtualization.
Cc: Keith Owens <kaos ocs.com.au>
Cc: Akio Takebe <takebe_akio jp.fujitsu.com>
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong intel.com>
Signed-off-by: Isaku Yamahata <yamahata valinux.co.jp>
---
arch/ia64/kernel/minstate.h | 13 +++++++------
arch/ia64/kernel/paravirt_inst.h | 29
+++++++++++++++++++++++++++++
include/asm-ia64/native/inst.h | 2 ++
3 files changed, 38 insertions(+), 6 deletions(-)
create mode 100644 arch/ia64/kernel/paravirt_inst.h
diff --git a/arch/ia64/kernel/minstate.h
b/arch/ia64/kernel/minstate.h
index 7c548ac..9db53cf 100644
--- a/arch/ia64/kernel/minstate.h
+++ b/arch/ia64/kernel/minstate.h
 -2,6
+2,7 
#include <asm/cache.h>
#include "entry.h"
+#include "paravirt_inst.h"
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
/* read ar.itc in advance, and use it before leaving bank 0
*/
 -40,16
+41,16 
* 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.
*/
-#define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA)
+#define
IA64_NATIVE_DO_SAVE_MIN(__COVER,SAVE_IFS,EXTRA)
mov r16=IA64_KR(CURRENT); /* M */
mov r27=ar.rsc; /* M */
mov r20=r1; /* A */
mov r25=ar.unat; /* M */
- mov r29=cr.ipsr; /* M */
+ MOV_FROM_IPSR(p0,r29); /* M */
mov r26=ar.pfs; /* I */
- mov r28=cr.iip; /* M */
+ MOV_FROM_IIP(r28); /* M */
mov r21=ar.fpsr; /* M */
- COVER; /* B;; (or nothing) */
+ __COVER; /* B;; (or nothing) */
;;
adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16;
;;
 -206,6
+207,6 
st8 [r25]=r10; /* ar.ssd */
;;
-#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov
r30=cr.ifs,)
-#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov
r30=cr.ifs, mov r15=r19)
+#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(COVER, mov
r30=cr.ifs,)
+#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(COVER, mov
r30=cr.ifs, mov r15=r19)
#define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, )
diff --git a/arch/ia64/kernel/paravirt_inst.h
b/arch/ia64/kernel/paravirt_inst.h
new file mode 100644
index 0000000..5cad6fb
--- /dev/null
+++ b/arch/ia64/kernel/paravirt_inst.h
 -0,0
+1,29 
+/**********************************************************
********************
+ * linux/arch/ia64/xen/paravirt_inst.h
+ *
+ * Copyright (c) 2008 Isaku Yamahata <yamahata at
valinux co jp>
+ * VA Linux Systems Japan K.K.
+ *
+ * This program is free software; you can redistribute it
and/or modify
+ * it under the terms of the GNU General Public License as
published by
+ * the Free Software Foundation; either version 2 of the
License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be
useful,
+ * but WITHOUT ANY WARRANTY; without even the implied
warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General
Public License
+ * along with this program; if not, write to the Free
Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
+ *
+ */
+
+#ifdef __IA64_ASM_PARAVIRTUALIZED_XEN
+#include <asm/xen/inst.h>
+#include <asm/xen/minstate.h>
+#else
+#include <asm/native/inst.h>
+#endif
+
diff --git a/include/asm-ia64/native/inst.h
b/include/asm-ia64/native/inst.h
index 2a50b70..f1072ac 100644
--- a/include/asm-ia64/native/inst.h
+++ b/include/asm-ia64/native/inst.h
 -20,6
+20,8 
*
*/
+#define DO_SAVE_MIN IA64_NATIVE_DO_SAVE_MIN
+
#ifdef CONFIG_PARAVIRT_GUEST_ASM_CLOBBER_CHECK
# define PARAVIRT_POISON 0xdeadbeefbaadf00d
# define CLOBBER(clob)
--
1.5.3
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel lists.xensource.com
http://list
s.xensource.com/xen-ia64-devel
|
|
| ia64: preparation: remove extern in
irq_ia64.c |

|
2008-05-19 08:13:28 |
remove extern declaration of handle_IPI() in irq_ia64.c.
Instead, declare it in asm-ia64/smp.h.
Later handle_IPI() will be referenced from another file.
Signed-off-by: Isaku Yamahata <yamahata valinux.co.jp>
---
arch/ia64/kernel/irq_ia64.c | 1 -
include/asm-ia64/smp.h | 2 ++
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/ia64/kernel/irq_ia64.c
b/arch/ia64/kernel/irq_ia64.c
index 5538471..c48171b 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
 -600,7
+600,6  static irqreturn_t dummy_handler (int irq, void
*dev_id)
{
BUG();
}
-extern irqreturn_t handle_IPI (int irq, void *dev_id);
static struct irqaction ipi_irqaction = {
.handler = handle_IPI,
diff --git a/include/asm-ia64/smp.h
b/include/asm-ia64/smp.h
index ec5f355..2984e26 100644
--- a/include/asm-ia64/smp.h
+++ b/include/asm-ia64/smp.h
 -15,6
+15,7 
#include <linux/kernel.h>
#include <linux/cpumask.h>
#include <linux/bitops.h>
+#include <linux/irqreturn.h>
#include <asm/io.h>
#include <asm/param.h>
 -123,6
+124,7  extern void __init smp_build_cpu_map(void);
extern void __init init_smp_config (void);
extern void smp_do_timer (struct pt_regs *regs);
+extern irqreturn_t handle_IPI(int irq, void *dev_id);
extern void smp_send_reschedule (int cpu);
extern void lock_ipi_calllock(void);
extern void unlock_ipi_calllock(void);
--
1.5.3
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel lists.xensource.com
http://list
s.xensource.com/xen-ia64-devel
|
|
| ia64/pv_ops take 6 |

|
2008-05-20 16:59:49 |
> Hi. This patchset implements ia64/pv_ops support which
is the
> framework for virtualization support.
> Changes from take 5 are rebased to Linux 2.6.26-rc3,
> bug fix ivt.S paravirtualization and multi entry point
support.
> I believe these patches can be applied to the linux
ia64 repository.
Ok. This series of 17 patches applied, and I can boot the
resulting kernel as a native binary. I'll run it for
another
day or two, if nothinstrange happens I'll add these to my
"test" tree so they'll go to -mm and linux-next
for more general
testing.
-Tony
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel lists.xensource.com
http://list
s.xensource.com/xen-ia64-devel
|
|
| ia64/pv_ops take 6 |

|
2008-05-26 20:46:28 |
On Tue, May 20, 2008 at 02:59:49PM -0700, Luck, Tony wrote:
> > Hi. This patchset implements ia64/pv_ops support
which is the
> > framework for virtualization support.
> > Changes from take 5 are rebased to Linux
2.6.26-rc3,
> > bug fix ivt.S paravirtualization and multi entry
point support.
> > I believe these patches can be applied to the
linux ia64 repository.
>
> Ok. This series of 17 patches applied, and I can boot
the
> resulting kernel as a native binary. I'll run it for
another
> day or two, if nothinstrange happens I'll add these to
my
> "test" tree so they'll go to -mm and
linux-next for more general
> testing.
Hello Tony. Thank you for testing.
What was the result?
No patch has been committed to
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
.git#test
Did anything go wrong?
--
yamahata
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel lists.xensource.com
http://list
s.xensource.com/xen-ia64-devel
|
|
| ia64/pv_ops take 6 |

|
2008-05-27 18:26:45 |
> Thank you for testing.
>
> What was the result?
No problems found.
> No patch has been committed to
>
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
.git#test
I had to spend time on a bugfix. The bugfix is posted
in my 'release' branch. The pv_ops series (including the
documentation) is now in the 'test' branch. Take a close
look at arch/is64/kernel/minstate.h as I had to re-merge
your changes because of collisions with the bugfix.
-Tony
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel lists.xensource.com
http://list
s.xensource.com/xen-ia64-devel
|
|
| ia64/pv_ops take 6 |

|
2008-05-28 03:34:43 |
On Tue, May 27, 2008 at 04:26:45PM -0700, Luck, Tony wrote:
> I had to spend time on a bugfix. The bugfix is posted
> in my 'release' branch. The pv_ops series (including
the
> documentation) is now in the 'test' branch. Take a
close
> look at arch/is64/kernel/minstate.h as I had to
re-merge
> your changes because of collisions with the bugfix.
Thank you for commiting them.
I checked the RSE work around patch of
4dcc29e1574d88f4465ba865ed82800032f76418.
It bloated SAVE_MIN_WITH_COVER and SAVE_MIN_WITH_COVER_R19
so that on paravirtualized case not only
dispatch_illegal_op_fault
but also other functions which those macros need to be
moved.
Since the effort to reduce code size had already been made,
so
it is difficult to go further. By moving all of them, it
would
be consistent and we don't have to worry about code size
anymore.
>From 8a280936ca40bf824250f22c77228412b17ef74a Mon Sep 17
00:00:00 2001
From: Isaku Yamahata <yamahata valinux.co.jp>
Date: Wed, 28 May 2008 16:28:41 +0900
Subject: ia64/pv_ops: preparation: move some functions in
ivt.S to avoid lack of space.
move interrupt, page_fault, non_syscall,
dispatch_unaligned_handler and
dispatch_to_fault_handler to avoid lack of instructin
space.
The change set 4dcc29e1574d88f4465ba865ed82800032f76418
bloated
SAVE_MIN_WITH_COVER, SAVE_MIN_WITH_COVER_R19 so that it
bloated the
functions which uses those macros.
In the native case, only dispatch_illegal_op_fault had to be
moved.
When paravirtualized case the all functions which use the
macros need
to be moved to avoid the lack of space.
Signed-off-by: Isaku Yamahata <yamahata valinux.co.jp>
---
arch/ia64/kernel/ivt.S | 261
++++++++++++++++++++++++-----------------------
1 files changed, 133 insertions(+), 128 deletions(-)
diff --git a/arch/ia64/kernel/ivt.S
b/arch/ia64/kernel/ivt.S
index 23749ed..c39627d 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
 -515,27
+515,6  ENTRY(ikey_miss)
FAULT(6)
END(ikey_miss)
- //--------------------------------------------------------
---------------------------
- // call do_page_fault (predicates are in r31, psr.dt may
be off, r16 is faulting address)
-ENTRY(page_fault)
- SSM_PSR_DT_AND_SRLZ_I
- ;;
- SAVE_MIN_WITH_COVER
- alloc r15=ar.pfs,0,0,3,0
- MOV_FROM_IFA(out0)
- MOV_FROM_ISR(out1)
- SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r14, r3)
- adds r3=8,r2 // set up second base pointer
- SSM_PSR_I(p15, p15, r14) // restore psr.i
- movl r14=ia64_leave_kernel
- ;;
- SAVE_REST
- mov rp=r14
- ;;
- adds out2=16,r12 // out2 = pointer to pt_regs
- br.call.sptk.many b6=ia64_do_page_fault // ignore return
address
-END(page_fault)
-
.org ia64_ivt+0x1c00
///////////////////////////////////////////////////////////
//////////////////////////////
// 0x1c00 Entry 7 (size 64 bundles) Data Key Miss (12,51)
 -896,26
+875,8  END(break_fault)
///////////////////////////////////////////////////////////
//////////////////////////////
// 0x3000 Entry 12 (size 64 bundles) External Interrupt
(4)
ENTRY(interrupt)
- DBG_FAULT(12)
- mov r31=pr // prepare to save predicates
- ;;
- SAVE_MIN_WITH_COVER // uses r31; defines r2 and r3
- SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, r14)
- // ensure everybody knows psr.ic is back on
- adds r3=8,r2 // set up second base pointer for SAVE_REST
- ;;
- SAVE_REST
- ;;
- MCA_RECOVER_RANGE(interrupt)
- alloc r14=ar.pfs,0,0,2,0 // must be first in an insn
group
- MOV_FROM_IVR(out0, r8) // pass cr.ivr as first arg
- add out1=16,sp // pass pointer to pt_regs as second arg
- ;;
- srlz.d // make sure we see the effect of cr.ivr
- movl r14=ia64_leave_kernel
- ;;
- mov rp=r14
- br.call.sptk.many b6=ia64_handle_irq
+ /* interrupt handler has become too big to fit this area.
*/
+ br.sptk.many __interrupt
END(interrupt)
.org ia64_ivt+0x3400

-1125,105 +1086,18  END(account_sys_enter)
DBG_FAULT(17)
FAULT(17)
-ENTRY(non_syscall)
- mov ar.rsc=r27 // restore ar.rsc before
SAVE_MIN_WITH_COVER
- ;;
- SAVE_MIN_WITH_COVER
-
- // There is no particular reason for this code to be here,
other than that
- // there happens to be space here that would go unused
otherwise. If this
- // fault ever gets "unreserved", simply moved
the following code to a more
- // suitable spot...
-
- alloc r14=ar.pfs,0,0,2,0
- MOV_FROM_IIM(out0)
- add out1=16,sp
- adds r3=8,r2 // set up second base pointer for
SAVE_REST
-
- SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r15, r24)
- // guarantee that interruption collection is on
- SSM_PSR_I(p15, p15, r15) // restore psr.i
- movl r15=ia64_leave_kernel
- ;;
- SAVE_REST
- mov rp=r15
- ;;
- br.call.sptk.many b6=ia64_bad_break // avoid WAW on CFM
and ignore return addr
-END(non_syscall)
-
.org ia64_ivt+0x4800
///////////////////////////////////////////////////////////
//////////////////////////////
// 0x4800 Entry 18 (size 64 bundles) Reserved
DBG_FAULT(18)
FAULT(18)
- /*
- * There is no particular reason for this code to be here,
other than that
- * there happens to be space here that would go unused
otherwise. If this
- * fault ever gets "unreserved", simply moved
the following code to a more
- * suitable spot...
- */
-
-ENTRY(dispatch_unaligned_handler)
- SAVE_MIN_WITH_COVER
- ;;
- alloc r14=ar.pfs,0,0,2,0 // now it's safe (must be first
in insn group!)
- MOV_FROM_IFA(out0)
- adds out1=16,sp
-
- SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, r24)
- // guarantee that interruption collection is on
- SSM_PSR_I(p15, p15, r3) // restore psr.i
- adds r3=8,r2 // set up second base pointer
- ;;
- SAVE_REST
- movl r14=ia64_leave_kernel
- ;;
- mov rp=r14
- br.sptk.many ia64_prepare_handle_unaligned
-END(dispatch_unaligned_handler)
-
.org ia64_ivt+0x4c00
///////////////////////////////////////////////////////////
//////////////////////////////
// 0x4c00 Entry 19 (size 64 bundles) Reserved
DBG_FAULT(19)
FAULT(19)
- /*
- * There is no particular reason for this code to be here,
other than that
- * there happens to be space here that would go unused
otherwise. If this
- * fault ever gets "unreserved", simply moved
the following code to a more
- * suitable spot...
- */
-
-ENTRY(dispatch_to_fault_handler)
- /*
- * Input:
- * psr.ic: off
- * r19: fault vector number (e.g., 24 for General
Exception)
- * r31: contains saved predicates (pr)
- */
- SAVE_MIN_WITH_COVER_R19
- alloc r14=ar.pfs,0,0,5,0
- MOV_FROM_ISR(out1)
- MOV_FROM_IFA(out2)
- MOV_FROM_IIM(out3)
- MOV_FROM_ITIR(out4)
- ;;
- SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, out0)
- // guarantee that interruption collection is on
- mov out0=r15
- ;;
- SSM_PSR_I(p15, p15, r3) // restore psr.i
- adds r3=8,r2 // set up second base pointer for
SAVE_REST
- ;;
- SAVE_REST
- movl r14=ia64_leave_kernel
- ;;
- mov rp=r14
- br.call.sptk.many b6=ia64_fault
-END(dispatch_to_fault_handler)
-
//
// --- End of long entries, Beginning of short entries
//
 -1670,6
+1544,137  END(ia32_interrupt)
DBG_FAULT(67)
FAULT(67)
+ //--------------------------------------------------------
---------------------------
+ // call do_page_fault (predicates are in r31, psr.dt may
be off, r16 is faulting address)
+ENTRY(page_fault)
+ SSM_PSR_DT_AND_SRLZ_I
+ ;;
+ SAVE_MIN_WITH_COVER
+ alloc r15=ar.pfs,0,0,3,0
+ MOV_FROM_IFA(out0)
+ MOV_FROM_ISR(out1)
+ SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r14, r3)
+ adds r3=8,r2 // set up second base pointer
+ SSM_PSR_I(p15, p15, r14) // restore psr.i
+ movl r14=ia64_leave_kernel
+ ;;
+ SAVE_REST
+ mov rp=r14
+ ;;
+ adds out2=16,r12 // out2 = pointer to pt_regs
+ br.call.sptk.many b6=ia64_do_page_fault // ignore return
address
+END(page_fault)
+
+ENTRY(non_syscall)
+ mov ar.rsc=r27 // restore ar.rsc before
SAVE_MIN_WITH_COVER
+ ;;
+ SAVE_MIN_WITH_COVER
+
+ // There is no particular reason for this code to be here,
other than that
+ // there happens to be space here that would go unused
otherwise. If this
+ // fault ever gets "unreserved", simply moved
the following code to a more
+ // suitable spot...
+
+ alloc r14=ar.pfs,0,0,2,0
+ MOV_FROM_IIM(out0)
+ add out1=16,sp
+ adds r3=8,r2 // set up second base pointer for
SAVE_REST
+
+ SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r15, r24)
+ // guarantee that interruption collection is on
+ SSM_PSR_I(p15, p15, r15) // restore psr.i
+ movl r15=ia64_leave_kernel
+ ;;
+ SAVE_REST
+ mov rp=r15
+ ;;
+ br.call.sptk.many b6=ia64_bad_break // avoid WAW on CFM
and ignore return addr
+END(non_syscall)
+
+ENTRY(__interrupt)
+ DBG_FAULT(12)
+ mov r31=pr // prepare to save predicates
+ ;;
+ SAVE_MIN_WITH_COVER // uses r31; defines r2 and r3
+ SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, r14)
+ // ensure everybody knows psr.ic is back on
+ adds r3=8,r2 // set up second base pointer for SAVE_REST
+ ;;
+ SAVE_REST
+ ;;
+ MCA_RECOVER_RANGE(interrupt)
+ alloc r14=ar.pfs,0,0,2,0 // must be first in an insn
group
+ MOV_FROM_IVR(out0, r8) // pass cr.ivr as first arg
+ add out1=16,sp // pass pointer to pt_regs as second arg
+ ;;
+ srlz.d // make sure we see the effect of cr.ivr
+ movl r14=ia64_leave_kernel
+ ;;
+ mov rp=r14
+ br.call.sptk.many b6=ia64_handle_irq
+END(__interrupt)
+
+ /*
+ * There is no particular reason for this code to be here,
other than that
+ * there happens to be space here that would go unused
otherwise. If this
+ * fault ever gets "unreserved", simply moved
the following code to a more
+ * suitable spot...
+ */
+
+ENTRY(dispatch_unaligned_handler)
+ SAVE_MIN_WITH_COVER
+ ;;
+ alloc r14=ar.pfs,0,0,2,0 // now it's safe (must be first
in insn group!)
+ MOV_FROM_IFA(out0)
+ adds out1=16,sp
+
+ SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, r24)
+ // guarantee that interruption collection is on
+ SSM_PSR_I(p15, p15, r3) // restore psr.i
+ adds r3=8,r2 // set up second base pointer
+ ;;
+ SAVE_REST
+ movl r14=ia64_leave_kernel
+ ;;
+ mov rp=r14
+ br.sptk.many ia64_prepare_handle_unaligned
+END(dispatch_unaligned_handler)
+
+ /*
+ * There is no particular reason for this code to be here,
other than that
+ * there happens to be space here that would go unused
otherwise. If this
+ * fault ever gets "unreserved", simply moved
the following code to a more
+ * suitable spot...
+ */
+
+ENTRY(dispatch_to_fault_handler)
+ /*
+ * Input:
+ * psr.ic: off
+ * r19: fault vector number (e.g., 24 for General
Exception)
+ * r31: contains saved predicates (pr)
+ */
+ SAVE_MIN_WITH_COVER_R19
+ alloc r14=ar.pfs,0,0,5,0
+ MOV_FROM_ISR(out1)
+ MOV_FROM_IFA(out2)
+ MOV_FROM_IIM(out3)
+ MOV_FROM_ITIR(out4)
+ ;;
+ SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, out0)
+ // guarantee that interruption collection is on
+ mov out0=r15
+ ;;
+ SSM_PSR_I(p15, p15, r3) // restore psr.i
+ adds r3=8,r2 // set up second base pointer for
SAVE_REST
+ ;;
+ SAVE_REST
+ movl r14=ia64_leave_kernel
+ ;;
+ mov rp=r14
+ br.call.sptk.many b6=ia64_fault
+END(dispatch_to_fault_handler)
+
/*
* Squatting in this space ...
*
--
1.5.3
--
yamahata
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel lists.xensource.com
http://list
s.xensource.com/xen-ia64-devel
|
|
| ia64/pv_ops take 6 |

|
2008-05-28 14:55:21 |
> Since the effort to reduce code size had already been
made, so
> it is difficult to go further. By moving all of them,
it would
> be consistent and we don't have to worry about code
size anymore.
I've been caught by these a number of times while adding
debug/monitor
hooks to ivt.S code. Moving all of these squatters out is a
good idea.
Thank you. Applied.
-Tony
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel lists.xensource.com
http://list
s.xensource.com/xen-ia64-devel
|
|
[1-8]
|
|