]> xenbits.xensource.com Git - xen.git/commit
x86/svm: Clean up construct_vmcb()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 25 Nov 2019 13:29:20 +0000 (13:29 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 5 Dec 2019 13:19:28 +0000 (13:19 +0000)
commitda650d3810909d6d17f9aa7a3eecee2088adb6cf
tree91d786f0a306c424877027bdb7ddfe7a33e4705f
parenta57e0b39800242a0fc3ef76c9cb642f10a1a5cbd
x86/svm: Clean up construct_vmcb()

The vmcb is zeroed on allocate - drop all explicit writes of 0.  Move
hvm_update_guest_efer() to co-locate it with the other control register
updates.

Move the BUILD_BUG_ON() into build_assertions(), and add some offset checks
for fields after the large blocks of reserved fields (as these are the most
likely to trigger from a mis-edit).  Take the opportunity to fold 6 adjacent
res* fields into one.

Finally, drop all trailing whitespace in the file.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/svm/vmcb.c
xen/include/asm-x86/hvm/svm/vmcb.h