vmmon: rename GDT_SIZE macro to avoid collision

When building against kernel 4.12 and newer, macro name GDT_SIZE used in
(vmmon) include/segs.h collides with macro defined in (kernel source)
arch/x86/include/asm/segment.h, resulting in its redefinition.

To prevent potential problems, rename vmmon's GDT_SIZE to VMMON_GDT_SIZE
and GDT_LIMIT to VMMON_GDT_LIMIT. (There is no GDT_LIMIT in mainline kernel
source but let's be consistent.)
This commit is contained in:
Michal Kubecek 2020-09-15 18:58:14 +02:00
parent 4ac35e1163
commit 7572bee7ec
2 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ CPDATA const VMCrossPageData cpDataTemplate = {
.monTask.IOMapBase = sizeof(Task64),
.monGDTR.limit = GDT_LIMIT,
.monGDTR.limit = VMMON_GDT_LIMIT,
.monGDTR.offset = GDT_START_VA,
.shadowDR[6].ureg64 = DR6_DEFAULT,

View File

@ -46,8 +46,8 @@
#define PCPU_DATA_SIZE (32 * CACHELINE_SIZE)
#define GDT_SIZE (sizeof(Descriptor) * NUM_VALID_SEGMENTS)
#define GDT_LIMIT (GDT_SIZE - 1)
#define VMMON_GDT_SIZE (sizeof(Descriptor) * NUM_VALID_SEGMENTS)
#define VMMON_GDT_LIMIT (VMMON_GDT_SIZE - 1)
/*
* This is one more than max GDT limit value.