Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1419573rdh; Fri, 27 Oct 2023 13:50:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHg+/N4fogkA5ojHMjgFbVLS4KA0M+FLWHcTtkL7ezi8u0fjKVt81T8S/1Hbc8M2qYmJY4t X-Received: by 2002:a05:690c:f0c:b0:573:30c8:6e1d with SMTP id dc12-20020a05690c0f0c00b0057330c86e1dmr4908374ywb.44.1698439820257; Fri, 27 Oct 2023 13:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698439820; cv=none; d=google.com; s=arc-20160816; b=VZsM2BJJzebJOwOVaVl4otNZSQz4yAr/BCRuaWFkiA11/aoFEQxxQ2aerblrk2Sic3 VxOkOtdbD/xu2C6c+ugsmCpdbTxiID9LrH4LeP3Xahem3MQoNFnC2lAw54CQdiXtNlxY 93gqQlFlQ4r5f2ic+HV602s1agb5vKuPcd1na0tNl/THp5lV19eAV2gqXj1ihdK7mBU7 Z5WJkvVvfg92T9iUnbM353bxLQZRlO0pJOCPr7tXkkMv9W/jeSpU302EyUEaPfmaM2S1 2Ic8RC+45FyOZrFrMhl7p67lqGkjFAC0TjyfmoJg6GhIG6cHqTq94ox2DtW18bvtLiOt oa+A== 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:message-id:references :mime-version:in-reply-to:date:reply-to:dkim-signature; bh=Ojvpxtx2aV2Xt8Hg6l62FzxVHJA7YGTaVrWAGxNmS6o=; fh=dogxdQWc7Q2U5Ekp9F18wEHwMgE3kRwQ/60KgTj3654=; b=RiCb0tL6oXuPXBwe2iQj3xJBQ0uFcc9AY3CIagVr9KjTXZBdWAPexoJXeOEYxXr2Hv iOske/7CqYyELac4RNB9f/z1exQd1IDhGPX8rBb8FT1jW84wZu8w4jMoGmQYjchbWswr zmuGK9+0G0HEXl5jH0VcZfMANepV2pA9ss2E2OHwPoquISCpfeaiAyRItjrRQzo2esUE lCQ8xNs2GtCwhjcgYISq3Grx7hos3Ak5b2FA9VBpYmQEfZJhbSD9YYmBVdvpVRqNJIvN 1XNPslP9dPZLo+CNo/HnOBawDGxt5xK8JNbf0iExYp70MiDgbbhmYhZN9AMnnDdqgTmN poPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=D+P5yXyP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o125-20020a0de583000000b0059f80804423si3722167ywe.575.2023.10.27.13.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 13:50:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=D+P5yXyP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EF21282EDB08; Fri, 27 Oct 2023 13:50:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346563AbjJ0UuH (ORCPT + 99 others); Fri, 27 Oct 2023 16:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235085AbjJ0UuA (ORCPT ); Fri, 27 Oct 2023 16:50:00 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F90B10D1 for ; Fri, 27 Oct 2023 13:49:49 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5afbcffe454so13533137b3.3 for ; Fri, 27 Oct 2023 13:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698439788; x=1699044588; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=Ojvpxtx2aV2Xt8Hg6l62FzxVHJA7YGTaVrWAGxNmS6o=; b=D+P5yXyPg3ZrbqNVnHi5iLvsS6UKb+Kvz+LiNqItDFI9NyY5uRPT6XkQ1PLnmN8qKo 0P1W5JC2YnpCxaZjP6JGctx5uPPUs2Hm9Jcq0/1KwoMsYaAR38qhgfuD7pQzLyKTmt/c LJ0Ngrxk4nw/DhetWd42rji1b9uVPaYupLc8UXbzLD24toQtpMztvQBzHJzyGgCHQAnw WhKIA08RS6BYWJqb+eZVE7CrvrjKknw49Tqfj+IQlm90ZUWH64oX6HRkNqYWAJZxo1+F TzavwaKwYT8ftLxAoI8h78e5+MDxjE3tV9sGPipzYQHZAbiJDqmzFvWbl8aKU/SzuCit Ae2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698439788; x=1699044588; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ojvpxtx2aV2Xt8Hg6l62FzxVHJA7YGTaVrWAGxNmS6o=; b=NNJIHnQGAv+o1co8XB/5S4zMa1Kgs8RstVlsuGDFCtBz2DfC8q2D0TqZw+4TFxKFaY MutDNtpttRM9Nhtbx4/Ie6G3Iy3+F8QSdDRa73KCUny0vIS1L1VwnN/DRnAT8Nc/GHgq oScvoihuPbgGYer0YosVXxEeqHDIWyYKjEjzlD8a/HPByf1e0PAMHjRCus+oAPAvhwEV LQaKIBOTYZEir7xrsuG+gG7c41nPSWiROOmiN2qPOrgLB/i2i4b25rH1KrIsdQneuPq2 mEisrG30mxW4f1E6M9+avJDAbGgNPCkbj1Sc/dyWSTnzPcKfg9896gKHWuBbSKySaH2Y NchA== X-Gm-Message-State: AOJu0YxRx7poKKlXoB96JTO/k+VfkgSb7v2yQkmNHWZ0eVk/MIdNS/c9 7NrqEfH1dAL867HooZIlHSUB1Ezu5Jw= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a81:a046:0:b0:58c:b45f:3e94 with SMTP id x67-20020a81a046000000b0058cb45f3e94mr72219ywg.8.1698439788736; Fri, 27 Oct 2023 13:49:48 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 27 Oct 2023 13:49:30 -0700 In-Reply-To: <20231027204933.3651381-1-seanjc@google.com> Mime-Version: 1.0 References: <20231027204933.3651381-1-seanjc@google.com> X-Mailer: git-send-email 2.42.0.820.g83a721a137-goog Message-ID: <20231027204933.3651381-7-seanjc@google.com> Subject: [GIT PULL] KVM: x86: SVM changes for 6.7 From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 27 Oct 2023 13:50:19 -0700 (PDT) An enhancement to help userspace deal with SEV-ES guest crashes, and cleanups related to not being able to do "skip" emulation for SEV guests. The following changes since commit 5804c19b80bf625c6a9925317f845e497434d6d3: Merge tag 'kvm-riscv-fixes-6.6-1' of https://github.com/kvm-riscv/linux into HEAD (2023-09-23 05:35:55 -0400) are available in the Git repository at: https://github.com/kvm-x86/linux.git tags/kvm-x86-svm-6.7 for you to fetch changes up to 00682995409696866fe43984c74c8688bdf8f0a5: KVM: SVM: Treat all "skip" emulation for SEV guests as outright failures (2023-10-04 15:08:53 -0700) ---------------------------------------------------------------- KVM SVM changes for 6.7: - Report KVM_EXIT_SHUTDOWN instead of EINVAL if KVM intercepts SHUTDOWN while running an SEV-ES guest. - Clean up handling "failures" when KVM detects it can't emulate the "skip" action for an instruction that has already been partially emulated. Drop a hack in the SVM code that was fudging around the emulator code not giving SVM enough information to do the right thing. ---------------------------------------------------------------- Peter Gonda (1): KVM: SVM: Update SEV-ES shutdown intercepts with more metadata Sean Christopherson (2): KVM: x86: Refactor can_emulate_instruction() return to be more expressive KVM: SVM: Treat all "skip" emulation for SEV guests as outright failures arch/x86/include/asm/kvm-x86-ops.h | 2 +- arch/x86/include/asm/kvm_host.h | 4 +-- arch/x86/kvm/svm/svm.c | 50 ++++++++++++++++---------------------- arch/x86/kvm/vmx/vmx.c | 12 ++++----- arch/x86/kvm/x86.c | 22 +++++++++++------ 5 files changed, 45 insertions(+), 45 deletions(-)