diff options
author | Tim Deegan <Tim.Deegan@xensource.com> | 2007-01-20 11:17:38 +0000 |
---|---|---|
committer | Tim Deegan <Tim.Deegan@xensource.com> | 2007-01-20 11:17:38 +0000 |
commit | 3969aaf2765ffcda14b4d53a5b0980f0d443331b (patch) | |
tree | 0a0919319f9beb9b179b5af2ff72582f7e786395 /xen/include/asm-x86/hvm/support.h | |
parent | e105919b0120a0eccfe59ece2ce545ddd6f0881f (diff) | |
download | xen-3969aaf2765ffcda14b4d53a5b0980f0d443331b.tar.gz xen-3969aaf2765ffcda14b4d53a5b0980f0d443331b.tar.bz2 xen-3969aaf2765ffcda14b4d53a5b0980f0d443331b.zip |
[HVM] Save/restore cleanups 01: PIT
Define public structure for the saved PIT data and use it instead
of a series of explicit loads and stores.
Don't save ephemeral Xen timer structs; rebuild them instead.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Diffstat (limited to 'xen/include/asm-x86/hvm/support.h')
-rw-r--r-- | xen/include/asm-x86/hvm/support.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xen/include/asm-x86/hvm/support.h b/xen/include/asm-x86/hvm/support.h index 2274578aa1..3d40cd9962 100644 --- a/xen/include/asm-x86/hvm/support.h +++ b/xen/include/asm-x86/hvm/support.h @@ -186,7 +186,6 @@ static inline void hvm_put_buffer(hvm_domain_context_t *h, const char *buf, int h->cur += len; } - static inline char hvm_get_byte(hvm_domain_context_t *h) { if (h->cur >= HVM_CTXT_SIZE) { @@ -240,6 +239,12 @@ static inline void hvm_get_buffer(hvm_domain_context_t *h, char *buf, int len) h->cur += len; } +#define hvm_put_struct(_h, _p) \ + hvm_put_buffer((_h), (char *)(_p), sizeof(*(_p))) +#define hvm_get_struct(_h, _p) \ + hvm_get_buffer((_h), (char *)(_p), sizeof(*(_p))) + + extern int hvm_save(struct vcpu*, hvm_domain_context_t *h); extern int hvm_load(struct vcpu*, hvm_domain_context_t *h); |