QEMU-Devel Archive mirror
 help / color / mirror / Atom feed
From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "jasowang@redhat.com" <jasowang@redhat.com>,
	CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
Subject: [PATCH intel_iommu 1/7] intel_iommu: fix FRCD construction macro.
Date: Mon, 22 Apr 2024 15:52:52 +0000	[thread overview]
Message-ID: <20240422155236.129179-2-clement.mathieu--drif@eviden.com> (raw)
In-Reply-To: <20240422155236.129179-1-clement.mathieu--drif@eviden.com>

The constant must be unsigned, otherwise the two's complement
overrides the other fields when a PASID is present

Signed-off-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
---
 hw/i386/intel_iommu_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h
index f8cf99bddf..cbc4030031 100644
--- a/hw/i386/intel_iommu_internal.h
+++ b/hw/i386/intel_iommu_internal.h
@@ -267,7 +267,7 @@
 /* For the low 64-bit of 128-bit */
 #define VTD_FRCD_FI(val)        ((val) & ~0xfffULL)
 #define VTD_FRCD_PV(val)        (((val) & 0xffffULL) << 40)
-#define VTD_FRCD_PP(val)        (((val) & 0x1) << 31)
+#define VTD_FRCD_PP(val)        (((val) & 0x1ULL) << 31)
 #define VTD_FRCD_IR_IDX(val)    (((val) & 0xffffULL) << 48)
 
 /* DMA Remapping Fault Conditions */
-- 
2.44.0

  parent reply	other threads:[~2024-04-22 15:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 15:52 [PATCH intel_iommu 0/7] FLTS for VT-d CLEMENT MATHIEU--DRIF
2024-04-22 15:52 ` [PATCH intel_iommu 2/7] intel_iommu: rename slpte to pte before adding FLTS CLEMENT MATHIEU--DRIF
2024-04-22 15:52 ` CLEMENT MATHIEU--DRIF [this message]
2024-04-22 15:52 ` [PATCH intel_iommu 7/7] intel_iommu: add a CLI option to enable FLTS CLEMENT MATHIEU--DRIF
2024-04-22 15:52 ` [PATCH intel_iommu 5/7] intel_iommu: extract device IOTLB invalidation logic CLEMENT MATHIEU--DRIF
2024-04-22 16:59   ` Philippe Mathieu-Daudé
2024-04-23  5:07     ` CLEMENT MATHIEU--DRIF
2024-04-22 15:52 ` [PATCH intel_iommu 4/7] intel_iommu: add support for first-stage translation CLEMENT MATHIEU--DRIF
2024-04-22 15:52 ` [PATCH intel_iommu 6/7] intel_iommu: add PASID-based IOTLB invalidation CLEMENT MATHIEU--DRIF
2024-04-22 15:52 ` [PATCH intel_iommu 3/7] intel_iommu: make types match CLEMENT MATHIEU--DRIF
2024-04-22 17:03   ` Philippe Mathieu-Daudé
2024-04-23  5:05     ` CLEMENT MATHIEU--DRIF
2024-04-23  8:19       ` Philippe Mathieu-Daudé
2024-04-23 15:17         ` CLEMENT MATHIEU--DRIF
2024-04-30 14:04 ` [PATCH intel_iommu 0/7] FLTS for VT-d Philippe Mathieu-Daudé
2024-04-30 14:13 ` Cédric Le Goater
2024-05-01 12:40   ` Duan, Zhenzhong
2024-05-02  5:03     ` CLEMENT MATHIEU--DRIF
2024-05-06  1:38       ` Duan, Zhenzhong
2024-05-14  5:02         ` CLEMENT MATHIEU--DRIF
2024-05-14  5:50           ` Duan, Zhenzhong
2024-05-14  6:13             ` CLEMENT MATHIEU--DRIF

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240422155236.129179-2-clement.mathieu--drif@eviden.com \
    --to=clement.mathieu--drif@eviden.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).