lkml.org 
[lkml]   [2020]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 2/2] KVM: x86: introduce KVM_X86_QUIRK_TSC_HOST_ACCESS
    From
    Date
    On 30/11/20 15:11, Maxim Levitsky wrote:
    > On Mon, 2020-11-30 at 14:54 +0100, Paolo Bonzini wrote:
    >> On 30/11/20 14:35, Maxim Levitsky wrote:
    >>> This quirk reflects the fact that we currently treat MSR_IA32_TSC
    >>> and MSR_TSC_ADJUST access by the host (e.g qemu) in a way that is different
    >>> compared to an access from the guest.
    >>>
    >>> For host's MSR_IA32_TSC read we currently always return L1 TSC value, and for
    >>> host's write we do the tsc synchronization.
    >>>
    >>> For host's MSR_TSC_ADJUST write, we don't make the tsc 'jump' as we should
    >>> for this msr.
    >>>
    >>> When the hypervisor uses the new TSC GET/SET state ioctls, all of this is no
    >>> longer needed, thus leave this enabled only with a quirk
    >>> which the hypervisor can disable.
    >>>
    >>> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
    >>> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
    >>
    >> This needs to be covered by a variant of the existing selftests testcase
    >> (running the same guest code, but different host code of course).
    > Do you think that the test should go to the kernel's kvm unit tests,
    > or to kvm-unit-tests project?

    The latter already has x86_64/tsc_msrs_test.c (which I created in
    preparation for this exact change :)).

    Paolo

    \
     
     \ /
      Last update: 2020-11-30 15:18    [W:2.960 / U:0.128 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site