ferror(fp));
> + goto out;
> + }
> +
> + TEST_ASSERT(!strncmp(clk_name, "tsc\n", st.st_size),
> + "clocksource not supported: %s", clk_name);
> +out:
> + fclose(fp);
> +}
> +
> +static void configure_pvclock(
ad_t task_thread, vcpu_thread;
> +
> +static void guest_code(uint64_t *is_hlt_exec)
> +{
> + while (!READ_ONCE(*is_hlt_exec))
> + ;
> +
> + safe_halt();
May I confirm if this selftest works on nested L1 VM as a hypervisor?
Thank you very much!
Dongli Zhang
Add the missing close(fd) in guest_memfd_test.c and
private_mem_conversions_test.c.
Signed-off-by: Dongli Zhang
---
tools/testing/selftests/kvm/guest_memfd_test.c | 3 +++
.../selftests/kvm/x86_64/private_mem_conversions_test.c| 2 ++
2 files changed, 5 insertions
!
Dongli Zhang
On 1/6/24 00:33, Dongli Zhang wrote:
> There is kvmclock drift issue during the vCPU hotplug. It has been fixed by
> the commit c52ffadc65e2 ("KVM: x86: Don't unnecessarily force masterclock
> update on vCPU hotplug").
>
> This is to add the test to verify
ock_drift.c:216: clock_old == clock_new
pid=14257 tid=14257 errno=4 - Interrupted system call
1 0x0040277b: main at kvm_clock_drift.c:216
2 0x7f7766fa7e44: ?? ??:0
3 0x0040286d: _start at ??:?
kvmclock drift detected, old=5012221999, new=501411
Signed-off-b
Hi Sean and Andrew,
On 10/18/23 23:51, Andrew Jones wrote:
> On Wed, Oct 18, 2023 at 12:51:55PM -0700, Sean Christopherson wrote:
>> On Fri, Oct 06, 2023, Dongli Zhang wrote:
>>> As inspired by the discussion in [1], the boottime wallclock may drift due
>>> to the fa
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 fact that the masterclock (or host monotonic clock) and kvmclock are
>> ca
diagnose the wallclock drift issue in the future.
The idea is to wrmsr the MSR_KVM_WALL_CLOCK_NEW, and read the boottime
wallclock nanoseconds immediately.
References:
[1] https://lore.kernel.org/all/2023100313.77586-1-nsa...@amazon.com
Cc: David Woodhouse
Signed-off-by: Dongli Zhang
---
tools