-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vTPM state storage v0 #4730
Merged
psafont
merged 8 commits into
xapi-project:feature/vtpm
from
edwintorok:private/edvint/vtpm-state-merged
Jun 17, 2022
Merged
vTPM state storage v0 #4730
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7ee7e33
maintenance: post-merge fixes
psafont 4ff283a
xapi-idl: move Uuidm type to separate module
edwintorok 3833d10
xapi-idl: add sexp converter to Uuidm type
edwintorok a8dec3a
vTPM: plumb through Uuid
edwintorok 4e5597e
varstore-guard: add filtering for vTPM.{set,get}_contents API
edwintorok 875da36
vTPM: add minimal support for saving/restoring state through the XAPI DB
edwintorok 43baa4a
vTPM: add minimal migration support
edwintorok cca5ac7
vTPM: do not hardcode swtpm-wrapper path
edwintorok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
module Uuidm = struct | ||
include Uuidm | ||
|
||
(** Validate UUIDs by converting them to Uuidm.t in the API *) | ||
let typ_of = | ||
Rpc.Types.Abstract | ||
{ | ||
aname= "uuid" | ||
; test_data= [Uuidm.v4_gen (Random.get_state ()) ()] | ||
; rpc_of= (fun t -> Rpc.String (Uuidm.to_string t)) | ||
; of_rpc= | ||
(function | ||
| Rpc.String s -> ( | ||
match Uuidm.of_string s with | ||
| Some uuid -> | ||
Ok uuid | ||
| None -> | ||
Error | ||
(`Msg | ||
(Printf.sprintf "typ_of_vm_uuid: not a valid UUID: %s" s) | ||
) | ||
) | ||
| r -> | ||
Error | ||
(`Msg | ||
(Printf.sprintf | ||
"typ_of_vm_uuid: expected rpc string but got %s" | ||
(Rpc.to_string r) | ||
) | ||
) | ||
) | ||
} | ||
|
||
let t_of_sexp sexp = | ||
match sexp |> Sexplib.Std.string_of_sexp |> Uuidm.of_string with | ||
| None -> | ||
Sexplib.Conv.of_sexp_error "not a UUID" sexp | ||
| Some u -> | ||
u | ||
|
||
let sexp_of_t t = t |> Uuidm.to_string |> Sexplib.Std.sexp_of_string | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Uuidm : sig | ||
type t = Uuidm.t | ||
|
||
include module type of Uuidm with type t := t | ||
|
||
val typ_of : t Rpc.Types.typ | ||
|
||
val t_of_sexp : Sexplib.Sexp.t -> t | ||
|
||
val sexp_of_t : t -> Sexplib.Sexp.t | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend changing the number in the quality gate, maintaining the corresponding mli seems to much of a headache.