diff options
| author | Louis Burda <quent.burda@gmail.com> | 2022-10-05 18:28:34 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2022-10-05 18:28:34 +0200 |
| commit | 0e89d3b1b7c45ff9a3916b01ab56f177d4b64f8c (patch) | |
| tree | fb2b57b3d21ffd9c932d237e8876a4b0b520219d /sevstep | |
| parent | dd1e29c4828b01b477a003679234097434f800d4 (diff) | |
| download | cachepc-0e89d3b1b7c45ff9a3916b01ab56f177d4b64f8c.tar.gz cachepc-0e89d3b1b7c45ff9a3916b01ab56f177d4b64f8c.zip | |
Add ioctl handling for sevstep
Diffstat (limited to 'sevstep')
| -rw-r--r-- | sevstep/uapi.h | 2 | ||||
| -rw-r--r-- | sevstep/uspt.c | 3 | ||||
| -rw-r--r-- | sevstep/uspt.h | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/sevstep/uapi.h b/sevstep/uapi.h index 5129750..c1d5064 100644 --- a/sevstep/uapi.h +++ b/sevstep/uapi.h @@ -72,7 +72,7 @@ typedef struct { __u64 len; __u8 decrypt_with_host_key; __s32 wbinvd_cpu; // -1: do not flush; else logical cpu on which we flush - __u64 output_buffer; + void *output_buffer; } read_guest_memory_t; typedef struct { diff --git a/sevstep/uspt.c b/sevstep/uspt.c index ef4ec6c..ca6b9a1 100644 --- a/sevstep/uspt.c +++ b/sevstep/uspt.c @@ -440,7 +440,8 @@ sevstep_uspt_batch_tracking_save(uint64_t faulted_gpa, uint32_t error_code, } int -sevstep_uspt_batch_tracking_stop(page_fault_event_t* results, uint64_t len, bool* error_occured) +sevstep_uspt_batch_tracking_stop(page_fault_event_t* results, + uint64_t len, __u8* error_occured) { spin_lock(&batch_track_state_lock); if (!batch_track_state.is_active) { diff --git a/sevstep/uspt.h b/sevstep/uspt.h index 163c1b8..9b47d4a 100644 --- a/sevstep/uspt.h +++ b/sevstep/uspt.h @@ -7,7 +7,7 @@ #include <linux/types.h> -int sevstep_uspt_initialize(int pid,bool should_get_rip); +int sevstep_uspt_initialize(int pid, bool should_get_rip); int sevstep_uspt_is_initialiized(void); void sevstep_uspt_clear(void); @@ -43,7 +43,7 @@ uint64_t sevstep_uspt_batch_tracking_get_events_count(void); * error_occured is set(there should also be a dmesg, but this allows programatic access); * Caller can use sevstep_uspt_batch_tracking_get_events_count() to determine the amount * of memory they should allocate for @results */ -int sevstep_uspt_batch_tracking_stop(page_fault_event_t *results, uint64_t len, bool *error_occured); +int sevstep_uspt_batch_tracking_stop(page_fault_event_t *results, uint64_t len, __u8 *error_occured); void sevstep_uspt_batch_tracking_handle_retrack(struct kvm_vcpu *vcpu, uint64_t current_fault_gfn); void sevstep_uspt_batch_tracking_get_retrack_gfns(uint64_t **gfns, uint64_t *len, int *tracking_type); bool sevstep_uspt_batch_tracking_in_progress(void); |
