* [Qemu-devel] [PATCH v2] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn
@ 2015-04-21 15:12 Thomas Huth
2015-04-23 6:04 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Huth @ 2015-04-21 15:12 UTC (permalink / raw)
To: qemu-ppc, qemu-devel, agraf; +Cc: aik, david
The check "liobn & 0xFFFFFFFF00000000ULL" in spapr_tce_find_by_liobn()
is completely useless since liobn is only declared as an uint32_t
parameter. Fix this by using target_ulong instead (this is what most
of the callers of this function are using, too).
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
v2:
- Do not change the hcall_dprintf() into a qemu_log_mask() statement.
---
hw/ppc/spapr_iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index f3990fd..995f21b 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -41,7 +41,7 @@ enum sPAPRTCEAccess {
static QLIST_HEAD(spapr_tce_tables, sPAPRTCETable) spapr_tce_tables;
-static sPAPRTCETable *spapr_tce_find_by_liobn(uint32_t liobn)
+static sPAPRTCETable *spapr_tce_find_by_liobn(target_ulong liobn)
{
sPAPRTCETable *tcet;
@@ -52,7 +52,7 @@ static sPAPRTCETable *spapr_tce_find_by_liobn(uint32_t liobn)
}
QLIST_FOREACH(tcet, &spapr_tce_tables, list) {
- if (tcet->liobn == liobn) {
+ if (tcet->liobn == (uint32_t)liobn) {
return tcet;
}
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH v2] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn
2015-04-21 15:12 [Qemu-devel] [PATCH v2] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn Thomas Huth
@ 2015-04-23 6:04 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2015-04-23 6:04 UTC (permalink / raw)
To: Thomas Huth; +Cc: aik, qemu-ppc, qemu-devel, agraf
[-- Attachment #1: Type: text/plain, Size: 674 bytes --]
On Tue, Apr 21, 2015 at 05:12:11PM +0200, Thomas Huth wrote:
> The check "liobn & 0xFFFFFFFF00000000ULL" in spapr_tce_find_by_liobn()
> is completely useless since liobn is only declared as an uint32_t
> parameter. Fix this by using target_ulong instead (this is what most
> of the callers of this function are using, too).
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Thanks. Adjusted for a conflict with Alexey's DDW preliminaries and
applied to spapr-next.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-23 7:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 15:12 [Qemu-devel] [PATCH v2] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn Thomas Huth
2015-04-23 6:04 ` David Gibson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.