diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-02-01 11:24:26 -0600 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-02-01 11:24:26 -0600 |
| commit | af8e9be96ac096e97d3d34af3e5178fe3adf4dca (patch) | |
| tree | dfdff48ee69481fbc6037da3478b81ebba6578e4 | |
| parent | 4b49b8122c8c5c5ddc68df61057df0b94f46d66f (diff) | |
| download | cachepc-af8e9be96ac096e97d3d34af3e5178fe3adf4dca.tar.gz cachepc-af8e9be96ac096e97d3d34af3e5178fe3adf4dca.zip | |
Properly initialize locks
| -rw-r--r-- | README | 2 | ||||
| -rw-r--r-- | cachepc/event.c | 1 | ||||
| -rw-r--r-- | cachepc/kvm.c | 2 |
3 files changed, 4 insertions, 1 deletions
@@ -105,7 +105,7 @@ Advanced > North Bridge Configuration > SEV-SNP Support = Enabled Advanced > North Bridge Configuration > Memory Configuration > TSME = Disabled The host kernel is built using the AMDESE/AMDSEV repo on branch sev-snp-devel -at commmit a480a51. Build and install the the host kernel and qemu by running: +at commmit a480a51. Build and install the host kernel and qemu by running: # ./bulid.sh --package # cd snp-release-`date "+%Y-%m-%d"` diff --git a/cachepc/event.c b/cachepc/event.c index 53f70b7..b37416a 100644 --- a/cachepc/event.c +++ b/cachepc/event.c @@ -36,6 +36,7 @@ cpc_events_init(void) cpc_eventbuf = NULL; cpc_eventbuf_len = 0; cpc_event_batching = false; + rwlock_init(&cpc_event_lock); cpc_events_reset(); } diff --git a/cachepc/kvm.c b/cachepc/kvm.c index cba2015..f746f2f 100644 --- a/cachepc/kvm.c +++ b/cachepc/kvm.c @@ -647,6 +647,8 @@ cpc_setup_test(void *p) spinlock_t lock; int cpu; + spin_lock_init(&lock); + cpu = get_cpu(); CPC_INFO("Running on core %i\n", cpu); |
