Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1702121ybh; Tue, 14 Jul 2020 05:14:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynVduBI/xptEMkx3k6r5diq0/jgEDWydeQzGsIFzRvUm44md3h52/yeh7QBsJJmBzfLrsE X-Received: by 2002:aa7:c5d4:: with SMTP id h20mr4105855eds.115.1594728858305; Tue, 14 Jul 2020 05:14:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594728858; cv=none; d=google.com; s=arc-20160816; b=G5SC2kQ7HtbtQpeDYkUfvXSBdwXc+kFIDt28FzsAJ5ATj2j552yd27vUqZkC9mX2Ft hcjS/SEPOCZkZiQKYLYy17+bD0obA34Qal7rrE6HpdaCa3lmIqpNNuR+Sx6ujVCkWYBO iqa74bM8yzUoohZobZ4CYXrhtOLaM8sneS2kvi2zRfhG+pWBk6/31NvVTHNzpnh0nuXp 6x4KwOCEeZlmth3H0f9LH9lYHuQcQ7ztgs5S1sMTMtmTxufykWZpVdP+iy6+L3Z7DOHi ims4tR3FdiNLrfl67AD9+d/hXlqpA+YDBbCOos41gM94uR9/zGu+gNuqiPzC/cTNW8wn JEeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=DWfKTMUidwM0YKNADhMKAP88dlF5OaG5jwgJEESZ0Y4=; b=ssqhvLaDpZukyCzjypBDMQ6htYIcjbEH0eLBdB5NX0GYoAm4lzoAX3IRalJ24Yv6R0 MJjhtGbwbgOnafGPkrrsUhfbKvhIGxeYmrRUnZ2k0MsNR7iE1sQTP1wNN5uMSIXFlmki PHAXhqEpEsWmr1i6yGAyrBB38Bvgyc6vGRrVuQKDL/CgUPuxe2g+wl5u/pPLFJMVYuhk 2BayOwnSUFdwI4nvkRtHzCzvBOPK6VXpJI1IBr8/GZnHLRd/VytduvmW3c9uUhQvq+78 GsdV0fWJ1rdVlRmQ+4EP25NbHKUkrH7W0yXu/MiMJyNdsuuaMcS0z3PJIuqTUD4Fkndk MBkQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n5si10750083ejc.171.2020.07.14.05.13.53; Tue, 14 Jul 2020 05:14:18 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728836AbgGNMMx (ORCPT + 99 others); Tue, 14 Jul 2020 08:12:53 -0400 Received: from 8bytes.org ([81.169.241.247]:53376 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728515AbgGNMLM (ORCPT ); Tue, 14 Jul 2020 08:11:12 -0400 Received: from cap.home.8bytes.org (p5b006776.dip0.t-ipconnect.de [91.0.103.118]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by theia.8bytes.org (Postfix) with ESMTPSA id 255EFFCE; Tue, 14 Jul 2020 14:11:05 +0200 (CEST) From: Joerg Roedel To: x86@kernel.org Cc: Joerg Roedel , Joerg Roedel , Tom Lendacky , hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: [PATCH v4 58/75] x86/sev-es: Handle INVD Events Date: Tue, 14 Jul 2020 14:09:00 +0200 Message-Id: <20200714120917.11253-59-joro@8bytes.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200714120917.11253-1-joro@8bytes.org> References: <20200714120917.11253-1-joro@8bytes.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tom Lendacky Implement a handler for #VC exceptions caused by INVD instructions. Since Linux should never use INVD, just mark it as unsupported. Signed-off-by: Tom Lendacky [ jroedel@suse.de: Adapt to #VC handling infrastructure ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel --- arch/x86/kernel/sev-es.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/kernel/sev-es.c b/arch/x86/kernel/sev-es.c index 6258bc8074fd..30d6161deada 100644 --- a/arch/x86/kernel/sev-es.c +++ b/arch/x86/kernel/sev-es.c @@ -898,6 +898,10 @@ static enum es_result vc_handle_exitcode(struct es_em_ctxt *ctxt, case SVM_EXIT_RDPMC: result = vc_handle_rdpmc(ghcb, ctxt); break; + case SVM_EXIT_INVD: + pr_err_ratelimited("#VC exception for INVD??? Seriously???\n"); + result = ES_UNSUPPORTED; + break; case SVM_EXIT_CPUID: result = vc_handle_cpuid(ghcb, ctxt); break; -- 2.27.0