Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4236463pxb; Tue, 26 Jan 2021 16:37:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwc1bpbNXE+9KfWPMrC5BZSXi30SODa3IWTSnElhRxQrvjRSoBOEIeDNoxjqz05p9Vbi5Wp X-Received: by 2002:aa7:d386:: with SMTP id x6mr6779377edq.194.1611707862500; Tue, 26 Jan 2021 16:37:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611707862; cv=none; d=google.com; s=arc-20160816; b=cbHWpU5CkQdYqmU2xns93MEMctHfd8WnV42TokRsGUoqoL6QhWiY4J5h3++aIDep23 nIZHp6WGasSn/lxc2SDU3FQELkoqBKjk+DNSuxZiFWxFX78UTimtgDRK+sCgE7cRANAX KQ+X+5/dpN+J0F8jpfLK5u22azDP3anSNLtPT+aWnvK0yij8LFbGsmnxhfLpS9uV2S/O 9Y6vS3r/2VU82phlRICUJVWNVBrHQkUH5pN4cuQgHCLtVigbLCJYONnoVotXYWAaOw8R yVsMT2B0OeqiS1z9V3jaNHNEVkBRt/G91MsCOLtzI2voOA0Kh7l4CuHRMuztlhX5IXJk 26JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=I4ZKb8bFlXRVvfL07LOhyv8cAdRu+Z/S+GDSbvfqb1Y=; b=uCIqxl7ckbJLfbaCwfMtIxUVTfayVuVrMg9q0KKmKAt8JaWH3W8oqpfYYvzIP5IPiR O7zMqJyxrwbOYty7QIfL5nFgyoerk28+byn7NW1hOgpDvP0Zyd/dKBBkDRccKI4eEL8k eF2R2NTnbU+R+K9rbcrjX9E8cvADNRoY2bNOhKTysImXU6dUYJ//ZRSJr2gJjg4o1Mza mr9i8tJ4cEyw3HT8uleNsQVUGtl/iF8vP6Tg3bdvdgkVV+m9Y2yTn9PGz97+zUwOReP+ Hv4zcCbwfvL7P4xJzGiwtll76VfOt1YdTJ4dy873MjBhK1AdjC0lExa3K1I35LtkHaL0 G8rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Quyr2BbY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x19si71052edr.378.2021.01.26.16.37.17; Tue, 26 Jan 2021 16:37:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Quyr2BbY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389915AbhA0ALP (ORCPT + 99 others); Tue, 26 Jan 2021 19:11:15 -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-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 >