Re: [PATCH v1] KVM: s390: interrupt: fix virtual-physical confusion for next alert GISA

Janosch Frank
2023-02-24T10:33:45Z

On 2/23/23 17:22, Nico Boehr wrote:
> We sometimes put a virtual address in next_alert, which should always be
> a physical address, since it is shared with hardware.
>
> This currently works, because virtual and physical addresses are
> the same.

I'd replace that with something like:

The gisa next alert address is defined as a host absolute address so
let's use virt_to_phys() to make sure we always write an absolute
address to this hardware structure.

This is not a bug since we're currently still running as a virtual ==
physical kernel but plan to move away from that.

>
> Add phys_to_virt() to resolve the virtual-physical confusion.

Reviewed-by: Janosch Frank <frankja@linux.ibm.com>