xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Julien Grall <julien.grall@citrix.com>,
	ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com
Subject: [PATCH v4 1/4] xen/arm: vgic-v2: Report the correct GICC size to the guest
Date: Thu, 8 Oct 2015 19:23:51 +0100	[thread overview]
Message-ID: <1444328634-32110-2-git-send-email-julien.grall@citrix.com> (raw)
In-Reply-To: <1444328634-32110-1-git-send-email-julien.grall@citrix.com>

The GICv2 DT node is usually used by the guest to know the address/size
of the regions (GICD, GICC...) to map into their virtual memory.

While the GICv2 spec requires the size of the GICC to be 8KB, we
correctly do an 8KB stage-2 mapping but errornously report 256 in the
device tree (based on GUEST_GICC_SIZE).

I bet we didn't see any issue so far because all the registers except
GICC_DIR lives in the first 256 bytes of the GICC region and all the guest
I have seen so far are driving the GIC with GICC_CTLR.EIOmode =
0.

Signed-off-by: Julien Grall <julien.grall@citrix.com>

---
    This patch is a good candidate to backport for Xen 4.6 - 4.4.
    Without it a guest relying on the DT can't use GICC_DIR.

    Changes in v4:
        - Patch added
---
 xen/include/public/arch-arm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index 9a96401..3c365f3 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -397,7 +397,7 @@ typedef uint64_t xen_callback_t;
 #define GUEST_GICD_BASE   0x03001000ULL
 #define GUEST_GICD_SIZE   0x00001000ULL
 #define GUEST_GICC_BASE   0x03002000ULL
-#define GUEST_GICC_SIZE   0x00000100ULL
+#define GUEST_GICC_SIZE   0x00002000ULL
 
 /* vGIC v3 mappings */
 #define GUEST_GICV3_GICD_BASE      0x03001000ULL
-- 
2.1.4

  reply	other threads:[~2015-10-08 18:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08 18:23 [PATCH v4 0/4] xen/arm: gic-v2: Detect automatically aliased GIC 400 Julien Grall
2015-10-08 18:23 ` Julien Grall [this message]
2015-10-23 13:28   ` [PATCH v4 1/4] xen/arm: vgic-v2: Report the correct GICC size to the guest Ian Campbell
2015-10-23 13:34     ` Julien Grall
2015-10-23 13:39       ` Ian Campbell
2015-10-23 13:43         ` Julien Grall
2015-10-08 18:23 ` [PATCH v4 2/4] xen/arm: gic: Check the size of the CPU and vCPU interface retrieved from DT Julien Grall
2015-10-23 13:21   ` Ian Campbell
2015-10-08 18:23 ` [PATCH v4 3/4] xen/arm: gic-v2: Automatically detect aliased GIC400 Julien Grall
2015-10-23 13:23   ` Ian Campbell
2015-10-08 18:23 ` [PATCH v4 4/4] xen/arm: platform: Drop the quirks callback Julien Grall
2015-10-23 13:23   ` Ian Campbell
2015-10-23 13:52 ` [PATCH v4 0/4] xen/arm: gic-v2: Detect automatically aliased GIC 400 Ian Campbell

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=1444328634-32110-2-git-send-email-julien.grall@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --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).