* [PATCH] xen/arm: gic: don't use dom0 variable in gicv_setup
@ 2013-11-19 17:55 Julien Grall
2013-11-20 9:44 ` Ian Campbell
0 siblings, 1 reply; 2+ messages in thread
From: Julien Grall @ 2013-11-19 17:55 UTC (permalink / raw)
To: xen-devel; +Cc: Julien Grall, stefano.stabellini, ian.campbell, time, patches
The commit 99bf30a "xen: arm: define guest virtual platform in API headers"
modifies gicv_setup to either use harcoded addresses for guest or hardware
addresses for dom0. In the latter case, the variable dom0 is not yet
initialized. dom0 receives assignment by the return of domain_create which
calls gicv_setup.
Use the ID to know whether the domain is dom0 or not.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
xen/arch/arm/gic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 3b1ef3a..d5ac770 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -881,7 +881,7 @@ int gicv_setup(struct domain *d)
* Domain 0 gets the hardware address.
* Guests get the virtual platform layout.
*/
- if ( d == dom0 )
+ if ( d->domain_id == 0 )
{
d->arch.vgic.dbase = gic.dbase;
d->arch.vgic.cbase = gic.cbase;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xen/arm: gic: don't use dom0 variable in gicv_setup
2013-11-19 17:55 [PATCH] xen/arm: gic: don't use dom0 variable in gicv_setup Julien Grall
@ 2013-11-20 9:44 ` Ian Campbell
0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2013-11-20 9:44 UTC (permalink / raw)
To: Julien Grall; +Cc: xen-devel, stefano.stabellini, time, patches
On Tue, 2013-11-19 at 17:55 +0000, Julien Grall wrote:
> The commit 99bf30a "xen: arm: define guest virtual platform in API headers"
> modifies gicv_setup to either use harcoded addresses for guest or hardware
> addresses for dom0. In the latter case, the variable dom0 is not yet
> initialized. dom0 receives assignment by the return of domain_create which
> calls gicv_setup.
> Use the ID to know whether the domain is dom0 or not.
Oops, I missed this because the platform I was testing (fastmodel ==
vexpress) happens to have the same GIC addresses as the virtual
platform.
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked + applied.
I investigated is_hardware_domain and friends but they relies on
d->is_privileged which is also not yet set.
Ian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-20 9:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-19 17:55 [PATCH] xen/arm: gic: don't use dom0 variable in gicv_setup Julien Grall
2013-11-20 9:44 ` Ian Campbell
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).