Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307843
b: refs/heads/master
c: f612771
h: refs/heads/master
i:
  307841: e02c125
  307839: ce8b474
v: v3
  • Loading branch information
Alexander Graf authored and Avi Kivity committed Apr 8, 2012
1 parent f5d9379 commit a14fd2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3aaefef200f618dc455cdf18053a7aeb262b5a11
refs/heads/master: f6127716c346c73ab1513edee53231800188c5ba
8 changes: 7 additions & 1 deletion trunk/arch/powerpc/kvm/bookehv_interrupts.S
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
* kernel with the -ffixed-r2 gcc option.
*/
#define HOST_R2 (3 * LONGBYTES)
#define HOST_NV_GPRS (4 * LONGBYTES)
#define HOST_CR (4 * LONGBYTES)
#define HOST_NV_GPRS (5 * LONGBYTES)
#define HOST_NV_GPR(n) (HOST_NV_GPRS + ((n - 14) * LONGBYTES))
#define HOST_MIN_STACK_SIZE (HOST_NV_GPR(31) + LONGBYTES)
#define HOST_STACK_SIZE ((HOST_MIN_STACK_SIZE + 15) & ~15) /* Align. */
Expand Down Expand Up @@ -396,6 +397,7 @@ skip_nv_load:
heavyweight_exit:
/* Not returning to guest. */
PPC_LL r5, HOST_STACK_LR(r1)
lwz r6, HOST_CR(r1)

/*
* We already saved guest volatile register state; now save the
Expand Down Expand Up @@ -442,6 +444,7 @@ heavyweight_exit:

/* Return to kvm_vcpu_run(). */
mtlr r5
mtcr r6
addi r1, r1, HOST_STACK_SIZE
/* r3 still contains the return code from kvmppc_handle_exit(). */
blr
Expand All @@ -457,8 +460,11 @@ _GLOBAL(__kvmppc_vcpu_run)
/* Save host state to stack. */
PPC_STL r3, HOST_RUN(r1)
mflr r3
mfcr r5
PPC_STL r3, HOST_STACK_LR(r1)

stw r5, HOST_CR(r1)

/* Save host non-volatile register state to stack. */
PPC_STL r14, HOST_NV_GPR(r14)(r1)
PPC_STL r15, HOST_NV_GPR(r15)(r1)
Expand Down

0 comments on commit a14fd2f

Please sign in to comment.