]> xenbits.xensource.com Git - people/royger/xen.git/commit
x86/shadow: adjust and move sh_type_to_size[]
authorJan Beulich <jbeulich@suse.com>
Thu, 22 Dec 2022 09:07:50 +0000 (10:07 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 22 Dec 2022 09:07:50 +0000 (10:07 +0100)
commit4fec945409fcd52f5d95a66a2087920816b77854
treeb3b2b4699aef220c47680490cd964db1f582f8c2
parentf90a265f5b6a10f558294e4d33642868fdabc416
x86/shadow: adjust and move sh_type_to_size[]

Drop the SH_type_none entry - there are no allocation attempts with
this type, and there also shouldn't be any. Adjust the shadow_size()
alternative path to match that change. Also generalize two related
assertions.

While there move the entire table and the respective part of the comment
there to hvm.c, resulting in one less #ifdef. In the course of the
movement switch to using designated initializers.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/hvm.c
xen/arch/x86/mm/shadow/private.h