qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] AArch64 QEMU System emulation: issue with TTBR0


From: Ian Campbell
Subject: Re: [Qemu-devel] AArch64 QEMU System emulation: issue with TTBR0
Date: Sun, 08 Jun 2014 12:26:37 +0100

On Tue, 2014-06-03 at 14:28 +0200, Claudio Fontana wrote:
> Thank you for the clarifications and advice, I think executable
> permissions might be involved, as removing the NX / PNX check in
> get_phys_addr_lpae() makes it proceed ahead

I'm seeing something very similar running modprobe, I get a kernel fault
(see below) which I also tracked down to the NX/PNX checks in
get_phys_addr_lpae().

At the moment I'm a bit suspicious of:
        /* Extract attributes from the descriptor and merge with table attrs */
        if (arm_feature(env, ARM_FEATURE_V8)) {
            attrs = extract64(descriptor, 2, 10)
                | (extract64(descriptor, 53, 11) << 10);
        } else {
            attrs = extract64(descriptor, 2, 10)
                | (extract64(descriptor, 52, 12) << 10);
        }

I'm not sure what the reason for the v8 difference is, it seems like it
is skipping extracting the CONTIG bit but I've not dug into the v8 ARM
ARM to figure out why that might be desirable...

Since in the v8 case extracts fewer bits from higher up but uses the
same << 10 shift, which seems like it ought to then confuse later checks
with use 1<<11 and 1<<12. Making that <<10 into <<11 doesn't help though
so I think I might be barking up the wrong tree...

Ian.

[    2.399053] Bad mode in Synchronous Abort handler detected, code 0x8400000f
[    2.399482] CPU: 0 PID: 45 Comm: systemd-udevd Not tainted 3.14-1-arm64 #1 
Debian 3.14.5-2
[    2.399769] task: ffffffc006f96440 ti: ffffffc006fb0000 task.ti: 
ffffffc006fb0000
[    2.400603] PC is at virtio_init+0x0/0x2c [virtio]
[    2.401061] LR is at do_one_initcall+0xdc/0x124
[    2.401214] pc : [<ffffffbffc000658>] lr : [<ffffffc000080c30>] pstate: 
60000145
[    2.401418] sp : ffffffc006fb3c50
[    2.401548] x29: ffffffc006fb3c50 x28: 0000000000000001 
[    2.401791] x27: 0000000000000000 x26: ffffffc0005f9000 
[    2.401973] x25: ffffffc006f1a380 x24: ffffffbffc000b08 
[    2.402152] x23: ffffffc006fb0000 x22: ffffffbffc000b58 
[    2.402331] x21: 0000000000000000 x20: ffffffbffc000658 
[    2.402505] x19: ffffffc006fb0000 x18: 0000007fd073cbb0 
[    2.402674] x17: 0000007fac1e6df0 x16: ffffffc000094274 
[    2.402826] x15: 0000007fac2690b8 x14: ffffffffffffffb8 
[    2.402978] x13: 00000000ffffffff x12: 0000000000000001 
[    2.403131] x11: ffffffc00063aea0 x10: 0000000000000000 
[    2.403318] x9 : 0000000000000001 x8 : 00000000000000dc 
[    2.403500] x7 : ffffffc007ffbf00 x6 : 2222222200112222 
[    2.403674] x5 : 0000000000000000 x4 : 0000000000000000 
[    2.403848] x3 : 0000000000000000 x2 : 0000000000000002 
[    2.404024] x1 : ffffffc006fb3c50 x0 : 0000000000000000 
[    2.404203] 
[    2.404473] Internal error: Oops - bad mode: 0 [#1] SMP
[    2.404743] Modules linked in: virtio(+)
[    2.405083] CPU: 0 PID: 45 Comm: systemd-udevd Not tainted 3.14-1-arm64 #1 
Debian 3.14.5-2
[    2.405313] task: ffffffc006f96440 ti: ffffffc006fb0000 task.ti: 
ffffffc006fb0000
[    2.405546] PC is at virtio_init+0x0/0x2c [virtio]
[    2.405707] LR is at do_one_initcall+0xdc/0x124
[    2.405857] pc : [<ffffffbffc000658>] lr : [<ffffffc000080c30>] pstate: 
60000145
[    2.406059] sp : ffffffc006fb3c50
[    2.406161] x29: ffffffc006fb3c50 x28: 0000000000000001 
[    2.406336] x27: 0000000000000000 x26: ffffffc0005f9000 
[    2.406510] x25: ffffffc006f1a380 x24: ffffffbffc000b08 
[    2.406685] x23: ffffffc006fb0000 x22: ffffffbffc000b58 
[    2.406861] x21: 0000000000000000 x20: ffffffbffc000658 
[    2.407039] x19: ffffffc006fb0000 x18: 0000007fd073cbb0 
[    2.407215] x17: 0000007fac1e6df0 x16: ffffffc000094274 
[    2.407392] x15: 0000007fac2690b8 x14: ffffffffffffffb8 
[    2.407567] x13: 00000000ffffffff x12: 0000000000000001 
[    2.407744] x11: ffffffc00063aea0 x10: 0000000000000000 
[    2.407915] x9 : 0000000000000001 x8 : 00000000000000dc 
[    2.408089] x7 : ffffffc007ffbf00 x6 : 2222222200112222 
[    2.408264] x5 : 0000000000000000 x4 : 0000000000000000 
[    2.408440] x3 : 0000000000000000 x2 : 0000000000000002 
[    2.408616] x1 : ffffffc006fb3c50 x0 : 0000000000000000 
[    2.408787] 
[    2.408872] Process systemd-udevd (pid: 45, stack limit = 0xffffffc006fb0058)
[    2.409115] Stack: (0xffffffc006fb3c50 to 0xffffffc006fb4000)
[    2.409389] 3c40:                                     06fb3cd0 ffffffc0 
000f6c70 ffffffc0
[    2.409643] 3c60: 005f9b98 ffffffc0 005f9bb0 ffffffc0 fc000b20 ffffffbf 
fc000b58 ffffffbf
[    2.409892] 3c80: 06fb0000 ffffffc0 000b5170 ffffffc0 005f9b98 ffffffc0 
005f9bb0 ffffffc0
[    2.410130] 3ca0: 00000000 00000000 ffffffff 00000000 fc000b08 ffffffbf 
00000001 00000000
[    2.410364] 3cc0: 06fb3cd0 ffffffc0 000f6c64 ffffffc0 06fb3e40 ffffffc0 
000f7374 ffffffc0
[    2.410598] 3ce0: 00000000 00000000 00000005 00000000 7fd1b730 0000007f 
7fc926a4 0000007f
[    2.410832] 3d00: 80000000 00000000 00000015 00000000 00000114 00000000 
00000111 00000000
[    2.411060] 3d20: 005f0000 ffffffc0 06fb0000 ffffffc0 06f6b0c0 ffffffc0 
06f1a390 ffffffc0
[    2.411291] 3d40: 000f3bdc ffffffc0 00000072 00000000 0000006e 00000000 
00533930 ffffffc0
[    2.411523] 3d60: 0000003f 00000000 0000feff 00000000 0000fff1 00000000 
00000019 00000000
[    2.411755] 3d80: 06fb3de0 ffffffc0 fc003000 ffffffbf 06fb3ec4 ffffffc0 
06fb3e80 ffffffc0
[    2.411987] 3da0: 00640360 ffffffc0 00000000 00000000 00000000 0000007f 
00000000 00000000
[    2.412219] 3dc0: 80000000 00000000 00000015 00000000 06fb3de0 ffffffc0 
00000784 00000000
[    2.412451] 3de0: 00000002 ffff81a4 00000001 00000000 00000000 00000000 
00000000 00000000
[    2.412682] 3e00: fc0006c8 ffffffbf 00000005 00000000 00000000 00000000 
00000000 00000000
[    2.412913] 3e20: 00000000 00000000 00000000 00000000 00000000 00000000 
00000000 00000000
[    2.413140] 3e40: d8f57fa0 0000007f 00082fec ffffffc0 2d241670 00000000 
7fd1b730 0000007f
[    2.413368] 3e60: ffffffff ffffffff 2d237ed0 00000000 00031000 ffffff80 
00003560 00000000
[    2.413603] 3e80: 000322e8 ffffff80 000321e8 ffffff80 000333a0 ffffff80 
00000d68 00000000
[    2.413850] 3ea0: 00000f60 00000000 00000000 00000000 00000000 00000000 
00000018 00000019
[    2.414082] 3ec0: 00000013 0000000f 0000000c 00000000 00000005 00000000 
7fd1b730 0000007f
[    2.414310] 3ee0: 00000000 00000000 00000005 00000000 00000000 00000000 
00000000 00000000
[    2.414538] 3f00: ffffffff ffffffff ffffffff ffffffff 00000111 00000000 
feff00d0 fefefefe
[    2.414767] 3f20: ffffffff 00000000 00000028 00000000 00000030 00000000 
00000008 00000000
[    2.414996] 3f40: 206f6b2e 6e72656b 7fcf90b8 0000007f 7fc92680 0000007f 
7fd2d288 0000007f
[    2.415226] 3f60: d8f57d00 0000007f 2d241670 00000000 7fd1b730 0000007f 
2d237ed0 00000000
[    2.415456] 3f80: 00000000 00000000 00020000 00000000 2d23ac20 00000000 
00000000 00000000
[    2.415686] 3fa0: 00020000 00000000 00000000 00000000 00000000 00000000 
d8f57fa0 0000007f
[    2.415921] 3fc0: 7fd152e8 0000007f d8f57fa0 0000007f 7fc926a4 0000007f 
80000000 00000000
[    2.416152] 3fe0: 00000005 00000000 00000111 00000000 00000000 00000000 
00000000 00000000
[    2.416412] Call trace:
[    2.416676] [<ffffffbffc000658>] virtio_init+0x0/0x2c [virtio]
[    2.416879] [<ffffffc0000f6c6c>] load_module+0x19b8/0x1f54
[    2.417109] [<ffffffc0000f7370>] SyS_finit_module+0x78/0x88
[    2.417370] Code: 95109058 90000000 9122e000 95108e70 (a9bf7bfd) 
[    2.418098] ---[ end trace 97ac04d8bcc4878d ]---





reply via email to

[Prev in Thread] Current Thread [Next in Thread]