Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp568682pxb; Tue, 19 Oct 2021 08:33:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAAToS73CRyVuFGLWKzarXYHPLjma0syp50PesblayWjj3m3NO38VXp3/74RmG4PQvFtXR X-Received: by 2002:a17:902:c950:b0:13e:fbf9:7939 with SMTP id i16-20020a170902c95000b0013efbf97939mr33552815pla.65.1634657628359; Tue, 19 Oct 2021 08:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634657628; cv=none; d=google.com; s=arc-20160816; b=D48YpioxvqFH6+dxlnz5ZLFv0rT/sKmtPKLpWaaMvWCz50WNDkQLKkw7+WvGSFm5oy E8qpt5Kj7k890R1eDMEakimoQC2OjgeaeVp8XhjXBMZmSBYypaB0x/9AbMxVdT7eSTAM CqfSQ9H93KfhjFZUoCMuaXjvd1RYqtRH+i9UroHZxyAnN9xNnrUwwnw/MwZ27GnlyTjw NWIGVpLARSl2pLVTY7r5B/BAIRBx6MBBEV9QOPrIq92/dHRImSq33LCk7fAON0w4XrN8 l5m/D7AS5d12Y++FTcq0xzq9m0FKlT+mur+x1wC31cAiCjJtI5e/S4gm8Z10KaV3tTej iE0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ffl8pk9RGcstocogN9PvsC6AWGjD4hHoeEIJ6AobA5U=; b=aUk87kydk7nQyHRDYxvJW2rb706zZAEWSZFZNTRZ0Yc81x89joz/fOCYhic0gCNr/L KR9jMcyQVyBw5hslakEB6li3azoSRrH2ZQvs1KseMmLkREJJZ5odbexxqmVAZTlDpT+E kIEXZgUgV7nE3X9uCfYVbCpOHQMvF2nZtZqEFLUb5IZL9CyLfXjbeyqQ4DxpiLqTbgt3 YiLYTu1UW67oCJ0N417ccJGoUnzprGJkqv1coQ4PiYH7ehyyvOpjJbaWplac4QDQZM/X oo8vjpQpzMGMXBz4TpUAjWitbWbhiMPf92LHacDKASfXwDRUUuLJj1Di3ySEKw/jwAHw qB5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XPxzycok; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 3si3653976pjn.154.2021.10.19.08.33.35; Tue, 19 Oct 2021 08:33:48 -0700 (PDT) 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=@chromium.org header.s=google header.b=XPxzycok; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233443AbhJSPel (ORCPT + 99 others); Tue, 19 Oct 2021 11:34:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232720AbhJSPef (ORCPT ); Tue, 19 Oct 2021 11:34:35 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4FC8C061746 for ; Tue, 19 Oct 2021 08:32:22 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id gn3so269151pjb.0 for ; Tue, 19 Oct 2021 08:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ffl8pk9RGcstocogN9PvsC6AWGjD4hHoeEIJ6AobA5U=; b=XPxzycokZi44IAMRuO5xBojOvHyLirzpE4NVfUceUTJ8o/qB1XFnbvtrB6u4mAPYLQ FpZGKmV4hauxrAO8kCIToZDHGyDII/3L9e+rnxJyWr9EpnLbGsGrkK6tcBtg0syNwhFJ TqecIRrfv6FXE6rsed7Q4OgHt7czWMuVEqgC4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ffl8pk9RGcstocogN9PvsC6AWGjD4hHoeEIJ6AobA5U=; b=MDrgvxem5EexaBZGLkGn4W2Dw8uVp+HuJHUDL4yHs5hOhhaJKfi4WdHBSgVAAAcgEo u91k/GtRwkeOzuZAMi5VwNM+GaPI/7Jd8lWl1fiqyRH4gnbI7qh7g8Bi/dA5KjeHxBHv CrqY4uLguqfUUZzex7cK8KZ3sef94jOie8hBUscAhgVer5VwK5kH99bShErLArkf0jyz DGh9tvo3yKgk9nXRFKRnt+YsJQ+CiZHqWcJRTsEaEQ9mBeHYDbIH3oQIWQUFPQlcFG1/ k1o2grvib4jD8t0+2zHHmsoR39t19AlOJVLneXCEAtTLWH5Q78rk5nJXJXbfak7Uss4L fsEw== X-Gm-Message-State: AOAM530s/cLVmGtrS7Pesv61D8xrf8rONGFcdqgIbFah0cj1LWOtpAEi ebDxeME2HcZXuOqa7ZD5A/sd8A== X-Received: by 2002:a17:902:b691:b029:12d:2b6:d116 with SMTP id c17-20020a170902b691b029012d02b6d116mr33496562pls.71.1634657542422; Tue, 19 Oct 2021 08:32:22 -0700 (PDT) Received: from senozhatsky.flets-east.jp ([2409:10:2e40:5100:490f:f89:7449:e615]) by smtp.gmail.com with ESMTPSA id v8sm3087474pjd.7.2021.10.19.08.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 08:32:21 -0700 (PDT) From: Sergey Senozhatsky To: Paolo Bonzini , David Matlack Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Suleiman Souhlal , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: [PATCHV2 0/3] kvm: x86: make PTE_PREFETCH_NUM tunable Date: Wed, 20 Oct 2021 00:32:11 +0900 Message-Id: <20211019153214.109519-1-senozhatsky@chromium.org> X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds new IOCTL which make it possible to tune PTE_PREFETCH_NUM value on per-VM basis. v2: - added ioctl (previously was sysfs param) [David] - preallocate prefetch buffers [David] - converted arch/x86/kvm/mmu/paging_tmpl.h [David] Sergey Senozhatsky (3): KVM: x86: introduce kvm_mmu_pte_prefetch structure KVM: x86: use mmu_pte_prefetch for guest_walker KVM: x86: add KVM_SET_MMU_PREFETCH ioctl Documentation/virt/kvm/api.rst | 21 ++++++++++++ arch/x86/include/asm/kvm_host.h | 12 +++++++ arch/x86/kvm/mmu.h | 4 +++ arch/x86/kvm/mmu/mmu.c | 57 ++++++++++++++++++++++++++++++--- arch/x86/kvm/mmu/paging_tmpl.h | 39 +++++++++++++++------- arch/x86/kvm/x86.c | 38 +++++++++++++++++++++- include/uapi/linux/kvm.h | 4 +++ 7 files changed, 158 insertions(+), 17 deletions(-) -- 2.33.0.1079.g6e70778dc9-goog