From 2ca144aceda2bae479f3b67eb0d60e4ef7e439dc Mon Sep 17 00:00:00 2001 From: Oliver Kurth Date: Mon, 17 Jun 2019 11:41:35 -0700 Subject: [PATCH] Common header file change not applicable to open-vm-tools. --- open-vm-tools/lib/include/backdoor_def.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/open-vm-tools/lib/include/backdoor_def.h b/open-vm-tools/lib/include/backdoor_def.h index 9855267fb..3fb6c467a 100644 --- a/open-vm-tools/lib/include/backdoor_def.h +++ b/open-vm-tools/lib/include/backdoor_def.h @@ -57,9 +57,19 @@ extern "C" { #define BDOOR_MAGIC 0x564D5868 -/* Low-bandwidth backdoor port. */ +/* Low-bandwidth backdoor port number for the IN/OUT interface. */ -#define BDOOR_PORT 0x5658 +#define BDOOR_PORT 0x5658 + +/* Flags used by the hypercall interface. */ + +#define BDOOR_FLAGS_HB (1<<0) +#define BDOOR_FLAGS_WRITE (1<<1) + +#define BDOOR_IS_LB(_flags) (((_flags) & BDOOR_FLAGS_HB) == 0) +#define BDOOR_IS_HB(_flags) !BDOOR_IS_LB(_flags) +#define BDOOR_IS_READ(_flags) (((_flags) & BDOOR_FLAGS_WRITE) == 0) +#define BDOOR_IS_WRITE(_flags) !BDOOR_IS_READ(_flags) #define BDOOR_CMD_GETMHZ 1 /* -- 2.47.3