diff options
author | Tony Krowiak <[email protected]> | 2023-08-15 14:43:33 -0400 |
---|---|---|
committer | Heiko Carstens <[email protected]> | 2023-08-18 15:24:39 +0200 |
commit | f88fb1335733029b4630fb93cfaad349a81e57b2 (patch) | |
tree | 32497b7faca0a5949e65acbcc8ca7bc7cccc70a9 /drivers/net/xen-netback/netback.c | |
parent | fb5040ef7f707525d0681cf6bfe424ccd1aadab7 (diff) |
s390/vfio-ap: make sure nib is shared
Since the NIB is visible by HW, KVM and the (PV) guest it needs to be
in non-secure or secure but shared storage. Return code 6 is used to
indicate to a PV guest that its NIB would be on secure, unshared
storage and therefore the NIB address is invalid.
Unfortunately we have no easy way to check if a page is unshared after
vfio_pin_pages() since it will automatically export an unshared page
if the UV pin shared call did not succeed due to a page being in
unshared state.
Therefore we use the fact that UV pinning it a second time is a nop
but trying to pin an exported page is an error (0x102). If we
encounter this error, we do a vfio unpin and import the page again,
since vfio_pin_pages() exported it.
Signed-off-by: Janosch Frank <[email protected]>
Signed-off-by: Tony Krowiak <[email protected]>
Acked-by: Halil Pasic <[email protected]>
Tested-by: Viktor Mihajlovski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Heiko Carstens <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/netback.c')
0 files changed, 0 insertions, 0 deletions