From patchwork Mon Aug 5 12:15:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 11076673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6B45F13B1 for ; Mon, 5 Aug 2019 12:16:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58583283AF for ; Mon, 5 Aug 2019 12:16:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CF4A2870D; Mon, 5 Aug 2019 12:16:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2BE8283AF for ; Mon, 5 Aug 2019 12:16:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728483AbfHEMQR (ORCPT ); Mon, 5 Aug 2019 08:16:17 -0400 Received: from foss.arm.com ([217.140.110.172]:47188 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727349AbfHEMQR (ORCPT ); Mon, 5 Aug 2019 08:16:17 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 363CC337; Mon, 5 Aug 2019 05:16:17 -0700 (PDT) Received: from filthy-habits.cambridge.arm.com (filthy-habits.cambridge.arm.com [10.1.197.61]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0EE773F706; Mon, 5 Aug 2019 05:16:15 -0700 (PDT) From: Marc Zyngier To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Cc: Zenghui Yu , Andrew Jones , Suzuki K Poulose , James Morse , Julien Thierry Subject: [PATCH 0/2] KVM: arm/arm64: Revamp sysreg reset checks Date: Mon, 5 Aug 2019 13:15:53 +0100 Message-Id: <20190805121555.130897-1-maz@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The way we deal with sysreg reset is terrible, as we write junk to them while other parts of the system may be evaluating these. That's obviously wrong. Instead, let's switch to a mode where we track which sysregs have had a reset function applied to them. The result is less bad, but my gut feeling is that we'd be better of without any of this. Comments welcome. Marc Zyngier (2): KVM: arm64: Don't write junk to sysregs on reset KVM: arm: Don't write junk to CP15 registers on reset arch/arm/kvm/coproc.c | 23 +++++++++++++++-------- arch/arm64/kvm/sys_regs.c | 32 ++++++++++++++++++-------------- 2 files changed, 33 insertions(+), 22 deletions(-)