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 <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Jason Chen CJ 2018-03-27 04:29:25 +08:00 committed by Jack Ren
parent c7dd6a51b5
commit 4f40b53c73
1 changed files with 2 additions and 2 deletions

View File

@ -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) static bool ptdev_hv_owned_intx(struct vm *vm, struct ptdev_intx_info *info)
{ {
/* vm0 pin 4 (uart) is owned by hypervisor */ /* vm0 pin 4 (uart) is owned by hypervisor under debug version */
if (is_vm0(vm) && info->virt_pin == 4) if (is_vm0(vm) && vm->vuart && info->virt_pin == 4)
return true; return true;
else else
return false; return false;