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=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham 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 D7050C433ED for ; Mon, 10 May 2021 10:02:07 +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 7A1A261184 for ; Mon, 10 May 2021 10:02:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A1A261184 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:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=d37y2quvzZ6/aRbaV3uoVVC0cpqwj6Zpm1FrbuSn5gw=; b=IZm13RETps6zKzPBG5Avgom+Jc Wfcl+TJNNsbEs9opSESm92rkeGoWq8MRusf7lXqHjWfh5BbKO7IxP+Qd8DlSo8tLN/2QItVw1cS7D LjrUZn4wiJpS2eLuK4QPR/wuM8IgxO3/cUKtk2OY+kb7FP43hSMQs2OZPxeZuTzZko5JO3w7BWPA7 oTn5XUzw1UxMc1s95v+5ouCUk4G7UkUl1VnOhgUQdEEgH+udvA/R80SNV40nAEUAkfGwEQUxasaTR IsWf5LLM//M7tiT1djwiH//iF/qpFAqEAilt1cXPlrNZK/YXGJHDLCPk1BbqlqVsLCDEa2T7LXqZ8 kEKQVJZw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg2iA-00Dquw-5d; Mon, 10 May 2021 10:00:27 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg2Xi-00Dp2L-20 for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 09:49:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=OylF7IXzJ0hie6U+cVG62tNZzdSE3ih3MPVnoih5mXI=; b=dUfZhgnkSnsNGqnbjUVljwZmkc 8YJoqaZmzRqDGUcf1G5zWOpAQdKE5p1DwA+07Uuf9+j+NYHOwo7UMfWVxmTeCa8tZLM1SBc56L6e5 uJ6WibwiUKnQx8W6nVcdGFRRsoeHIgVV1FVANoPKTP02ckLhxzhP4QOm3JSNTqiuwno0pAU/QjJNe CnQ6NoO/0Bd9ZjodzRjnBFTJeY/YheBEl3T0qW9JSrafUyVf4IwGtthVFWqV/V0yWQKxv8JlqV06Q 5G/zZt+ytjA3S4YtHHsUzAWNdIPSANBR9DobkxLx2/zYXzC8h7YJkgewkkfKDQvSxIck5SD4FZtTj KYvdQkCQ==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg2Xf-008Te6-E9 for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 09:49:36 +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 1915F613DC; Mon, 10 May 2021 09:49:35 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) 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 1lg2Xc-000LFh-R6; Mon, 10 May 2021 10:49:32 +0100 From: Marc Zyngier To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Cc: Zenghui Yu , James Morse , Suzuki K Poulose , Alexandru Elisei , kernel-team@android.com Subject: [PATCH 0/2] KVM: arm64: Fixup PC updates on exit to userspace Date: Mon, 10 May 2021 10:49:13 +0100 Message-Id: <20210510094915.1909484-1-maz@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, yuzenghui@huawei.com, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, kernel-team@android.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-20210510_024935_529011_3651E66A X-CRM114-Status: GOOD ( 12.84 ) 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 We recently moved anything related to PC updates into the guest entry code to help with the protected KVM effort. However, I missed a critical point: userspace needs to be able to observe state changes when the vcpu exits. Otherwise, live migration is a bit broken and vcpu reset can fail (as reported by Zenghui). Not good. These two patches aim at fixing the above, and carry a Cc stable. Marc Zyngier (2): KVM: arm64: Move __adjust_pc out of line KVM: arm64: Commit pending PC adjustemnts before returning to userspace arch/arm64/include/asm/kvm_asm.h | 3 +++ arch/arm64/kvm/arm.c | 10 ++++++++++ arch/arm64/kvm/hyp/exception.c | 18 +++++++++++++++++- arch/arm64/kvm/hyp/include/hyp/adjust_pc.h | 18 ------------------ arch/arm64/kvm/hyp/nvhe/hyp-main.c | 8 ++++++++ arch/arm64/kvm/hyp/nvhe/switch.c | 2 +- arch/arm64/kvm/hyp/vhe/switch.c | 2 +- 7 files changed, 40 insertions(+), 21 deletions(-) -- 2.29.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel