ia64/xen-unstable

changeset 14964:7f5a804d8a68

[HVM] Save/restore: pad save structs up to a multiple of eight bytes.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Fri Apr 27 10:54:00 2007 +0100 (2007-04-27)
parents c8e01cc58cb1
children 6548dadab8d5
files xen/include/public/hvm/save.h
line diff
     1.1 --- a/xen/include/public/hvm/save.h	Fri Apr 27 10:24:09 2007 +0100
     1.2 +++ b/xen/include/public/hvm/save.h	Fri Apr 27 10:54:00 2007 +0100
     1.3 @@ -32,7 +32,8 @@
     1.4  /*
     1.5   * Structures in this header *must* have the same layout in 32bit 
     1.6   * and 64bit environments: this means that all fields must be explicitly 
     1.7 - * sized types and aligned to their sizes.
     1.8 + * sized types and aligned to their sizes, and the structs must be 
     1.9 + * a multiple of eight bytes long.
    1.10   *
    1.11   * Only the state necessary for saving and restoring (i.e. fields 
    1.12   * that are analogous to actual hardware state) should go in this file. 
    1.13 @@ -77,6 +78,7 @@ struct hvm_save_header {
    1.14      uint32_t version;           /* File format version */
    1.15      uint64_t changeset;         /* Version of Xen that saved this file */
    1.16      uint32_t cpuid;             /* CPUID[0x01][%eax] on the saving machine */
    1.17 +    uint32_t pad0;
    1.18  };
    1.19  
    1.20  DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header);
    1.21 @@ -340,6 +342,7 @@ struct hvm_hw_pci_link {
    1.22       * The router provides a programmable mapping from each link to a GSI.
    1.23       */
    1.24      uint8_t route[4];
    1.25 +    uint8_t pad0[4];
    1.26  };
    1.27  
    1.28  DECLARE_HVM_SAVE_TYPE(PCI_LINK, 9, struct hvm_hw_pci_link);
    1.29 @@ -364,6 +367,7 @@ struct hvm_hw_pit {
    1.30          uint8_t gate; /* timer start */
    1.31      } channels[3];  /* 3 x 16 bytes */
    1.32      uint32_t speaker_data_on;
    1.33 +    uint32_t pad0;
    1.34  };
    1.35  
    1.36  DECLARE_HVM_SAVE_TYPE(PIT, 10, struct hvm_hw_pit);
    1.37 @@ -379,6 +383,7 @@ struct hvm_hw_rtc {
    1.38      uint8_t cmos_data[RTC_CMOS_SIZE];
    1.39      /* Index register for 2-part operations */
    1.40      uint8_t cmos_index;
    1.41 +    uint8_t pad0;
    1.42  };
    1.43  
    1.44  DECLARE_HVM_SAVE_TYPE(RTC, 11, struct hvm_hw_rtc);