Re: [PATCH net-next v2 0/4] virtio_net: Fixes and improvements

2025-03-24 Thread Lei Yang
QE tested this series of patches v2 with virtio-net regression tests, everything works fine. Tested-by: Lei Yang On Sat, Mar 22, 2025 at 2:27 AM Michael S. Tsirkin wrote: > > On Fri, Mar 21, 2025 at 03:48:31PM +0900, Akihiko Odaki wrote: > > Jason Wang recently proposed an improvement to struct

[PATCH] virtio_console: fix order of fields cols and rows

2025-03-24 Thread Maximilian Immanuel Brandtner
According to section 5.3.6.2 (Multiport Device Operation) of the virtio spec(version 1.2) a control buffer with the event VIRTIO_CONSOLE_RESIZE is followed by a virtio_console_resize struct containing cols then rows. The kernel implements this the wrong way around (rows then cols) resulting in the

[PATCH v4 37/38] KVM: Selftests: Support mediated vPMU for vmx_pmu_caps_test

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Define KVM_ONE_VCPU_PMU_TEST_SUITE macro which calls vm_create_with_one_vcpu_with_pmu() to create mediated vPMU enabled VM. Then vmx_pmu_caps_test can supported mediated vPMU's validation. Signed-off-by: Dapeng Mi Signed-off-by: Mingwei Zhang --- .../selftests/kvm/include/kvm

[PATCH v4 35/38] KVM: x86/pmu: Expose enable_mediated_pmu parameter to user space

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Expose enable_mediated_pmu parameter to user space, then users can enable/disable mediated vPMU on demand. Signed-off-by: Dapeng Mi Signed-off-by: Mingwei Zhang --- arch/x86/kvm/svm/svm.c | 2 ++ arch/x86/kvm/vmx/vmx.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arc

[PATCH v4 38/38] KVM: Selftests: Fix pmu_counters_test error for mediated vPMU

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi As previous patch commit 'f8905c638eb7 ("KVM: x86/pmu: Check PMU cpuid configuration from user space")', KVM would check if user space configured pmu version is larger than KVM supported maximum pmu version for mediated vPMU, or if fixed counter bitmap is configured incorrectly, i

[PATCH v4 34/38] perf/x86/amd: Support PERF_PMU_CAP_MEDIATED_VPMU for AMD host

2025-03-24 Thread Mingwei Zhang
From: Sandipan Das Apply the PERF_PMU_CAP_MEDIATED_VPMU flag for version 2 and later implementations of the core PMU. Aside from having Global Control and Status registers, virtualizing the PMU using the passthrough model requires an interface to set or clear the overflow bits in the Global Statu

[PATCH v4 30/38] KVM: x86/pmu: Handle emulated instruction for mediated vPMU

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Mediated vPMU needs to accumulate the emulated instructions into counter and load the counter into HW at vm-entry. Moreover, if the accumulation leads to counter overflow, KVM needs to update GLOBAL_STATUS and inject PMI into guest as well. Suggested-by: Sean Christopherson Sig

[PATCH v4 29/38] KVM: x86/pmu: Switch host/guest PMU context at vm-exit/vm-entry

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi This patch supports to switch host/guest PMU context at vm-exit/vm-entry for mediated vPMU. In details, kvm_pmu_put_guest_context() is called to save guest PMU context and load host PMU context at VM-exits and kvm_pmu_load_guest_context() is called to save host PMU context and lo

Re: [PATCH v3 1/7] dt-bindings: input: syna,rmi4: document syna,pdt-fallback-desc

2025-03-24 Thread David Heidelberg
On 10/03/2025 10:45, Krzysztof Kozlowski wrote: On Sat, Mar 08, 2025 at 03:08:37PM +0100, David Heidelberg wrote: From: Caleb Connolly This new property allows devices to specify some register values which are missing on units with third party replacement displays. These displays use unofficia

Re: [PATCH v2 2/2] selftests: livepatch: test if ftrace can trace a livepatched function

2025-03-24 Thread Joe Lawrence
On Tue, Mar 18, 2025 at 06:20:36PM -0300, Filipe Xavier wrote: > This new test makes sure that ftrace can trace a > function that was introduced by a livepatch. > > Signed-off-by: Filipe Xavier > --- > tools/testing/selftests/livepatch/test-ftrace.sh | 34 > > 1 file ch

[PATCH v4 32/38] KVM: nVMX: Add nested virtualization support for mediated PMU

2025-03-24 Thread Mingwei Zhang
Add nested virtualization support for mediated PMU by combining the MSR interception bitmaps of vmcs01 and vmcs12. Readers may argue even without this patch, nested virtualization works for mediated PMU because L1 will see Perfmon v2 and will have to use legacy vPMU implementation if it is Linux. H

Re: [PATCH] selftests/x86/lam: fix memory leak and resource leak in lam.c

2025-03-24 Thread Peter Zijlstra
On Mon, Mar 24, 2025 at 06:17:50PM +0530, Malaya Kumar Rout wrote: > Static Analyis for bench_htab_mem.c with cppcheck:error > tools/testing/selftests/x86/lam.c:585:3: > error: Resource leak: file_fd [resourceLeak] > tools/testing/selftests/x86/lam.c:593:3: > error: Resource leak: file_fd [resource

Re: [RFC PATCH v3 7/8] perf: arm_pmuv3: Keep out of guest counter partition

2025-03-24 Thread James Clark
On 13/02/2025 6:03 pm, Colton Lewis wrote: If the PMU is partitioned, keep the driver out of the guest counter partition and only use the host counter partition. Partitioning is defined by the MDCR_EL2.HPMN register field and saved in cpu_pmu->hpmn. The range 0..HPMN-1 is accessible by EL1 and

Re: [PATCH 1/1] virtio_console: fix missing byte order handling for cols and rows

2025-03-24 Thread Maximilian Immanuel Brandtner
On Sat, 2025-03-22 at 01:29 +0100, Halil Pasic wrote: > As per virtio spec the fields cols and rows are specified as little > endian. Although there is no legacy interface requirement that would > state that cols and rows need to be handled as native endian when > legacy > interface is used, unlike

Re: [PATCH v2 2/4] dt-bindings: clock: add SM6350 QCOM video clock bindings

2025-03-24 Thread Rob Herring (Arm)
On Mon, 24 Mar 2025 09:41:02 +0100, Luca Weiss wrote: > From: Konrad Dybcio > > Add device tree bindings for video clock controller for SM6350 SoCs. > > Signed-off-by: Konrad Dybcio > Co-developed-by: Luca Weiss > Signed-off-by: Luca Weiss > --- > .../devicetree/bindings/clock/qcom,videocc

[PATCH v4 20/38] KVM: x86/pmu: Check if mediated vPMU can intercept rdpmc

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Check if rdpmc can be intercepted for mediated vPMU. Simply speaking, if guest own all PMU counters in mediated vPMU, then rdpmc interception should be disabled to mitigate the performance impact, otherwise rdpmc has to be intercepted to avoid guest obtain host counter's data via

Re: [PATCH v2 1/2] selftests: livepatch: add new ftrace helpers functions

2025-03-24 Thread Joe Lawrence
On Tue, Mar 18, 2025 at 06:20:35PM -0300, Filipe Xavier wrote: > Add new ftrace helpers functions cleanup_tracing, trace_function and > check_traced_functions. > > Signed-off-by: Filipe Xavier > --- > tools/testing/selftests/livepatch/functions.sh | 49 > ++ > 1 file cha

Re: [PATCH v7 0/3] x86/tdx: Fix HLT logic execution for TDX VMs

2025-03-24 Thread Ryan Afranji
Tested with the specjbb2015 benchmark. It has heavy lock contention which leads to many halt calls. TDX VMs suffered a poor score before this patchset. Verified the major performance improvement with this patchset applied. Tested-by: Ryan Afranji

[PATCH v4 09/38] perf: Add switch_guest_ctx() interface

2025-03-24 Thread Mingwei Zhang
From: Kan Liang When entering/exiting a guest, some contexts for a guest have to be switched. For examples, there is a dedicated interrupt vector for guests on Intel platforms. When PMI switch into a new guest vector, guest_lvtpc value need to be reflected onto HW, e,g., guest clear PMI mask bit

Re: [PATCH net-next v24 09/23] ovpn: implement packet processing

2025-03-24 Thread Antonio Quartulli
On 24/03/2025 12:02, Sabrina Dubroca wrote: 2025-03-18, 02:40:44 +0100, Antonio Quartulli wrote: +int ovpn_crypto_state_reset(struct ovpn_crypto_state *cs, + const struct ovpn_peer_key_reset *pkr) +{ + struct ovpn_crypto_key_slot *old = NULL, *new; + u8 idx;

[PATCH v2 2/2] KVM: selftests: access_tracking_perf_test: add option to skip the sanity check

2025-03-24 Thread Maxim Levitsky
Add an option to skip sanity check of number of still idle pages, and set it by default to skip, in case hypervisor or NUMA balancing is detected. Signed-off-by: Maxim Levitsky --- .../selftests/kvm/access_tracking_perf_test.c | 33 --- .../testing/selftests/kvm/include/test_util

[PATCH v2 0/2] KVM: selftests: access_tracking_perf_test: skip the test when NUMA balancing is active

2025-03-24 Thread Maxim Levitsky
Due to several issues which are unlikely to be fixed in the near future, the access_tracking_perf_test sanity check for how many pages are still clean after an iteration is not reliable when NUMA balancing is active. This patch series refactors this test to skip this check by default automaticall

[PATCH 2/3] KVM: riscv: selftests: Decode stval to identify exact exception type

2025-03-24 Thread Atish Patra
Currently, the sbi_pmu_test continues if the exception type is illegal instruction because access to hpmcounter will generate that. However, we may get illegal for other reasons as well which should result in test assertion. Use the stval to decode the exact type of instructions and which csrs are

[PATCH 0/3] RISC-V KVM selftests improvements

2025-03-24 Thread Atish Patra
| 2 + tools/testing/selftests/kvm/riscv/get-reg-list.c | 111 - tools/testing/selftests/kvm/riscv/sbi_pmu_test.c | 32 ++ 4 files changed, 145 insertions(+), 1 deletion(-) --- base-commit: b3f263a98d30fe2e33eefea297598c590ee3560e change-id: 20250324

Re: [GIT PULL] slab updates for 6.15

2025-03-24 Thread pr-tracker-bot
The pull request you sent on Thu, 20 Mar 2025 14:06:42 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git > tags/slab-for-6.15 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/05b00ffd7a0bf31f45b63242f30b3a8a0008fa78 Thank you! -- Deet-doot-dot, I

[PATCH 1/3] KVM: riscv: selftests: Add stval to exception handling

2025-03-24 Thread Atish Patra
Save stval during exception handling so that it can be decoded to figure out the details of exception type. Signed-off-by: Atish Patra --- tools/testing/selftests/kvm/include/riscv/processor.h | 1 + tools/testing/selftests/kvm/lib/riscv/handlers.S | 2 ++ 2 files changed, 3 insertions(+)

[PATCH v2 1/2] KVM: selftests: Extract guts of THP accessor to standalone sysfs helpers

2025-03-24 Thread Maxim Levitsky
From: Sean Christopherson Extract the guts of thp_configured() and get_trans_hugepagesz() to standalone helpers so that the core logic can be reused for other sysfs files, e.g. to query numa_balancing. Opportunistically assert that the initial fscanf() read at least one byte, and add a comment e

Re: [PATCH net-next v24 09/23] ovpn: implement packet processing

2025-03-24 Thread Qingfang Deng
Hi Antonio, On Tue, 18 Mar 2025 02:40:44 +0100, Antonio Quartulli wrote: > > This change implements encryption/decryption and > encapsulation/decapsulation of OpenVPN packets. > > Support for generic crypto state is added along with > a wrapper for the AEAD crypto kernel API. > > Signed-off-by:

Re: [PATCH 3/3] selftests: vDSO: chacha: Provide default definition of HWCAP_S390_VXRS

2025-03-24 Thread Heiko Carstens
On Mon, Mar 24, 2025 at 03:03:17PM +0100, Thomas Weißschuh wrote: > s390 does not provide a hwcap.h UAPI header. > > Add an inline definition for the constant HWCAP_S390_VXRS until a proper > UAPI header is introduced. > > Fixes: 210860e7f733 ("selftests: vDSO: check cpu caps before running chach

Re: [PATCH v2] remoteproc: imx_dsp_rproc: Add support for DSP-specific features

2025-03-24 Thread Mathieu Poirier
Good day Iuliana, On Tue, Mar 18, 2025 at 11:50:07PM +0200, Iuliana Prodan (OSS) wrote: > From: Iuliana Prodan > > Some DSP firmware requires a FW_READY signal before proceeding, while > others do not. > Therefore, add support to handle i.MX DSP-specific features. > > Implement handle_rsc callb

[PATCH] selftests/x86/lam: fix memory leak and resource leak in lam.c

2025-03-24 Thread Malaya Kumar Rout
Static Analyis for bench_htab_mem.c with cppcheck:error tools/testing/selftests/x86/lam.c:585:3: error: Resource leak: file_fd [resourceLeak] tools/testing/selftests/x86/lam.c:593:3: error: Resource leak: file_fd [resourceLeak] tools/testing/selftests/x86/lam.c:600:3: error: Memory leak: fi [memlea

[RFC][PATCH] sched,livepatch: Untangle cond_resched() and live-patching

2025-03-24 Thread Peter Zijlstra
With the goal of deprecating / removing VOLUNTARY preempt, live-patch needs to stop relying on cond_resched() to make forward progress. Instead, rely on schedule() with TASK_FREEZABLE set. Just like live-patching, the freezer needs to be able to stop tasks in a safe / known state. Compile teste

RE: [PATCH 3/4] x86/sgx: Define error codes for ENCLS[EUPDATESVN]

2025-03-24 Thread Reshetova, Elena
> On Fri, Mar 21, 2025 at 02:34:42PM +0200, Elena Reshetova wrote: > > Add error codes for ENCLS[EUPDATESVN], then SGX CPUSVN update > > process can know the execution state of EUPDATESVN. > > > > Enumerate the error codes. You mean in the commit message or? > Do we need all of the three ad

[PATCH v3 2/2] arm64: Implement HAVE_LIVEPATCH

2025-03-24 Thread Song Liu
This is largely based on [1] by Suraj Jitindar Singh. Test coverage: - Passed manual tests with samples/livepatch. - Passed all but test-kprobe.sh in selftests/livepatch. test-kprobe.sh is expected to fail, because arm64 doesn't have KPROBES_ON_FTRACE. - Passed tests with kpatch-build [2]. (T

[PATCH v4 01/38] perf: Support get/put mediated PMU interfaces

2025-03-24 Thread Mingwei Zhang
From: Kan Liang Currently, the guest and host share the PMU resources when a guest is running. KVM has to create an extra virtual event to simulate the guest's event, which brings several issues, e.g., high overhead, not accuracy and etc. A new mediated PMU method is proposed to address the issu

[PATCH v4 13/38] perf/x86/core: Plumb mediated PMU capability from x86_pmu to x86_pmu_cap

2025-03-24 Thread Mingwei Zhang
Plumb mediated PMU capability to x86_pmu_cap in order to let any kernel entity such as KVM know that host PMU support mediated PMU mode and has the implementation. Signed-off-by: Mingwei Zhang --- arch/x86/events/core.c| 1 + arch/x86/include/asm/perf_event.h | 1 + 2 files changed,

[PATCH v4 00/38] Mediated vPMU 4.0 for x86

2025-03-24 Thread Mingwei Zhang
With joint effort from the upstream KVM community, we come up with the 4th version of mediated vPMU for x86. We have made the following changes on top of the previous RFC v3. v3 -> v4 - Rebase whole patchset on 6.14-rc3 base. - Address Peter's comments on Perf part. - Address Sean's comments on

[PATCH v4 07/38] perf: core/x86: Register a new vector for KVM GUEST PMI

2025-03-24 Thread Mingwei Zhang
From: Xiong Zhang Create a new vector in the host IDT for kvm guest PMI handling within mediated passthrough vPMU. In addition, guest PMI handler registration is added into x86_set_kvm_irq_handler(). This is the preparation work to support mediated passthrough vPMU to handle kvm guest PMIs witho

[PATCH v4 04/38] perf: Add a EVENT_GUEST flag

2025-03-24 Thread Mingwei Zhang
From: Kan Liang Current perf doesn't explicitly schedule out all exclude_guest events while the guest is running. There is no problem with the current emulated vPMU. Because perf owns all the PMU counters. It can mask the counter which is assigned to an exclude_guest event when a guest is running

[PATCH v4 05/38] perf: Add generic exclude_guest support

2025-03-24 Thread Mingwei Zhang
From: Kan Liang Only KVM knows the exact time when a guest is entering/exiting. Expose two interfaces to KVM to switch the ownership of the PMU resources. All the pinned events must be scheduled in first. Extend the perf_event_sched_in() helper to support extra flag, e.g., EVENT_GUEST. Signed-o

[PATCH v4 11/38] perf/x86: Forbid PMI handler when guest own PMU

2025-03-24 Thread Mingwei Zhang
If a guest PMI is delivered after VM-exit, the KVM maskable interrupt will be held pending until EFLAGS.IF is set. In the meantime, if the logical processor receives an NMI for any reason at all, perf_event_nmi_handler() will be invoked. If there is any active perf event anywhere on the system, x86

[PATCH 03/10] samples/livepatch: add module descriptions

2025-03-24 Thread Arnd Bergmann
From: Arnd Bergmann Every module should have a description, so add one for each of these modules. Signed-off-by: Arnd Bergmann --- samples/livepatch/livepatch-callbacks-busymod.c | 1 + samples/livepatch/livepatch-callbacks-demo.c| 1 + samples/livepatch/livepatch-callbacks-mod.c | 1 +

[PATCH v4 10/38] perf/x86: Support switch_guest_ctx interface

2025-03-24 Thread Mingwei Zhang
From: Kan Liang Implement switch_guest_ctx interface for x86 PMU, switch PMI to dedicated KVM_GUEST_PMI_VECTOR at perf guest enter, and switch PMI back to NMI at perf guest exit. Signed-off-by: Xiong Zhang Signed-off-by: Kan Liang Tested-by: Yongwei Ma Signed-off-by: Mingwei Zhang --- arch/

[PATCH v4 12/38] perf/x86/core: Do not set bit width for unavailable counters

2025-03-24 Thread Mingwei Zhang
From: Sandipan Das Not all x86 processors have fixed counters. It may also be the case that a processor has only fixed counters and no general-purpose counters. Set the bit widths corresponding to each counter type only if such counters are available. Fixes: b3d9468a8bd2 ("perf, x86: Expose perf

[PATCH v4 14/38] KVM: x86/pmu: Introduce enable_mediated_pmu global parameter

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Introduce enable_mediated_pmu global parameter to control if mediated vPMU can be enabled on KVM level. Even enable_mediated_pmu is set to true in KVM, user space hypervisor still need to enable mediated vPMU explicitly by calling KVM_CAP_PMU_CAPABILITY ioctl. This gives hyperviso

[PATCH v4 15/38] KVM: x86/pmu: Check PMU cpuid configuration from user space

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Check user space's PMU cpuid configuration and filter the invalid configuration. Either legacy perf-based vPMU or mediated vPMU needs kernel to support local APIC, otherwise PMI has no way to be injected into guest. If kernel doesn't support local APIC, reject user space to enabl

[PATCH v4 16/38] KVM: x86: Rename vmx_vmentry/vmexit_ctrl() helpers

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Rename the two helpers vmx_vmentry/vmexit_ctrl() to vmx_get_initial_vmentry/vmexit_ctrl() to represent their real meaning. No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: Dapeng Mi Signed-off-by: Mingwei Zhang --- arch/x86/kvm/vmx/vmx.c | 8 ++

[PATCH v4 18/38] KVM: x86/pmu: Move PMU_CAP_{FW_WRITES,LBR_FMT} into msr-index.h header

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Move PMU_CAP_{FW_WRITES,LBR_FMT} into msr-index.h and rename them with PERF_CAP prefix to keep consistent with other perf capabilities macros. No functional change intended. Signed-off-by: Dapeng Mi Signed-off-by: Mingwei Zhang --- arch/x86/include/asm/msr-index.h | 15 ++

[PATCH v4 19/38] KVM: VMX: Add macros to wrap around {secondary,tertiary}_exec_controls_changebit()

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Add macros around helpers that changes VMCS bits to simplify vmx exec ctrl bits clearing and setting. No function change intended. Suggested-by: Sean Christopherson Signed-off-by: Dapeng Mi Signed-off-by: Mingwei Zhang --- arch/x86/kvm/vmx/vmx.c | 20 +++- ar

[PATCH v4 23/38] KVM: x86/pmu: Configure the interception of PMU MSRs

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Add helper intel_pmu_update_msr_intercepts() to configure the interception of PMU MSRs. For mediated vPMU, intercept all the guest owned GP counters EVENTSELx MSRs and fixed counters FIX_CTR_CTRL MSR (Intel only). This is because KVM needs to intercept the event configuration and

[PATCH v4 24/38] KVM: x86/pmu: Exclude PMU MSRs in vmx_get_passthrough_msr_slot()

2025-03-24 Thread Mingwei Zhang
Reject PMU MSRs interception explicitly in vmx_get_passthrough_msr_slot() since interception of PMU MSRs are specially handled in intel_passthrough_pmu_msrs(). Signed-off-by: Mingwei Zhang Co-developed-by: Dapeng Mi Signed-off-by: Dapeng Mi --- arch/x86/kvm/vmx/vmx.c | 12 +++- 1 file

[PATCH v4 26/38] KVM: x86/pmu: Introduce eventsel_hw to prepare for pmu event filtering

2025-03-24 Thread Mingwei Zhang
Introduce eventsel_hw and fixed_ctr_ctrl_hw to store the actual HW value in PMU event selector MSRs. In mediated PMU checks events before allowing the event values written to the PMU MSRs. However, to match the HW behavior, when PMU event checks fails, KVM should allow guest to read the value back.

[PATCH v4 28/38] KVM: x86/pmu/svm: Set GuestOnly bit and clear HostOnly bit when guest writes to event selectors

2025-03-24 Thread Mingwei Zhang
From: Sandipan Das On AMD platforms, there is no way to restore PerfCntrGlobalCtl at VM-Entry or clear it at VM-Exit. Since the register states will be restored before entering and saved after exiting guest context, the counters can keep ticking and even overflow leading to chaos while still in h

[PATCH v4 25/38] KVM: x86/pmu: Add AMD PMU registers to direct access list

2025-03-24 Thread Mingwei Zhang
From: Sandipan Das Add all PMU-related MSRs (including legacy K7 MSRs) to the list of possible direct access MSRs. Most of them will not be intercepted when using passthrough PMU. Signed-off-by: Sandipan Das Signed-off-by: Mingwei Zhang --- arch/x86/kvm/svm/svm.c | 24 +++

[PATCH v4 08/38] KVM: x86/pmu: Register KVM_GUEST_PMI_VECTOR handler

2025-03-24 Thread Mingwei Zhang
From: Xiong Zhang Add function to register/unregister guest KVM PMI handler at KVM module initialization and destroy. This allows the host PMU with passthough capability enabled can switch PMI handler at PMU context switch. Signed-off-by: Xiong Zhang Tested-by: Yongwei Ma Signed-off-by: Mingwe

[PATCH v4 33/38] perf/x86/intel: Support PERF_PMU_CAP_MEDIATED_VPMU

2025-03-24 Thread Mingwei Zhang
From: Kan Liang Apply the PERF_PMU_CAP_MEDIATED_VPMU for Intel core PMU. It only indicates that the perf side of core PMU is ready to support the passthrough vPMU. Besides the capability, the hypervisor should still need to check the PMU version and other capabilities to decide whether to enable

[PATCH v4 31/38] KVM: nVMX: Add macros to simplify nested MSR interception setting

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Add macros nested_vmx_merge_msr_bitmaps_xxx() to simplify nested MSR interception setting. No function change intended. Suggested-by: Sean Christopherson Signed-off-by: Dapeng Mi Signed-off-by: Mingwei Zhang --- arch/x86/kvm/vmx/nested.c | 35 +++--

[PATCH 2/3] rcu: Add warning to ensure rcu_seq_done_exact() is working

2025-03-24 Thread Joel Fernandes
The previous patch improved the rcu_seq_done_exact() function by adding a meaningful constant for the guardband. Ensure that this is working for the future by a quick check during rcu_gp_init(). Signed-off-by: Joel Fernandes --- kernel/rcu/tree.c | 5 + 1 file changed, 5 insertions(+) diff

[PATCH 3/3] rcu: Comment on the extraneous delta test on rcu_seq_done_exact()

2025-03-24 Thread Joel Fernandes
From: Frederic Weisbecker The numbers used in rcu_seq_done_exact() lack some explanation behind their magic. Especially after the commit: 85aad7cc4178 ("rcu: Fix get_state_synchronize_rcu_full() GP-start detection") which reported a subtle issue where a new GP sequence snapshot was taken o

[PATCH 1/3] rcu: Replace magic number with meaningful constant in rcu_seq_done_exact()

2025-03-24 Thread Joel Fernandes
The rcu_seq_done_exact() function checks if a grace period has completed by comparing sequence numbers. It includes a guard band to handle sequence number wraparound, which was previously expressed using the magic number calculation '3 * RCU_SEQ_STATE_MASK + 1'. This magic number is not immediatel

Re: [PATCH 00/19] virtio_ring in order support

2025-03-24 Thread Lei Yang
QE tested this series of patches with virtio-net regression tests, everything works fine. Tested-by: Lei Yang On Mon, Mar 24, 2025 at 1:45 PM Jason Wang wrote: > > Hello all: > > This sereis tries to implement the VIRTIO_F_IN_ORDER to > virtio_ring. This is done by introducing virtqueue ops so

[PATCH 1/3] selftests: vDSO: chacha: Correctly skip test if necessary

2025-03-24 Thread Thomas Weißschuh
According to kselftest.h ksft_exit_skip() is not meant to be called when a plan has already been printed. Use the recommended function ksft_test_result_skip(). This fixes a bug, where the TAP output would be invalid when skipping: TAP version 13 1..1 ok 2 # SKIP Not imple

[PATCH 2/3] selftests: vDSO: chacha: Include asm/hwcap.h for arm64

2025-03-24 Thread Thomas Weißschuh
The hwcap constants are not available unconditionally. Include asm/hwcap.h to make them available. Not all architectures provide this header, so gate the inclusion behind an architecture-specific ifdef. Fixes: 210860e7f733 ("selftests: vDSO: check cpu caps before running chacha test") Signed-of

[PATCH 0/3] selftests: vDSO: chacha: Bugfixes

2025-03-24 Thread Thomas Weißschuh
HWCAP_S390_VXRS tools/testing/selftests/vDSO/vdso_test_chacha.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) --- base-commit: 586de92313fcab8ed84ac5f78f4d2aae2db92c59 change-id: 20250324-s390-vdso-hwcap-0914c0f7c7f1 Best regards, -- Thomas Weißschuh

[PATCH 3/3] selftests: vDSO: chacha: Provide default definition of HWCAP_S390_VXRS

2025-03-24 Thread Thomas Weißschuh
s390 does not provide a hwcap.h UAPI header. Add an inline definition for the constant HWCAP_S390_VXRS until a proper UAPI header is introduced. Fixes: 210860e7f733 ("selftests: vDSO: check cpu caps before running chacha test") Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/vDSO/v

Re: [PATCH] kunit: cs_dsp: Depend on FW_CS_DSP rather then enabling it

2025-03-24 Thread Nico Pache
On Fri, Mar 21, 2025 at 9:51 AM Mark Brown wrote: > > On Fri, Mar 21, 2025 at 09:01:35AM -0600, Nico Pache wrote: > > On Fri, Mar 21, 2025 at 8:51 AM Mark Brown wrote: > > > > That user select should only be visible if KUnit is enabled though, > > > it really is library code so shouldn't actually

Re: [PATCH] kunit: cs_dsp: Depend on FW_CS_DSP rather then enabling it

2025-03-24 Thread Nico Pache
On Sat, Mar 22, 2025 at 4:11 AM Richard Fitzgerald wrote: > > On 20/3/25 17:35, Nico Pache wrote: > > Sorry links got mangled > > > Thanks. I'm on vacation right now but I'll take a look through > all those when I have time. Ok thanks! no rush, enjoy your vacation! If the links go stale (i'm not

Re: [PATCH v2 1/2] selftests: livepatch: add new ftrace helpers functions

2025-03-24 Thread Joe Lawrence
On Tue, Mar 18, 2025 at 06:20:35PM -0300, Filipe Xavier wrote: > [ ... snip ... ] > > + if [[ -n "$FTRACE_FILTER" ]]; then > + echo "$FTRACE_FILTER" \ > + | sed -e "/ all functions enabled /d" > + > "$SYSFS_TRACING_DIR/set_ftrace_filt

[PATCH] KVM: selftests: Fix a couple "prio" signedness bugs

2025-03-24 Thread Dan Carpenter
There is an assert which relies on "prio" to be signed. GUEST_ASSERT(prio >= 0); Change the type from uint32_t to int. Fixes: 728fcc46d2c2 ("KVM: selftests: aarch64: Add test for restoring active IRQs") Fixes: 0ad3ff4a6adc ("KVM: selftests: aarch64: Add preemption tests in vgic_irq") S

[PATCH 0/3] Add video clock controller for SM6350

2025-03-24 Thread Luca Weiss
The driver for the SM6350 videocc has been lying around in some branches of my git tree for a long time, let's upstream it. It doesn't get any better by letting it age! Signed-off-by: Luca Weiss --- Konrad Dybcio (2): dt-bindings: clock: add SM6350 QCOM video clock bindings clk: qcom:

[PATCH v6 3/5] arm64: dts: imx8mp: Configure dsp node for rproc usage

2025-03-24 Thread Daniel Baluta
DSP can be used with various frameworks (e.g audio firmware, rproc). Currently 'dsp' configuration is intended for audio firmware but it doesn't work well with board level DTs (e.g imx8mp-evk) because board level DT enables audio related IPs (e.g SAI) while audio firmware needs this IPs disabled (b

[PATCH 3/3] KVM: riscv: selftests: Add vector extension tests

2025-03-24 Thread Atish Patra
Add vector related tests with the ISA extension standard template. However, the vector registers are bit tricky as the register length is variable based on vlenb value of the system. That's why the macros are defined with a default and overidden with actual value at runtime. Signed-off-by: Atish P

[PATCH 5.15.y] ipvs: properly dereference pe in ip_vs_add_service

2025-03-24 Thread Cliff Liu
From: Chen Hanxiao [ Upstream commit cbd070a4ae62f119058973f6d2c984e325bce6e7 ] Use pe directly to resolve sparse warning: net/netfilter/ipvs/ip_vs_ctl.c:1471:27: warning: dereference of noderef expression Fixes: 39b972231536 ("ipvs: handle connections started by real-servers") Signed-off-b

[PATCH 5.10.y] ipvs: properly dereference pe in ip_vs_add_service

2025-03-24 Thread Cliff Liu
From: Chen Hanxiao [ Upstream commit cbd070a4ae62f119058973f6d2c984e325bce6e7 ] Use pe directly to resolve sparse warning: net/netfilter/ipvs/ip_vs_ctl.c:1471:27: warning: dereference of noderef expression Fixes: 39b972231536 ("ipvs: handle connections started by real-servers") Signed-off-b

Re: [PATCH net-next v1 1/2] net: pktgen: add strict buffer parsing index check

2025-03-24 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 17 Mar 2025 10:04:00 +0100 you wrote: > Add strict buffer parsing index check to avoid the following Smatch > warning: > > net/core/pktgen.c:877 get_imix_entries() > warn: check that incremented offset '

[PATCH v3 1/2] selftests: livepatch: add new ftrace helpers functions

2025-03-24 Thread Filipe Xavier
Add new ftrace helpers functions cleanup_tracing, trace_function and check_traced_functions. Signed-off-by: Filipe Xavier --- tools/testing/selftests/livepatch/functions.sh | 49 ++ 1 file changed, 49 insertions(+) diff --git a/tools/testing/selftests/livepatch/functions

Re: [PATCH net-next v24 18/23] ovpn: implement peer add/get/dump/delete via netlink

2025-03-24 Thread Antonio Quartulli
On 24/03/2025 11:48, Sabrina Dubroca wrote: Hello Antonio, A few questions wrt the API: 2025-03-18, 02:40:53 +0100, Antonio Quartulli wrote: +static bool ovpn_nl_attr_sockaddr_remote(struct nlattr **attrs, +struct sockaddr_storage *ss) +{ + struct

[PATCH] selftests/nolibc: drop unnecessary sys/io.h include

2025-03-24 Thread Thomas Weißschuh
a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -16,7 +16,6 @@ #ifndef _NOLIBC_STDIO_H /* standard libcs need more includes */ #include -#include #include #include #include --- base-commit: bceb73904c855c78402dca94c82915f078f259dd chan

Re: [PATCH] virtio_console: fix order of fields cols and rows

2025-03-24 Thread Daniel Verkamp
On Mon, Mar 24, 2025 at 7:43 AM Maximilian Immanuel Brandtner wrote: > > According to section 5.3.6.2 (Multiport Device Operation) of the virtio > spec(version 1.2) a control buffer with the event VIRTIO_CONSOLE_RESIZE > is followed by a virtio_console_resize struct containing cols then rows. > Th

[PATCH v4 06/38] x86/irq: Factor out common code for installing kvm irq handler

2025-03-24 Thread Mingwei Zhang
From: Xiong Zhang KVM will register irq handler for POSTED_INTR_WAKEUP_VECTOR and KVM_GUEST_PMI_VECTOR, the existing kvm_set_posted_intr_wakeup_handler() is renamed to x86_set_kvm_irq_handler(), and vector input parameter is used to distinguish POSTED_INTR_WARKUP_VECTOR and KVM_GUEST_PMI_VECTOR.

Re: [PATCH v8 0/3] rust: kunit: Support KUnit tests with a user-space like syntax

2025-03-24 Thread David Gow
On Thu, 20 Mar 2025 at 19:24, Miguel Ojeda wrote: > > On Fri, Mar 7, 2025 at 10:01 AM David Gow wrote: > > > > This is v8 of the Rust/KUnit integration patch. I think all of the > > suggestions have at least been responded to (even if there are a few I'm > > leaving as either future projects or m

Re: [PATCH v2 1/2] selftests: livepatch: add new ftrace helpers functions

2025-03-24 Thread Filipe Xavier
On 3/24/25 3:36 PM, Joe Lawrence wrote: On Tue, Mar 18, 2025 at 06:20:35PM -0300, Filipe Xavier wrote: [ ... snip ... ] + if [[ -n "$FTRACE_FILTER" ]]; then + echo "$FTRACE_FILTER" \ + | sed -e "/ all functions enabled /d" +

Re: [PATCH 3/3] arm64: dts: qcom: sm6350: Add video clock controller

2025-03-24 Thread Luca Weiss
On Fri Mar 21, 2025 at 5:23 PM CET, Dmitry Baryshkov wrote: > On 21/03/2025 18:15, Luca Weiss wrote: >> Hi Dmitry, >> >> On Fri Mar 21, 2025 at 4:56 PM CET, Dmitry Baryshkov wrote: >>> On Fri, Mar 21, 2025 at 03:45:01PM +0100, Luca Weiss wrote: Add a node for the videocc found on the SM6350 S

[PATCH v2 1/4] arm64: dts: qcom: sm6350: Align reg properties with latest style

2025-03-24 Thread Luca Weiss
While in the past the 'reg' properties were often written using decimal '0' for #address-cells = <2> & #size-cells = <2>, nowadays the style is to use hexadecimal '0x0' instead. Align this dtsi file to the new style to make it consistent, and don't use mixed 0x0 and 0 anymore. Signed-off-by: Luca

[PATCH v2 0/4] Add video clock controller for SM6350

2025-03-24 Thread Luca Weiss
The driver for the SM6350 videocc has been lying around in some branches of my git tree for a long time, let's upstream it. It doesn't get any better by letting it age! Signed-off-by: Luca Weiss --- Changes in v2: - Fix an uppercase hex in driver (Dmitry) - Use hex numbers for reg in dtsi (Dmitry

[PATCH v2 4/4] arm64: dts: qcom: sm6350: Add video clock controller

2025-03-24 Thread Luca Weiss
Add a node for the videocc found on the SM6350 SoC. Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index 42f9d16c2fa6da66a8bb524a3

[PATCH v2 3/4] clk: qcom: Add video clock controller driver for SM6350

2025-03-24 Thread Luca Weiss
From: Konrad Dybcio Add support for the video clock controller found on SM6350 based devices. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Co-developed-by: Luca Weiss Signed-off-by: Luca Weiss --- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile |

[PATCH v2 2/4] dt-bindings: clock: add SM6350 QCOM video clock bindings

2025-03-24 Thread Luca Weiss
From: Konrad Dybcio Add device tree bindings for video clock controller for SM6350 SoCs. Signed-off-by: Konrad Dybcio Co-developed-by: Luca Weiss Signed-off-by: Luca Weiss --- .../devicetree/bindings/clock/qcom,videocc.yaml| 20 include/dt-bindings/clock/qcom,sm6350-vide

RE: [PATCH 4/4] x86/sgx: Implement ENCLS[EUPDATESVN] and opportunistically call it during first EPC page alloc

2025-03-24 Thread Reshetova, Elena
> On Fri, Mar 21, 2025 at 02:34:43PM +0200, Elena Reshetova wrote: > > SGX architecture introduced a new instruction called EUPDATESVN [1] > > to Ice Lake. It allows updating security SVN version, given that EPC > > is completely empty. The latter is required for security reasons > > in order to

RE: [PATCH 1/4] x86/sgx: Add total number of EPC pages

2025-03-24 Thread Reshetova, Elena
> On Fri, Mar 21, 2025 at 02:34:40PM +0200, Elena Reshetova wrote: > > In order to successfully execute ENCLS[EUPDATESVN], EPC must be empty. > > SGX already has a variable sgx_nr_free_pages that tracks free > > EPC pages. Add a new variable, sgx_nr_total_pages, that will keep > > track of total nu

RE: [PATCH 2/4] x86/sgx: Change counter sgx_nr_free_pages -> sgx_nr_used_pages

2025-03-24 Thread Reshetova, Elena
> On Fri, Mar 21, 2025 at 02:34:41PM +0200, Elena Reshetova wrote: > > sgx_nr_free_pages is an atomic that is used to keep track of > > free EPC pages and detect whenever page reclaiming should start. > > Since successful execution of ENCLS[EUPDATESVN] requires empty > > EPC and a fast way of che

Re: [PATCH v2 1/4] arm64: dts: qcom: sm6350: Align reg properties with latest style

2025-03-24 Thread Dmitry Baryshkov
On Mon, Mar 24, 2025 at 09:41:01AM +0100, Luca Weiss wrote: > While in the past the 'reg' properties were often written using decimal > '0' for #address-cells = <2> & #size-cells = <2>, nowadays the style is > to use hexadecimal '0x0' instead. > > Align this dtsi file to the new style to make it c

Re: [PATCH v2 4/4] arm64: dts: qcom: sm6350: Add video clock controller

2025-03-24 Thread Dmitry Baryshkov
On Mon, Mar 24, 2025 at 09:41:04AM +0100, Luca Weiss wrote: > Add a node for the videocc found on the SM6350 SoC. > > Signed-off-by: Luca Weiss > --- > arch/arm64/boot/dts/qcom/sm6350.dtsi | 14 ++ > 1 file changed, 14 insertions(+) > Reviewed-by: Dmitry Baryshkov -- With best w

Re: [PATCH net-next v24 09/23] ovpn: implement packet processing

2025-03-24 Thread Sabrina Dubroca
2025-03-18, 02:40:44 +0100, Antonio Quartulli wrote: > +int ovpn_crypto_state_reset(struct ovpn_crypto_state *cs, > + const struct ovpn_peer_key_reset *pkr) > +{ > + struct ovpn_crypto_key_slot *old = NULL, *new; > + u8 idx; > + > + if (pkr->slot != OVPN_KEY_SLOT

Re: [PATCH net-next v24 18/23] ovpn: implement peer add/get/dump/delete via netlink

2025-03-24 Thread Sabrina Dubroca
Hello Antonio, A few questions wrt the API: 2025-03-18, 02:40:53 +0100, Antonio Quartulli wrote: > +static bool ovpn_nl_attr_sockaddr_remote(struct nlattr **attrs, > + struct sockaddr_storage *ss) > +{ > + struct sockaddr_in6 *sin6; > + struct sockaddr

[PATCH 18/19] virtio_ring: factor out split indirect detaching logic

2025-03-24 Thread Jason Wang
Factor out the split indirect descriptor detaching logic in order to make it be reused by the in order support. Signed-off-by: Jason Wang --- drivers/virtio/virtio_ring.c | 63 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/drivers/virtio/vir

Re: [GIT PULL] RCU changes for v6.15

2025-03-24 Thread pr-tracker-bot
The pull request you sent on Sat, 22 Mar 2025 19:21:24 -0700: > git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git > tags/rcu-next-v6.15 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/3ba7dfb8da62c43ea02bc278863367c2b0427cc1 Thank you! -- Deet-doot-dot, I

[PATCH v4 17/38] KVM: x86/pmu: Add perf_capabilities field in struct kvm_host_values{}

2025-03-24 Thread Mingwei Zhang
From: Dapeng Mi Add perf_capabilities in kvm_host_values{} structure to record host perf capabilities. KVM needs to know if host supports some PMU capabilities and then decide if passthrough or intercept some PMU MSRs or instruction like rdpmc, e.g. If host supports PERF_METRICES, but guest is co

Re: [PATCH v3] remoteproc: Add device awake calls in rproc boot and shutdown path

2025-03-24 Thread Souradeep Chowdhury
On 3/22/2025 3:51 AM, Bjorn Andersson wrote: On Mon, Mar 17, 2025 at 05:10:57PM +0530, Souradeep Chowdhury wrote: Add device awake calls in case of rproc boot and rproc shutdown path. Currently, device awake call is only present in the recovery path of remoteproc. If a user stops and starts r