All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Itaru Kitayama <itaru.kitayama@riken.jp>
Cc: "kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>
Subject: Re: Increase GICV size to 64KB so !4KB page-size kernels are able to initialize KVM
Date: Wed, 22 Jun 2016 11:06:06 +0100	[thread overview]
Message-ID: <576A630E.10800@arm.com> (raw)
In-Reply-To: <8b9c3e26-97b1-307f-8227-5ca3a4966c84@riken.jp>

On 22/06/16 07:48, Itaru Kitayama wrote:
> Against the tag v4.7-rc2 in the kvmtree.
> 
> ---
>   drivers/irqchip/irq-gic.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
> index fbc4ae2..bd463a3 100644
> --- a/drivers/irqchip/irq-gic.c
> +++ b/drivers/irqchip/irq-gic.c
> @@ -1425,7 +1425,7 @@ static bool __init gic_validate_dist(struct 
> acpi_subtable_header *header,
>   #define ACPI_GICV2_DIST_MEM_SIZE       (SZ_4K)
>   #define ACPI_GIC_CPU_IF_MEM_SIZE       (SZ_8K)
>   #define ACPI_GICV2_VCTRL_MEM_SIZE      (SZ_4K)
> -#define ACPI_GICV2_VCPU_MEM_SIZE       (SZ_8K)
> +#define ACPI_GICV2_VCPU_MEM_SIZE       (SZ_64K)
> 
>   static void __init gic_acpi_setup_kvm_info(void)
>   {
> 

I'm afraid this is the wrong approach. No matter how you look at it, the
size of the GICV region is 8kB, and not 64kB. On some systems the GICV
region is *aliased* over 128kB (first 4kB aliased over the first 64kB
page, second 4kB aliased over the second 64kB page). The usable range
for the GICV region is then the f000-10fff region in order to preserve
the contiguity of the two 4kB blocks.

In that case, ACPI ought to provide the base address of the usable
range, not some dummy address. It would be different if the ACPI tables
would provide the size of the region (where we could make an educated
guess at what is happening, just like with DT), but the information is
simply not available. So my advise here is to fix your ACPI tables (or
get them fixed).

What is actually missing in KVM is a way to describe the offset within a
page at which the GICV region must be mapped. I have patches for that
that I may revive if there is some interest.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2016-06-22 10:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22  6:48 Increase GICV size to 64KB so !4KB page-size kernels are able to initialize KVM Itaru Kitayama
2016-06-22 10:06 ` Marc Zyngier [this message]
2016-06-22 11:02   ` Itaru Kitayama
2016-06-22 12:20     ` Marc Zyngier
2016-06-23  3:17       ` Itaru Kitayama
2016-06-23  7:33         ` Marc Zyngier

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=576A630E.10800@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=itaru.kitayama@riken.jp \
    --cc=kvmarm@lists.cs.columbia.edu \
    /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.