From 9cce829d8a794848b0699c3f9a84b2a057221a90 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Thu, 29 Sep 2022 00:32:30 +0200 Subject: Adapt kernel module for sev-snp machine --- kmod/cachepc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kmod/cachepc.c') 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); -- cgit v1.2.3-71-gd317