diff options
| author | Louis Burda <quent.burda@gmail.com> | 2022-09-29 00:32:30 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2022-09-29 00:32:30 +0200 |
| commit | 9cce829d8a794848b0699c3f9a84b2a057221a90 (patch) | |
| tree | f1efcf63354a6fd971974a027b8d6dc56b1da470 /kmod/cachepc.c | |
| parent | 297900bdb5d58224bb1d65f5632a179de825c11d (diff) | |
| download | cachepc-9cce829d8a794848b0699c3f9a84b2a057221a90.tar.gz cachepc-9cce829d8a794848b0699c3f9a84b2a057221a90.zip | |
Adapt kernel module for sev-snp machine
Diffstat (limited to 'kmod/cachepc.c')
| -rw-r--r-- | kmod/cachepc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kmod/cachepc.c b/kmod/cachepc.c index 9b2b59c..09ed705 100644 --- a/kmod/cachepc.c +++ b/kmod/cachepc.c @@ -16,14 +16,14 @@ static void build_randomized_list_for_cache_set(cache_ctx *ctx, cacheline **cach static cacheline **allocate_cache_ds(cache_ctx *ctx); static uint16_t get_virt_cache_set(cache_ctx *ctx, void *ptr); -void +void __attribute__((optimize(1))) // prevent instruction reordering cachepc_prime_vcall(uintptr_t ret, cacheline *cl) { cachepc_prime(cl); asm volatile ("mov %0, %%rax; jmp *%%rax" : : "r"(ret) : "rax"); } -void +void __attribute__((optimize(1))) // prevent instruction reordering cachepc_probe_vcall(uintptr_t ret, cacheline *cl) { cachepc_probe(cl); |
