Hi Zixuan, On 9/21/21 5:58 AM, Zixuan Wang wrote: > On Mon, Sep 20, 2021 at 6:26 PM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: >> >> On 27/08/21 05:12, Zixuan Wang wrote: >>> + >>> +/* >>> + * The UEFI spec and EDK2 reference implementation both define EFI_GUID as >>> + * struct { u32 a; u16; b; u16 c; u8 d[8]; }; and so the implied alignment >>> + * is 32 bits not 8 bits like our guid_t. In some cases (i.e., on 32-bit ARM), >>> + * this means that firmware services invoked by the kernel may assume that >>> + * efi_guid_t* arguments are 32-bit aligned, and use memory accessors that >>> + * do not tolerate misalignment. So let's set the minimum alignment to 32 bits. >> >> Here you're not doing that though. >> >> Paolo > > Hi Paolo, > > Indeed, I checked the original Linux code [1] and it has the alignment. > > This patch is from Varad's patch set [2]. I can update this code in > the next version if Varad is OK with it. > Please feel free to modify the patch in the next revision. The alignment indeed does not make sense here. Thanks, Varad > I just finished my Google internship and lost my access to the Google > email, so I'm replying with my personal email. > > [1] https://elixir.bootlin.com/linux/v5.14/source/include/linux/efi.h#L73 > [2] https://lore.kernel.org/kvm/20210819113400.26516-1-varad.gautam@xxxxxxxx/ > > Best regards, > Zixuan >