Replies: 2 comments 6 replies
-
This is an interesting problem. I am glad you brought it up! I am guessing that state here refers to volatile memory contents that would normally be stored in RAM, right? Can a snapshot be taken in the middle of processing a request or can a snapshot only be taken while the TPM is idle? If it can be taken in the middle of processing, should that processing continue when the snapshot is restored?
I like the idea of introducing a trait that allows access to structured state, maybe something like pub enum ServerState {
Idle,
Processing,
Running,
}
pub trait RuntimeState {
fn get_server_state(&self) -> ServerState;
fn set_server_state(&mut self, state: ServerState);
} But the serialization and deserialization of state would be handled by something external. The type that implements What are your thoughts? |
Beta Was this translation helpful? Give feedback.
-
Resolution: Will include these requirements as optional functionality in the TPM Storage abstraction/module. |
Beta Was this translation helpful? Give feedback.
-
I didn't see this being discussed anywhere, so I thought I'd start a thread to make sure there's visibility here...
The ability to save/restore volatile TPM state will be needed to support Virtual TPM (vTPM) scenarios, as unlike physical TPMs in physical machine, vTPMs in VMs need to support things such as snapshots (live save/restore), and live migration.
This is not a novel feature, and is something that's already supported by various open-source (e.g: swtpm) and proprietary (e.g: Hyper-V) C-based TPM implementations.
tpm-rs
saved-state state should also be properly versioned, so as to support live-migration/updates from older to newer TPM revisions (which is one thing no other TPM implementation currently supports, as far as I'm aware).This discussion might be a good place to start bike-shedding on specifics, such as:
tpm-rs
codebaseBeta Was this translation helpful? Give feedback.
All reactions