Comments (1)
[ GIC ITS command buffer access violation ]
How to reproduce: run qemu with -smp 4
KVM error message
[ 709.354329] Unable to handle kernel unknown 40 at virtual address 0000007f6ca30000
[ 709.354520] Mem abort info:
[ 709.354610] ESR = 0x96000028
[ 709.354717] EC = 0x25: DABT (current EL), IL = 32 bits
[ 709.354859] SET = 0, FnV = 0
[ 709.354970] EA = 0, S1PTW = 0
[ 709.355071] FSC = 0x28: unknown 40
[ 709.355190] Data abort info:
[ 709.355281] ISV = 0, ISS = 0x00000028
[ 709.355390] CM = 0, WnR = 0
[ 709.355500] user pgtable: 4k pages, 39-bit VAs, pgdp=000000088256c000
[ 709.355669] [0000007f6ca30000] pgd=0800000880e96003, p4d=0800000880e96003, pud=0800000880e96003, pmd=08000008803b6003, pte=00e8000887398f43
[ 709.356059] Internal error: Oops: 96000028 [#1] PREEMPT SMP
[ 709.356209] Modules linked in:
[ 709.356320] CPU: 2 PID: 534 Comm: qemu-system-aar Not tainted 5.17.0-g04b710f9aaec-dirty #10
[ 709.356549] Hardware name: FVP Base RevC (DT)
[ 709.356674] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 709.356880] pc : __arch_copy_from_user+0x94/0x230
[ 709.357050] lr : __kvm_read_guest_page+0x70/0xa0
[ 709.357209] sp : ffffffc00a463740
....
[ 709.359810] Call trace:
[ 709.359900] __arch_copy_from_user+0x94/0x230
[ 709.360069] kvm_read_guest+0x6c/0xa4
[ 709.360220] vgic_its_process_commands.part.0+0xa8/0x970
[ 709.360403] vgic_mmio_write_its_cwriter+0x80/0xa4
[ 709.360576] dispatch_mmio_write+0xd0/0x130
[ 709.360750] __kvm_io_bus_write+0xb4/0xf0
[ 709.360909] kvm_io_bus_write+0x48/0x80
[ 709.361059] io_mem_abort+0x134/0x24c
[ 709.361209] kvm_handle_guest_abort+0x478/0xb20
[ 709.361369] handle_exit+0x70/0x180
[ 709.361531] kvm_arch_vcpu_ioctl_run+0x1c4/0x5e0
[ 709.361690] kvm_vcpu_ioctl+0x23c/0x950
[ 709.361849] __arm64_sys_ioctl+0xa8/0xec
[ 709.362010] invoke_syscall+0x48/0x114
[ 709.362170] el0_svc_common.constprop.0+0x44/0xec
[ 709.362350] do_el0_svc+0x24/0x84
[ 709.362499] el0_svc+0x2c/0x84
[ 709.362660] el0t_64_sync_handler+0x1a4/0x1b0
[ 709.362832] el0t_64_sync+0x18c/0x190
[ 709.363009] Code: f8400827 f8408828 91004021 a88120c7 (f8400827)
...
[ 709.363170] ---[ end trace 0000000000000000 ]---
Reason: Current implementation of RMM delegates all physical memory pages accessed by a realm to the realm via PAS update in GPT. No mechanism for specifying shared memory between RS(realm state) and NS(non-secure state).
Realm Linux kernel allocates a memory page for a GIC ITS command buffer and shares it with KVM in normal world.
Once it is touches(i.e. access) at realm before the gic emulator in KVM accesses the buffer, RMM maps IPA-PA according to the VMMapMemory RMI request from (our modified) KVM and updates GPT so that the page granule belongs to the realm.
work-around: 7a0918e
ultimate-solution(to-do): define interface for sharing memory between NS and RS.
(Once fixing this issue with smp 4, lots of GPT translation error messages are reported but we ignore the error for now.)
from islet.
Related Issues (20)
- Enable ACS with islet-rmm
- Figure out a better way to associate Rec with Rd HOT 2
- Reinforce granule management HOT 2
- Reinforce RMI input/context validations
- Sporadic realm linux boot failure HOT 2
- Figure out a way to securely manage "Run" and "HostMMIO_Read/Write" HOT 2
- Fix the CI failure HOT 1
- Realm is unexpectedly destroyed
- Fix SMC Context bug
- A safe interface to read/write page table
- Fix a bus fault in realm booting
- Fix CI failures by lack of runner's space
- Get granule state according to a given PA
- Move "FVP binary" away from islet-asset
- [Cache] Garbage value in shared region (NS, Realm) HOT 4
- Refactor PageTable interfaces HOT 1
- ACS(Architecture Compliance Suite) Status HOT 4
- Do optimizations in frequently called RMIs HOT 2
- Ask for Suggestions about Research Topics HOT 6
- Fix a ci failure (sdk build)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from islet.