Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
21e6075
Documentation
LICENSES
arch
alpha
arc
arm
arm64
csky
hexagon
ia64
loongarch
m68k
microblaze
mips
nios2
openrisc
parisc
powerpc
riscv
boot
configs
errata
include
asm
vdso
Kbuild
alternative-macros.h
alternative.h
asm-extable.h
asm-offsets.h
asm-prototypes.h
asm.h
atomic.h
barrier.h
bitops.h
bug.h
cache.h
cacheflush.h
cacheinfo.h
clint.h
clocksource.h
cmpxchg.h
compat.h
cpu_ops.h
cpu_ops_sbi.h
cpuidle.h
csr.h
current.h
delay.h
efi.h
elf.h
errata_list.h
extable.h
fence.h
fixmap.h
ftrace.h
futex.h
gdb_xml.h
gpr-num.h
hugetlb.h
hwcap.h
image.h
insn-def.h
io.h
irq.h
irq_work.h
irqflags.h
jump_label.h
kasan.h
kdebug.h
kexec.h
kfence.h
kgdb.h
kprobes.h
kvm_host.h
kvm_types.h
kvm_vcpu_fp.h
kvm_vcpu_insn.h
kvm_vcpu_sbi.h
kvm_vcpu_timer.h
linkage.h
mmio.h
mmiowb.h
mmu.h
mmu_context.h
mmzone.h
module.h
module.lds.h
numa.h
page.h
parse_asm.h
patch.h
pci.h
perf_event.h
pgalloc.h
pgtable-32.h
pgtable-64.h
pgtable-bits.h
pgtable.h
probes.h
processor.h
ptdump.h
ptrace.h
sbi.h
seccomp.h
sections.h
set_memory.h
signal.h
signal32.h
smp.h
soc.h
sparsemem.h
stackprotector.h
stacktrace.h
string.h
suspend.h
switch_to.h
syscall.h
thread_info.h
timex.h
tlb.h
tlbflush.h
uaccess.h
unistd.h
uprobes.h
vdso.h
vendorid_list.h
vermagic.h
vmalloc.h
word-at-a-time.h
xip_fixup.h
uapi
kernel
kvm
lib
mm
net
purgatory
Kbuild
Kconfig
Kconfig.debug
Kconfig.erratas
Kconfig.socs
Makefile
s390
sh
sparc
um
x86
xtensa
.gitignore
Kconfig
block
certs
crypto
drivers
fs
include
init
io_uring
ipc
kernel
lib
mm
net
rust
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
arch
/
riscv
/
include
/
asm
/
kvm_vcpu_timer.h
Blame
Blame
Latest commit
History
History
52 lines (45 loc) · 1.56 KB
Breadcrumbs
linux
/
arch
/
riscv
/
include
/
asm
/
kvm_vcpu_timer.h
Top
File metadata and controls
Code
Blame
52 lines (45 loc) · 1.56 KB
Raw
/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2019 Western Digital Corporation or its affiliates. * * Authors: * Atish Patra <atish.patra@wdc.com> */ #ifndef __KVM_VCPU_RISCV_TIMER_H #define __KVM_VCPU_RISCV_TIMER_H #include <linux/hrtimer.h> struct kvm_guest_timer { /* Mult & Shift values to get nanoseconds from cycles */ u32 nsec_mult; u32 nsec_shift; /* Time delta value */ u64 time_delta; }; struct kvm_vcpu_timer { /* Flag for whether init is done */ bool init_done; /* Flag for whether timer event is configured */ bool next_set; /* Next timer event cycles */ u64 next_cycles; /* Underlying hrtimer instance */ struct hrtimer hrt; /* Flag to check if sstc is enabled or not */ bool sstc_enabled; /* A function pointer to switch between stimecmp or hrtimer at runtime */ int (*timer_next_event)(struct kvm_vcpu *vcpu, u64 ncycles); }; int kvm_riscv_vcpu_timer_next_event(struct kvm_vcpu *vcpu, u64 ncycles); int kvm_riscv_vcpu_get_reg_timer(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); int kvm_riscv_vcpu_set_reg_timer(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); int kvm_riscv_vcpu_timer_init(struct kvm_vcpu *vcpu); int kvm_riscv_vcpu_timer_deinit(struct kvm_vcpu *vcpu); int kvm_riscv_vcpu_timer_reset(struct kvm_vcpu *vcpu); void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu); void kvm_riscv_guest_timer_init(struct kvm *kvm); void kvm_riscv_vcpu_timer_sync(struct kvm_vcpu *vcpu); void kvm_riscv_vcpu_timer_save(struct kvm_vcpu *vcpu); bool kvm_riscv_vcpu_timer_pending(struct kvm_vcpu *vcpu); #endif
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
You can’t perform that action at this time.