Re: [RFC PATCH 1/3] iommu/riscv: Add guest IMSIC GPA mapping helpers

From: fangyu . yu

Date: Mon Oct 12 2026 - 05:58:46 EST


>On Sat, Oct 10, 2026 at 07:18:37PM +0800, fangyu.yu@xxxxxxxxxxxxxxxxx wrote:
>> This is not a generic page-table operation. It is a special
>> requirement of RISC-V IOMMU IRQ forwarding (irqbypass) on
>> implementations without an MSI page table: the guest IMSIC GPA
>> must be mapped into the second-stage domain, and when a vCPU's
>> VS-file host page migrates, its leaf must be replaced atomically.
>
>I think you can add an atomic PTE replace operation to generic_pt,
>that should be fine.

Hi Jason,

Thanks for the suggestion. I plan to give this a try in v2 and move
the atomic PTE replacement logic into generic_pt.

CC Shuai, since he suggested the same earlier.

Thanks,
Fangyu

>
>Jason