Skip to content
This repository was archived by the owner on Jan 28, 2023. It is now read-only.

Commit 72e53fa

Browse files
committed
Add new capability HAX_CAP_CPUID
Add the capability flag HAX_CAP_CPUID to indicate the CPUID feature is already supported. This capability information is used for user space query. Signed-off-by: Wenchao Wang <[email protected]>
1 parent c7da519 commit 72e53fa

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

core/hax.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ int hax_get_capability(void *buf, int bufLeng, int *outLength)
373373
cap->winfo |= HAX_CAP_TUNNEL_PAGE;
374374
cap->winfo |= HAX_CAP_RAM_PROTECTION;
375375
cap->winfo |= HAX_CAP_DEBUG;
376+
cap->winfo |= HAX_CAP_CPUID;
376377
if (cpu_data->vmx_info._ept_cap) {
377378
cap->winfo |= HAX_CAP_EPT;
378379
}

include/hax_interface.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ struct hax_module_version {
194194
#define HAX_CAP_RAM_PROTECTION (1 << 6)
195195
#define HAX_CAP_DEBUG (1 << 7)
196196
#define HAX_CAP_IMPLICIT_RAMBLOCK (1 << 8)
197+
#define HAX_CAP_CPUID (1 << 9)
197198

198199
struct hax_capabilityinfo {
199200
/*

0 commit comments

Comments
 (0)