Commit fcd35f5
KVM: PPC: Book3S HV: Save/restore host values of debug registers
commit 7ceaa6d upstream.
At present, HV KVM on POWER8 and POWER9 machines loses any instruction
or data breakpoint set in the host whenever a guest is run.
Instruction breakpoints are currently only used by xmon, but ptrace
and the perf_event subsystem can set data breakpoints as well as xmon.
To fix this, we save the host values of the debug registers (CIABR,
DAWR and DAWRX) before entering the guest and restore them on exit.
To provide space to save them in the stack frame, we expand the stack
frame allocated by kvmppc_hv_entry() from 112 to 144 bytes.
[[email protected] - Adjusted stack offsets since we aren't saving
POWER9-specific registers.]
Fixes: b005255 ("KVM: PPC: Book3S HV: Context-switch new POWER8 SPRs", 2014-01-08)
Signed-off-by: Paul Mackerras <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 17d3810 commit fcd35f5
1 file changed
+32
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
274 | 281 | | |
275 | 282 | | |
276 | 283 | | |
277 | | - | |
| 284 | + | |
278 | 285 | | |
279 | 286 | | |
280 | | - | |
| 287 | + | |
281 | 288 | | |
282 | 289 | | |
283 | 290 | | |
| |||
489 | 496 | | |
490 | 497 | | |
491 | 498 | | |
492 | | - | |
| 499 | + | |
493 | 500 | | |
494 | 501 | | |
495 | 502 | | |
| |||
643 | 650 | | |
644 | 651 | | |
645 | 652 | | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
646 | 663 | | |
647 | 664 | | |
648 | 665 | | |
| |||
1266 | 1283 | | |
1267 | 1284 | | |
1268 | 1285 | | |
1269 | | - | |
1270 | | - | |
1271 | 1286 | | |
1272 | 1287 | | |
1273 | 1288 | | |
| |||
1426 | 1441 | | |
1427 | 1442 | | |
1428 | 1443 | | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
1429 | 1454 | | |
1430 | 1455 | | |
1431 | 1456 | | |
| |||
1535 | 1560 | | |
1536 | 1561 | | |
1537 | 1562 | | |
1538 | | - | |
1539 | | - | |
| 1563 | + | |
| 1564 | + | |
1540 | 1565 | | |
1541 | 1566 | | |
1542 | 1567 | | |
| |||
0 commit comments