Message ID | 20221023174307.1868939-1-pbonzini@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp82418wru; Sun, 23 Oct 2022 10:51:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4HMzHnS0Irnm/2/BWrrxIQVoxfo6npGQH5Krjwzp9SWiaGnhhAGM1kK14fBWuz4NQoFYqe X-Received: by 2002:a17:902:7c11:b0:178:a6ca:4850 with SMTP id x17-20020a1709027c1100b00178a6ca4850mr30798148pll.111.1666547482711; Sun, 23 Oct 2022 10:51:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666547482; cv=none; d=google.com; s=arc-20160816; b=vjjWHa2xtzcEj18Zey+0cVXRZR8ZjRHVfirPZ1dcEURzzEBGmTeXi2g2mdH9NxayBl JXWIXNFK+itiJkPUEF38L+CXfs+q57atIrMNf1sd/VJ5c0R6o8VCfxhNJ7sX8xLA/IWp 6tBb8zjKjZVMXYgTXGeRO2wiBERdLHj/C1whijpvWC/4sl5u9a815jW8x+hsQvteaJIF 6YXf3/i7nEoTffcl/ghYx5Zy6gGEIn/e+drSFqB6r/WUc/VqUPbZmBb7nGDkfFwgjrgg FwSwM7QGqrcDs73slOxwGsAKDRem+k/9Mb91QU2CgHBwYJW4POioCth8WjYkeLanVKax RfQw== 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=3vt+KZx63WgRri2q1BTlkYWROLUWRToSyczWPx/yZ74=; b=HJtaLm+GuVi5z6QhoZYXXzNGWcByyrCH19oIc0otFWbdkFhmc+BN0uqpRgKWZ5qK/+ qkkoc3nxtz4tGRAqe5TECXV9uiJ2fkt0/7W2v+uLh32wiAZpmLRaqYDrt7NVMfOaO010 reFhyRVqNKKKQqfxzb+t8J9rNJATEC1oH8r/34ScEdoG9q5YVsKmuCuADzSwab15EkMP mvV6yU64aSKWYmePZ9zT2l0AXoRs+32686ZzxbBUfsLftBDsjUZ9zqwltiZLUdkNLLnk m+5+CK6sMfpB9vREhyj42RevMFLq/seZUNNVI2McwFv+M1dNCnY21sHxavBmOcpVmvmV Nr8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=K18xz6MG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020a1709029b8300b0017c2a42fc8csi29480773plp.270.2022.10.23.10.51.10; Sun, 23 Oct 2022 10:51:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=K18xz6MG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230242AbiJWRnk (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Sun, 23 Oct 2022 13:43:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiJWRnj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 23 Oct 2022 13:43:39 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 081BF6C948 for <linux-kernel@vger.kernel.org>; Sun, 23 Oct 2022 10:43:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666547016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3vt+KZx63WgRri2q1BTlkYWROLUWRToSyczWPx/yZ74=; b=K18xz6MGteKvsGS+edQQzXNLJsLuraUVpMa/cxOblayAfObuY9sBA9Aaef1UmJIdKebXnq 6KGruFyLzrXooYoQ6xNLMJeAwY+O074Gs9g8793zbyBZkyLydtcmzJLtDspQRvZd39p3uY sPFW4Lh6+EK+XgWyjpItb85IfFojSe8= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-532-YCYfz7G_Pk6jI4VlTPAnNg-1; Sun, 23 Oct 2022 13:43:35 -0400 X-MC-Unique: YCYfz7G_Pk6jI4VlTPAnNg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BD22C38041D5; Sun, 23 Oct 2022 17:43:19 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD83739DB3; Sun, 23 Oct 2022 17:43:08 +0000 (UTC) From: Paolo Bonzini <pbonzini@redhat.com> To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [GIT PULL] KVM patches for Linux 6.1-rc2 Date: Sun, 23 Oct 2022 13:43:07 -0400 Message-Id: <20221023174307.1868939-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747501693417126350?= X-GMAIL-MSGID: =?utf-8?q?1747501693417126350?= |
Series |
[GIT,PULL] KVM patches for Linux 6.1-rc2
|
|
Pull-request
https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linusMessage
Paolo Bonzini
Oct. 23, 2022, 5:43 p.m. UTC
Linus, The following changes since commit 9abf2313adc1ca1b6180c508c25f22f9395cc780: Linux 6.1-rc1 (2022-10-16 15:36:24 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus for you to fetch changes up to 9aec606c1609a5da177b579475a73f6c948e034a: tools: include: sync include/api/linux/kvm.h (2022-10-22 07:54:19 -0400) ---------------------------------------------------------------- RISC-V: - Fix compilation without RISCV_ISA_ZICBOM - Fix kvm_riscv_vcpu_timer_pending() for Sstc ARM: - Fix a bug preventing restoring an ITS containing mappings for very large and very sparse device topology - Work around a relocation handling error when compiling the nVHE object with profile optimisation - Fix for stage-2 invalidation holding the VM MMU lock for too long by limiting the walk to the largest block mapping size - Enable stack protection and branch profiling for VHE - Two selftest fixes x86: - add compat implementation for KVM_X86_SET_MSR_FILTER ioctl selftests: - synchronize includes between include/uapi and tools/include/uapi ---------------------------------------------------------------- As a heads up, next week I will have a relatively large pull request in number of patches, with a series fixing various issues in virt/kvm/pfncache.c. Paolo Alexander Graf (3): kvm: Add support for arch compat vm ioctls KVM: x86: Copy filter arg outside kvm_vm_ioctl_set_msr_filter() KVM: x86: Add compat handler for KVM_X86_SET_MSR_FILTER Andrew Jones (1): RISC-V: Fix compilation without RISCV_ISA_ZICBOM Anup Patel (1): RISC-V: KVM: Fix kvm_riscv_vcpu_timer_pending() for Sstc Denis Nikitin (1): KVM: arm64: nvhe: Fix build with profile optimization Eric Ren (1): KVM: arm64: vgic: Fix exit condition in scan_its_table() Gavin Shan (1): KVM: selftests: Fix number of pages for memory slot in memslot_modification_stress_test Oliver Upton (2): KVM: arm64: Work out supported block level at compile time KVM: arm64: Limit stage2_apply_range() batch size to largest block Paolo Bonzini (4): Merge tag 'kvmarm-fixes-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD Merge tag 'kvmarm-fixes-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD Merge tag 'kvm-riscv-fixes-6.1-1' of https://github.com/kvm-riscv/linux into HEAD tools: include: sync include/api/linux/kvm.h Vincent Donnefort (1): KVM: arm64: Enable stack protection and branch profiling for VHE Zenghui Yu (1): KVM: arm64: selftests: Fix multiple versions of GIC creation arch/arm64/include/asm/kvm_pgtable.h | 18 +++-- arch/arm64/include/asm/stage2_pgtable.h | 20 ----- arch/arm64/kvm/hyp/Makefile | 5 +- arch/arm64/kvm/hyp/nvhe/Makefile | 7 ++ arch/arm64/kvm/mmu.c | 9 ++- arch/arm64/kvm/vgic/vgic-its.c | 5 +- arch/riscv/include/asm/cacheflush.h | 8 -- arch/riscv/include/asm/kvm_vcpu_timer.h | 1 + arch/riscv/kvm/vcpu.c | 3 + arch/riscv/kvm/vcpu_timer.c | 17 ++++- arch/riscv/mm/cacheflush.c | 38 ++++++++++ arch/riscv/mm/dma-noncoherent.c | 41 ---------- arch/x86/kvm/x86.c | 87 ++++++++++++++++++---- include/linux/kvm_host.h | 2 + tools/include/uapi/linux/kvm.h | 1 + tools/testing/selftests/kvm/aarch64/vgic_init.c | 4 +- .../kvm/memslot_modification_stress_test.c | 2 +- virt/kvm/kvm_main.c | 11 +++ 18 files changed, 180 insertions(+), 99 deletions(-)
Comments
On Sun, Oct 23, 2022 at 10:43 AM Paolo Bonzini <pbonzini@redhat.com> wrote: > > x86: > > - add compat implementation for KVM_X86_SET_MSR_FILTER ioctl Side note: this should probably have used compat_uptr_t bitmap; ... .bitmap = compat_ptr(cr->bitmap), instead of doing that __u32 bitmap; ... .bitmap = (__u8 *)(ulong)cr->bitmap, because not only are those casts really ugly, using that 'compat_uptr_t" and "compat_ptr()" helper also really explains what is going on. compat_ptr() also happens to get the address space right (ie it returns a "void __user *" pointer). But since the non-compat 'struct kvm_msr_filter_range' bitmap member doesn't get that right either (because it uses the same type for kernel pointers as for user pointers - ugly uglt), that isn't such a big deal. The kvm code clearly doesn't do proper user pointer typing, and just uses random casts instead. Linus
The pull request you sent on Sun, 23 Oct 2022 13:43:07 -0400:
> https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/05b4ebd2c7cbb3671c376754b37b4963dd08a3a2
Thank you!
On 10/24/22 00:15, Linus Torvalds wrote: > > compat_ptr() also happens to get the address space right (ie it > returns a "void __user *" pointer). But since the non-compat 'struct > kvm_msr_filter_range' bitmap member doesn't get that right either > (because it uses the same type for kernel pointers as for user > pointers - ugly uglt), that isn't such a big deal. The kvm code > clearly doesn't do proper user pointer typing, and just uses random > casts instead. In general KVM ioctl arguments very rarely have __user pointers in them, so there's not much need for compat ioctls at all. KVM_GET_DIRTY_LOG and KVM_CLEAR_DIRTY_LOG get it right, but this one indeed can be improved with compat_ptr(). Will do for 6.2, thanks for the review. Paolo