From patchwork Fri Dec 2 10:50:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 13062613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18B43C47088 for ; Fri, 2 Dec 2022 10:51:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232572AbiLBKvV (ORCPT ); Fri, 2 Dec 2022 05:51:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232279AbiLBKvT (ORCPT ); Fri, 2 Dec 2022 05:51:19 -0500 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 BA759CFE75 for ; Fri, 2 Dec 2022 02:50:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669978228; 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: in-reply-to:in-reply-to:references:references; bh=e/WSDhCff5cI0oKVC2xG/rXWZdwpVxH3SgK+Cp6160A=; b=XrynmiK0wza+XQ3T3lCIYUWuee97+OOYwa2q/Q/9J0fkr6i+Tl6nJOw9MDHjbVRasqzoE+ vOjdrVond2KMUkhacDfGA7Ty3slAPpJwaKWDRTfxVIwl+wN+q3ZZM5k0j53gujPhG42VQ9 1CAX77zMZBAdGyB2NbjSFQr+z3NW4Ng= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-312-ug-gdjGhOu-D-fuTtQ_3Ww-1; Fri, 02 Dec 2022 05:50:26 -0500 X-MC-Unique: ug-gdjGhOu-D-fuTtQ_3Ww-1 Received: by mail-wr1-f71.google.com with SMTP id e7-20020adf9bc7000000b00242121eebe2so969387wrc.3 for ; Fri, 02 Dec 2022 02:50:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e/WSDhCff5cI0oKVC2xG/rXWZdwpVxH3SgK+Cp6160A=; b=Qg+z3Gqixg1a9twfXWVr3AsiqTWpghKdWoWgRrdCalO/FuAkoRf3D2/bi65UkVJ8GQ QnAE2eA2qt7kDNvG4yPuVBFEtZ4bz2tXb3B1dYBUws2i7PS9qwRwKTov8B2BjDJ+FAMY dUV3ssw2+IZ3Qcak3Cl3dD12/aJ0ZwQ4X/yOkYbINdwWSdVFNi+5oA/nZxiOUpFXeCty nRxWm2n9Mqq8kdwQynkV217ECMDZX1CoZuBl1y7S75hCaZrKeFI6CseHFKYZt6JPwpGY VW7RBVJGs0KFdFxPAKIbxywtHn5eyGiDNYtE3zF/CrL95t4xG7AuGRIOlZlF8FNbX01s T9Lw== X-Gm-Message-State: ANoB5pl6zdM3GkaA/cNdHnl3PvapRRl8pot19jvriBTZpJgHdhXhU+j/ eRVJWyatSGnYr0iUSvkPvsuJIVhDn/v4vdBlPm2LhP/zA03pK9lV5+NeiV6drYg5r5P7dPoqVIM NRUJHCCo/mJ82 X-Received: by 2002:a1c:f216:0:b0:3d0:70fd:92bb with SMTP id s22-20020a1cf216000000b003d070fd92bbmr8875613wmc.14.1669978225708; Fri, 02 Dec 2022 02:50:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf685QZj2W6wR2OfJVqBlDm1LFTsF4LNxBCQdfUos9S5uMPZkJFB11z0tALtJyodHM0eSiyWmA== X-Received: by 2002:a1c:f216:0:b0:3d0:70fd:92bb with SMTP id s22-20020a1cf216000000b003d070fd92bbmr8875597wmc.14.1669978225479; Fri, 02 Dec 2022 02:50:25 -0800 (PST) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id bg2-20020a05600c3c8200b003a3170a7af9sm9728818wmb.4.2022.12.02.02.50.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 02:50:25 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Paolo Bonzini , Sergio Lopez Pascual , Sean Christopherson , Javier Martinez Canillas , Arnaldo Carvalho de Melo , Fabiano Rosas , Guang Zeng , "Gustavo A. R. Silva" , Jonathan Corbet , Nicholas Piggin , Wei Wang , kvm@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v2 1/4] KVM: Delete all references to removed KVM_SET_MEMORY_REGION ioctl Date: Fri, 2 Dec 2022 11:50:08 +0100 Message-Id: <20221202105011.185147-2-javierm@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221202105011.185147-1-javierm@redhat.com> References: <20221202105011.185147-1-javierm@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The documentation says that the ioctl has been deprecated, but it has been actually removed and the remaining references are just left overs. Suggested-by: Sean Christopherson Signed-off-by: Javier Martinez Canillas --- (no changes since v1) Documentation/virt/kvm/api.rst | 16 ---------------- include/uapi/linux/kvm.h | 12 ------------ tools/include/uapi/linux/kvm.h | 12 ------------ 3 files changed, 40 deletions(-) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index eee9f857a986..54af33645df3 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -272,18 +272,6 @@ the VCPU file descriptor can be mmap-ed, including: KVM_CAP_DIRTY_LOG_RING, see section 8.3. -4.6 KVM_SET_MEMORY_REGION -------------------------- - -:Capability: basic -:Architectures: all -:Type: vm ioctl -:Parameters: struct kvm_memory_region (in) -:Returns: 0 on success, -1 on error - -This ioctl is obsolete and has been removed. - - 4.7 KVM_CREATE_VCPU ------------------- @@ -1377,10 +1365,6 @@ the memory region are automatically reflected into the guest. For example, an mmap() that affects the region will be made visible immediately. Another example is madvise(MADV_DROP). -It is recommended to use this API instead of the KVM_SET_MEMORY_REGION ioctl. -The KVM_SET_MEMORY_REGION does not allow fine grained control over memory -allocation and is deprecated. - 4.36 KVM_SET_TSS_ADDR --------------------- diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 0d5d4419139a..8899201d5964 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -86,14 +86,6 @@ struct kvm_debug_guest { /* *** End of deprecated interfaces *** */ -/* for KVM_CREATE_MEMORY_REGION */ -struct kvm_memory_region { - __u32 slot; - __u32 flags; - __u64 guest_phys_addr; - __u64 memory_size; /* bytes */ -}; - /* for KVM_SET_USER_MEMORY_REGION */ struct kvm_userspace_memory_region { __u32 slot; @@ -1437,10 +1429,6 @@ struct kvm_vfio_spapr_tce { __s32 tablefd; }; -/* - * ioctls for VM fds - */ -#define KVM_SET_MEMORY_REGION _IOW(KVMIO, 0x40, struct kvm_memory_region) /* * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns * a vcpu fd. diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h index 0d5d4419139a..8899201d5964 100644 --- a/tools/include/uapi/linux/kvm.h +++ b/tools/include/uapi/linux/kvm.h @@ -86,14 +86,6 @@ struct kvm_debug_guest { /* *** End of deprecated interfaces *** */ -/* for KVM_CREATE_MEMORY_REGION */ -struct kvm_memory_region { - __u32 slot; - __u32 flags; - __u64 guest_phys_addr; - __u64 memory_size; /* bytes */ -}; - /* for KVM_SET_USER_MEMORY_REGION */ struct kvm_userspace_memory_region { __u32 slot; @@ -1437,10 +1429,6 @@ struct kvm_vfio_spapr_tce { __s32 tablefd; }; -/* - * ioctls for VM fds - */ -#define KVM_SET_MEMORY_REGION _IOW(KVMIO, 0x40, struct kvm_memory_region) /* * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns * a vcpu fd. From patchwork Fri Dec 2 10:50:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 13062614 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E647C4708D for ; Fri, 2 Dec 2022 10:51:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233309AbiLBKvf (ORCPT ); Fri, 2 Dec 2022 05:51:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233148AbiLBKv1 (ORCPT ); Fri, 2 Dec 2022 05:51:27 -0500 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 44CDAD038D for ; Fri, 2 Dec 2022 02:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669978230; 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: in-reply-to:in-reply-to:references:references; bh=+/LEkekaTEo+dH48I9BDoWLnS9MzBRMjobxYQkKyym4=; b=fP9WQb7rAsmiUFRtHvgCrUtel4UX2bUjpAo5/oFO2JadiGwh5uWyEvxB3YawQk3vZNtLnl ULnbSeJvN+t+acSBtynA/Ow3mwcbS2+rh8b9M6aMwb9v6oOHVSpvn6fUMs8yMFJyD7f8Dr iROAd4axaMERiQBEzFT5fnsXJTmEemc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-178-uR4UC7nOMWGC8_tDHL7Qdw-1; Fri, 02 Dec 2022 05:50:28 -0500 X-MC-Unique: uR4UC7nOMWGC8_tDHL7Qdw-1 Received: by mail-wm1-f69.google.com with SMTP id c187-20020a1c35c4000000b003cfee3c91cdso2314775wma.6 for ; Fri, 02 Dec 2022 02:50:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+/LEkekaTEo+dH48I9BDoWLnS9MzBRMjobxYQkKyym4=; b=RWwNEFPSdigIjq2uJs6lhianzsFnOhe5T15KgdirIN7h2jLDp7agq3NjVPwjbpWe/F EEBt8onrZLENxdSjbEw/3QBFCADycUo9KMWftZjxBVMkOggwVRuV42aK3N/fzivuFXWC +aNZ3k6ppvwRcMquQAgwLGi93Emq5OWNC8jtQNWWDEVz5cjOjoClfDUr6aPYJXbIeY52 NnEKIBZHGZj/coUWaS9odlWaowpiKpTwk62w+jRrJ/dMgreSoZtndI03JmzA7IygQ8+b 64xzFsxK6H4DmGVLKq0HenVhrXdnw82lrs4fp7kFQK1xhc9P/ufuBfeqqQgm57N3sKDs wB4Q== X-Gm-Message-State: ANoB5plqep8MIEkJ1VAcWlUG/Oz772F6Zpo882cLo8EZQMK5kHzswj+G FurNXIfsSFugLDNMJR/R29SRJNeOXNXMn8x96yyAZdFEY6IdNumeIl8nge9blsFp7BQKEZRoiYE MEjaT5isQUPLc X-Received: by 2002:a1c:2743:0:b0:3c6:e471:7400 with SMTP id n64-20020a1c2743000000b003c6e4717400mr38026477wmn.98.1669978227533; Fri, 02 Dec 2022 02:50:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf6LRw+Q5h08VxPWoFG1o+HyiLNocv2IiuqIXrVvaQwPWzbHSZnbDyo9D+lrAYgNTlYhm9tRrQ== X-Received: by 2002:a1c:2743:0:b0:3c6:e471:7400 with SMTP id n64-20020a1c2743000000b003c6e4717400mr38026452wmn.98.1669978227323; Fri, 02 Dec 2022 02:50:27 -0800 (PST) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id bg2-20020a05600c3c8200b003a3170a7af9sm9728818wmb.4.2022.12.02.02.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 02:50:26 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Paolo Bonzini , Sergio Lopez Pascual , Sean Christopherson , Javier Martinez Canillas , Arnaldo Carvalho de Melo , Borislav Petkov , Dan Williams , Dave Hansen , "Gustavo A. R. Silva" , "H. Peter Anvin" , Ingo Molnar , Jing Liu , Jonathan Corbet , Nicholas Piggin , Thomas Gleixner , Wei Wang , Yang Zhong , kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org Subject: [PATCH v2 2/4] KVM: Delete all references to removed KVM_SET_MEMORY_ALIAS ioctl Date: Fri, 2 Dec 2022 11:50:09 +0100 Message-Id: <20221202105011.185147-3-javierm@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221202105011.185147-1-javierm@redhat.com> References: <20221202105011.185147-1-javierm@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The documentation says that the ioctl has been deprecated, but it has been actually removed and the remaining references are just left overs. Suggested-by: Sean Christopherson Signed-off-by: Javier Martinez Canillas --- (no changes since v1) Documentation/virt/kvm/api.rst | 11 ----------- arch/x86/include/uapi/asm/kvm.h | 8 -------- include/uapi/linux/kvm.h | 2 -- tools/arch/x86/include/uapi/asm/kvm.h | 8 -------- tools/include/uapi/linux/kvm.h | 2 -- 5 files changed, 31 deletions(-) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 54af33645df3..85a5b12eb017 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -356,17 +356,6 @@ see the description of the capability. Note that the Xen shared info page, if configured, shall always be assumed to be dirty. KVM will not explicitly mark it such. -4.9 KVM_SET_MEMORY_ALIAS ------------------------- - -:Capability: basic -:Architectures: x86 -:Type: vm ioctl -:Parameters: struct kvm_memory_alias (in) -:Returns: 0 (success), -1 (error) - -This ioctl is obsolete and has been removed. - 4.10 KVM_RUN ------------ diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include/uapi/asm/kvm.h index 46de10a809ec..649e50a8f9dd 100644 --- a/arch/x86/include/uapi/asm/kvm.h +++ b/arch/x86/include/uapi/asm/kvm.h @@ -53,14 +53,6 @@ /* Architectural interrupt line count. */ #define KVM_NR_INTERRUPTS 256 -struct kvm_memory_alias { - __u32 slot; /* this has a different namespace than memory slots */ - __u32 flags; - __u64 guest_phys_addr; - __u64 memory_size; - __u64 target_phys_addr; -}; - /* for KVM_GET_IRQCHIP and KVM_SET_IRQCHIP */ struct kvm_pic_state { __u8 last_irr; /* edge detection */ diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 8899201d5964..6ba2928f8f18 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -1435,8 +1435,6 @@ struct kvm_vfio_spapr_tce { */ #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) -/* KVM_SET_MEMORY_ALIAS is obsolete: */ -#define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) #define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) #define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) #define KVM_SET_USER_MEMORY_REGION _IOW(KVMIO, 0x46, \ diff --git a/tools/arch/x86/include/uapi/asm/kvm.h b/tools/arch/x86/include/uapi/asm/kvm.h index 46de10a809ec..649e50a8f9dd 100644 --- a/tools/arch/x86/include/uapi/asm/kvm.h +++ b/tools/arch/x86/include/uapi/asm/kvm.h @@ -53,14 +53,6 @@ /* Architectural interrupt line count. */ #define KVM_NR_INTERRUPTS 256 -struct kvm_memory_alias { - __u32 slot; /* this has a different namespace than memory slots */ - __u32 flags; - __u64 guest_phys_addr; - __u64 memory_size; - __u64 target_phys_addr; -}; - /* for KVM_GET_IRQCHIP and KVM_SET_IRQCHIP */ struct kvm_pic_state { __u8 last_irr; /* edge detection */ diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h index 8899201d5964..6ba2928f8f18 100644 --- a/tools/include/uapi/linux/kvm.h +++ b/tools/include/uapi/linux/kvm.h @@ -1435,8 +1435,6 @@ struct kvm_vfio_spapr_tce { */ #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) -/* KVM_SET_MEMORY_ALIAS is obsolete: */ -#define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) #define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) #define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) #define KVM_SET_USER_MEMORY_REGION _IOW(KVMIO, 0x46, \ From patchwork Fri Dec 2 10:50:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 13062617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F876C47088 for ; Fri, 2 Dec 2022 10:51:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232761AbiLBKvn (ORCPT ); Fri, 2 Dec 2022 05:51:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233190AbiLBKvb (ORCPT ); Fri, 2 Dec 2022 05:51:31 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 317B4D0383 for ; Fri, 2 Dec 2022 02:50:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669978233; 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: in-reply-to:in-reply-to:references:references; bh=1ZiLhwAB4T5DlsifWPEOUp55KcHRF76jPNns8olDBLs=; b=WPTsBkbqKJsyOImXDltiWu8wMeecaWE0BaaaNUlANhWVYDx09xnAzJdPWkUe8LzBpuw5J0 U4CLGrG533c0X269DNpvIN9oAvV9dcPJgQFEotz5T2S8nu9pNQxCy8sTq7ouRWMOYoqZUt z4LnBx4RDcH6pJvfZFd2PSSZRKCMvrA= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-205-iPX_SYswNd6Bioj3tIKicg-1; Fri, 02 Dec 2022 05:50:30 -0500 X-MC-Unique: iPX_SYswNd6Bioj3tIKicg-1 Received: by mail-wm1-f72.google.com with SMTP id c126-20020a1c3584000000b003cfffcf7c1aso3968920wma.0 for ; Fri, 02 Dec 2022 02:50:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1ZiLhwAB4T5DlsifWPEOUp55KcHRF76jPNns8olDBLs=; b=Mw8twF1sRHMQ2OuKlZJEZRXu9Msd4XmyW3Cn+npNXA+/8ZriC2c563jnT3k1d0jueG AL6yJJuOVCZaLK3KECU2eamcGbaj/enhpM8cRJJbgEqxpkbcIqORc+arwOueOUJootV2 jd1ZqhkPVMHCLbBvRfW1tX/BeTbmCRZ04Twu+ctBORt9zGP/SMNe+8SeQclLykQqMHMB NrjhWakPMb4oKtMyi0YJU7pekq0DljIgQIT+MleHbSrVtPhm6nho7Pisno36hf0G1yq0 Akbhg7bEzit2SGJ8OA4BmJwnEAMIzRB6+UI5SlQolKNwISjGpx4s3V4FGXQsJVyVy0qC LacQ== X-Gm-Message-State: ANoB5plpZoYC5DQBouGSREulVnBD/OD6T2kuz4c6dd9d/whV33+dR2/U CK6OgJl6rX2d30YCkittRIthu5JZgzRkvt0TGhtw+WhpJ0qkPSORpizf/kGXKxXubftV6yZXzVb S87zPNu+CB3rb X-Received: by 2002:a05:6000:983:b0:236:aacc:ea07 with SMTP id by3-20020a056000098300b00236aaccea07mr45038552wrb.36.1669978229097; Fri, 02 Dec 2022 02:50:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf5xmf8N/KoyM3E7rvK+vbyjX3grYot4oQfWOk16THK9TJ5D1uAwksRui+qdQ92XRGd+sHEYog== X-Received: by 2002:a05:6000:983:b0:236:aacc:ea07 with SMTP id by3-20020a056000098300b00236aaccea07mr45038533wrb.36.1669978228835; Fri, 02 Dec 2022 02:50:28 -0800 (PST) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id bg2-20020a05600c3c8200b003a3170a7af9sm9728818wmb.4.2022.12.02.02.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 02:50:28 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Paolo Bonzini , Sergio Lopez Pascual , Sean Christopherson , Javier Martinez Canillas , Arnaldo Carvalho de Melo , Guang Zeng , "Gustavo A. R. Silva" , Jing Liu , Jonathan Corbet , Nicholas Piggin , Wei Wang , kvm@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v2 3/4] KVM: Reference to kvm_userspace_memory_region in doc and comments Date: Fri, 2 Dec 2022 11:50:10 +0100 Message-Id: <20221202105011.185147-4-javierm@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221202105011.185147-1-javierm@redhat.com> References: <20221202105011.185147-1-javierm@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org There are still references to the removed kvm_memory_region data structure but the doc and comments should mention struct kvm_userspace_memory_region instead, since that is what's used by the ioctl that replaced the old one and this data structure support the same set of flags. Signed-off-by: Javier Martinez Canillas --- (no changes since v1) Documentation/virt/kvm/api.rst | 2 +- include/linux/kvm_host.h | 4 ++-- include/uapi/linux/kvm.h | 6 +++--- tools/include/uapi/linux/kvm.h | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 85a5b12eb017..b15ea129f9cf 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -1309,7 +1309,7 @@ yet and must be cleared on entry. __u64 userspace_addr; /* start of the userspace allocated memory */ }; - /* for kvm_memory_region::flags */ + /* for kvm_userspace_memory_region::flags */ #define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0) #define KVM_MEM_READONLY (1UL << 1) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 18592bdf4c1b..759ed18dabb7 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -50,8 +50,8 @@ #endif /* - * The bit 16 ~ bit 31 of kvm_memory_region::flags are internally used - * in kvm, other bits are visible for userspace which are defined in + * The bit 16 ~ bit 31 of kvm_userspace_memory_region::flags are internally + * used in kvm, other bits are visible for userspace which are defined in * include/linux/kvm_h. */ #define KVM_MEMSLOT_INVALID (1UL << 16) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 6ba2928f8f18..e42be6b45b9b 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -96,9 +96,9 @@ struct kvm_userspace_memory_region { }; /* - * The bit 0 ~ bit 15 of kvm_memory_region::flags are visible for userspace, - * other bits are reserved for kvm internal use which are defined in - * include/linux/kvm_host.h. + * The bit 0 ~ bit 15 of kvm_userspace_memory_region::flags are visible for + * userspace, other bits are reserved for kvm internal use which are defined + * in include/linux/kvm_host.h. */ #define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0) #define KVM_MEM_READONLY (1UL << 1) diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h index 6ba2928f8f18..21d6d29502e4 100644 --- a/tools/include/uapi/linux/kvm.h +++ b/tools/include/uapi/linux/kvm.h @@ -96,9 +96,9 @@ struct kvm_userspace_memory_region { }; /* - * The bit 0 ~ bit 15 of kvm_memory_region::flags are visible for userspace, - * other bits are reserved for kvm internal use which are defined in - * include/linux/kvm_host.h. + * The bit 0 ~ bit 15 of kvm_userspace_memory_region::flags are visible for + * userspace, other bits are reserved for kvm internal use which are defined + *in include/linux/kvm_host.h. */ #define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0) #define KVM_MEM_READONLY (1UL << 1) From patchwork Fri Dec 2 10:50:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 13062616 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49A32C4332F for ; Fri, 2 Dec 2022 10:51:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233355AbiLBKvg (ORCPT ); Fri, 2 Dec 2022 05:51:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233172AbiLBKv2 (ORCPT ); Fri, 2 Dec 2022 05:51:28 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A34EC7275 for ; Fri, 2 Dec 2022 02:50:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669978233; 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: in-reply-to:in-reply-to:references:references; bh=01EVu86F03ZVkaisaIA8aOhxapK6bD5iJUUbcQRNmys=; b=gRBpVn4XFihIn5sMWZ7vHPj7PrTqcPk7f3MON2lpeIUdwZDH/iz1Zp1x2Rx6qagylD8apH jj/4jxKXIM+n0hu4onVD7EoxT0wcrykZ2IOaLze5fo44iNwf4gLwW6ziBSjZpN/MB/+yz7 gi/YUlstB6B/dNnINKtWBpK/A9f8Bvk= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-271-c-fSbOTqP-iZPQwqIgeMDA-1; Fri, 02 Dec 2022 05:50:31 -0500 X-MC-Unique: c-fSbOTqP-iZPQwqIgeMDA-1 Received: by mail-wr1-f70.google.com with SMTP id e7-20020adf9bc7000000b00242121eebe2so969476wrc.3 for ; Fri, 02 Dec 2022 02:50:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=01EVu86F03ZVkaisaIA8aOhxapK6bD5iJUUbcQRNmys=; b=1sHW1xd9Bg5KSvx/uqa2nuNbR4W2UDpaw3D4Hbj2YaoRiKsne0JcSS4QyH/SAh/pDl CRhA6leOFmaT714/zsD25WD/KwVK5AJ3bZssv1lm2RbUO229Lz4kEe7bO5/BmQlnPOfL Wz5m87JpCH++8RCng0jyVTqa1OnrEREEg5X9mRTM6owZNdihAxLMMpQsBlBuyabYBIB/ U9VkeUts1J65L0iAUfka7YM2J6KxnyRCGFHjXjp9MnNgvvrZqki8GRUosmCXP+l1LL/3 sN5O02dRRXuuHmCLaNKrPsDwSMl5klD2+3gugtms4k+MFzQwy/YkjpUpBfEsHcnqeXgZ xB3w== X-Gm-Message-State: ANoB5pm6L02RvzySueBGGKQGJTaNw4WW57xMWz/R7uXv3tv+oAlfjRFj L5LoJGxxnY6mb93hLd9FFccDCL/Gs4MgkFg1CCLf6FihGF35YotE95axATBkBYNlqQZOeSSXYAf 0VRPgqzxKnKLP X-Received: by 2002:adf:e105:0:b0:236:73af:f9ad with SMTP id t5-20020adfe105000000b0023673aff9admr42046588wrz.225.1669978230867; Fri, 02 Dec 2022 02:50:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf5gKhowvqyk/ROz6Tub/sMJPyTW0HCi4czVL2HWfKAPTpnGRqZYvsKYMG8CpBMMwJo8CzalVg== X-Received: by 2002:adf:e105:0:b0:236:73af:f9ad with SMTP id t5-20020adfe105000000b0023673aff9admr42046575wrz.225.1669978230635; Fri, 02 Dec 2022 02:50:30 -0800 (PST) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id bg2-20020a05600c3c8200b003a3170a7af9sm9728818wmb.4.2022.12.02.02.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 02:50:29 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Paolo Bonzini , Sergio Lopez Pascual , Sean Christopherson , Javier Martinez Canillas , Jonathan Corbet , kvm@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v2 4/4] KVM: Add missing arch for KVM_CREATE_DEVICE and KVM_{SET,GET}_DEVICE_ATTR Date: Fri, 2 Dec 2022 11:50:11 +0100 Message-Id: <20221202105011.185147-5-javierm@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221202105011.185147-1-javierm@redhat.com> References: <20221202105011.185147-1-javierm@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The ioctls are missing an architecture property that is present in others. Suggested-by: Sergio Lopez Pascual Signed-off-by: Javier Martinez Canillas --- (no changes since v1) Documentation/virt/kvm/api.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index b15ea129f9cf..1db60cd9e1ba 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -3266,6 +3266,7 @@ valid entries found. ---------------------- :Capability: KVM_CAP_DEVICE_CTRL +:Architectures: all :Type: vm ioctl :Parameters: struct kvm_create_device (in/out) :Returns: 0 on success, -1 on error @@ -3306,6 +3307,7 @@ number. :Capability: KVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device, KVM_CAP_VCPU_ATTRIBUTES for vcpu device KVM_CAP_SYS_ATTRIBUTES for system (/dev/kvm) device (no set) +:Architectures: x86, arm64, s390 :Type: device ioctl, vm ioctl, vcpu ioctl :Parameters: struct kvm_device_attr :Returns: 0 on success, -1 on error