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 13:20:40 +0100	[thread overview]
Message-ID: <576A8298.20704@arm.com> (raw)
In-Reply-To: <57f56525-119a-8566-8d9b-43b7bcb23a49@riken.jp>

On 22/06/16 12:02, Itaru Kitayama wrote:
> Hi Marc,
> 
> Thanks for your comments. I'm definitely interested in your patch set 
> that makes KVM to work with large page sizes. I'll ask the vendor to 
> update some ACPI tables. (I'm on Overdrive with recent F/W though I 
> think the GICV physical address is aligned at 4KB boundary still)

I'm only using DT, which works just fine on Overdrive, even with 64kB 
pages.

I think I understand the issue you're having, which is not what I 
was thinking of. The issue is that because ACPI doesn't tell us
anything about the size of the GICV region, we have to assume that
it is 8kB, and cannot distinguish a safe platform from an unsafe
one, failing the size test on 64kB.

Oh well.

How about this:

diff --git a/virt/kvm/arm/vgic/vgic-v2.c b/virt/kvm/arm/vgic/vgic-v2.c
index e31405e..8aac59b 100644
--- a/virt/kvm/arm/vgic/vgic-v2.c
+++ b/virt/kvm/arm/vgic/vgic-v2.c
@@ -315,12 +315,10 @@ int vgic_v2_probe(const struct gic_kvm_info *info)
 		return -ENXIO;
 	}
 
-	if (!PAGE_ALIGNED(resource_size(&info->vcpu))) {
-		kvm_err("GICV size 0x%llx not a multiple of page size 0x%lx\n",
+	if (!PAGE_ALIGNED(resource_size(&info->vcpu)))
+		kvm_warn("GICV size 0x%llx not a multiple of page size 0x%lx, system may be unsafe\n",
 			(unsigned long long)resource_size(&info->vcpu),
 			PAGE_SIZE);
-		return -ENXIO;
-	}
 
 	kvm_vgic_global_state.vctrl_base = ioremap(info->vctrl.start,
 						   resource_size(&info->vctrl));

Thanks,

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

  reply	other threads:[~2016-06-22 12:15 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
2016-06-22 11:02   ` Itaru Kitayama
2016-06-22 12:20     ` Marc Zyngier [this message]
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=576A8298.20704@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.