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=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 769A4C4361B for ; Mon, 14 Dec 2020 18:35:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 325D82250F for ; Mon, 14 Dec 2020 18:35:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440937AbgLNSfE (ORCPT ); Mon, 14 Dec 2020 13:35:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40636 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440918AbgLNSea (ORCPT ); Mon, 14 Dec 2020 13:34:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607970784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=xkuYtdLf6aD5g/AJsimLnGfHqBLSAGTfbX/Ao9PPeSQ=; b=VQk6eYgo+G3drawbIbMSyALRgx0T29+BngPdDDhlqnONza1nR90Dmuf+dy8055moaM4Fp8 7rGdsjh0WI2C1p2p79H3q4KaQcN0FtOrrOuoH+M0nTWkEiLMA5rnyeRsjRJANH0RfIsPwm MPSO0FB6tE1OweXlSCUBYoJVmeEZUmg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-323-xMThsjC3OO66Xqsd14h6wA-1; Mon, 14 Dec 2020 13:32:53 -0500 X-MC-Unique: xMThsjC3OO66Xqsd14h6wA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 005D6180A0AA; Mon, 14 Dec 2020 18:32:52 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67D73100AE36; Mon, 14 Dec 2020 18:32:51 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Sean Christopherson , Alexander Graf , Tom Lendacky Subject: [PATCH 0/3] KVM: x86: MSR completion refactoring for SEV-ES Date: Mon, 14 Dec 2020 13:32:47 -0500 Message-Id: <20201214183250.1034541-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These patches remove kvm_inject_gp from the RDMSR/WRMSR emulation path, with the purpose of letting SEV-ES inject the #GP through the GHCB instead. The main idea is to introduce a complete_emulated_msr callback that is call-compatible with kvm_complete_insn_gp, so that svm.c can just call kvm_complete_insn_gp in the common case. I have more patches to use kvm_complete_insn_gp instead of kvm_inject_gp in other paths, but they are not necessary for SEV-ES so they can be delayed to 5.12. Paolo Paolo Bonzini (3): KVM: x86: remove bogus #GP injection KVM: x86: use kvm_complete_insn_gp in emulating RDMSR/WRMSR KVM: x86: introduce complete_emulated_msr callback arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/mtrr.c | 6 +---- arch/x86/kvm/svm/svm.c | 1 + arch/x86/kvm/vmx/vmx.c | 1 + arch/x86/kvm/x86.c | 42 +++++++++++++-------------------- 5 files changed, 20 insertions(+), 31 deletions(-) -- 2.26.2