Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport v3.5] drivers: virtualization: Crash when using ivshmem-v2 #65894

Closed
gramsay0 opened this issue Nov 28, 2023 · 1 comment · Fixed by #65095 or #65812
Closed

[Backport v3.5] drivers: virtualization: Crash when using ivshmem-v2 #65894

gramsay0 opened this issue Nov 28, 2023 · 1 comment · Fixed by #65095 or #65812
Assignees
Labels
Backport Backport PR and backport failure issues bug The issue is a bug, or the PR is fixing a bug

Comments

@gramsay0
Copy link
Contributor

Note: The fix has been already been merged, adding a ticket to allow a backport to the 3.5-branch.
Below is my original comment for reference


Hi, my Jailhouse hypervisor ivshmem stopped working, I bisected to this commit c9b534c.

It crashes here dc_ops("ivac", start_addr);

  • ivshmem_configure -> z_phys_map -> arch_mem_map -> inv_dcache_after_map_helper -> arm64_dcache_range -> dc_ops("ivac", start_addr);.

addr 0xa0000000, size 1044480, mapped/virt 0xfc5ef000

Unhandled data write at 0xa0000000(1)

FATAL: unhandled trap (exception class 0x24)
Cell state before exception:
 pc: 00000000fc00034c   lr: 00000000fc00034c spsr: 600000c5     EL1
 sp: 00000000fc0712d0  elr: 00000000fc00034c  esr: 24 1 000014f
 x0: 00000000fc042f90   x1: 0000000000000000   x2: 00000000fc02e488
 x3: 0000000000000000   x4: 0000000000000066   x5: 0000000000000000
 x6: 0000000000000000   x7: 0000000000000000   x8: 00000000fc0712c0
 x9: ffffff80fffffff8  x10: aaaaaaaaaaaaaaaa  x11: aaaaaaaaaaaaaaaa
x12: aaaaaaaaaaaaaaaa  x13: aaaaaaaaaaaaaaaa  x14: aaaaaaaaaaaaaaaa
x15: aaaaaaaaaaaaaaaa  x16: aaaaaaaaaaaaaaaa  x17: aaaaaaaaaaaaaaaa
x18: aaaaaaaaaaaaaaaa  x19: 00000000fc5ef000  x20: 0000000000000040
x21: 00000000fc6ee000  x22: 00000000fc6ee000  x23: 00000000fc07fe90
x24: 0000000000000000  x25: 0000000000000040  x26: 0000000000000000
x27: 0000000000000000  x28: 0000000000000000  x29: 00000000fc0712f0

Maybe something to do with part of this memory being read-only and DC IVAC requiring write access?

DC IVAC, requires write permission or else a permission fault is generated

https://developer.arm.com/documentation/den0024/a/Caches/Cache-maintenance

Although I get the same crash even without K_MEM_PERM_RW

Any thoughts/ideas on this?

@gramsay0 gramsay0 added the bug The issue is a bug, or the PR is fixing a bug label Nov 28, 2023
@henrikbrixandersen henrikbrixandersen added the Backport Backport PR and backport failure issues label Nov 29, 2023
@henrikbrixandersen henrikbrixandersen changed the title drivers: virtualization: Crash when using ivshmem-v2 [Backport v3.5] drivers: virtualization: Crash when using ivshmem-v2 Nov 29, 2023
@henrikbrixandersen
Copy link
Member

Closing since #65812 was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport Backport PR and backport failure issues bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
2 participants