kvmclock: initial implementation

This commit is contained in:
Matheus
2024-09-29 11:21:46 -03:00
parent 11f76ab01d
commit fdd203d1a7
3 changed files with 118 additions and 0 deletions
+2
View File
@@ -12,6 +12,8 @@
#define MSR_GSBASE 0xC0000101
#define MSR_KERNELGSBASE 0xC0000102
#define MSR_KVM_SYSTEM_TIME_NEW 0x4b564d01
static inline uint64_t rdmsr(uint32_t which) {
uint64_t low,high;
asm volatile("rdmsr" : "=a"(low), "=d"(high) : "c"(which));