x86/xen: Remove use of VLAs
authorLaura Abbott <labbott@redhat.com>
Wed, 18 Apr 2018 17:08:32 +0000 (10:08 -0700)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 19 Apr 2018 20:35:51 +0000 (16:35 -0400)
commiteb0b4aa89cf21b69e15168010189e9d9c7483e54
tree082db0025e38fc3ef5c52e09439356b7171c95ed
parentebf04f331fa15a966262341a7dc6b1a0efd633e4
x86/xen: Remove use of VLAs

There's an ongoing effort to remove VLAs[1] from the kernel to eventually
turn on -Wvla. It turns out, the few VLAs in use in Xen produce only a
single entry array that is always bounded by GDT_SIZE. Clean up the code to
get rid of the VLA and the loop.

[1] https://lkml.org/lkml/2018/3/7/621

Signed-off-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
[boris: Use BUG_ON(size>PAGE_SIZE) instead of GDT_SIZE]
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/x86/xen/enlighten_pv.c