HV: correct usage of GUEST_FLAG_IO_COMPLETION_POLLING

The guest flags of GUEST_FLAG_IO_COMPLETION_POLLING work for NORMAL_VM only;

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2019-04-23 11:16:30 +08:00
committed by ACRN System Integration
parent 578592b566
commit 2362e58509
2 changed files with 2 additions and 3 deletions

View File

@@ -430,7 +430,7 @@ int32_t create_vm(uint16_t vm_id, struct acrn_vm_config *vm_config, struct acrn_
/* Populate return VM handle */
*rtn_vm = vm;
vm->sw.io_shared_page = NULL;
if ((vm_config->guest_flags & GUEST_FLAG_IO_COMPLETION_POLLING) != 0U) {
if ((vm_config->type == NORMAL_VM) && (vm_config->guest_flags & GUEST_FLAG_IO_COMPLETION_POLLING) != 0U) {
/* enable IO completion polling mode per its guest flags in vm_config. */
vm->sw.is_completion_polling = true;
}