All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: [PATCH 5/5] Revert "xen/arm: vgic-v3: Delay the initialization of the domain information"
Date: Fri, 5 Oct 2018 15:54:49 +0100	[thread overview]
Message-ID: <1538751289-1109-6-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1538751289-1109-1-git-send-email-andrew.cooper3@citrix.com>

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 <andrew.cooper3@citrix.com>
---
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <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 b4476f3..e909502 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);
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2018-10-05 14:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-05 14:54 [PATCH RFC 0/5] xen/domain: Allocate d->vcpu[] earlier during domain construction Andrew Cooper
2018-10-05 14:54 ` [PATCH 1/5] xen/domain: Introduce a new check_domain_config() helper Andrew Cooper
2018-10-08 13:37   ` Jan Beulich
2018-10-05 14:54 ` [PATCH 2/5] xen/domain: Introduce a new arch_check_domain_config() helper Andrew Cooper
2018-10-08 13:39   ` Jan Beulich
2018-10-09 10:57   ` Julien Grall
2018-10-05 14:54 ` [PATCH 3/5] xen/domain: Audit config->max_vcpus during {, arch_}check_domain_config() Andrew Cooper
2018-10-08  6:44   ` Alan Robinson
2018-10-08 13:45   ` Jan Beulich
2018-11-09 18:44     ` Andrew Cooper
2018-11-12  8:21       ` Jan Beulich
2018-10-09 11:23   ` Julien Grall
2018-11-09 18:43     ` Andrew Cooper
2018-11-12 11:43       ` Julien Grall
2018-11-12 11:45         ` Andrew Cooper
2018-10-05 14:54 ` [PATCH 4/5] xen/domain: Allocate d->vcpu[] earlier during domain_create() Andrew Cooper
2018-10-08 13:51   ` Jan Beulich
2018-10-08 17:39     ` Andrew Cooper
2018-10-09  6:06       ` Jan Beulich
2018-10-05 14:54 ` Andrew Cooper [this message]
2018-10-09 11:25   ` [PATCH 5/5] Revert "xen/arm: vgic-v3: Delay the initialization of the domain information" Julien Grall

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=1538751289-1109-6-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.