From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, dmitry@daynix.com
Cc: quintela@redhat.com, amit.shah@redhat.com
Subject: [Qemu-devel] [PATCH 1/2] vmxnet3: Convert ring values to uint32_t's
Date: Thu, 15 Dec 2016 20:05:08 +0000 [thread overview]
Message-ID: <20161215200509.2239-2-dgilbert@redhat.com> (raw)
In-Reply-To: <20161215200509.2239-1-dgilbert@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
The index's in the Vmxnet3Ring were migrated as 32bit ints
yet are declared as size_t's. They appear to be derived
from 32bit values loaded from guest memory, so actually
store them as that.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
hw/net/vmxnet3.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 2cb2731..7853174 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -141,17 +141,17 @@ typedef struct VMXNET3Class {
/* Cyclic ring abstraction */
typedef struct {
hwaddr pa;
- size_t size;
- size_t cell_size;
- size_t next;
+ uint32_t size;
+ uint32_t cell_size;
+ uint32_t next;
uint8_t gen;
} Vmxnet3Ring;
static inline void vmxnet3_ring_init(PCIDevice *d,
Vmxnet3Ring *ring,
hwaddr pa,
- size_t size,
- size_t cell_size,
+ uint32_t size,
+ uint32_t cell_size,
bool zero_region)
{
ring->pa = pa;
@@ -166,7 +166,7 @@ static inline void vmxnet3_ring_init(PCIDevice *d,
}
#define VMXNET3_RING_DUMP(macro, ring_name, ridx, r) \
- macro("%s#%d: base %" PRIx64 " size %zu cell_size %zu gen %d next %zu", \
+ macro("%s#%d: base %" PRIx64 " size %u cell_size %u gen %d next %u", \
(ring_name), (ridx), \
(r)->pa, (r)->size, (r)->cell_size, (r)->gen, (r)->next)
--
2.9.3
next prev parent reply other threads:[~2016-12-15 20:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-15 20:05 [Qemu-devel] [PATCH 0/2] Vmxnet3 VMStatification Dr. David Alan Gilbert (git)
2016-12-15 20:05 ` Dr. David Alan Gilbert (git) [this message]
2016-12-18 7:55 ` [Qemu-devel] [PATCH 1/2] vmxnet3: Convert ring values to uint32_t's Dmitry Fleytman
2016-12-15 20:05 ` [Qemu-devel] [PATCH 2/2] vmxnet3: VMStatify rx/tx q_descr and int_state Dr. David Alan Gilbert (git)
2016-12-16 12:19 ` Dr. David Alan Gilbert
2016-12-18 7:54 ` Dmitry Fleytman
2017-01-03 19:40 ` Dr. David Alan Gilbert
2017-01-04 8:02 ` Dmitry Fleytman
2017-01-31 19:44 ` Dr. David Alan Gilbert
2017-02-24 1:39 ` Jason Wang
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=20161215200509.2239-2-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=amit.shah@redhat.com \
--cc=dmitry@daynix.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@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).