All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHV2 0/3] kvm: x86: make PTE_PREFETCH_NUM tunable
@ 2021-10-19 15:32 Sergey Senozhatsky
  2021-10-19 15:32 ` [PATCHV2 1/3] KVM: x86: introduce kvm_mmu_pte_prefetch structure Sergey Senozhatsky
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Sergey Senozhatsky @ 2021-10-19 15:32 UTC (permalink / raw)
  To: Paolo Bonzini, David Matlack
  Cc: Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
	Joerg Roedel, Suleiman Souhlal, kvm, linux-kernel,
	Sergey Senozhatsky

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


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [PATCHV2 3/3] KVM: x86: add KVM_SET_MMU_PREFETCH ioctl
@ 2021-10-25  5:15 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2021-10-25  5:15 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3196 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20211019153214.109519-4-senozhatsky@chromium.org>
References: <20211019153214.109519-4-senozhatsky@chromium.org>
TO: Sergey Senozhatsky <senozhatsky@chromium.org>
TO: Paolo Bonzini <pbonzini@redhat.com>
TO: David Matlack <dmatlack@google.com>
CC: Sean Christopherson <seanjc@google.com>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
CC: Wanpeng Li <wanpengli@tencent.com>
CC: Jim Mattson <jmattson@google.com>
CC: Joerg Roedel <joro@8bytes.org>
CC: Suleiman Souhlal <suleiman@google.com>
CC: kvm(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

Hi Sergey,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20211019]
[cannot apply to kvm/queue v5.15-rc6 v5.15-rc5 v5.15-rc4 v5.15-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Sergey-Senozhatsky/kvm-x86-make-PTE_PREFETCH_NUM-tunable/20211019-233356
base:    5b27c149257d83558d9a7fae927be822673be230
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: x86_64-randconfig-m031-20211019 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
arch/x86/kvm/x86.c:5851 kvm_arch_mmu_pte_prefetch() error: uninitialized symbol 'ret'.

vim +/ret +5851 arch/x86/kvm/x86.c

7d62874f69d7e5 Sergey Senozhatsky 2021-06-06  5834  
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5835  static int kvm_arch_mmu_pte_prefetch(struct kvm *kvm, unsigned int num_pages)
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5836  {
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5837  	struct kvm_vcpu *vcpu;
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5838  	int i, ret;
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5839  
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5840  	mutex_lock(&kvm->lock);
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5841  	kvm_for_each_vcpu(i, vcpu, kvm) {
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5842  		ret = kvm_set_pte_prefetch(vcpu, num_pages);
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5843  		if (ret) {
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5844  			kvm_err("Failed to set PTE prefetch on VCPU%d: %d\n",
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5845  				vcpu->vcpu_id, ret);
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5846  			break;
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5847  		}
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5848  	}
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5849  	mutex_unlock(&kvm->lock);
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5850  
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20 @5851  	return ret;
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5852  }
f13d2ba39ce3e5 Sergey Senozhatsky 2021-10-20  5853  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34634 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-11-08 21:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-19 15:32 [PATCHV2 0/3] kvm: x86: make PTE_PREFETCH_NUM tunable Sergey Senozhatsky
2021-10-19 15:32 ` [PATCHV2 1/3] KVM: x86: introduce kvm_mmu_pte_prefetch structure Sergey Senozhatsky
2021-10-19 22:44   ` David Matlack
2021-10-20  1:23     ` Sergey Senozhatsky
2021-10-20 15:56       ` David Matlack
2021-10-21  2:48         ` Sergey Senozhatsky
2021-10-21  3:28           ` Sergey Senozhatsky
2021-10-21  8:09             ` Sergey Senozhatsky
2021-10-19 15:32 ` [PATCHV2 2/3] KVM: x86: use mmu_pte_prefetch for guest_walker Sergey Senozhatsky
2021-10-19 15:32 ` [PATCHV2 3/3] KVM: x86: add KVM_SET_MMU_PREFETCH ioctl Sergey Senozhatsky
2021-10-19 15:38   ` Sergey Senozhatsky
2021-11-08 21:47     ` Sean Christopherson
  -- strict thread matches above, loose matches on Subject: below --
2021-10-25  5:15 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.