From patchwork Mon Nov 1 14:03:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 12596471 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6665BC433F5 for ; Mon, 1 Nov 2021 14:03:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43F8D610A0 for ; Mon, 1 Nov 2021 14:03:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231906AbhKAOGa (ORCPT ); Mon, 1 Nov 2021 10:06:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47636 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231366AbhKAOGa (ORCPT ); Mon, 1 Nov 2021 10:06:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635775436; 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=lHflTYf5NLbENikWzp+YZTdDYwuB7z5GdZSkSzXcqu8=; b=D3ZFw3lFpf/Y4UjvmWXkzbmc8+V4ZAVrq5X5/YiWia7c/WJ99nCzJr675HcPiqoa6sSfKs t/Mr3jP+fGbxZk8kXILqw7DrSuPO1m+wOonxsW8AgqSV2fNLEaEiTZMRP8ySI74k99RusM IbqVxaXSn4xES8HkAbClPvh+hwOEbRQ= 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-478-gEQNqKeLNLKgLtOtHIhZQQ-1; Mon, 01 Nov 2021 10:03:54 -0400 X-MC-Unique: gEQNqKeLNLKgLtOtHIhZQQ-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 C5BB080DDE0; Mon, 1 Nov 2021 14:03:52 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 81AE9101E59B; Mon, 1 Nov 2021 14:03:25 +0000 (UTC) From: Maxim Levitsky To: kvm@vger.kernel.org Cc: Shuah Khan , linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK), Borislav Petkov , Paolo Bonzini , linux-kernel@vger.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)), Joerg Roedel , "H. Peter Anvin" , Maxim Levitsky , Thomas Gleixner , Vitaly Kuznetsov , Bandan Das , Wanpeng Li , Jim Mattson , Sean Christopherson , Wei Huang , x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)), Ingo Molnar Subject: [PATCH v2 0/6] nSVM optional features Date: Mon, 1 Nov 2021 16:03:18 +0200 Message-Id: <20211101140324.197921-1-mlevitsk@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org This is a resend of a few patches that implement few SVM's optional features for nesting. I was testing these patches during last few weeks with various nested configurations and I was unable to find any issues. I also implemented support for nested vGIF in the last patch. Best regards, Maxim Levitsky Maxim Levitsky (6): KVM: x86: SVM: add module param to control LBR virtualization 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: SVM: implement nested vGIF arch/x86/kvm/svm/nested.c | 86 ++++++++++++++++++++--- arch/x86/kvm/svm/svm.c | 140 ++++++++++++++++++++++++++++++++------ arch/x86/kvm/svm/svm.h | 38 +++++++++-- 3 files changed, 228 insertions(+), 36 deletions(-)