From patchwork Thu Sep 28 17:33:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 13403361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C573DE732FE for ; Thu, 28 Sep 2023 17:35:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232130AbjI1Rf7 (ORCPT ); Thu, 28 Sep 2023 13:35:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232161AbjI1Rfx (ORCPT ); Thu, 28 Sep 2023 13:35:53 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B7501B2 for ; Thu, 28 Sep 2023 10:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695922506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X1WRNiJYKhsjhu9PboPlV47UeY0+Yci+Xnu7y1tiVFc=; b=immoPGkNRDY5tsA3ceyg4tSzANa4BO72Jej4jjTjQpvfm3PrcMuiiAd4nbPdOdXkNghHEk pLoLGEazWTncBLamhDJZVkr7++vdNgDjj0OAu7BHoEyLYjXAFo6xdfCAsOyAtBac/YtsYW iEYkzjE6laTSViR3/ZmdSYYX5WHk8oc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-2-PukTvQVcMWqAKQ7ZZyw2rA-1; Thu, 28 Sep 2023 13:33:59 -0400 X-MC-Unique: PukTvQVcMWqAKQ7ZZyw2rA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1D56B85A5BF; Thu, 28 Sep 2023 17:33:59 +0000 (UTC) Received: from localhost.localdomain (unknown [10.45.226.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69CFE14171B6; Thu, 28 Sep 2023 17:33:55 +0000 (UTC) From: Maxim Levitsky To: kvm@vger.kernel.org Cc: iommu@lists.linux.dev, "H. Peter Anvin" , Sean Christopherson , Maxim Levitsky , Paolo Bonzini , Thomas Gleixner , Borislav Petkov , Joerg Roedel , x86@kernel.org, Suravee Suthikulpanit , linux-kernel@vger.kernel.org, Dave Hansen , Will Deacon , Ingo Molnar , Robin Murphy Subject: [PATCH v2 0/4] AVIC bugfixes and workarounds Date: Thu, 28 Sep 2023 20:33:50 +0300 Message-Id: <20230928173354.217464-1-mlevitsk@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This patch series includes several fixes to AVIC I found while working on a new version of nested AVIC code. Also while developing it I realized that a very simple workaround for AVIC's errata #1235 exists and included it in this patch series as well. changes since v2: - added 'fixes' tags - reworked workaround for avic errata #1235 - dropped iommu patch as it is no longer needed. Best regards, Maxim Levitsky Maxim Levitsky (4): x86: KVM: SVM: always update the x2avic msr interception x86: KVM: SVM: add support for Invalid IPI Vector interception x86: KVM: SVM: refresh AVIC inhibition in svm_leave_nested() x86: KVM: SVM: workaround for AVIC's errata #1235 arch/x86/include/asm/svm.h | 1 + arch/x86/kvm/svm/avic.c | 68 +++++++++++++++++++++++++++----------- arch/x86/kvm/svm/nested.c | 3 ++ arch/x86/kvm/svm/svm.c | 3 +- arch/x86/kvm/svm/svm.h | 1 + 5 files changed, 55 insertions(+), 21 deletions(-)