From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
David Hildenbrand <david@redhat.com>,
Stefano Garzarella <sgarzare@redhat.com>,
Pankaj Gupta <pankaj.gupta.linux@gmail.com>,
Bruce Rogers <brogers@suse.com>
Subject: [PULL 3/3] virtio-mem: Correct format specifier mismatch for RISC-V
Date: Tue, 4 Aug 2020 10:17:12 -0400 [thread overview]
Message-ID: <20200804141640.591031-4-mst@redhat.com> (raw)
In-Reply-To: <20200804141640.591031-1-mst@redhat.com>
From: Bruce Rogers <brogers@suse.com>
This likely affects other, less popular host architectures as well.
Less common host architectures under linux get QEMU_VMALLOC_ALIGN (from
which VIRTIO_MEM_MIN_BLOCK_SIZE is derived) define to a variable of
type uintptr, which isn't compatible with the format specifier used to
print a user message. Since this particular usage of the underlying data
seems unique to this file, the simple fix is to just cast
QEMU_VMALLOC_ALIGN to uint32_t, which corresponds to the format specifier
used.
Signed-off-by: Bruce Rogers <brogers@suse.com>
Message-Id: <20200730130519.168475-1-brogers@suse.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
---
hw/virtio/virtio-mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c
index c12e9f79b0..7740fc613f 100644
--- a/hw/virtio/virtio-mem.c
+++ b/hw/virtio/virtio-mem.c
@@ -36,7 +36,7 @@
* Use QEMU_VMALLOC_ALIGN, so no THP will have to be split when unplugging
* memory (e.g., 2MB on x86_64).
*/
-#define VIRTIO_MEM_MIN_BLOCK_SIZE QEMU_VMALLOC_ALIGN
+#define VIRTIO_MEM_MIN_BLOCK_SIZE ((uint32_t)QEMU_VMALLOC_ALIGN)
/*
* Size the usable region bigger than the requested size if possible. Esp.
* Linux guests will only add (aligned) memory blocks in case they fully
--
MST
next prev parent reply other threads:[~2020-08-04 14:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 14:16 [PULL 0/3] virtio,acpi: bugfixes Michael S. Tsirkin
2020-08-04 14:17 ` [PULL 1/3] i386/acpi: fix inconsistent QEMU/OVMF device paths Michael S. Tsirkin
2020-08-04 14:17 ` [PULL 2/3] arm/acpi: fix an out of spec _UID for PCI root Michael S. Tsirkin
2020-08-04 14:17 ` Michael S. Tsirkin [this message]
2020-08-04 15:19 ` [PULL 0/3] virtio,acpi: bugfixes Peter Maydell
2020-08-04 17:20 ` Peter Maydell
2020-08-04 21:25 ` Michael S. Tsirkin
2020-08-04 20:34 ` Michael S. Tsirkin
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=20200804141640.591031-4-mst@redhat.com \
--to=mst@redhat.com \
--cc=brogers@suse.com \
--cc=david@redhat.com \
--cc=pankaj.gupta.linux@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
/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 NNTP newsgroup(s).