diff options
| -rw-r--r-- | Documentation/admin-guide/kernel-parameters.txt | 4 | ||||
| -rw-r--r-- | virt/kvm/arm/vgic/vgic-v3.c | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 3daa0a590236..6f897a4c8281 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt | |||
| @@ -1881,6 +1881,10 @@ | |||
| 1881 | [KVM,ARM] Trap guest accesses to GICv3 common | 1881 | [KVM,ARM] Trap guest accesses to GICv3 common |
| 1882 | system registers | 1882 | system registers |
| 1883 | 1883 | ||
| 1884 | kvm-arm.vgic_v4_enable= | ||
| 1885 | [KVM,ARM] Allow use of GICv4 for direct injection of | ||
| 1886 | LPIs. | ||
| 1887 | |||
| 1884 | kvm-intel.ept= [KVM,Intel] Disable extended page tables | 1888 | kvm-intel.ept= [KVM,Intel] Disable extended page tables |
| 1885 | (virtualized MMU) support on capable Intel chips. | 1889 | (virtualized MMU) support on capable Intel chips. |
| 1886 | Default is 1 (enabled) | 1890 | Default is 1 (enabled) |
diff --git a/virt/kvm/arm/vgic/vgic-v3.c b/virt/kvm/arm/vgic/vgic-v3.c index 863351c090d8..2f05f732d3fd 100644 --- a/virt/kvm/arm/vgic/vgic-v3.c +++ b/virt/kvm/arm/vgic/vgic-v3.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | static bool group0_trap; | 24 | static bool group0_trap; |
| 25 | static bool group1_trap; | 25 | static bool group1_trap; |
| 26 | static bool common_trap; | 26 | static bool common_trap; |
| 27 | static bool gicv4_enable; | ||
| 27 | 28 | ||
| 28 | void vgic_v3_set_underflow(struct kvm_vcpu *vcpu) | 29 | void vgic_v3_set_underflow(struct kvm_vcpu *vcpu) |
| 29 | { | 30 | { |
| @@ -461,6 +462,12 @@ static int __init early_common_trap_cfg(char *buf) | |||
| 461 | } | 462 | } |
| 462 | early_param("kvm-arm.vgic_v3_common_trap", early_common_trap_cfg); | 463 | early_param("kvm-arm.vgic_v3_common_trap", early_common_trap_cfg); |
| 463 | 464 | ||
| 465 | static int __init early_gicv4_enable(char *buf) | ||
| 466 | { | ||
| 467 | return strtobool(buf, &gicv4_enable); | ||
| 468 | } | ||
| 469 | early_param("kvm-arm.vgic_v4_enable", early_gicv4_enable); | ||
| 470 | |||
| 464 | /** | 471 | /** |
| 465 | * vgic_v3_probe - probe for a GICv3 compatible interrupt controller in DT | 472 | * vgic_v3_probe - probe for a GICv3 compatible interrupt controller in DT |
| 466 | * @node: pointer to the DT node | 473 | * @node: pointer to the DT node |
| @@ -480,6 +487,13 @@ int vgic_v3_probe(const struct gic_kvm_info *info) | |||
| 480 | kvm_vgic_global_state.can_emulate_gicv2 = false; | 487 | kvm_vgic_global_state.can_emulate_gicv2 = false; |
| 481 | kvm_vgic_global_state.ich_vtr_el2 = ich_vtr_el2; | 488 | kvm_vgic_global_state.ich_vtr_el2 = ich_vtr_el2; |
| 482 | 489 | ||
| 490 | /* GICv4 support? */ | ||
| 491 | if (info->has_v4) { | ||
| 492 | kvm_vgic_global_state.has_gicv4 = gicv4_enable; | ||
| 493 | kvm_info("GICv4 support %sabled\n", | ||
| 494 | gicv4_enable ? "en" : "dis"); | ||
| 495 | } | ||
| 496 | |||
| 483 | if (!info->vcpu.start) { | 497 | if (!info->vcpu.start) { |
| 484 | kvm_info("GICv3: no GICV resource entry\n"); | 498 | kvm_info("GICv3: no GICV resource entry\n"); |
| 485 | kvm_vgic_global_state.vcpu_base = 0; | 499 | kvm_vgic_global_state.vcpu_base = 0; |
