* [Qemu-devel] Debugging aarch64 guest running on Foundationv8 model @ 2014-02-27 9:45 Jani Kokkonen 2014-02-27 9:52 ` Peter Maydell 0 siblings, 1 reply; 5+ messages in thread From: Jani Kokkonen @ 2014-02-27 9:45 UTC (permalink / raw) To: qemu-devel, peter.maydell; +Cc: Claudio Fontana [-- Attachment #1: Type: text/plain, Size: 766 bytes --] Hi, I would like to debug a Qemu guest linux kernel under Foundationv8 model and I tried the following setup: 1. Foundationv8 model started with --network=nat and --network-nat-ports=1234=1234 options 2. In Foundationv8 model I started qemu-system-aarch64 with the command line: ./qemu-system-aarch64 -M virt -cpu host -kernel Image -serial stdio -display none -enable-kvm -gdb tcp::1234 -S 3. I start debugging the guest kernel with aarch64-linux-gnu-gdb vmlinux and with target remote:1234 command. However when I set any breakpoint I will get error message: "Cannot insert breakpoint 1. Error accessing memory address 0xffffffc000636498: Unknown error -1" In addition stepi or any other run related command does not work. Any ideas to fix this? -Jani [-- Attachment #2: Type: text/html, Size: 1020 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Debugging aarch64 guest running on Foundationv8 model 2014-02-27 9:45 [Qemu-devel] Debugging aarch64 guest running on Foundationv8 model Jani Kokkonen @ 2014-02-27 9:52 ` Peter Maydell 2014-02-27 13:21 ` Xuebing wang 0 siblings, 1 reply; 5+ messages in thread From: Peter Maydell @ 2014-02-27 9:52 UTC (permalink / raw) To: Jani Kokkonen; +Cc: Claudio Fontana, QEMU Developers On 27 February 2014 09:45, Jani Kokkonen <janimikokkonen@gmail.com> wrote: > Hi, > > I would like to debug a Qemu guest linux kernel under Foundationv8 model and > I tried the following setup: > > 1. Foundationv8 model started with --network=nat and > --network-nat-ports=1234=1234 options > 2. In Foundationv8 model I started qemu-system-aarch64 with the command > line: > > ./qemu-system-aarch64 -M virt -cpu host -kernel Image -serial stdio > -display none -enable-kvm -gdb tcp::1234 -S > > 3. I start debugging the guest kernel with aarch64-linux-gnu-gdb vmlinux > and with target remote:1234 command. > > However when I set any breakpoint I will get error message: > "Cannot insert breakpoint 1. > Error accessing memory address 0xffffffc000636498: Unknown error -1" > In addition stepi or any other run related command does not work. You would need to implement breakpoint support for AArch64 in both KVM and QEMU, I think. That feature is currently not implemented. thanks -- PMM ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Debugging aarch64 guest running on Foundationv8 model 2014-02-27 9:52 ` Peter Maydell @ 2014-02-27 13:21 ` Xuebing wang 2014-02-27 15:35 ` Jani Kokkonen 0 siblings, 1 reply; 5+ messages in thread From: Xuebing wang @ 2014-02-27 13:21 UTC (permalink / raw) To: Peter Maydell, Jani Kokkonen; +Cc: Claudio Fontana, QEMU Developers Hi Jani, Is below video similar to what you want? This video shows cross-debug armv8 linux kernel (using armv8-gdb + armv8-qemu). http://www.youtube.com/watch?v=MLu5EzheHIM On 02/27/2014 05:52 PM, Peter Maydell wrote: > On 27 February 2014 09:45, Jani Kokkonen <janimikokkonen@gmail.com> wrote: >> Hi, >> >> I would like to debug a Qemu guest linux kernel under Foundationv8 model and >> I tried the following setup: >> >> 1. Foundationv8 model started with --network=nat and >> --network-nat-ports=1234=1234 options >> 2. In Foundationv8 model I started qemu-system-aarch64 with the command >> line: >> >> ./qemu-system-aarch64 -M virt -cpu host -kernel Image -serial stdio >> -display none -enable-kvm -gdb tcp::1234 -S >> >> 3. I start debugging the guest kernel with aarch64-linux-gnu-gdb vmlinux >> and with target remote:1234 command. >> >> However when I set any breakpoint I will get error message: >> "Cannot insert breakpoint 1. >> Error accessing memory address 0xffffffc000636498: Unknown error -1" >> In addition stepi or any other run related command does not work. > You would need to implement breakpoint support for AArch64 in > both KVM and QEMU, I think. That feature is currently not implemented. > > thanks > -- PMM > > -- Thanks, Xuebing Wang ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Debugging aarch64 guest running on Foundationv8 model 2014-02-27 13:21 ` Xuebing wang @ 2014-02-27 15:35 ` Jani Kokkonen 2014-02-28 1:29 ` Xuebing wang 0 siblings, 1 reply; 5+ messages in thread From: Jani Kokkonen @ 2014-02-27 15:35 UTC (permalink / raw) To: Xuebing wang; +Cc: Peter Maydell, Claudio Fontana, QEMU Developers [-- Attachment #1: Type: text/plain, Size: 1605 bytes --] Hi Xuebing, In that video the qemu seems use 32-bit ARM cpu model whereas I have need to use 64-bit ARM cpu model as I have specified by "-cpu host" qemu parameter in Foundationv8 model. -Jani 2014-02-27 14:21 GMT+01:00 Xuebing wang <xbing6@gmail.com>: > Hi Jani, > > Is below video similar to what you want? This video shows cross-debug > armv8 linux kernel (using armv8-gdb + armv8-qemu). > > http://www.youtube.com/watch?v=MLu5EzheHIM > > > > On 02/27/2014 05:52 PM, Peter Maydell wrote: > >> On 27 February 2014 09:45, Jani Kokkonen <janimikokkonen@gmail.com> >> wrote: >> >>> Hi, >>> >>> I would like to debug a Qemu guest linux kernel under Foundationv8 model >>> and >>> I tried the following setup: >>> >>> 1. Foundationv8 model started with --network=nat and >>> --network-nat-ports=1234=1234 options >>> 2. In Foundationv8 model I started qemu-system-aarch64 with the command >>> line: >>> >>> ./qemu-system-aarch64 -M virt -cpu host -kernel Image -serial stdio >>> -display none -enable-kvm -gdb tcp::1234 -S >>> >>> 3. I start debugging the guest kernel with aarch64-linux-gnu-gdb vmlinux >>> and with target remote:1234 command. >>> >>> However when I set any breakpoint I will get error message: >>> "Cannot insert breakpoint 1. >>> Error accessing memory address 0xffffffc000636498: Unknown error -1" >>> In addition stepi or any other run related command does not work. >>> >> You would need to implement breakpoint support for AArch64 in >> both KVM and QEMU, I think. That feature is currently not implemented. >> >> thanks >> -- PMM >> >> >> > -- > Thanks, > Xuebing Wang > > [-- Attachment #2: Type: text/html, Size: 2634 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Debugging aarch64 guest running on Foundationv8 model 2014-02-27 15:35 ` Jani Kokkonen @ 2014-02-28 1:29 ` Xuebing wang 0 siblings, 0 replies; 5+ messages in thread From: Xuebing wang @ 2014-02-28 1:29 UTC (permalink / raw) To: Jani Kokkonen; +Cc: Peter Maydell, Claudio Fontana, QEMU Developers [-- Attachment #1: Type: text/plain, Size: 2877 bytes --] Hi Jani, The video is about aarch64 (not 32-bit arm). For your original issue, I think you need armv8 MMU support (which is not merged yet), so qemu can not handle guest virtual address like 0xffffffc000636498. I just tried Peter's branch, using aarch64-qemu + aarch64-gdb to cross-debug arm64-kernel is working here. -- But, because aarch64 timer is not implemented in the current qemu, thus I can not get arm64-kernel scheduler working. Peter's branch is here: git://git.linaro.org/people/pmaydell/qemu-arm.git branch: a64-system Command I am using: 1) in one terminal: ./aarch64-softmmu/qemu-system-aarch64 -kernel ../../kernel/arch/arm64/boot/Image -machine virt -cpu cortex-a57 -s -S 2) in another terminal aarch64-linux-gnu-gdb ../../kernel/vmlinux target remote tcp::1234 b start_kernel On 02/27/2014 11:35 PM, Jani Kokkonen wrote: > Hi Xuebing, > > In that video the qemu seems use 32-bit ARM cpu model whereas I have > need to use 64-bit ARM cpu model as I have specified by "-cpu host" > qemu parameter in Foundationv8 model. > > -Jani > > > 2014-02-27 14:21 GMT+01:00 Xuebing wang <xbing6@gmail.com > <mailto:xbing6@gmail.com>>: > > Hi Jani, > > Is below video similar to what you want? This video shows > cross-debug armv8 linux kernel (using armv8-gdb + armv8-qemu). > > http://www.youtube.com/watch?v=MLu5EzheHIM > > > > On 02/27/2014 05:52 PM, Peter Maydell wrote: > > On 27 February 2014 09:45, Jani Kokkonen > <janimikokkonen@gmail.com <mailto:janimikokkonen@gmail.com>> > wrote: > > Hi, > > I would like to debug a Qemu guest linux kernel under > Foundationv8 model and > I tried the following setup: > > 1. Foundationv8 model started with --network=nat and > --network-nat-ports=1234=1234 options > 2. In Foundationv8 model I started qemu-system-aarch64 > with the command > line: > > ./qemu-system-aarch64 -M virt -cpu host -kernel Image > -serial stdio > -display none -enable-kvm -gdb tcp::1234 -S > > 3. I start debugging the guest kernel with > aarch64-linux-gnu-gdb vmlinux > and with target remote:1234 command. > > However when I set any breakpoint I will get error message: > "Cannot insert breakpoint 1. > Error accessing memory address 0xffffffc000636498: Unknown > error -1" > In addition stepi or any other run related command does > not work. > > You would need to implement breakpoint support for AArch64 in > both KVM and QEMU, I think. That feature is currently not > implemented. > > thanks > -- PMM > > > > -- > Thanks, > Xuebing Wang > > -- Thanks, Xuebing Wang [-- Attachment #2: Type: text/html, Size: 5658 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-28 1:29 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-02-27 9:45 [Qemu-devel] Debugging aarch64 guest running on Foundationv8 model Jani Kokkonen 2014-02-27 9:52 ` Peter Maydell 2014-02-27 13:21 ` Xuebing wang 2014-02-27 15:35 ` Jani Kokkonen 2014-02-28 1:29 ` Xuebing wang
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.