You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
I get a build error when compiling on Ubuntu 20.04:
luca@luca64:/data/Test/Virt/vbh/sources$ make
make -C /lib/modules/5.4.0-40-lowlatency/build M=/data/Test/Virt/vbh/sources
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-40-lowlatency'
AR /data/Test/Virt/vbh/sources/built-in.a
CC [M] /data/Test/Virt/vbh/sources/kernelhardening.o
In file included from /data/Test/Virt/vbh/sources/kernelhardening.c:6:
/data/Test/Virt/vbh/sources/vmx_common.h: In function ‘__vmcs_readl’:
/data/Test/Virt/vbh/sources/vmx_common.h:322:15: error: expected string literal before ‘ASM_VMX_VMREAD_RDX_RAX’
322 | asm volatile(ASM_VMX_VMREAD_RDX_RAX
| ^~~~~~~~~~~~~~~~~~~~~~
/data/Test/Virt/vbh/sources/vmx_common.h: In function ‘__vmcs_writel’:
/data/Test/Virt/vbh/sources/vmx_common.h:364:20: error: expected string literal before ‘ASM_VMX_VMWRITE_RAX_RDX’
364 | asm volatile(__ex(ASM_VMX_VMWRITE_RAX_RDX) "; setna %0"
| ^~~~~~~~~~~~~~~~~~~~~~~
/data/Test/Virt/vbh/sources/vmx_common.h:263:17: note: in definition of macro ‘__ex’
263 | #define __ex(x) x
| ^
It looks like the source expect to find ASM_VMX_VMREAD_RDX_RAX and similar defined in the kernel sources... However, that define has been removed some time ago (and the kernel now uses the vmread and vmwrite assembly instructions directly).
I think there are 2 possible solutions:
switch to using vmread and vmwrite directly, as current kernels do
define ASM_VMX_VMREAD_RDX_RAX and similar in vbh/sources/vmx_common.h
Which solution do you think is more appropriate?
As a side note, what is the purpose of the "__ex()" macro?
Thanks,
Luca
The text was updated successfully, but these errors were encountered:
Hello,
I get a build error when compiling on Ubuntu 20.04:
luca@luca64:/data/Test/Virt/vbh/sources$ make
make -C /lib/modules/5.4.0-40-lowlatency/build M=/data/Test/Virt/vbh/sources
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-40-lowlatency'
AR /data/Test/Virt/vbh/sources/built-in.a
CC [M] /data/Test/Virt/vbh/sources/kernelhardening.o
In file included from /data/Test/Virt/vbh/sources/kernelhardening.c:6:
/data/Test/Virt/vbh/sources/vmx_common.h: In function ‘__vmcs_readl’:
/data/Test/Virt/vbh/sources/vmx_common.h:322:15: error: expected string literal before ‘ASM_VMX_VMREAD_RDX_RAX’
322 | asm volatile(ASM_VMX_VMREAD_RDX_RAX
| ^~~~~~~~~~~~~~~~~~~~~~
/data/Test/Virt/vbh/sources/vmx_common.h: In function ‘__vmcs_writel’:
/data/Test/Virt/vbh/sources/vmx_common.h:364:20: error: expected string literal before ‘ASM_VMX_VMWRITE_RAX_RDX’
364 | asm volatile(__ex(ASM_VMX_VMWRITE_RAX_RDX) "; setna %0"
| ^~~~~~~~~~~~~~~~~~~~~~~
/data/Test/Virt/vbh/sources/vmx_common.h:263:17: note: in definition of macro ‘__ex’
263 | #define __ex(x) x
| ^
It looks like the source expect to find ASM_VMX_VMREAD_RDX_RAX and similar defined in the kernel sources... However, that define has been removed some time ago (and the kernel now uses the vmread and vmwrite assembly instructions directly).
I think there are 2 possible solutions:
Which solution do you think is more appropriate?
As a side note, what is the purpose of the "__ex()" macro?
Thanks,
Luca
The text was updated successfully, but these errors were encountered: