From 9f5b0ce10b2895b4136c9e5c5ebd0aebac31ea98 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roger=20Pau=20Monn=C3=A9?= Date: Mon, 26 Mar 2018 15:17:12 +0200 Subject: [PATCH] vpci/msix: fix incorrect usage of bitmask MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The bitmask to clear the low bits of the address field should be ~0xffffffffull, the current mask clears both the low and the high bits of the address field, which is a bug. Reported-by: Coverity Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- xen/drivers/vpci/msix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c index 3b378c2e51..bcf63256f6 100644 --- a/xen/drivers/vpci/msix.c +++ b/xen/drivers/vpci/msix.c @@ -328,7 +328,7 @@ static int msix_write(struct vcpu *v, unsigned long addr, unsigned int len, entry->addr = data; break; } - entry->addr &= ~0xffffffff; + entry->addr &= ~0xffffffffull; entry->addr |= data; break; -- 2.39.5