qemu-s390x
[Top][All Lists]
Advanced

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

Re: [qemu-s390x] [PATCH v2 1/3] hw/s390x/ipl: Fix alignment problems of


From: Thomas Huth
Subject: Re: [qemu-s390x] [PATCH v2 1/3] hw/s390x/ipl: Fix alignment problems of S390IPLState members
Date: Wed, 26 Sep 2018 10:04:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2018-09-26 09:56, David Hildenbrand wrote:
> On 26/09/2018 09:38, Thomas Huth wrote:
>> The IplParameterBlock and QemuIplParameters structures are declared
>> with QEMU_PACKED, so the compiler assumes that the structures do not
>> need to be aligned in memory. Since the are listed after a "bool"
>> within the S390IPLState, the IplParameterBlock and QemuIplParameters
>> are also indeed mis-aligned in memory. This causes problems on Sparc
>> during migration, since we use VMSTATE_UINT16 in vmstate_iplb to access
>> the devno member for example, and the corresponding migration functions
>> (like qemu_get_be16s) then try to access a 16-bit value from a mis-
>> aligned memory address.
>> The easiest solution to fix this problem is to move the packed structures
>> to the beginning of the S390IPLState. Also add some additional comments
>> here to prevent that this problem will be introduced again in the future.
> 
> The last sentence no longer applies.

Oops. Cornelia, could you please fix it up when picking up the patch (in
case there are no other reasons for respinning the series)?

 Thanks,
  Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]