Re: Increase GICV size to 64KB so !4KB page-size kernels are able to initialize KVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/22/16 9:20 PM, Marc Zyngier wrote:
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.

Is it likely in the future specification of ACPI the size information
stored in the GIC subtable? In 6.1 or earlier, it seems optional to me.
I also had to allow the not page-aligned physical address of GICV, below
is an excerpt of apic.dsl

[054h 0084   8]     Virtual GIC Base Address : 00000000E116F000
[05Ch 0092   8]  Hypervisor GIC Base Address : 00000000E1140000
[064h 0100   4]        Virtual GIC Interrupt : 00000019
[068h 0104   8]   Redistributor Base Address : 0000000000000000
[070h 0112   8]                    ARM MPIDR : 0000000000000000


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.

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux