book3s_interrupts.S (879f99ef2c4c05d9a7f0a67a05f1415663119825) book3s_interrupts.S (5deb8e7ad8ac7e3fcdfa042acff617f461b361c2)
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License, version 2, as
4 * published by the Free Software Foundation.
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

--- 90 unchanged lines hidden (view full) ---

99
100#ifdef CONFIG_PPC_BOOK3S_64
101 /* Get the dcbz32 flag */
102 PPC_LL r3, VCPU_HFLAGS(r4)
103 rldicl r3, r3, 0, 63 /* r3 &= 1 */
104 stb r3, HSTATE_RESTORE_HID5(r13)
105
106 /* Load up guest SPRG3 value, since it's user readable */
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License, version 2, as
4 * published by the Free Software Foundation.
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

--- 90 unchanged lines hidden (view full) ---

99
100#ifdef CONFIG_PPC_BOOK3S_64
101 /* Get the dcbz32 flag */
102 PPC_LL r3, VCPU_HFLAGS(r4)
103 rldicl r3, r3, 0, 63 /* r3 &= 1 */
104 stb r3, HSTATE_RESTORE_HID5(r13)
105
106 /* Load up guest SPRG3 value, since it's user readable */
107 ld r3, VCPU_SHARED(r4)
108 ld r3, VCPU_SHARED_SPRG3(r3)
107 lwz r3, VCPU_SHAREDBE(r4)
108 cmpwi r3, 0
109 ld r5, VCPU_SHARED(r4)
110 beq sprg3_little_endian
111sprg3_big_endian:
112#ifdef __BIG_ENDIAN__
113 ld r3, VCPU_SHARED_SPRG3(r5)
114#else
115 addi r5, r5, VCPU_SHARED_SPRG3
116 ldbrx r3, 0, r5
117#endif
118 b after_sprg3_load
119sprg3_little_endian:
120#ifdef __LITTLE_ENDIAN__
121 ld r3, VCPU_SHARED_SPRG3(r5)
122#else
123 addi r5, r5, VCPU_SHARED_SPRG3
124 ldbrx r3, 0, r5
125#endif
126
127after_sprg3_load:
109 mtspr SPRN_SPRG3, r3
110#endif /* CONFIG_PPC_BOOK3S_64 */
111
112 PPC_LL r4, VCPU_SHADOW_MSR(r4) /* get shadow_msr */
113
114 /* Jump to segment patching handler and into our guest */
115 bl FUNC(kvmppc_entry_trampoline)
116 nop

--- 114 unchanged lines hidden ---
128 mtspr SPRN_SPRG3, r3
129#endif /* CONFIG_PPC_BOOK3S_64 */
130
131 PPC_LL r4, VCPU_SHADOW_MSR(r4) /* get shadow_msr */
132
133 /* Jump to segment patching handler and into our guest */
134 bl FUNC(kvmppc_entry_trampoline)
135 nop

--- 114 unchanged lines hidden ---