Re: [PATCH v4 4/8] KVM: selftests: Introduce SEV VM type check

2025-01-13 Thread Pratik Rajesh Sampat
On 1/13/25 2:18 AM, Nikunj A. Dadhania wrote: > > > On 11/15/2024 5:11 AM, Pratik R. Sampat wrote: >> In preparation for SNP, declutter the vm type check by introducing a >> SEV-SNP VM type check as well a transitive set of helper functions. >> >> The SNP VM type is the subset of SEV-ES. Simil

Re: [PATCH v4 5/8] KVM: selftests: Add library support for interacting with SNP

2025-01-13 Thread Pratik Rajesh Sampat
On 1/13/25 2:32 AM, Nikunj A. Dadhania wrote: > > > On 11/15/2024 5:11 AM, Pratik R. Sampat wrote: >> Extend the SEV library to include support for SNP ioctl() wrappers, >> which aid in launching and interacting with a SEV-SNP guest. >> >> Signed-off-by: Pratik R. Sampat >> --- >> .../selfte

Re: [sos-linux-ext-patches] [PATCH v4 2/8] KVM: selftests: SEV-SNP test for KVM_SEV_INIT2

2025-01-10 Thread Pratik Rajesh Sampat
On 1/9/25 11:52 PM, Nikunj A. Dadhania wrote: > > > On 11/15/2024 5:10 AM, Pratik R. Sampat wrote: >> Add the X86_FEATURE_SNP CPU feature to the architectural definition for >> the SEV-SNP VM type to exercise the KVM_SEV_INIT2 call. Ensure that the >> SNP test is skipped in scenarios where CPU

Re: [sos-linux-ext-patches] [PATCH v4 1/8] KVM: SEV: Disable SEV-SNP on FW validation failure

2025-01-10 Thread Pratik Rajesh Sampat
Hi Nikunj, On 1/9/25 11:21 PM, Nikunj A. Dadhania wrote: > > > On 11/15/2024 5:10 AM, Pratik R. Sampat wrote: >> On incompatible firmware versions, SEV-SNP support is pulled and the >> setup is not performed. However, the platform and subsequently the KVM >> capability may continue to advertize

Re: [PATCH v4 0/8] Basic SEV-SNP Selftests

2025-01-07 Thread Pratik Rajesh Sampat
On 11/14/24 5:40 PM, Pratik R. Sampat wrote: > This patch series extends the sev_init2 and the sev_smoke test to > exercise the SEV-SNP VM launch workflow. > > Primarily, it introduces the architectural defines, its support in the SEV > library and extends the tests to interact with the SEV-SNP

[RFC v4 2/2] selftest/cpuidle: Add support for cpuidle latency measurement

2021-04-12 Thread Pratik Rajesh Sampat
cation in: tools/testing/selftest/cpuidle/cpuidle.log To run the test without re-compiling: $ cd tools/testing/selftest/cpuidle/ $ sudo ./cpuidle.sh Signed-off-by: Pratik Rajesh Sampat --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/cpuidle/Makefile | 6 +

[RFC v4 0/2] CPU-Idle latency selftest framework

2021-04-12 Thread Pratik Rajesh Sampat
devised by Artem Bityutskiy from Intel. https://youtu.be/Opk92aQyvt0?t=8266 https://intel.github.io/wult/ Pratik Rajesh Sampat (2): cpuidle: Extract IPI based and timer based wakeup latency from idle states selftest/cpuidle: Add support for cpuidle latency measurement drivers/cpu

[RFC v4 1/2] cpuidle: Extract IPI based and timer based wakeup latency from idle states

2021-04-12 Thread Pratik Rajesh Sampat
simple debugfs interface to control the knobs to fire the IPI and Timer events on specified CPU and view their incurred idle wakeup latencies. Signed-off-by: Pratik Rajesh Sampat --- drivers/cpuidle/Makefile | 1 + drivers/cpuidle/test-cpuidle_latency.c | 157

[RFC v3 2/2] selftest/cpuidle: Add support for cpuidle latency measurement

2021-04-04 Thread Pratik Rajesh Sampat
cation in: tools/testing/selftest/cpuidle/cpuidle.log To run the test without re-compiling: $ cd tools/testing/selftest/cpuidle/ $ sudo ./cpuidle.sh Signed-off-by: Pratik Rajesh Sampat --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/cpuidle/Makefile | 6 +

[RFC v3 1/2] cpuidle: Extract IPI based and timer based wakeup latency from idle states

2021-04-04 Thread Pratik Rajesh Sampat
simple debugfs interface to control the knobs to fire the IPI and Timer events on specified CPU and view their incurred idle wakeup latencies. Signed-off-by: Pratik Rajesh Sampat --- drivers/cpuidle/Makefile | 1 + drivers/cpuidle/test-cpuidle_latency.c | 157

[RFC v3 0/2] CPU-Idle latency selftest framework

2021-04-04 Thread Pratik Rajesh Sampat
Opk92aQyvt0?t=8266 https://intel.github.io/wult/ Pratik Rajesh Sampat (2): cpuidle: Extract IPI based and timer based wakeup latency from idle states selftest/cpuidle: Add support for cpuidle latency measurement drivers/cpuidle/Makefile | 1 + drivers

[RFC v2 0/2] CPU-Idle latency selftest framework

2021-04-01 Thread Pratik Rajesh Sampat
https://intel.github.io/wult/ Pratik Rajesh Sampat (2): cpuidle: Extract IPI based and timer based wakeup latency from idle states selftest/cpuidle: Add support for cpuidle latency measurement drivers/cpuidle/Makefile | 1 + drivers/cpuidle/test-cpuidle_latency

[RFC v2 1/2] cpuidle: Extract IPI based and timer based wakeup latency from idle states

2021-04-01 Thread Pratik Rajesh Sampat
simple debugfs interface to control the knobs to fire the IPI and Timer events on specified CPU and view their incurred idle wakeup latencies. Signed-off-by: Pratik Rajesh Sampat --- drivers/cpuidle/Makefile | 1 + drivers/cpuidle/test-cpuidle_latency.c | 157

[RFC v2 2/2] selftest/cpuidle: Add support for cpuidle latency measurement

2021-04-01 Thread Pratik Rajesh Sampat
cation in: tools/testing/selftest/cpuidle/cpuidle.log Signed-off-by: Pratik Rajesh Sampat --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/cpuidle/Makefile | 6 + tools/testing/selftests/cpuidle/cpuidle.sh | 323 + tools/testing/selftests/cpuidle/se

[RFC 0/2] CPU-Idle latency selftest framework

2021-03-15 Thread Pratik Rajesh Sampat
10) For solution to this problem, a hardware based latency analyzer is devised by Artem Bityutskiy from Intel. https://youtu.be/Opk92aQyvt0?t=8266 https://intel.github.io/wult/ Pratik Rajesh Sampat (2): cpuidle: Extract IPI based and timer based wakeup latency from idle states

[RFC 1/2] cpuidle: Extract IPI based and timer based wakeup latency from idle states

2021-03-15 Thread Pratik Rajesh Sampat
simple debugfs interface to control the knobs to fire the IPI and Timer events on specified CPU and view their incurred idle wakeup latencies. Signed-off-by: Pratik Rajesh Sampat --- drivers/cpuidle/Makefile | 1 + drivers/cpuidle/test-cpuidle_latency.c | 157

[RFC 2/2] selftest/cpuidle: Add support for cpuidle latency measurement

2021-03-15 Thread Pratik Rajesh Sampat
puidle/cpuidle.log Signed-off-by: Pratik Rajesh Sampat --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/cpuidle/Makefile | 6 + tools/testing/selftests/cpuidle/cpuidle.sh | 316 + tools/testing/selftests/cpuidle/settings | 2 + 4 files chang

[RFC v5 1/1] selftests/cpuidle: Add support for cpuidle latency measurement

2020-10-04 Thread Pratik Rajesh Sampat
taken at 100 percent CPU usage to quantify for the kernel-userpsace overhead during execution. Signed-off-by: Pratik Rajesh Sampat --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/cpuidle/Makefile | 7 + tools/testing/selftests/cpuidle/cpuidle.c | 479

[RFC v5 0/1] Selftest for cpuidle latency measurement

2020-10-04 Thread Pratik Rajesh Sampat
0 8 273553 Expected IPI latency(ns): 10 Observed Average IPI latency(ns): 248334 Pratik Rajesh Sampat (1): selftests/cpuidle: Add support for cpuidle latency measurement tools/testing/selftests/Makefile | 1 + tools/testing/selftests/cpuidle/Makefile | 7 + to

[RFC v4 1/1] selftests/cpuidle: Add support for cpuidle latency measurement

2020-09-02 Thread Pratik Rajesh Sampat
case of IPI and timers is taken at 100 percent CPU usage to quantify for the kernel-userpsace overhead during execution. Signed-off-by: Pratik Rajesh Sampat --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/cpuidle/Makefile | 7 + tools/testing/selftests/cpuidle

[RFC v4 0/1] Selftest for cpuidle latency measurement

2020-09-02 Thread Pratik Rajesh Sampat
ncy measurement: CPU Busy-- Wakeup_src Baseline_delay(ns) ... 32 972405 33 1004287 34 986663 35 994022 Expected timeout(ns): 1000 Observed Average timeout diff(ns): 991844 Pratik Rajesh Sampat (1): selftests/cpuidle: Add support for cpuidle latency measurem

[PATCH] Revert "powerpc/powernv/idle: Replace CPU feature check with PVR check"

2020-08-26 Thread Pratik Rajesh Sampat
8747bf36f312356f8a295a0c39ff092d65ce75ae. Fixes: 8747bf36f312 ("powerpc/powernv/idle: Replace CPU feature check with PVR check") Signed-off-by: Pratik Rajesh Sampat --- @mpe: This revert would resolve a staging issue wherein the P10 stop driver is not yet ready while cpuidle stop states need not be b

[PATCH v4 1/3] powerpc/powernv/idle: Replace CPU features check with PVR check

2020-07-21 Thread Pratik Rajesh Sampat
e PVR check on the outer level function, subsequently in the hierarchy keeping the CPU_FTR_ARCH_300 check intact as it is a faster check to do because of static branches Signed-off-by: Pratik Rajesh Sampat --- arch/powerpc/platforms/powernv/idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v4 3/3] powerpc/powernv/idle: Exclude mfspr on HID1,4,5 on P9 and above

2020-07-21 Thread Pratik Rajesh Sampat
POWER9 onwards the support for the registers HID1, HID4, HID5 has been receded. Although mfspr on the above registers worked in Power9, In Power10 simulator is unrecognized. Moving their assignment under the check for machines lower than Power9 Signed-off-by: Pratik Rajesh Sampat Reviewed-by

[PATCH v4 0/3] powernv/idle: Power9 idle cleanup

2020-07-21 Thread Pratik Rajesh Sampat
ion pnv_probe_idle_states and let the rest of the checks be DT based because it is faster to do so Pratik Rajesh Sampat (3): powerpc/powernv/idle: Replace CPU features check with PVR check powerpc/powernv/idle: Rename pnv_first_spr_loss_level variable powerpc/powernv/idle: Exclude mfspr on HID1,4,5 on P9

[PATCH v4 2/3] powerpc/powernv/idle: Rename pnv_first_spr_loss_level variable

2020-07-21 Thread Pratik Rajesh Sampat
ce renaming the variable to be coherent to its semantics. Signed-off-by: Pratik Rajesh Sampat --- arch/powerpc/platforms/powernv/idle.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/pow

[PATCH v3 0/2] Selftest for cpuidle latency measurement

2020-07-21 Thread Pratik Rajesh Sampat
9 10911 10 10912 11 12100 12 73276 Expected timeout(ns): 1200 Observed Average timeout diff(ns): 23589 Pratik Rajesh Sampat (2): cpuidle: Trace IPI based and timer b

[PATCH v3 2/2] selftest/cpuidle: Add support for cpuidle latency measurement

2020-07-21 Thread Pratik Rajesh Sampat
for the IPI and timer tests; first disable all idle states and then test for latency measurements incrementally enabling each state Signed-off-by: Pratik Rajesh Sampat --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/cpuidle/Makefile | 6 + tools/testing/selftests

[PATCH v3 1/2] cpuidle: Trace IPI based and timer based wakeup latency from idle states

2020-07-21 Thread Pratik Rajesh Sampat
fix some of the time calculation] [e...@linux.vnet.ibm.com: Fix some whitespace and tab errors and increase the resolution of IPI wakeup] Signed-off-by: Pratik Rajesh Sampat Reviewed-by: Gautham R. Shenoy --- drivers/cpuidle/Makefile | 1 + drivers/cpuidle/test-cpuidle_latenc

[PATCH v3 1/3] powerpc/powernv/idle: Replace CPU features checks with PVR checks

2020-07-17 Thread Pratik Rajesh Sampat
ratik Rajesh Sampat --- arch/powerpc/platforms/powernv/idle.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c index 2dd467383a88..f62904f70fc6 100644 --- a/arch/powerpc/platforms/powernv/i

[PATCH v3 2/3] powerpc/powernv/idle: Rename pnv_first_spr_loss_level variable

2020-07-17 Thread Pratik Rajesh Sampat
terminology. Signed-off-by: Pratik Rajesh Sampat --- arch/powerpc/platforms/powernv/idle.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c index f62904f70fc6..d439e11af101 10064

[PATCH v3 3/3] powerpc/powernv/idle: Exclude mfspr on HID1,4,5 on P9 and above

2020-07-17 Thread Pratik Rajesh Sampat
POWER9 onwards the support for the registers HID1, HID4, HID5 has been receded. Although mfspr on the above registers worked in Power9, In Power10 simulator is unrecognized. Moving their assignment under the check for machines lower than Power9 Signed-off-by: Pratik Rajesh Sampat Reviewed-by

[PATCH v3 0/3] powernv/idle: Power9 idle cleanup

2020-07-17 Thread Pratik Rajesh Sampat
ave multiple ways to handling idle 2. Removed saving-restoring DAWR, DAWRX patch for P10 systems. Based on discussions it has become evident that checks based on PVR is the way to go; however, P10 PVR is yet to up-stream hence shelving this patch for later. Pratik Rajesh Sampat (3): powe

[PATCH v2 2/2] selftest/cpuidle: Add support for cpuidle latency measurement

2020-07-17 Thread Pratik Rajesh Sampat
for the IPI and timer tests; first disable all idle states and then test for latency measurements incrementally enabling each state Signed-off-by: Pratik Rajesh Sampat --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/cpuidle/Makefile | 6 + tools/testing/selftests

[PATCH v2 0/2] Selftest for cpuidle latency measurement

2020-07-17 Thread Pratik Rajesh Sampat
12 73276 Expected timeout(ns): 10000200 Observed Average timeout diff(ns): 23589 Pratik Rajesh Sampat (2): cpuidle: Trace IPI based and timer based wakeup latency from idle states selftest/cpuidle: Add support for cpuidle latency measurement drive

[PATCH v2 1/2] cpuidle: Trace IPI based and timer based wakeup latency from idle states

2020-07-17 Thread Pratik Rajesh Sampat
fix some of the time calculation] [e...@linux.vnet.ibm.com: Fix some whitespace and tab errors and increase the resolution of IPI wakeup] Signed-off-by: Pratik Rajesh Sampat --- drivers/cpuidle/Makefile | 1 + drivers/cpuidle/test-cpuidle_latency.c |

[PATCH v2 2/3] powerpc/powernv/idle: save-restore DAWR0,DAWRX0 for P10

2020-07-09 Thread Pratik Rajesh Sampat
Additional registers DAWR0, DAWRX0 may be lost on Power 10 for stop levels < 4. Therefore save the values of these SPRs before entering a "stop" state and restore their values on wakeup. Signed-off-by: Pratik Rajesh Sampat --- arch/powerpc/platforms/powernv/idle.c | 10 +

[PATCH v2 1/3] powerpc/powernv/idle: Exclude mfspr on HID1,4,5 on P9 and above

2020-07-09 Thread Pratik Rajesh Sampat
POWER9 onwards the support for the registers HID1, HID4, HID5 has been receded. Although mfspr on the above registers worked in Power9, In Power10 simulator is unrecognized. Moving their assignment under the check for machines lower than Power9 Signed-off-by: Pratik Rajesh Sampat Reviewed-by

[PATCH v2 3/3] powerpc/powernv/idle: Rename pnv_first_spr_loss_level variable

2020-07-09 Thread Pratik Rajesh Sampat
terminology. Signed-off-by: Pratik Rajesh Sampat --- arch/powerpc/platforms/powernv/idle.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c index f2e2a6a4c274..d54e7ef234e3 10064

[PATCH v2 0/3] Power10 basic energy management

2020-07-09 Thread Pratik Rajesh Sampat
Changelog v1 --> v2: 1. Save-restore DAWR and DAWRX unconditionally as they are lost in shallow idle states too 2. Rename pnv_first_spr_loss_level to pnv_first_fullstate_loss_level to correct naming terminology Pratik Rajesh Sampat (3): powerpc/powernv/idle: Exclude mfspr on HID1,4,5 on P9

[PATCH 1/2] cpuidle: Trace IPI based and timer based wakeup latency from idle states

2020-07-07 Thread Pratik Rajesh Sampat
fix some of the time calculation] [e...@linux.vnet.ibm.com: Fix some whitespace and tab errors and increase the resolution of IPI wakeup] Signed-off-by: Pratik Rajesh Sampat --- drivers/cpuidle/Makefile | 1 + drivers/cpuidle/test-cpuidle_latency.c |

[PATCH 2/2] selftest/cpuidle: Add support for cpuidle latency measurement

2020-07-07 Thread Pratik Rajesh Sampat
for the IPI and timer tests; first disable all idle states and then test for latency measurements incrementally enabling each state Signed-off-by: Pratik Rajesh Sampat --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/cpuidle/Makefile | 6 + tools/testing/selftests

[PATCH 0/2] Selftest for cpuidle latency measurement

2020-07-07 Thread Pratik Rajesh Sampat
22 2198 32421 2325 . . . . Expected timeout(ns): 200 Baseline Average timeout diff(ns): 2513 Observed Average timeout diff(ns): 2189 Pratik Rajesh Sampat (2): cpuidle: Trace IPI based and timer based wakeup latency from idle states selftest/cpuidle: Add supp

[PATCH 1/2] powerpc/powernv/idle: Exclude mfspr on HID1,4,5 on P9 and above

2020-07-03 Thread Pratik Rajesh Sampat
POWER9 onwards the support for the registers HID1, HID4, HID5 has been receded. Although mfspr on the above registers worked in Power9, In Power10 simulator is unrecognized. Moving their assignment under the check for machines lower than Power9 Signed-off-by: Pratik Rajesh Sampat --- arch

[PATCH 2/2] powerpc/powernv/idle: save-restore DAWR0,DAWRX0 for P10

2020-07-03 Thread Pratik Rajesh Sampat
Additional registers DAWR0, DAWRX0 may be lost on Power 10 for stop levels < 4. Therefore save the values of these SPRs before entering a "stop" state and restore their values on wakeup. Signed-off-by: Pratik Rajesh Sampat --- arch/powerpc/platforms/powernv/idle.c | 10 +

[RFC 1/1] Weighted approach to gather and use history in TEO governor

2020-05-11 Thread Pratik Rajesh Sampat
uld have woken up with (could be the hit / miss / early hit state) is increased in weight by the "LEARNING_RATE" % and the rest of the states for that index are reduced by the same factor. The LEARNING RATE is experimentally chosen to be 10 % Signed-off-by: Pratik Rajesh Sampat --- drivers

[RFC 0/1] Alternate history mechanism for the TEO governor

2020-05-11 Thread Pratik Rajesh Sampat
-+ | 100 | 100 | 100.04 | 100.2 | +-+--+--+---+ Power :Socket: Consistent between 135-140 watts for both TEO and Wt. TEO Pipe: Consistent between 125-130 watts for both TEO and Wt. TEO Pratik