Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4050428pxv; Tue, 13 Jul 2021 09:35:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxryN3MTXBYgqPi+x7hIbHux2hKGMnKfuzccGNVSg9JW/MVzV7oH3jaClMybgd/MeogMt+T X-Received: by 2002:a05:6402:411:: with SMTP id q17mr6839389edv.313.1626194144792; Tue, 13 Jul 2021 09:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626194144; cv=none; d=google.com; s=arc-20160816; b=n6rGH0JRakXYgURSx7kNOfcLYuKG0V3qLSCq8G/zwmFyRui2BYfGT0Fh2sguc4ZvjV 4at+ZHSa34+lWjZe31uRDj8HPS6lu4M3r9Qnfjwsrx5Qx8rsJacMQoChKmW25G4WmIzz UVucQIje1xWO0tBuXHytl8ArFp2TsTjH/1nWZY89Jhm01sq8Jjs0wwED6FOYHwsYdugp Oyp6dg00rKME5M8n5FqmkHg0sB3OoLdR/svWIAWei83j9J9x++Ldl7kjlqmAbIhSsj8R SKU4MKr9qqBjCk+dG5KBNhyyQPPpQA5JTbbfR2bKAN/muHWSZhedUClO/yADwQdYjpSj 6okw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:reply-to:dkim-signature; bh=Yi6bDLPGCrbqS09Vb1Q1YxAsIO5UfWIqGpJKeQgB6SM=; b=hSxhGBg/uk29vNgwAm/Xi5R7upr5Yhs7et+TdvQI7qlASk+jCHkmhOqus32DoMXUXd 4rlkePd9xAtL2X3i4CW2kyNwuXNJwSH0VaGkv03t+pjdlYy7i+owNDTx+JhLWptk9eC+ H3ywbp9EhQnhPx5i9wOPFZA64xJCT3Q65UquZRRxIgqyVqCm6885Ov2XGqZAtKZ2NBd0 HVYfU0be0Z+PraD2/IvK55S71AvMgPpVA9qANzaplkJCn7ACHZFVI8LLO7/Yi4pE6al1 2nnDCHzdxNRQmkIoeI/QYkDl01v/DWQeDD6VGgdT6oYSXjcSKK+Dos0HJ4/OBWC6i6bQ pSeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=IVnOLNaL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ci13si356400ejc.316.2021.07.13.09.35.19; Tue, 13 Jul 2021 09:35:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=IVnOLNaL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234005AbhGMQgp (ORCPT + 99 others); Tue, 13 Jul 2021 12:36:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233455AbhGMQgl (ORCPT ); Tue, 13 Jul 2021 12:36:41 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE1FDC0613A7 for ; Tue, 13 Jul 2021 09:33:50 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id j186-20020a25d2c30000b029055ed6ffbea6so20160411ybg.14 for ; Tue, 13 Jul 2021 09:33:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=Yi6bDLPGCrbqS09Vb1Q1YxAsIO5UfWIqGpJKeQgB6SM=; b=IVnOLNaL2eWedum/MsETC2COPdFjr41LCUU0dWy0VQ24GHK+90gGUlHlDQeoU8HW1d mmZ1yZqe9nXwNxMCwWOpj3gCIcVAat5HY7uNR5tiFwITBNaq+DXV9yOhggr1MdNKUb/g QrqZ1ZNJHkRub0g1yBYxgv51Da5cgu4KZ4YESMWLgP8GrcT3ARqrjmmwA0JbSFfCbLFM 026R2zcJndSlaBgezEKyQObEjkqDmPNqUxBbPJAwDunR+PPzo8UceXVLjBwkpicIxDvF 1J5/mCRFFkGEHBcITYmPmDxZEtL2Ov1hnEOlpQd5OBFvhuVAP7y35LmQTsxHT74r0uUB +61w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=Yi6bDLPGCrbqS09Vb1Q1YxAsIO5UfWIqGpJKeQgB6SM=; b=ZZBtPQAFKp9Xl60bZnEoz7crc7xGY1RnTxUJKiz4dTF/xPyG04l9UoRBSEUAo2Xbns dHkMT+DViJZeF7dfvGvxazSW8Ge0ZYa2fTzSigbZxSvMo4gjvIIUAUUbGCWYI8KYer0Y xnxA3exVL2RyhcWWHPKEMr3BTgqTSBROthjtg1dS6LBQVYWdODrHQgBUeSdlekJZzHP4 1z62lCzqFRrBPtlb3JbfXtpKpqxmXCMduaa7sRLBobAzuEMqOuiOxRajcODGEioQqMPH ueymWpahFCE4S6uHFnSK5PlU79r0vHvwmkJ7EVNuBiBnJMN6BOsMBt14iyGCVJxBJcGB Wzew== X-Gm-Message-State: AOAM530qNwwf6x1DoGCg5dTopXCP4coiVsKBKdrlPL2UTYmz1k1XazpA chvbRm3e3BUQpoHoyBkJ1QefVuwvreE= X-Received: from seanjc798194.pdx.corp.google.com ([2620:15c:90:200:825e:11a1:364b:8109]) (user=seanjc job=sendgmr) by 2002:a25:550:: with SMTP id 77mr7152673ybf.452.1626194030009; Tue, 13 Jul 2021 09:33:50 -0700 (PDT) Reply-To: Sean Christopherson Date: Tue, 13 Jul 2021 09:32:46 -0700 In-Reply-To: <20210713163324.627647-1-seanjc@google.com> Message-Id: <20210713163324.627647-9-seanjc@google.com> Mime-Version: 1.0 References: <20210713163324.627647-1-seanjc@google.com> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog Subject: [PATCH v2 08/46] KVM: SVM: Drop explicit MMU reset at RESET/INIT From: Sean Christopherson To: Paolo Bonzini Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Reiji Watanabe Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Drop an explicit MMU reset in SVM's vCPU RESET/INIT flow now that the common x86 path correctly handles conditional MMU resets, e.g. if INIT arrives while the vCPU is in 64-bit mode. This reverts commit ebae871a509d ("kvm: svm: reset mmu on VCPU reset"). Reviewed-by: Reiji Watanabe Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm/svm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 7da214660c64..44248548be7d 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -1274,7 +1274,6 @@ static void init_vmcb(struct kvm_vcpu *vcpu) * It also updates the guest-visible cr0 value. */ svm_set_cr0(vcpu, X86_CR0_NW | X86_CR0_CD | X86_CR0_ET); - kvm_mmu_reset_context(vcpu); save->cr4 = X86_CR4_PAE; -- 2.32.0.93.g670b81a890-goog