| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 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 |
|---|
| 9 | | - * GNU General Public License for more details. |
|---|
| 10 | | - * |
|---|
| 11 | | - * You should have received a copy of the GNU General Public License |
|---|
| 12 | | - * along with this program; if not, write to the Free Software |
|---|
| 13 | | - * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|---|
| 14 | 3 | * |
|---|
| 15 | 4 | * Copyright IBM Corp. 2007 |
|---|
| 16 | 5 | * Copyright 2011 Freescale Semiconductor, Inc. |
|---|
| .. | .. |
|---|
| 248 | 237 | /* Switch to kernel stack and jump to handler. */ |
|---|
| 249 | 238 | LOAD_REG_ADDR(r3, kvmppc_handle_exit) |
|---|
| 250 | 239 | mtctr r3 |
|---|
| 251 | | - lwz r3, HOST_RUN(r1) |
|---|
| 240 | + mr r3, r4 |
|---|
| 252 | 241 | lwz r2, HOST_R2(r1) |
|---|
| 253 | 242 | mr r14, r4 /* Save vcpu pointer. */ |
|---|
| 254 | 243 | |
|---|
| .. | .. |
|---|
| 348 | 337 | |
|---|
| 349 | 338 | |
|---|
| 350 | 339 | /* Registers: |
|---|
| 351 | | - * r3: kvm_run pointer |
|---|
| 352 | | - * r4: vcpu pointer |
|---|
| 340 | + * r3: vcpu pointer |
|---|
| 353 | 341 | */ |
|---|
| 354 | 342 | _GLOBAL(__kvmppc_vcpu_run) |
|---|
| 355 | 343 | stwu r1, -HOST_STACK_SIZE(r1) |
|---|
| 356 | | - stw r1, VCPU_HOST_STACK(r4) /* Save stack pointer to vcpu. */ |
|---|
| 344 | + stw r1, VCPU_HOST_STACK(r3) /* Save stack pointer to vcpu. */ |
|---|
| 357 | 345 | |
|---|
| 358 | 346 | /* Save host state to stack. */ |
|---|
| 359 | | - stw r3, HOST_RUN(r1) |
|---|
| 347 | + mr r4, r3 |
|---|
| 360 | 348 | mflr r3 |
|---|
| 361 | 349 | stw r3, HOST_STACK_LR(r1) |
|---|
| 362 | 350 | mfcr r5 |
|---|