qemu-discuss
[Top][All Lists]
Advanced

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

[Qemu-discuss] Qemu: AARCH64: Single Step exception does not work


From: Pratyush Anand
Subject: [Qemu-discuss] Qemu: AARCH64: Single Step exception does not work
Date: Thu, 08 Jan 2015 11:02:21 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

Hi All,

Have anyone tried to test single step exception with ARM64 on Qemu? I was testing ARM64 uprobe patches[1] with qemu and I noticed that it does not generate single step exception. I also tried kprobe[2], which uses single step exception and it does not work. However, these code works fine with real silicon.

Test case can be summarized as under:

1. After kernel code is executed, it programs ELR_EL1 with the address of instruction which is to be single stepped. Lets say 0x7ffffff004 is the address of instruction which is to be single stepped. So, ELR_EL1 has been programmed with 0x7ffffff004.

2. MDSCR_EL1.SS is set to 1

3. ERET has been called to execute instruction to be single stepped.

With Qemu, I always see
undefined instruction: pc=0000007ffffff008
Code: bad PC value

It seems that Qemu could not notice MDSCR_EL1.SS = 1 and since, kernel had written a single valid instruction at location 0x7ffffff004, so it raised an undefined exception while executing next invalid instruction.

My Qemu version is:

QEMU emulator version 2.1.2, Copyright (c) 2003-2008 Fabrice Bellard

You may use code in [3] to test single steping.

Please let me know, if any more input is needed to reproduce it.

~Pratyush

[1] https://lkml.org/lkml/2014/12/31/151
[2] https://lkml.org/lkml/2014/11/18/33
[3] https://github.com/pratyushanand/linux.git:ml_arm64_uprobe_devel_v2




reply via email to

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