diff options
Diffstat (limited to 'arch/arm/kvm/interrupts.S')
| -rw-r--r-- | arch/arm/kvm/interrupts.S | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S index ddc15539bad2..0d68d4073068 100644 --- a/arch/arm/kvm/interrupts.S +++ b/arch/arm/kvm/interrupts.S | |||
| @@ -220,6 +220,10 @@ after_vfp_restore: | |||
| 220 | * in Hyp mode (see init_hyp_mode in arch/arm/kvm/arm.c). Return values are | 220 | * in Hyp mode (see init_hyp_mode in arch/arm/kvm/arm.c). Return values are |
| 221 | * passed in r0 and r1. | 221 | * passed in r0 and r1. |
| 222 | * | 222 | * |
| 223 | * A function pointer with a value of 0xffffffff has a special meaning, | ||
| 224 | * and is used to implement __hyp_get_vectors in the same way as in | ||
| 225 | * arch/arm/kernel/hyp_stub.S. | ||
| 226 | * | ||
| 223 | * The calling convention follows the standard AAPCS: | 227 | * The calling convention follows the standard AAPCS: |
| 224 | * r0 - r3: caller save | 228 | * r0 - r3: caller save |
| 225 | * r12: caller save | 229 | * r12: caller save |
| @@ -363,6 +367,11 @@ hyp_hvc: | |||
| 363 | host_switch_to_hyp: | 367 | host_switch_to_hyp: |
| 364 | pop {r0, r1, r2} | 368 | pop {r0, r1, r2} |
| 365 | 369 | ||
| 370 | /* Check for __hyp_get_vectors */ | ||
| 371 | cmp r0, #-1 | ||
| 372 | mrceq p15, 4, r0, c12, c0, 0 @ get HVBAR | ||
| 373 | beq 1f | ||
| 374 | |||
| 366 | push {lr} | 375 | push {lr} |
| 367 | mrs lr, SPSR | 376 | mrs lr, SPSR |
| 368 | push {lr} | 377 | push {lr} |
| @@ -378,7 +387,7 @@ THUMB( orr lr, #1) | |||
| 378 | pop {lr} | 387 | pop {lr} |
| 379 | msr SPSR_csxf, lr | 388 | msr SPSR_csxf, lr |
| 380 | pop {lr} | 389 | pop {lr} |
| 381 | eret | 390 | 1: eret |
| 382 | 391 | ||
| 383 | guest_trap: | 392 | guest_trap: |
| 384 | load_vcpu @ Load VCPU pointer to r0 | 393 | load_vcpu @ Load VCPU pointer to r0 |
