From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69869 invoked by alias); 21 May 2018 08:27:48 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 68841 invoked by uid 89); 21 May 2018 08:26:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.4 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:901 X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: spamtitan.xlab.si Received: from mx1.xlab.si (HELO spamtitan.xlab.si) (91.217.255.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 May 2018 08:26:13 +0000 X-Virus-Scanned: by SpamTitan at xlab.si Received: from jcpc.xlab.lan (5-255-217-91.xlab.si [91.217.255.5]) by zimbra.xlab.si (Postfix) with ESMTPSA id 63BA55BB3A22 for ; Mon, 21 May 2018 10:26:08 +0200 (CEST) To: elfutils-devel@sourceware.org From: Justin Cinkelj Subject: get backtrace of KVM VM from host Message-ID: <9c68635a-3eac-cee5-d05f-dfc80bdaea2a@xlab.si> Date: Mon, 21 May 2018 08:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-SW-Source: 2018-q2/txt/msg00068.txt.bz2 (crossposting from KVM maillist) Hi Is it possible to get stack backtrace into KVM VM from the host side? So if I run './stack -p PID' (stack from elfutilfs https://sourceware.org/elfutils/), I get backtrace of some process. I would like to do the same for VM. I can assume VM will run only a kernel (a unikernel, like OSv or IncludeOS), so most/all debug symbols will be there in a single file, and at least IncludeOS doesnt load any code beside its own kernel. I did notice KVM_GET_REGS and KVM_SET_MEMORY_REGION, and at least for trivial examples (like https://github.com/dpw/kvm-hello-world) this provides enough information to track which code was loaded into VM, observe current stack content and registers. I can only guess much more work is required to get similar result with qemu-kvm. Hence I'm asking if this is already implemented. Thank you, Justin