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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24C0AC43460 for ; Thu, 1 Apr 2021 15:28:13 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 558DE6128A for ; Thu, 1 Apr 2021 15:28:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 558DE6128A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=X/YEDtpn2b0jlQrZdnFwQqo4z9F7es3hghue8AfYLyY=; b=NrjfdaAWSrn5XKGhH3CndKJ8X dXB+f7MZvMX4YHe+KNdMc/g7kuRVpIGp4VhddJTs7d2liD2P5EXyzV4K0afEp4khAOJASJPFORqK1 kNqTi9ECtSWGa8ncErz9Gfh8nn63lHuveW/JKeU9eKIJNMVBSFuKCK64YPHzJw2PwGyUXiGs/2B7y MelwvW0wvnKiZa2DOn6sheEDoaHDvpJbgKAEYf7i1jTBvKiRh7fBX4++BO2j0I3qqRBmANsS80/a6 V0wtn20sdFAwy9R0UHGUSKLnzPxlAtDCs5Fepx1ZsqfNznBT0X/ZJyiRk9Lj+kSPcS8EE/pLK4dWz EORjE0mRA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRzDK-00A0rw-Cb; Thu, 01 Apr 2021 15:26:30 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRz9g-00A09y-Pv for linux-arm-kernel@lists.infradead.org; Thu, 01 Apr 2021 15:22:49 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D29D461370; Thu, 1 Apr 2021 15:22:42 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] 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) (envelope-from ) id 1lRz9c-0057KI-M2; Thu, 01 Apr 2021 16:22:40 +0100 Date: Thu, 01 Apr 2021 16:22:40 +0100 Message-ID: <87r1juowqn.wl-maz@kernel.org> From: Marc Zyngier To: Alexandru Elisei Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2] KVM: arm64: Initialize VCPU mdcr_el2 before loading it In-Reply-To: References: <20210323180057.263356-1-alexandru.elisei@arm.com> <87sg4dq83r.wl-maz@kernel.org> <5cfd4870-db31-cd7d-699f-bd70a1ab90fe@arm.com> <5c90a3b2-c9a8-640b-fb6a-7a09d397ba7f@arm.com> <87lfa4fm8u.wl-maz@kernel.org> 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: 62.31.163.78 X-SA-Exim-Rcpt-To: alexandru.elisei@arm.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org 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-20210401_162245_313580_36B54D74 X-CRM114-Status: GOOD ( 17.97 ) 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, 01 Apr 2021 14:55:54 +0100, Alexandru Elisei wrote: [...] > Had another go at this, and as I was looking at the code, I realized that > conceptually, trapping debug registers access (MDCR_EL2.TDA) is tied to: > > - KVM_ARM64_DEBUG_DIRTY *not* being set (guest is debugging itself and KVM will > world-switch the debug registers). > > - KVM_GUESTDBG_USE_HW being set, which also *sets* KVM_ARM64_DEBUG_DIRTY (host is > debugging the guest using hardware breakpoints). > > So I cannot set the MDCR_EL2.TDA bit based on KVM_ARM64_DEBUG_DIRTY, > because I would lose one of the two cases. It looks to me that > keeping kvm_arm_setup_mdcr_el2() unchanged and calling it at the > start of kvm_arm_setup_debug() is the way to go here. Just post the revised patch, and we'll take it from there. 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