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=-12.5 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,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable 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 6F100C43333 for ; Wed, 27 Jan 2021 00:12:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C04820679 for ; Wed, 27 Jan 2021 00:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389939AbhA0ALT (ORCPT ); Tue, 26 Jan 2021 19:11:19 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:38088 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727641AbhAZRDv (ORCPT ); Tue, 26 Jan 2021 12:03:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611680539; 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: in-reply-to:in-reply-to:references:references; bh=I4ZKb8bFlXRVvfL07LOhyv8cAdRu+Z/S+GDSbvfqb1Y=; b=Quyr2BbYcbKL2yiRH2J+TQAj7dwQCXprDhtVQ3k1LYcgNweqBohiMbZdmZxIckNtm1cjxB yPuryyojPhEx4D3Kg+SQcix7geEHv8dXKioXiV9dK28BqWz5ffs3eZkrGPYuTSGa107Ht5 ABhQ03+BHZA/PhfKFd8idqfnuBswdtU= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-233-sZkq5HL8PeSdX4T3A5KBow-1; Tue, 26 Jan 2021 11:47:03 -0500 X-MC-Unique: sZkq5HL8PeSdX4T3A5KBow-1 Received: by mail-ed1-f72.google.com with SMTP id e25so9630057edq.6 for ; Tue, 26 Jan 2021 08:47:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=I4ZKb8bFlXRVvfL07LOhyv8cAdRu+Z/S+GDSbvfqb1Y=; b=egTn8D0WY9TFnbNRGWNH5fEKOZADdue4KWd4+CDcfZCxzFgInbrqwLHi7vrlpe6R9v K8c2QQnF9MXHAYS4Rd7lI0fDrapzzz+OL6FJ2nLNZQ1noRW6vjB4vhpm91eIBPJksOeU C+CisGIN1Fn+o0PFitvkarotDhSZOtYS4+j+LF85wE36GYf9Rxi6qwT+kNDbhThj9Ddl AxiVH9L8m6f24vkFLRkr8SDcrw1qiK1o3r7eT1AUvhYGoHxe75R9XBbiDFP2YI7ZA24p XO8Pf+xVwoCJuScVph1K6d4+7eCxp8uCHmdxHAvseAIwVuOVImcAFYHwR85X/60c6Oyt EWKg== X-Gm-Message-State: AOAM530TMHSt4xVyYSkmY2JGV44uHa42o6DqVNbYYL0dDBSPTkVg8D3l FXD3vzMIpiOmkA5pgYerwaPLtnTLaoglwFqH/TLIva/IfxLZUga/7jPfxrX0CzsNeOV1x0rBdc2 j9n4ZShUwd8e/57gN0ziISlU9ZCFiQg8g3We1ASQEhiereb2dKJTY2AGjavcy57KpPBSKFQaaj/ 3Y X-Received: by 2002:a50:ee94:: with SMTP id f20mr5409160edr.222.1611679622212; Tue, 26 Jan 2021 08:47:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWAWMTdXHRABB/i4tSZ9e4vzIsNpvFRyrBXtBgagESBXWm++q9yOphXqQ8dkTSGP0xwomHmQ== X-Received: by 2002:a50:ee94:: with SMTP id f20mr5409148edr.222.1611679622048; Tue, 26 Jan 2021 08:47:02 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id dj25sm12571694edb.5.2021.01.26.08.47.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Jan 2021 08:47:01 -0800 (PST) Subject: Re: [PATCH v2 0/3] Use static_call for kvm_x86_ops To: Jason Baron , seanjc@google.com Cc: kvm@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org References: From: Paolo Bonzini Message-ID: <7efb7e51-611c-e4eb-be32-fefafb664309@redhat.com> Date: Tue, 26 Jan 2021 17:47:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/01/21 04:27, Jason Baron wrote: > Hi, > > Convert kvm_x86_ops to use static_call. Shows good performance > gains for cpuid loop micro-benchmark (results in patch 3/3). Queued, thanks. Paolo > Thanks, > > -Jason > > > Changes from v1: > -Introduce kvm-x86-ops header with eye towards using this to define > svm_x86_ops and vmx_x86_ops in follow on patches (Paolo, Sean) > -add new patch (1/3), that adds a vmx/svm prefix to help facilitate > svm_x86_ops and vmx_x86_ops future conversions. > -added amd perf numbres to description of patch 3/3 > > Jason Baron (3): > KVM: X86: append vmx/svm prefix to additional kvm_x86_ops functions > KVM: x86: introduce definitions to support static calls for kvm_x86_ops > KVM: x86: use static calls to reduce kvm_x86_ops overhead > > arch/x86/include/asm/kvm-x86-ops.h | 127 +++++++++++++++ > arch/x86/include/asm/kvm_host.h | 21 ++- > arch/x86/kvm/cpuid.c | 2 +- > arch/x86/kvm/hyperv.c | 4 +- > arch/x86/kvm/irq.c | 3 +- > arch/x86/kvm/kvm_cache_regs.h | 10 +- > arch/x86/kvm/lapic.c | 30 ++-- > arch/x86/kvm/mmu.h | 6 +- > arch/x86/kvm/mmu/mmu.c | 15 +- > arch/x86/kvm/mmu/spte.c | 2 +- > arch/x86/kvm/pmu.c | 2 +- > arch/x86/kvm/svm/svm.c | 20 +-- > arch/x86/kvm/trace.h | 4 +- > arch/x86/kvm/vmx/nested.c | 2 +- > arch/x86/kvm/vmx/vmx.c | 30 ++-- > arch/x86/kvm/vmx/vmx.h | 2 +- > arch/x86/kvm/x86.c | 307 +++++++++++++++++++------------------ > arch/x86/kvm/x86.h | 6 +- > 18 files changed, 369 insertions(+), 224 deletions(-) > create mode 100644 arch/x86/include/asm/kvm-x86-ops.h >