From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
Paul Durrant <paul.durrant@citrix.com>,
Wei Liu <wei.liu2@citrix.com>
Subject: [PATCH 2/2] libxendevicemodel: initialise extent to zero
Date: Thu, 28 Sep 2017 11:24:25 +0100 [thread overview]
Message-ID: <20170928102425.22745-3-wei.liu2@citrix.com> (raw)
In-Reply-To: <20170928102425.22745-1-wei.liu2@citrix.com>
The pad field needs to be zero as required by the hypervisor.
Instead of setting the pad separately, memset extent to zero.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Paul Durrant <paul.durrant@citrix.com>
Backport to 4.9
---
tools/libs/devicemodel/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/libs/devicemodel/core.c b/tools/libs/devicemodel/core.c
index fcb260d29b..af06936262 100644
--- a/tools/libs/devicemodel/core.c
+++ b/tools/libs/devicemodel/core.c
@@ -485,6 +485,8 @@ int xendevicemodel_modified_memory(
{
struct xen_dm_op_modified_memory_extent extent;
+ memset(&extent, 0, sizeof(extent));
+
extent.first_pfn = first_pfn;
extent.nr = nr;
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-09-28 10:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 10:24 [PATCH 0/2] Fix bugs in dmop code Wei Liu
2017-09-28 10:24 ` [PATCH 1/2] x86/hvm/dmop: fix EFAULT condition Wei Liu
2017-09-28 10:28 ` Paul Durrant
2017-09-28 10:24 ` Wei Liu [this message]
2017-09-28 10:31 ` [PATCH 2/2] libxendevicemodel: initialise extent to zero Paul Durrant
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=20170928102425.22745-3-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=paul.durrant@citrix.com \
--cc=xen-devel@lists.xenproject.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 NNTP newsgroup(s).