From 4f40b53c738ac8bf95e331f1a674030c6c61d357 Mon Sep 17 00:00:00 2001 From: Jason Chen CJ Date: Tue, 27 Mar 2018 04:29:25 +0800 Subject: [PATCH] ptdev: fix ptdev_hv_owned_intx under release version for release version, the vuart is not be used - pin 4 then is not used by hypervisor. this patch adds check for vm0->vuart to distinguish it. Signed-off-by: Jason Chen CJ Acked-by: Eddie Dong --- hypervisor/arch/x86/assign.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/arch/x86/assign.c b/hypervisor/arch/x86/assign.c index 93bf64c48..bf8d3c445 100644 --- a/hypervisor/arch/x86/assign.c +++ b/hypervisor/arch/x86/assign.c @@ -321,8 +321,8 @@ static void check_deactive_pic_intx(struct vm *vm, uint8_t phys_pin) static bool ptdev_hv_owned_intx(struct vm *vm, struct ptdev_intx_info *info) { - /* vm0 pin 4 (uart) is owned by hypervisor */ - if (is_vm0(vm) && info->virt_pin == 4) + /* vm0 pin 4 (uart) is owned by hypervisor under debug version */ + if (is_vm0(vm) && vm->vuart && info->virt_pin == 4) return true; else return false;