hv: vmconfig: format guest flag with prefix GUEST_FLAG_

To make the code more readable.

Tracked-On: #1842
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1
2019-03-16 02:39:44 +08:00
committed by wenlingz
parent c018b853e9
commit 79cfb1cf58
7 changed files with 20 additions and 20 deletions

View File

@@ -49,15 +49,15 @@ struct acrn_vm_config {
uint64_t pcpu_bitmap; /* from pcpu bitmap, we could know VM core number */
uint64_t guest_flags; /* VM flags that we want to configure for guest
* Now we have two flags:
* SECURE_WORLD_ENABLED
* LAPIC_PASSTHROUGH
* GUEST_FLAG_SECURE_WORLD_ENABLED
* GUEST_FLAG_LAPIC_PASSTHROUGH
* We could add more guest flags in future;
*/
struct acrn_vm_mem_config memory; /* memory configuration of VM */
uint16_t pci_ptdev_num; /* indicate how many PCI PT devices in VM */
struct acrn_vm_pci_ptdev_config *pci_ptdevs; /* point to PCI PT devices BDF list */
struct acrn_vm_os_config os_config; /* OS information the VM */
uint16_t clos; /* if guest_flags has CLOS_REQUIRED, then VM use this CLOS */
uint16_t clos; /* if guest_flags has GUEST_FLAG_CLOS_REQUIRED, then VM use this CLOS */
#ifdef CONFIG_PARTITION_MODE
bool vm_vuart;

View File

@@ -47,11 +47,11 @@
#endif
/* Generic VM flags from guest OS */
#define SECURE_WORLD_ENABLED (1UL << 0U) /* Whether secure world is enabled */
#define LAPIC_PASSTHROUGH (1UL << 1U) /* Whether LAPIC is passed through */
#define IO_COMPLETION_POLLING (1UL << 2U) /* Whether need hypervisor poll IO completion */
#define CLOS_REQUIRED (1UL << 3U) /* Whether CLOS is required */
#define HIDE_MTRR (1UL << 4U) /* Whether hide MTRR from VM */
#define GUEST_FLAG_SECURE_WORLD_ENABLED (1UL << 0U) /* Whether secure world is enabled */
#define GUEST_FLAG_LAPIC_PASSTHROUGH (1UL << 1U) /* Whether LAPIC is passed through */
#define GUEST_FLAG_IO_COMPLETION_POLLING (1UL << 2U) /* Whether need hypervisor poll IO completion */
#define GUEST_FLAG_CLOS_REQUIRED (1UL << 3U) /* Whether CLOS is required */
#define GUEST_FLAG_HIDE_MTRR (1UL << 4U) /* Whether hide MTRR from VM */
/**
* @brief Hypercall
@@ -347,7 +347,7 @@ struct acrn_create_vm {
uint8_t GUID[16];
/* VM flag bits from Guest OS, now used
* SECURE_WORLD_ENABLED (1UL<<0)
* GUEST_FLAG_SECURE_WORLD_ENABLED (1UL<<0)
*/
uint64_t vm_flag;