diff options
author | Xiantao Zhang <xiantao.zhang@intel.com> | 2008-09-12 08:23:11 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-10-15 08:25:12 -0400 |
commit | 81aec5227eedf9035e8544d8021ca6b8fb7c357a (patch) | |
tree | 3e2166dd2b54cb433b2492c052fa5637e10d38fd /arch/ia64/kvm/optvfault.S | |
parent | 271b05281f7f485a0be8764860687ebb98459b80 (diff) |
KVM: ia64: Implement a uniform vps interface
An uniform entry kvm_vps_entry is added for
vps_sync_write/read, vps_resume_handler/guest,
and branches to differnt PAL service according to the offset.
Singed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/ia64/kvm/optvfault.S')
-rw-r--r-- | arch/ia64/kvm/optvfault.S | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/ia64/kvm/optvfault.S b/arch/ia64/kvm/optvfault.S index e4f15d641b22..f0bf0a8efa3e 100644 --- a/arch/ia64/kvm/optvfault.S +++ b/arch/ia64/kvm/optvfault.S | |||
@@ -20,6 +20,75 @@ | |||
20 | #define ACCE_MOV_TO_PSR | 20 | #define ACCE_MOV_TO_PSR |
21 | #define ACCE_THASH | 21 | #define ACCE_THASH |
22 | 22 | ||
23 | ENTRY(kvm_vps_entry) | ||
24 | adds r29 = VMM_VCPU_VSA_BASE_OFFSET,r21 | ||
25 | ;; | ||
26 | ld8 r29 = [r29] | ||
27 | ;; | ||
28 | add r29 = r29, r30 | ||
29 | ;; | ||
30 | mov b0 = r29 | ||
31 | br.sptk.many b0 | ||
32 | END(kvm_vps_entry) | ||
33 | |||
34 | /* | ||
35 | * Inputs: | ||
36 | * r24 : return address | ||
37 | * r25 : vpd | ||
38 | * r29 : scratch | ||
39 | * | ||
40 | */ | ||
41 | GLOBAL_ENTRY(kvm_vps_sync_read) | ||
42 | movl r30 = PAL_VPS_SYNC_READ | ||
43 | ;; | ||
44 | br.sptk.many kvm_vps_entry | ||
45 | END(kvm_vps_sync_read) | ||
46 | |||
47 | /* | ||
48 | * Inputs: | ||
49 | * r24 : return address | ||
50 | * r25 : vpd | ||
51 | * r29 : scratch | ||
52 | * | ||
53 | */ | ||
54 | GLOBAL_ENTRY(kvm_vps_sync_write) | ||
55 | movl r30 = PAL_VPS_SYNC_WRITE | ||
56 | ;; | ||
57 | br.sptk.many kvm_vps_entry | ||
58 | END(kvm_vps_sync_write) | ||
59 | |||
60 | /* | ||
61 | * Inputs: | ||
62 | * r23 : pr | ||
63 | * r24 : guest b0 | ||
64 | * r25 : vpd | ||
65 | * | ||
66 | */ | ||
67 | GLOBAL_ENTRY(kvm_vps_resume_normal) | ||
68 | movl r30 = PAL_VPS_RESUME_NORMAL | ||
69 | ;; | ||
70 | mov pr=r23,-2 | ||
71 | br.sptk.many kvm_vps_entry | ||
72 | END(kvm_vps_resume_normal) | ||
73 | |||
74 | /* | ||
75 | * Inputs: | ||
76 | * r23 : pr | ||
77 | * r24 : guest b0 | ||
78 | * r25 : vpd | ||
79 | * r17 : isr | ||
80 | */ | ||
81 | GLOBAL_ENTRY(kvm_vps_resume_handler) | ||
82 | movl r30 = PAL_VPS_RESUME_HANDLER | ||
83 | ;; | ||
84 | ld8 r27=[r25] | ||
85 | shr r17=r17,IA64_ISR_IR_BIT | ||
86 | ;; | ||
87 | dep r27=r17,r27,63,1 // bit 63 of r27 indicate whether enable CFLE | ||
88 | mov pr=r23,-2 | ||
89 | br.sptk.many kvm_vps_entry | ||
90 | END(kvm_vps_resume_handler) | ||
91 | |||
23 | //mov r1=ar3 | 92 | //mov r1=ar3 |
24 | GLOBAL_ENTRY(kvm_asm_mov_from_ar) | 93 | GLOBAL_ENTRY(kvm_asm_mov_from_ar) |
25 | #ifndef ACCE_MOV_FROM_AR | 94 | #ifndef ACCE_MOV_FROM_AR |