Commit 8bb7170
hisi_acc_vfio_pci: fix XQE dma address error
The dma addresses of EQE and AEQE are wrong after migration and
results in guest kernel-mode encryption services failure.
Comparing the definition of hardware registers, we found that
there was an error when the data read from the register was
combined into an address. Therefore, the address combination
sequence needs to be corrected.
Even after fixing the above problem, we still have an issue
where the Guest from an old kernel can get migrated to
new kernel and may result in wrong data.
In order to ensure that the address is correct after migration,
if an old magic number is detected, the dma address needs to be
updated.
Fixes: b0eed08 ("hisi_acc_vfio_pci: Add support for VFIO live migration")
Signed-off-by: Longfang Liu <[email protected]>
Reviewed-by: Shameer Kolothum <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>1 parent 07970d0 commit 8bb7170
File tree
2 files changed
+47
-8
lines changed- drivers/vfio/pci/hisilicon
2 files changed
+47
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
353 | 379 | | |
354 | 380 | | |
355 | 381 | | |
| |||
363 | 389 | | |
364 | 390 | | |
365 | 391 | | |
366 | | - | |
| 392 | + | |
| 393 | + | |
367 | 394 | | |
368 | 395 | | |
369 | 396 | | |
| |||
418 | 445 | | |
419 | 446 | | |
420 | 447 | | |
421 | | - | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
422 | 451 | | |
423 | 452 | | |
424 | 453 | | |
| |||
496 | 525 | | |
497 | 526 | | |
498 | 527 | | |
499 | | - | |
| 528 | + | |
500 | 529 | | |
501 | | - | |
502 | | - | |
| 530 | + | |
| 531 | + | |
503 | 532 | | |
504 | | - | |
| 533 | + | |
505 | 534 | | |
506 | 535 | | |
507 | 536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
56 | | - | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
64 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
| |||
0 commit comments