Switched to a kmem cache for allocating lcd_arch's.
Was getting bad load/store msr addresses for vm exits. Properly detected by the lcd_arch_check code. In struct lcd_arch, the msr_autoload fields were not word aligned in some instances (see requirement in Intel SDM V3 26.2.1.2). Even with compiler align attributes, if we use kmalloc, proper alignment is not guaranteed - we can allocate a struct lcd_arch on the wrong byte and it throws off the alignment of the entire struct. kmem cache allows specifying alignment. Appears to be working correctly.
Showing
Please register or sign in to comment