From 2e4d7eb527689e46b63d9eb7e44d5c5cedb75475 Mon Sep 17 00:00:00 2001 From: Kaige Fu Date: Wed, 27 Mar 2019 13:23:37 +0000 Subject: [PATCH] DM: Add new flag GUEST_FLAG_RT for RTVM This flag indicates that if the vm is RTVM. And if a vm has GUEST_FLAG_LAPIC_PASSTHROUGH flag set, we must set the GUEST_FLAG_RT at the same time. Tracked-On: #2865 Signed-off-by: Kaige Fu --- devicemodel/core/vmmapi.c | 1 + hypervisor/include/public/acrn_common.h | 1 + 2 files changed, 2 insertions(+) diff --git a/devicemodel/core/vmmapi.c b/devicemodel/core/vmmapi.c index a01d61462..912004ddb 100644 --- a/devicemodel/core/vmmapi.c +++ b/devicemodel/core/vmmapi.c @@ -142,6 +142,7 @@ vm_create(const char *name, uint64_t req_buf) if (lapic_pt) { create_vm.vm_flag |= GUEST_FLAG_LAPIC_PASSTHROUGH; + create_vm.vm_flag |= GUEST_FLAG_RT; create_vm.vm_flag |= GUEST_FLAG_IO_COMPLETION_POLLING; } else { create_vm.vm_flag &= (~GUEST_FLAG_LAPIC_PASSTHROUGH); diff --git a/hypervisor/include/public/acrn_common.h b/hypervisor/include/public/acrn_common.h index 814a6b702..d1caf062b 100644 --- a/hypervisor/include/public/acrn_common.h +++ b/hypervisor/include/public/acrn_common.h @@ -52,6 +52,7 @@ #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 */ +#define GUEST_FLAG_RT (1UL << 5U) /* Whether the vm is RT-VM */ /** * @brief Hypercall