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>
Subject: [PATCH v2 5/5] Revert "xen/arm: vgic-v3: Delay the initialization of the domain information"
Date: Mon, 12 Nov 2018 16:16:31 +0000	[thread overview]
Message-ID: <1542039391-32406-6-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1542039391-32406-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>
Acked-by: 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 519cc72..474be13 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-11-12 16:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 16:16 [PATCH v2 0/5] xen/domain: Allocate d->vcpu[] earlier during domain construction Andrew Cooper
2018-11-12 16:16 ` [PATCH v2 1/5] xen/domain: Introduce a new sanitise_domain_config() helper Andrew Cooper
2018-11-13 14:03   ` Jan Beulich
2018-11-14 18:49   ` Julien Grall
2018-11-12 16:16 ` [PATCH v2 2/5] xen/domain: Introduce a new arch_sanitise_domain_config() helper Andrew Cooper
2018-11-12 16:16 ` [PATCH v2 3/5] xen/domain: Stricter configuration checking Andrew Cooper
2018-11-13 14:14   ` Jan Beulich
2018-11-13 14:36     ` Wei Liu
2018-11-13 14:39       ` Andrew Cooper
2018-11-13 14:49         ` Wei Liu
2018-11-13 16:56         ` Jan Beulich
2018-11-13 15:07     ` Andrew Cooper
2018-11-13 16:54       ` Jan Beulich
2018-11-14 17:44   ` [PATCH v3 3/5] xen/domain: Move guest type checks into the arch_sanitise_domain_config() path Andrew Cooper
2018-11-14 18:52     ` Julien Grall
     [not found]     ` <013C0C6C020000F58E2C01CD@prv1-mh.provo.novell.com>
2018-11-15 10:51       ` Jan Beulich
2018-11-14 18:51   ` [PATCH v2 3/5] xen/domain: Stricter configuration checking Julien Grall
2018-11-12 16:16 ` [PATCH v2 4/5] xen/domain: Allocate d->vcpu[] earlier during domain_create() Andrew Cooper
2018-11-13 14:17   ` Jan Beulich
2018-11-14 18:20   ` [PATCH v3 " Andrew Cooper
2018-11-14 18:59   ` [PATCH v2 " Julien Grall
2018-11-14 19:04     ` Andrew Cooper
2018-11-14 19:36       ` [PATCH v4 " Andrew Cooper
2018-11-14 19:37         ` Julien Grall
2018-11-14 19:38           ` Andrew Cooper
2018-11-14 19:48             ` [PATCH v5 " Andrew Cooper
2018-11-14 19:50               ` Julien Grall
2018-11-12 16:16 ` Andrew Cooper [this message]

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=1542039391-32406-6-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --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.