Bug 13036 - Backport upstreamed patch "c0900d15d31c arm64: Ensure bits ASID[15:8] are masked out when the kernel uses 8-bit ASIDs"
Summary: Backport upstreamed patch "c0900d15d31c arm64: Ensure bits ASID[15:8] are mas...
Status: NEW
Alias: None
Product: ANCK 6.6 Dev
Classification: ANCK
Component: ARM (show other bugs) ARM
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: fghui_kernel
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-25 14:34 UTC by justinhe
Modified: 2024-12-25 14:45 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description justinhe 2024-12-25 14:34:42 UTC
Description of problem:
c0900d15d31c arm64: Ensure bits ASID[15:8] are masked out when the kernel uses 8-bit ASIDs
" Linux currently sets the TCR_EL1.AS bit unconditionally during CPU
    bring-up. On an 8-bit ASID CPU, this is RES0 and ignored, otherwise
    16-bit ASIDs are enabled. However, if running in a VM and the hypervisor
    reports 8-bit ASIDs (ID_AA64MMFR0_EL1.ASIDBits == 0) on a 16-bit ASIDs
    CPU, Linux uses bits 8 to 63 as a generation number for tracking old
    process ASIDs. The bottom 8 bits of this generation end up being written
    to TTBR1_EL1 and also used for the ASID-based TLBI operations as the
    upper 8 bits of the ASID. Following an ASID roll-over event we can have
    threads of the same application with the same 8-bit ASID but different
    generation numbers running on separate CPUs. Both TLB caching and the
    TLBI operations will end up using different actual 16-bit ASIDs for the
    same process."
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 小龙 admin 2024-12-25 14:45:00 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/4370