From: Julien Grall <julien.grall@linaro.org>
To: xen-devel@lists.xenproject.org
Cc: stefano.stabellini@citrix.com,
Julien Grall <julien.grall@linaro.org>,
tim@xen.org, ian.campbell@citrix.com
Subject: [PATCH v2 for 4.5] xen/arm: p2m: Correctly initialize cur_offset
Date: Wed, 1 Oct 2014 16:13:41 +0100 [thread overview]
Message-ID: <1412176421-20606-1-git-send-email-julien.grall@linaro.org> (raw)
{~0,} only initializes the first cell of the array to ~0. The other cells
are initialized to 0.
Explicitly initialize every cells of the array and, at the same time, do the
same for the mappings.
This is fixing boot after 82985d7 "xen: arm: handle variable p2m levels
in apply_p2m_changes" on platform where the root-level doesn't have
concatenate table (such as the Foundation Model).
Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
This is a bug fix for Xen 4.5. This make Xen booting again on the
Foundation Model and any platform that doesn't have concatenate
table for root-level.
Changes in v2:
- Add missing Signed-off-by
- Explicitly initialize every cells rather than using a loop
---
xen/arch/arm/p2m.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 70929fc..7044431 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -716,11 +716,11 @@ static int apply_p2m_changes(struct domain *d,
{
int rc, ret;
struct p2m_domain *p2m = &d->arch.p2m;
- lpae_t *mappings[4] = { NULL, };
+ lpae_t *mappings[4] = { NULL, NULL, NULL, NULL };
paddr_t addr, orig_maddr = maddr;
unsigned int level = 0;
unsigned int cur_root_table = ~0;
- unsigned int cur_offset[4] = { ~0, };
+ unsigned int cur_offset[4] = { ~0, ~0, ~0, ~0 };
unsigned int count = 0;
bool_t flush = false;
bool_t flush_pt;
--
1.7.10.4
reply other threads:[~2014-10-01 15:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1412176421-20606-1-git-send-email-julien.grall@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--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).