From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: Exposing host debug capabilities to userspace Date: Mon, 24 Nov 2014 13:26:19 +0100 Message-ID: <547323EB.6070203@suse.de> References: <87mw7l3j7x.fsf@linaro.org> <87egssn91o.fsf@zen.linaro.local.i-did-not-set--mail-host-address--so-tickle-me> <87d28cn84s.fsf@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvmarm@lists.cs.columbia.edu, KVM devel mailing list To: =?UTF-8?B?QWxleCBCZW5uw6ll?= , Will Deacon , Marc Zyngier , Christoffer Dall , Peter Maydell , Paolo Bonzini Return-path: Received: from cantor2.suse.de ([195.135.220.15]:41751 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750966AbaKXM0V (ORCPT ); Mon, 24 Nov 2014 07:26:21 -0500 In-Reply-To: <87d28cn84s.fsf@linaro.org> Sender: kvm-owner@vger.kernel.org List-ID: On 24.11.14 12:35, Alex Benn=C3=A9e wrote: >=20 > Fixed CC:kvmarm, Added: Alexander Graf, Fixed: my From: >=20 > Replying to myself with additional information on each option >=20 > Alex Benn=C3=A9e writes: >=20 >> Hi, >> >> I've almost finished the ARMv8 guest debug support but I have one >> problem left to solve. userspace needs to know how many hardware deb= ug >> registers are available for GDB to use. This information is availabl= e >> from the ID_AA64DFR0_EL1 register. Currently I abuse GET_ONE_REG to >> fetch it's value however semantically this is poor as it's API is fo= r >> getting guest state not host state and they could theoretically have >> different values. >> >> So far the options I've examined are: >> >> * KVM ioctl GET_ONE_REG(ID_AA64DFR0_EL1) > Nope, guest state API What's the problem with using ONE_REG for this? After all, the total number of available guest debug register is a guest vcpu property of some sort. Btw, looking through the mess that we have today with asymmetric SET_GUEST_DEBUG and GET_DEBUGREGS ioctls I can't shake off the feeling that we're best off just doing all of the debug register sync via ONE_REGs. That way we at least have a guaranteed symmetric interface that can get and set values, so we won't trip over it on live migration= =2E Alex