From patchwork Mon Feb 7 15:54:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 12737566 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 DFE8BC433EF for ; Mon, 7 Feb 2022 16:05:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242326AbiBGQD5 (ORCPT ); Mon, 7 Feb 2022 11:03:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377047AbiBGPzF (ORCPT ); Mon, 7 Feb 2022 10:55:05 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C349EC0401DC for ; Mon, 7 Feb 2022 07:55:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644249303; 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=ckLuH3eXQt4Wu9Nzp1D8ksAkv1tHukiQ+KMKFiTtdwY=; b=cIx6hvdW99GeleJU4jRK3RUHgV40wH49QCk2UgtyVVxMq7fkD+K5V9JcxmG1r6jcYVKWXm h72qR6Uim788LQWPXDR/cCOy9iohJUdxq1+plDA3TTh1iSQAavw3LnQOSFiocbajLhCulu eCqL8sWlE5+biPjldKlyHuETyp9qw7Y= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-277-3oJzETgWM123BYxoIWYJeQ-1; Mon, 07 Feb 2022 10:55:00 -0500 X-MC-Unique: 3oJzETgWM123BYxoIWYJeQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EAE56100C609; Mon, 7 Feb 2022 15:54:56 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 182D87DE5F; Mon, 7 Feb 2022 15:54:48 +0000 (UTC) From: Maxim Levitsky To: kvm@vger.kernel.org Cc: Tony Luck , "Chang S. Bae" , Thomas Gleixner , Wanpeng Li , Ingo Molnar , Vitaly Kuznetsov , Pawan Gupta , Dave Hansen , Paolo Bonzini , linux-kernel@vger.kernel.org, Rodrigo Vivi , "H. Peter Anvin" , intel-gvt-dev@lists.freedesktop.org, Joonas Lahtinen , Joerg Roedel , Sean Christopherson , David Airlie , Zhi Wang , Brijesh Singh , Jim Mattson , x86@kernel.org, Daniel Vetter , Borislav Petkov , Zhenyu Wang , Kan Liang , Jani Nikula , Maxim Levitsky Subject: [PATCH RESEND 00/30] My patch queue Date: Mon, 7 Feb 2022 17:54:17 +0200 Message-Id: <20220207155447.840194-1-mlevitsk@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This is set of various patches that are stuck in my patch queue. KVM_REQ_GET_NESTED_STATE_PAGES patch is mostly RFC, but it does seem to work for me. Read-only APIC ID is also somewhat RFC. Some of these patches are preparation for support for nested AVIC which I almost done developing, and will start testing very soon. Resend with cleaned up CCs. Best regards, Maxim Levitsky Maxim Levitsky (30): KVM: x86: SVM: don't passthrough SMAP/SMEP/PKE bits in !NPT && !gCR0.PG case KVM: x86: nSVM: fix potential NULL derefernce on nested migration KVM: x86: nSVM: mark vmcb01 as dirty when restoring SMM saved state KVM: x86: nSVM/nVMX: set nested_run_pending on VM entry which is a result of RSM KVM: x86: nSVM: expose clean bit support to the guest KVM: x86: mark syntethic SMM vmexit as SVM_EXIT_SW KVM: x86: nSVM: deal with L1 hypervisor that intercepts interrupts but lets L2 control them KVM: x86: lapic: don't touch irr_pending in kvm_apic_update_apicv when inhibiting it KVM: x86: SVM: move avic definitions from AMD's spec to svm.h KVM: x86: SVM: fix race between interrupt delivery and AVIC inhibition KVM: x86: SVM: use vmcb01 in avic_init_vmcb KVM: x86: SVM: allow AVIC to co-exist with a nested guest running KVM: x86: lapic: don't allow to change APIC ID when apic acceleration is enabled KVM: x86: lapic: don't allow to change local apic id when using older x2apic api KVM: x86: SVM: remove avic's broken code that updated APIC ID KVM: x86: SVM: allow to force AVIC to be enabled KVM: x86: mmu: trace kvm_mmu_set_spte after the new SPTE was set KVM: x86: mmu: add strict mmu mode KVM: x86: mmu: add gfn_in_memslot helper KVM: x86: mmu: allow to enable write tracking externally x86: KVMGT: use kvm_page_track_write_tracking_enable KVM: x86: nSVM: correctly virtualize LBR msrs when L2 is running KVM: x86: nSVM: implement nested LBR virtualization KVM: x86: nSVM: implement nested VMLOAD/VMSAVE KVM: x86: nSVM: support PAUSE filter threshold and count when cpu_pm=on KVM: x86: nSVM: implement nested vGIF KVM: x86: add force_intercept_exceptions_mask KVM: SVM: implement force_intercept_exceptions_mask KVM: VMX: implement force_intercept_exceptions_mask KVM: x86: get rid of KVM_REQ_GET_NESTED_STATE_PAGES arch/x86/include/asm/kvm-x86-ops.h | 1 + arch/x86/include/asm/kvm_host.h | 24 +- arch/x86/include/asm/kvm_page_track.h | 1 + arch/x86/include/asm/msr-index.h | 1 + arch/x86/include/asm/svm.h | 36 +++ arch/x86/include/uapi/asm/kvm.h | 1 + arch/x86/kvm/Kconfig | 3 - arch/x86/kvm/hyperv.c | 4 + arch/x86/kvm/lapic.c | 53 ++-- arch/x86/kvm/mmu.h | 8 +- arch/x86/kvm/mmu/mmu.c | 31 ++- arch/x86/kvm/mmu/page_track.c | 10 +- arch/x86/kvm/svm/avic.c | 135 +++------- arch/x86/kvm/svm/nested.c | 167 +++++++----- arch/x86/kvm/svm/svm.c | 375 ++++++++++++++++++++++---- arch/x86/kvm/svm/svm.h | 60 +++-- arch/x86/kvm/svm/svm_onhyperv.c | 1 + arch/x86/kvm/vmx/nested.c | 107 +++----- arch/x86/kvm/vmx/vmcs.h | 6 + arch/x86/kvm/vmx/vmx.c | 48 +++- arch/x86/kvm/x86.c | 42 ++- arch/x86/kvm/x86.h | 5 + drivers/gpu/drm/i915/Kconfig | 1 - drivers/gpu/drm/i915/gvt/kvmgt.c | 5 + include/linux/kvm_host.h | 10 +- 25 files changed, 764 insertions(+), 371 deletions(-)