From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71322C433EF for ; Thu, 21 Apr 2022 12:59:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D12A64B267; Thu, 21 Apr 2022 08:59:01 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2viubUDj+Tc7; Thu, 21 Apr 2022 08:59:00 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id AEE3D4B268; Thu, 21 Apr 2022 08:59:00 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 7D0A14B266 for ; Thu, 21 Apr 2022 08:58:59 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5TL2+1fnVgWn for ; Thu, 21 Apr 2022 08:58:58 -0400 (EDT) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 595544B242 for ; Thu, 21 Apr 2022 08:58:58 -0400 (EDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 18C92B82325; Thu, 21 Apr 2022 12:58:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC414C385A5; Thu, 21 Apr 2022 12:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650545935; bh=imOx+6IbsOXhtkahpoBJIda5gKouIVe/i1qrC9ZNDc8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sijovxn5E60I8wMBZ1cLtBJCMum3baxUIzZYbyESNpIm7M+aMO1HjK0UTskZXl9lb lnznSU0zxctlatO3nLkuV2T14n7mFN7Gg6Z9RUlCuO2qbwYiA71ioV4F2QGJu4vtSt Snwhm6AqPaMzm8i83flX1+RD/PTGISjsA/wPc0D62rfLjezG4AdpmoD9yJT6dn1x7I 506mpkFymdfyc4kCzQ1r0hMNzUiIrjiYPtMrREcq5aZawwLIX2bWfAiVt3UJQc3x7T poMIKygjSTGGZpqdvh/g3dty2irEvv8SZpUBe0qHgzEIIfh8P/6yMUCz5j1FbPrcRt 0tcxiwpBRWWQA== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nhWOb-005tF7-2k; Thu, 21 Apr 2022 13:58:53 +0100 Date: Thu, 21 Apr 2022 13:58:52 +0100 Message-ID: <87ee1qa8z7.wl-maz@kernel.org> From: Marc Zyngier To: Alexandru Elisei Subject: Re: [PATCH v2 5/5] KVM: arm64: uapi: Add kvm_debug_exit_arch.hsr_high In-Reply-To: <20220421100547.873761-6-alexandru.elisei@arm.com> References: <20220421100547.873761-1-alexandru.elisei@arm.com> <20220421100547.873761-6-alexandru.elisei@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: alexandru.elisei@arm.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, kvmarm@lists.cs.columbia.edu, mark.rutland@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: catalin.marinas@arm.com, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Thu, 21 Apr 2022 11:05:47 +0100, Alexandru Elisei wrote: > > diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c > index 93d92130d36c..fd5b6773e3a2 100644 > --- a/arch/arm64/kvm/handle_exit.c > +++ b/arch/arm64/kvm/handle_exit.c > @@ -121,6 +121,8 @@ static int kvm_handle_guest_debug(struct kvm_vcpu *vcpu) > > run->exit_reason = KVM_EXIT_DEBUG; > run->debug.arch.hsr = lower_32_bits(esr); > + run->debug.arch.hsr_high = upper_32_bits(esr); > + run->flags |= KVM_DEBUG_ARCH_HSR_HIGH_VALID; Who will eventually clear this flag? I'm concerned that it could be misinterpreted by other userspace paths, as once you get a debug exit on this vcpu, it will always be set. Probably only a matter of clearing flags on all the other exit paths. Also, please document the flag in the API file (only a couple of x86 flags are there so far). Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CA9C6C433F5 for ; Thu, 21 Apr 2022 13:00:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+yLgcW+1DcQ2yJevp6Zt7ey7wTaxAuAu7kA0oM1IR9U=; b=qGjr1y5SKezGW4 Ev3Q5kmg8Ikoc3AQacSffRtT9cMfND6bpn5+4envczPQ9dn2qXctgo4Tkb7L4YGc1VF35W/v+HZ4e E3ChVjI4/BCHPXsUZqf33eO/yFHDjSq+vh7tP3Cn4iivjT5vNdyUVcW5UF2HHlaHxHFHDYgkk58IN 6nSHybjcaXNvoy9TPL+FOzk3gipGx5WyCDx9bRtBDztRLgpa710tUlSm3hNXIKHdTgm4EZpECCt8s uZ6IDXPSCXmaWRHz6M666BBiQif8iTyDq+uJPsv7vFGsbuar0tACc2yv4WRb/vKWdn9JWHvU9oalR 8LyW5JvWO5gh/R2T75LA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhWOj-00DTLo-TH; Thu, 21 Apr 2022 12:59:02 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhWOg-00DTL4-RW for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 12:59:00 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 18C92B82325; Thu, 21 Apr 2022 12:58:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC414C385A5; Thu, 21 Apr 2022 12:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650545935; bh=imOx+6IbsOXhtkahpoBJIda5gKouIVe/i1qrC9ZNDc8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sijovxn5E60I8wMBZ1cLtBJCMum3baxUIzZYbyESNpIm7M+aMO1HjK0UTskZXl9lb lnznSU0zxctlatO3nLkuV2T14n7mFN7Gg6Z9RUlCuO2qbwYiA71ioV4F2QGJu4vtSt Snwhm6AqPaMzm8i83flX1+RD/PTGISjsA/wPc0D62rfLjezG4AdpmoD9yJT6dn1x7I 506mpkFymdfyc4kCzQ1r0hMNzUiIrjiYPtMrREcq5aZawwLIX2bWfAiVt3UJQc3x7T poMIKygjSTGGZpqdvh/g3dty2irEvv8SZpUBe0qHgzEIIfh8P/6yMUCz5j1FbPrcRt 0tcxiwpBRWWQA== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nhWOb-005tF7-2k; Thu, 21 Apr 2022 13:58:53 +0100 Date: Thu, 21 Apr 2022 13:58:52 +0100 Message-ID: <87ee1qa8z7.wl-maz@kernel.org> From: Marc Zyngier To: Alexandru Elisei Cc: catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, kvmarm@lists.cs.columbia.edu, mark.rutland@arm.com Subject: Re: [PATCH v2 5/5] KVM: arm64: uapi: Add kvm_debug_exit_arch.hsr_high In-Reply-To: <20220421100547.873761-6-alexandru.elisei@arm.com> References: <20220421100547.873761-1-alexandru.elisei@arm.com> <20220421100547.873761-6-alexandru.elisei@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: alexandru.elisei@arm.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, kvmarm@lists.cs.columbia.edu, mark.rutland@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_055859_085929_1B819CA8 X-CRM114-Status: GOOD ( 17.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 21 Apr 2022 11:05:47 +0100, Alexandru Elisei wrote: > > diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c > index 93d92130d36c..fd5b6773e3a2 100644 > --- a/arch/arm64/kvm/handle_exit.c > +++ b/arch/arm64/kvm/handle_exit.c > @@ -121,6 +121,8 @@ static int kvm_handle_guest_debug(struct kvm_vcpu *vcpu) > > run->exit_reason = KVM_EXIT_DEBUG; > run->debug.arch.hsr = lower_32_bits(esr); > + run->debug.arch.hsr_high = upper_32_bits(esr); > + run->flags |= KVM_DEBUG_ARCH_HSR_HIGH_VALID; Who will eventually clear this flag? I'm concerned that it could be misinterpreted by other userspace paths, as once you get a debug exit on this vcpu, it will always be set. Probably only a matter of clearing flags on all the other exit paths. Also, please document the flag in the API file (only a couple of x86 flags are there so far). Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel