* [PATCH 01/11] tools headers: Sync KVM headers with the kernel source [not found] <20250825215904.2594216-1-namhyung@kernel.org> @ 2025-08-25 21:58 ` Namhyung Kim 2025-08-25 21:59 ` [PATCH 11/11] tools headers: Sync uapi/linux/vhost.h " Namhyung Kim 1 sibling, 0 replies; 3+ messages in thread From: Namhyung Kim @ 2025-08-25 21:58 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Ian Rogers, Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users, Paolo Bonzini, kvm To pick up the changes in this cset: f55ce5a6cd33211c KVM: arm64: Expose new KVM cap for cacheable PFNMAP 28224ef02b56fcee KVM: TDX: Report supported optional TDVMCALLs in TDX capabilities 4580dbef5ce0f95a KVM: TDX: Exit to userspace for SetupEventNotifyInterrupt 25e8b1dd4883e6c2 KVM: TDX: Exit to userspace for GetTdVmCallInfo cf207eac06f661fb KVM: TDX: Handle TDG.VP.VMCALL<GetQuote> This addresses these perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h Please see tools/include/uapi/README for further details. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: kvm@vger.kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org> --- tools/arch/x86/include/uapi/asm/kvm.h | 8 +++++++- tools/include/uapi/linux/kvm.h | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/tools/arch/x86/include/uapi/asm/kvm.h b/tools/arch/x86/include/uapi/asm/kvm.h index 6f3499507c5efb56..0f15d683817d6a77 100644 --- a/tools/arch/x86/include/uapi/asm/kvm.h +++ b/tools/arch/x86/include/uapi/asm/kvm.h @@ -965,7 +965,13 @@ struct kvm_tdx_cmd { struct kvm_tdx_capabilities { __u64 supported_attrs; __u64 supported_xfam; - __u64 reserved[254]; + + __u64 kernel_tdvmcallinfo_1_r11; + __u64 user_tdvmcallinfo_1_r11; + __u64 kernel_tdvmcallinfo_1_r12; + __u64 user_tdvmcallinfo_1_r12; + + __u64 reserved[250]; /* Configurable CPUID bits for userspace */ struct kvm_cpuid2 cpuid; diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h index 7415a3863891c042..f0f0d49d25443552 100644 --- a/tools/include/uapi/linux/kvm.h +++ b/tools/include/uapi/linux/kvm.h @@ -178,6 +178,7 @@ struct kvm_xen_exit { #define KVM_EXIT_NOTIFY 37 #define KVM_EXIT_LOONGARCH_IOCSR 38 #define KVM_EXIT_MEMORY_FAULT 39 +#define KVM_EXIT_TDX 40 /* For KVM_EXIT_INTERNAL_ERROR */ /* Emulate instruction failed. */ @@ -447,6 +448,31 @@ struct kvm_run { __u64 gpa; __u64 size; } memory_fault; + /* KVM_EXIT_TDX */ + struct { + __u64 flags; + __u64 nr; + union { + struct { + __u64 ret; + __u64 data[5]; + } unknown; + struct { + __u64 ret; + __u64 gpa; + __u64 size; + } get_quote; + struct { + __u64 ret; + __u64 leaf; + __u64 r11, r12, r13, r14; + } get_tdvmcall_info; + struct { + __u64 ret; + __u64 vector; + } setup_event_notify; + }; + } tdx; /* Fix the size of the union. */ char padding[256]; }; @@ -935,6 +961,7 @@ struct kvm_enable_cap { #define KVM_CAP_ARM_EL2 240 #define KVM_CAP_ARM_EL2_E2H0 241 #define KVM_CAP_RISCV_MP_STATE_RESET 242 +#define KVM_CAP_ARM_CACHEABLE_PFNMAP_SUPPORTED 243 struct kvm_irq_routing_irqchip { __u32 irqchip; -- 2.51.0.261.g7ce5a0a67e-goog ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 11/11] tools headers: Sync uapi/linux/vhost.h with the kernel source [not found] <20250825215904.2594216-1-namhyung@kernel.org> 2025-08-25 21:58 ` [PATCH 01/11] tools headers: Sync KVM headers with the kernel source Namhyung Kim @ 2025-08-25 21:59 ` Namhyung Kim 2025-08-26 7:38 ` Michael S. Tsirkin 1 sibling, 1 reply; 3+ messages in thread From: Namhyung Kim @ 2025-08-25 21:59 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Ian Rogers, Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users, Michael S. Tsirkin, Jason Wang, kvm, virtualization To pick up the changes in this cset: 7d9896e9f6d02d8a vhost: Reintroduce kthread API and add mode selection 333c515d189657c9 vhost-net: allow configuring extended features This addresses these perf build warnings: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/uapi/linux/vhost.h include/uapi/linux/vhost.h Please see tools/include/uapi/README for further details. Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Jason Wang <jasowang@redhat.com> Cc: kvm@vger.kernel.org Cc: virtualization@lists.linux.dev Signed-off-by: Namhyung Kim <namhyung@kernel.org> --- * This is on top of the fix below: https://lore.kernel.org/r/20250819063958.833770-1-namhyung@kernel.org .../trace/beauty/include/uapi/linux/vhost.h | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tools/perf/trace/beauty/include/uapi/linux/vhost.h b/tools/perf/trace/beauty/include/uapi/linux/vhost.h index d4b3e2ae1314d1fc..c57674a6aa0dbbea 100644 --- a/tools/perf/trace/beauty/include/uapi/linux/vhost.h +++ b/tools/perf/trace/beauty/include/uapi/linux/vhost.h @@ -235,4 +235,39 @@ */ #define VHOST_VDPA_GET_VRING_SIZE _IOWR(VHOST_VIRTIO, 0x82, \ struct vhost_vring_state) + +/* Extended features manipulation */ +#define VHOST_GET_FEATURES_ARRAY _IOR(VHOST_VIRTIO, 0x83, \ + struct vhost_features_array) +#define VHOST_SET_FEATURES_ARRAY _IOW(VHOST_VIRTIO, 0x83, \ + struct vhost_features_array) + +/* fork_owner values for vhost */ +#define VHOST_FORK_OWNER_KTHREAD 0 +#define VHOST_FORK_OWNER_TASK 1 + +/** + * VHOST_SET_FORK_FROM_OWNER - Set the fork_owner flag for the vhost device, + * This ioctl must called before VHOST_SET_OWNER. + * Only available when CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y + * + * @param fork_owner: An 8-bit value that determines the vhost thread mode + * + * When fork_owner is set to VHOST_FORK_OWNER_TASK(default value): + * - Vhost will create vhost worker as tasks forked from the owner, + * inheriting all of the owner's attributes. + * + * When fork_owner is set to VHOST_FORK_OWNER_KTHREAD: + * - Vhost will create vhost workers as kernel threads. + */ +#define VHOST_SET_FORK_FROM_OWNER _IOW(VHOST_VIRTIO, 0x84, __u8) + +/** + * VHOST_GET_FORK_OWNER - Get the current fork_owner flag for the vhost device. + * Only available when CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y + * + * @return: An 8-bit value indicating the current thread mode. + */ +#define VHOST_GET_FORK_FROM_OWNER _IOR(VHOST_VIRTIO, 0x85, __u8) + #endif -- 2.51.0.261.g7ce5a0a67e-goog ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 11/11] tools headers: Sync uapi/linux/vhost.h with the kernel source 2025-08-25 21:59 ` [PATCH 11/11] tools headers: Sync uapi/linux/vhost.h " Namhyung Kim @ 2025-08-26 7:38 ` Michael S. Tsirkin 0 siblings, 0 replies; 3+ messages in thread From: Michael S. Tsirkin @ 2025-08-26 7:38 UTC (permalink / raw) To: Namhyung Kim Cc: Arnaldo Carvalho de Melo, Ian Rogers, Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users, Jason Wang, kvm, virtualization On Mon, Aug 25, 2025 at 02:59:03PM -0700, Namhyung Kim wrote: > To pick up the changes in this cset: > > 7d9896e9f6d02d8a vhost: Reintroduce kthread API and add mode selection > 333c515d189657c9 vhost-net: allow configuring extended features > > This addresses these perf build warnings: > > Warning: Kernel ABI header differences: > diff -u tools/perf/trace/beauty/include/uapi/linux/vhost.h include/uapi/linux/vhost.h > > Please see tools/include/uapi/README for further details. > > Cc: "Michael S. Tsirkin" <mst@redhat.com> > Cc: Jason Wang <jasowang@redhat.com> > Cc: kvm@vger.kernel.org > Cc: virtualization@lists.linux.dev > Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Should I queue it? > --- > * This is on top of the fix below: > https://lore.kernel.org/r/20250819063958.833770-1-namhyung@kernel.org > > .../trace/beauty/include/uapi/linux/vhost.h | 35 +++++++++++++++++++ > 1 file changed, 35 insertions(+) > > diff --git a/tools/perf/trace/beauty/include/uapi/linux/vhost.h b/tools/perf/trace/beauty/include/uapi/linux/vhost.h > index d4b3e2ae1314d1fc..c57674a6aa0dbbea 100644 > --- a/tools/perf/trace/beauty/include/uapi/linux/vhost.h > +++ b/tools/perf/trace/beauty/include/uapi/linux/vhost.h > @@ -235,4 +235,39 @@ > */ > #define VHOST_VDPA_GET_VRING_SIZE _IOWR(VHOST_VIRTIO, 0x82, \ > struct vhost_vring_state) > + > +/* Extended features manipulation */ > +#define VHOST_GET_FEATURES_ARRAY _IOR(VHOST_VIRTIO, 0x83, \ > + struct vhost_features_array) > +#define VHOST_SET_FEATURES_ARRAY _IOW(VHOST_VIRTIO, 0x83, \ > + struct vhost_features_array) > + > +/* fork_owner values for vhost */ > +#define VHOST_FORK_OWNER_KTHREAD 0 > +#define VHOST_FORK_OWNER_TASK 1 > + > +/** > + * VHOST_SET_FORK_FROM_OWNER - Set the fork_owner flag for the vhost device, > + * This ioctl must called before VHOST_SET_OWNER. > + * Only available when CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y > + * > + * @param fork_owner: An 8-bit value that determines the vhost thread mode > + * > + * When fork_owner is set to VHOST_FORK_OWNER_TASK(default value): > + * - Vhost will create vhost worker as tasks forked from the owner, > + * inheriting all of the owner's attributes. > + * > + * When fork_owner is set to VHOST_FORK_OWNER_KTHREAD: > + * - Vhost will create vhost workers as kernel threads. > + */ > +#define VHOST_SET_FORK_FROM_OWNER _IOW(VHOST_VIRTIO, 0x84, __u8) > + > +/** > + * VHOST_GET_FORK_OWNER - Get the current fork_owner flag for the vhost device. > + * Only available when CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y > + * > + * @return: An 8-bit value indicating the current thread mode. > + */ > +#define VHOST_GET_FORK_FROM_OWNER _IOR(VHOST_VIRTIO, 0x85, __u8) > + > #endif > -- > 2.51.0.261.g7ce5a0a67e-goog ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-26 7:38 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20250825215904.2594216-1-namhyung@kernel.org> 2025-08-25 21:58 ` [PATCH 01/11] tools headers: Sync KVM headers with the kernel source Namhyung Kim 2025-08-25 21:59 ` [PATCH 11/11] tools headers: Sync uapi/linux/vhost.h " Namhyung Kim 2025-08-26 7:38 ` Michael S. Tsirkin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).