Defined in 1 files as a prototype:

Defined in 1 files as a function:

Referenced in 2 files:

Smatch caller information:

arch/x86/kvm/x86.c kvm_arch_vcpu_load() -> kvm_compute_l1_tsc_offset()

Type Parameter Key Value
PARAM_VALUE 0 vcpu 4096-ptr_max
BUF_SIZE 0 vcpu s32min-(-1),1-s32max
BUF_SIZE 0 vcpu s32min-(-1),1-s32max
BUF_SIZE 0 vcpu->arch.mce_banks (-1),8
BUF_SIZE 0 vcpu->arch.mci_ctl2_banks (-1),8
CAPPED_DATA 0 vcpu 1
DATA_SOURCE 0 vcpu $0
NOSPEC 0 vcpu->dirty_ring.index
NOSPEC 0 vcpu->vcpu_id
PREEMPT_ADD
RX_PATH
TASK_NOT_RUNNING
USER_DATA 0 vcpu->arch.guest_supported_xcr0 0-393983[c]
USER_DATA 0 vcpu->arch.guest_supported_xss 0-6144[c]
USER_DATA 0 vcpu->arch.hyperv_enabled 0[c]
USER_DATA 0 vcpu->arch.is_amd_compatible 0[c]
USER_DATA 0 vcpu->arch.l1_tsc_offset 0-u64max
USER_DATA 0 vcpu->arch.maxphyaddr 1-255[c]
USER_DATA 0 vcpu->arch.pv_cpuid.features 0-u32max
USER_DATA 0 vcpu->arch.pv_time.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.pv_time.kvm->arch.pre_fault_allowed 0-1
USER_DATA 0 vcpu->arch.pv_time.kvm->arch.vm_type 0-255
USER_DATA 0 vcpu->arch.tsc_offset 0-u64max
USER_DATA 0 vcpu->arch.virtual_tsc_khz 1-u32max
USER_DATA 0 vcpu->arch.xen.runstate2_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.runstate2_cache.kvm->arch.noncoherent_dma_count.counter 0
USER_DATA 0 vcpu->arch.xen.runstate2_cache.kvm->arch.pre_fault_allowed 0-1[c]
USER_DATA 0 vcpu->arch.xen.runstate2_cache.kvm->arch.vm_type 0-31
USER_DATA 0 vcpu->arch.xen.runstate_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.runstate_cache.kvm->arch.noncoherent_dma_count.counter 0
USER_DATA 0 vcpu->arch.xen.runstate_cache.kvm->arch.pre_fault_allowed 0-1[c]
USER_DATA 0 vcpu->arch.xen.runstate_cache.kvm->arch.vm_type 0-31
USER_DATA 0 vcpu->arch.xen.vcpu_info_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.vcpu_info_cache.kvm->arch.noncoherent_dma_count.counter 0
USER_DATA 0 vcpu->arch.xen.vcpu_info_cache.kvm->arch.pre_fault_allowed 0-1[c]
USER_DATA 0 vcpu->arch.xen.vcpu_info_cache.kvm->arch.vm_type 0-31
USER_DATA 0 vcpu->arch.xen.vcpu_time_info_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.vcpu_time_info_cache.kvm->arch.noncoherent_dma_count.counter 0
USER_DATA 0 vcpu->arch.xen.vcpu_time_info_cache.kvm->arch.pre_fault_allowed 0-1[c]
USER_DATA 0 vcpu->arch.xen.vcpu_time_info_cache.kvm->arch.vm_type 0-31
USER_DATA 0 vcpu->dirty_ring.index 1-16383[c]
USER_DATA 0 vcpu->vcpu_id 1-16383[c]
HALF_LOCKED2 0 &vcpu->mutex

arch/x86/kvm/x86.c kvm_synchronize_tsc() -> kvm_compute_l1_tsc_offset()

Type Parameter Key Value
PARAM_VALUE 0 vcpu 4096-ptr_max
CAPPED_DATA 0 vcpu 1
DATA_SOURCE 0 vcpu $0
NOSPEC 0 vcpu->dirty_ring.index
NOSPEC 0 vcpu->vcpu_id
PREEMPT_ADD <- disables preempt
USER_DATA 0 vcpu->arch.l1_tsc_offset 0-u64max
USER_DATA 0 vcpu->arch.pv_time.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.pv_time.kvm->arch.noncoherent_dma_count.counter 0
USER_DATA 0 vcpu->arch.pv_time.kvm->arch.pre_fault_allowed 1[c]
USER_DATA 0 vcpu->arch.pv_time.kvm->arch.vm_type 0-1
USER_DATA 0 vcpu->arch.tsc_offset 0-u64max
USER_DATA 0 vcpu->arch.virtual_tsc_khz 1-u32max
USER_DATA 0 vcpu->arch.xen.runstate2_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.runstate2_cache.kvm->arch.pre_fault_allowed 0-1
USER_DATA 0 vcpu->arch.xen.runstate2_cache.kvm->arch.vm_type 0-255
USER_DATA 0 vcpu->arch.xen.runstate_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.runstate_cache.kvm->arch.pre_fault_allowed 0-1
USER_DATA 0 vcpu->arch.xen.runstate_cache.kvm->arch.vm_type 0-255
USER_DATA 0 vcpu->arch.xen.vcpu_info_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.vcpu_info_cache.kvm->arch.pre_fault_allowed 0-1
USER_DATA 0 vcpu->arch.xen.vcpu_info_cache.kvm->arch.vm_type 0-255
USER_DATA 0 vcpu->arch.xen.vcpu_time_info_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.vcpu_time_info_cache.kvm->arch.pre_fault_allowed 0-1
USER_DATA 0 vcpu->arch.xen.vcpu_time_info_cache.kvm->arch.vm_type 0-255
USER_DATA 0 vcpu->dirty_ring.index 1-16383[c]
USER_DATA 0 vcpu->vcpu_id 1-16383[c]
LOCK2 &kvm->arch.tsc_write_lock
LOCK2 flags
HALF_LOCKED2 0 &vcpu->mutex
TYPE_LOCK (struct kvm_arch)->tsc_write_lock

arch/x86/kvm/x86.c kvm_synchronize_tsc() -> kvm_compute_l1_tsc_offset()

Type Parameter Key Value
PARAM_VALUE 0 vcpu 4096-ptr_max
CAPPED_DATA 0 vcpu 1
CAPPED_DATA 0 vcpu->arch.virtual_tsc_khz 1
DATA_SOURCE 0 vcpu $0
NOSPEC 0 vcpu->dirty_ring.index
NOSPEC 0 vcpu->vcpu_id
PREEMPT_ADD <- disables preempt
USER_DATA 0 vcpu->arch.l1_tsc_offset 0-u64max
USER_DATA 0 vcpu->arch.pv_time.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.pv_time.kvm->arch.noncoherent_dma_count.counter 0
USER_DATA 0 vcpu->arch.pv_time.kvm->arch.pre_fault_allowed 1[c]
USER_DATA 0 vcpu->arch.pv_time.kvm->arch.vm_type 0-1
USER_DATA 0 vcpu->arch.tsc_offset 0-u64max
USER_DATA 0 vcpu->arch.xen.runstate2_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.runstate2_cache.kvm->arch.pre_fault_allowed 0-1
USER_DATA 0 vcpu->arch.xen.runstate2_cache.kvm->arch.vm_type 0-255
USER_DATA 0 vcpu->arch.xen.runstate_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.runstate_cache.kvm->arch.pre_fault_allowed 0-1
USER_DATA 0 vcpu->arch.xen.runstate_cache.kvm->arch.vm_type 0-255
USER_DATA 0 vcpu->arch.xen.vcpu_info_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.vcpu_info_cache.kvm->arch.pre_fault_allowed 0-1
USER_DATA 0 vcpu->arch.xen.vcpu_info_cache.kvm->arch.vm_type 0-255
USER_DATA 0 vcpu->arch.xen.vcpu_time_info_cache.kvm->arch.has_private_mem 0[c]
USER_DATA 0 vcpu->arch.xen.vcpu_time_info_cache.kvm->arch.pre_fault_allowed 0-1
USER_DATA 0 vcpu->arch.xen.vcpu_time_info_cache.kvm->arch.vm_type 0-255
USER_DATA 0 vcpu->dirty_ring.index 1-16383[c]
USER_DATA 0 vcpu->vcpu_id 1-16383[c]
LOCK2 &kvm->arch.tsc_write_lock
LOCK2 flags
HALF_LOCKED2 0 &vcpu->mutex
TYPE_LOCK (struct kvm_arch)->tsc_write_lock

arch/x86/kvm/msrs.c kvm_set_msr_common() -> kvm_compute_l1_tsc_offset()

Type Parameter Key Value
PARAM_VALUE 0 vcpu 4096-ptr_max
CAPPED_DATA 0 vcpu->kvm->arch.xen.hvm_config.msr 1
DATA_SOURCE 0 vcpu $0
UNITS 1 target_tsc unit_byte