Commit 21c79969 authored by Alexander Gordeev's avatar Alexander Gordeev

vfio/ccw: sort out physical vs virtual pointers usage

The ORB's interrupt parameter field is stored unmodified into the
interruption code when an I/O interrupt occurs. As this reflects
a real device, let's store the physical address of the subchannel
struct so it can be used when processing an interrupt.

Note: this currently doesn't fix a real bug, since virtual
addresses are identical to physical ones.
Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
[EF: Updated commit message]
Signed-off-by: default avatarEric Farman <farman@linux.ibm.com>
Reviewed-by: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: default avatarNico Boehr <nrb@linux.ibm.com>
Link: https://lore.kernel.org/r/20221121165836.283781-2-farman@linux.ibm.com
parent dfe843dc
...@@ -29,7 +29,7 @@ static int fsm_io_helper(struct vfio_ccw_private *private) ...@@ -29,7 +29,7 @@ static int fsm_io_helper(struct vfio_ccw_private *private)
spin_lock_irqsave(sch->lock, flags); spin_lock_irqsave(sch->lock, flags);
orb = cp_get_orb(&private->cp, (u32)(addr_t)sch, sch->lpm); orb = cp_get_orb(&private->cp, (u32)virt_to_phys(sch), sch->lpm);
if (!orb) { if (!orb) {
ret = -EIO; ret = -EIO;
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment