On Thu, 2024-06-27 at 10:42 -0700, Sean Christopherson wrote:
> On Fri, Jun 21, 2024, Maxim Levitsky wrote:
> > Currently this test does a single CLFLUSH on its memory location
> > but due to speculative execution this might not cause LLC misses.
> >
> > Instead, do
On Fri, 2024-06-21 at 16:43 -0400, Maxim Levitsky wrote:
> Currently this test does a single CLFLUSH on its memory location
> but due to speculative execution this might not cause LLC misses.
>
> Instead, do a cache flush on each loop iteration to confuse the prediction
> and make
ed
on each iteration of the measured loop which should at least reduce by order
of magnitude the chance of this happening.
This patch survived more that a day of running in a loop on a Comet Lake
machine,
where the test used to fail after about 10-20 minites.
Best regards,
Maxim Levitsky
Currently this test does a single CLFLUSH on its memory location
but due to speculative execution this might not cause LLC misses.
Instead, do a cache flush on each loop iteration to confuse the prediction
and make sure that cache misses always occur.
Signed-off-by: Maxim Levitsky
On Fri, 2024-03-15 at 10:35 -0400, Maxim Levitsky wrote:
> max_guest_memory_test uses ucalls to sync with the host, but
> it also resets the guest RIP back to its initial value in between
> tests stages.
>
> This makes the guest never reach the code which frees the ucall struc
more that 256 vCPUs are used.
Fix that by replacing the manual register reset with a loop in
the guest code.
Signed-off-by: Maxim Levitsky
---
.../testing/selftests/kvm/max_guest_memory_test.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/tools/testing
У вт, 2023-10-10 у 09:31 -0700, Dongli Zhang пише:
> Hi Maxim,
>
> On 10/10/23 09:13, Maxim Levitsky wrote:
> > У пт, 2023-10-06 у 10:57 -0700, Dongli Zhang пише:
> > > As inspired by the discussion in [1], the boottime wallclock may drift due
> > > to the f
; + period = atoi_positive("The period (seconds)", optarg);
> + break;
> + case 'h':
> + default:
> + pr_info("usage: %s [-p period (seconds)]\n", argv[0]);
> + exit(1);
> + }
> + }
> +
> + pr_info("Capture boottime wallclock every %d seconds.\n", period);
> + pr_info("Stop with Ctrl + c.\n\n");
> +
> + vm = vm_create_with_one_vcpu(&vcpu, guest_main);
> +
> + wc_gva = vm_vaddr_alloc(vm, getpagesize(), 0x1);
> + wc_gpa = addr_gva2gpa(vm, wc_gva);
> + vcpu_args_set(vcpu, 2, wc_gpa, wc_gva);
> +
> + enter_guest(vcpu);
> + kvm_vm_free(vm);
> +}
Best regards,
Maxim Levitsky
ex 1cceac5984daa..319460090a836 100644
> --- a/arch/x86/kernel/kvm.c
> +++ b/arch/x86/kernel/kvm.c
> @@ -44,7 +44,7 @@
> #include
> #include
>
> -DEFINE_STATIC_KEY_FALSE(kvm_async_pf_enabled);
> +DEFINE_STATIC_KEY_FALSE_RO(kvm_async_pf_enabled);
>
> static int kvmapf = 1;
>
Reviewed-by: Maxim Levitsky
Best regards,
Maxim Levitsky