Bug 23197 - Clear IOMMU page table entry C bit if IOMMU_PROT_MMIO is set in prot
Summary: Clear IOMMU page table entry C bit if IOMMU_PROT_MMIO is set in prot
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: 5.10.y-19
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: GuixinLiu
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-30 17:37 UTC by eastmouotain
Modified: 2025-07-30 17:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eastmouotain hygon_group 2025-07-30 17:37:36 UTC
Description of problem:
Clear IOMMU page table entry C bit if IOMMU_PROT_MMIO is set in prot. IOMMU_PROT_MMIO indicates pfn is MMIO rather than normal RAM.

It makes no sence to set SME bit on IOMMU page table entry if the
phyical address is PFN rather than DRAM, it even causes device
P2P access fail, as device can't recognize SME bit, only memory
controller can hanle SME bit properly.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Create a SEV/CSV VM with two GPU card passthrough to the VM.
2. One GPU accesses the other GPU's MMIO memory region.

Actual results:
It fails to access the other GPU MMIO memory.

Expected results:
Access other GPU's mmio memory successfully.

Additional info:
Comment 1 小龙 admin 2025-07-30 17:43:57 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/5558