Discussion:
[Xen-changelog] [xen staging] Revert "xen/arm: vgic-v3: Delay the initialization of the domain information"
p***@xen.org
2018-11-15 11:33:45 UTC
Permalink
commit 2a8922cff38403a9be7b0e38e09668dae0c6d9f6
Author: Andrew Cooper <***@citrix.com>
AuthorDate: Tue Oct 2 20:10:27 2018 +0100
Commit: Andrew Cooper <***@citrix.com>
CommitDate: Thu Nov 15 11:11:30 2018 +0000

Revert "xen/arm: vgic-v3: Delay the initialization of the domain information"

This reverts commit 703d9d5ec13a0f487e7415174ba54e0e3ca158db. The domain
creation logic has been adjusted to set up d->max_vcpus early enough to be
usable in vgic_v3_domain_init().

Signed-off-by: Andrew Cooper <***@citrix.com>
Acked-by: Julien Grall <***@arm.com>
---
xen/arch/arm/vgic-v3.c | 29 ++---------------------------
1 file changed, 2 insertions(+), 27 deletions(-)

diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c
index 519cc728ab..474be134c1 100644
--- a/xen/arch/arm/vgic-v3.c
+++ b/xen/arch/arm/vgic-v3.c
@@ -1573,11 +1573,9 @@ static const struct mmio_handler_ops vgic_distr_mmio_handler = {
.write = vgic_v3_distr_mmio_write,
};

-static int vgic_v3_real_domain_init(struct domain *d);
-
static int vgic_v3_vcpu_init(struct vcpu *v)
{
- int i, rc;
+ int i;
paddr_t rdist_base;
struct vgic_rdist_region *region;
unsigned int last_cpu;
@@ -1586,19 +1584,6 @@ static int vgic_v3_vcpu_init(struct vcpu *v)
struct domain *d = v->domain;

/*
- * This is the earliest place where the number of vCPUs is
- * known. This is required to initialize correctly the vGIC v3
- * domain structure. We only to do that when vCPU 0 is
- * initilialized.
- */
- if ( v->vcpu_id == 0 )
- {
- rc = vgic_v3_real_domain_init(d);
- if ( rc )
- return rc;
- }
-
- /*
* Find the region where the re-distributor lives. For this purpose,
* we look one region ahead as we have only the first CPU in hand.
*/
@@ -1660,7 +1645,7 @@ static inline unsigned int vgic_v3_max_rdist_count(struct domain *d)
GUEST_GICV3_RDIST_REGIONS;
}

-static int vgic_v3_real_domain_init(struct domain *d)
+static int vgic_v3_domain_init(struct domain *d)
{
struct vgic_rdist_region *rdist_regions;
int rdist_count, i, ret;
@@ -1763,16 +1748,6 @@ static int vgic_v3_real_domain_init(struct domain *d)
return 0;
}

-static int vgic_v3_domain_init(struct domain *d)
-{
- /*
- * The domain initialization for vGIC v3 is delayed until the first vCPU
- * is created. This because the initialization may require to know the
- * number of vCPUs that is not known when creating the domain.
- */
- return 0;
-}
-
static void vgic_v3_domain_free(struct domain *d)
{
vgic_v3_its_free_domain(d);
--
generated by git-patchbot for /home/xen/git/xen.git#staging

Loading...