From 6d6e10484f88f672ff0ea613e4d0fd7374469d5e Mon Sep 17 00:00:00 2001 From: Jason Chen CJ Date: Fri, 9 Mar 2018 07:21:14 +0800 Subject: [PATCH] ptdev: fix bug when update ptdev entry info->phys_pin need be used by ptdev_build_native_rte when updating entry TODO: currently ptdev entry is virtual based, the better solution should be physical based. Signed-off-by: Jason Chen CJ --- arch/x86/assign.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/assign.c b/arch/x86/assign.c index 5ac09be1b..1c8bcb5f1 100644 --- a/arch/x86/assign.c +++ b/arch/x86/assign.c @@ -747,7 +747,15 @@ int ptdev_intx_pin_remap(struct vm *vm, struct ptdev_intx_info *info) info->phys_pin, pic_pin); } else goto END; - } + } else + /* info->phys_pin need be used by ptdev_build_native_rte when + * updating entry. + * + * TODO: currently ptdev entry is virtual based, the better + * solution should be physical based, then we will not have + * this problem. + */ + info->phys_pin = entry->intx.phys_pin; /* phys_pin from native IOAPIC */ phys_pin = entry->intx.phys_pin;