From 37771ac9fe4d09a1045727e05277dc6fbbee002e Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Mon, 11 Nov 2024 15:55:58 -0800 Subject: [PATCH] mshv-bindings: implement send for svm_ghcb_base Signed-off-by: Muminul Islam --- mshv-bindings/src/x86_64/snp.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mshv-bindings/src/x86_64/snp.rs b/mshv-bindings/src/x86_64/snp.rs index f18ebb4..ac28618 100644 --- a/mshv-bindings/src/x86_64/snp.rs +++ b/mshv-bindings/src/x86_64/snp.rs @@ -773,6 +773,10 @@ pub struct svm_ghcb_base { pub shared: [__u64; 254usize], } +// SAFETY: struct is based on GHCB page in the hypervisor, +// safe to send across threads +unsafe impl Send for svm_ghcb_base {} + #[test] fn bindgen_test_layout_svm_ghcb_base() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();