[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] HVM/save: allow the usage of zeroextend and a fixup function



commit 4243baf61acf24d972eb456aea8353481af31100
Author:     Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Thu Nov 26 15:51:00 2015 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Nov 26 15:51:00 2015 +0100

    HVM/save: allow the usage of zeroextend and a fixup function

    With the current compat implementation in the save/restore context handling,
    only one compat structure is allowed, and using _zeroextend prevents the
    fixup function from being called.

    In order to allow for the compat handling layer to be able to handle
    different compat versions allow calling the fixup function with
    hvm_load_entry_zeroextend.

    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/include/xen/hvm/save.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/xen/include/xen/hvm/save.h b/xen/include/xen/hvm/save.h
index 51bc7d5..a9a78f9 100644
--- a/xen/include/xen/hvm/save.h
+++ b/xen/include/xen/hvm/save.h
@@ -64,7 +64,12 @@ void _hvm_read_entry(struct hvm_domain_context *h,
         = (struct hvm_save_descriptor *)&(_h)->data[(_h)->cur];         \
     if ( (r = _hvm_check_entry((_h), HVM_SAVE_CODE(_x),                 \
                HVM_SAVE_LENGTH(_x), (_strict))) == 0 )                  \
+    {                                                                   \
         _hvm_read_entry((_h), (_dst), HVM_SAVE_LENGTH(_x));             \
+        if ( HVM_SAVE_HAS_COMPAT(_x) &&                                 \
+             desc->length != HVM_SAVE_LENGTH(_x) )                      \
+            r = HVM_SAVE_FIX_COMPAT(_x, (_dst), desc->length);          \
+    }                                                                   \
     else if (HVM_SAVE_HAS_COMPAT(_x)                                    \
              && (r = _hvm_check_entry((_h), HVM_SAVE_CODE(_x),          \
                        HVM_SAVE_LENGTH_COMPAT(_x), (_strict))) == 0 ) { \
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.