• C
    kvm: svm: move WARN_ON in svm_adjust_tsc_offset · d913b904
    Chris J Arges 提交于
    When running the tsc_adjust kvm-unit-test on an AMD processor with the
    IA32_TSC_ADJUST feature enabled, the WARN_ON in svm_adjust_tsc_offset can be
    triggered. This WARN_ON checks for a negative adjustment in case __scale_tsc
    is called; however it may trigger unnecessary warnings.
    
    This patch moves the WARN_ON to trigger only if __scale_tsc will actually be
    called from svm_adjust_tsc_offset. In addition make adj in kvm_set_msr_common
    s64 since this can have signed values.
    Signed-off-by: NChris J Arges <chris.j.arges@canonical.com>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    d913b904
svm.c 113.4 KB