// SPDX-License-Identifier: GPL-2.0-only /* * Kernel-based Virtual Machine driver for Linux * * AMD SVM support * * Copyright (C) 2006 Qumranet, Inc. * Copyright 2010 Red Hat, Inc. and/or its affiliates. * * Authors: * Yaniv Kamay <yaniv@qumranet.com> * Avi Kivity <avi@qumranet.com>
*/
/* * Encode the arbitrary VM ID and the vCPU's _index_ into the GATag so that * KVM can retrieve the correct vCPU from a GALog entry if an interrupt can't * be delivered, e.g. because the vCPU isn't running. Use the vCPU's index * instead of its ID (a.k.a. its default APIC ID), as KVM is guaranteed a fast * lookup on the index, where as vCPUs whose index doesn't match their ID need * to walk the entire xarray of vCPUs in the worst case scenario. * * For the vCPU index, use however many bits are currently allowed for the max * guest physical APIC ID (limited by the size of the physical ID table), and * use whatever bits remain to assign arbitrary AVIC IDs to VMs. Note, the * size of the GATag is defined by hardware (32 bits), but is an opaque value * as far as hardware is concerned.
*/ #define AVIC_VCPU_IDX_MASK AVIC_PHYSICAL_MAX_INDEX_MASK
/* Note: * This hash table is used to map VM_ID to a struct kvm_svm, * when handling AMD IOMMU GALOG notification to schedule in * a particular vCPU.
*/ #define SVM_VM_DATA_HASH_BITS 8 static DEFINE_HASHTABLE(svm_vm_data_hash, SVM_VM_DATA_HASH_BITS); static u32 next_vm_id = 0; staticbool next_vm_id_wrapped = 0; static DEFINE_SPINLOCK(svm_vm_data_hash_lock); bool x2avic_enabled;
/* * Note: KVM supports hybrid-AVIC mode, where KVM emulates x2APIC MSR * accesses, while interrupt injection to a running vCPU can be * achieved using AVIC doorbell. KVM disables the APIC access page * (deletes the memslot) if any vCPU has x2APIC enabled, thus enabling * AVIC in hybrid mode activates only the doorbell mechanism.
*/ if (x2avic_enabled && apic_x2apic_mode(svm->vcpu.arch.apic)) {
vmcb->control.int_ctl |= X2APIC_MODE_MASK;
vmcb->control.avic_physical_id |= X2AVIC_MAX_PHYSICAL_ID; /* Disabling MSR intercept for x2APIC registers */
svm_set_x2apic_msr_interception(svm, false);
} else { /* * Flush the TLB, the guest may have inserted a non-APIC * mapping into the TLB while AVIC was disabled.
*/
kvm_make_request(KVM_REQ_TLB_FLUSH_CURRENT, &svm->vcpu);
/* For xAVIC and hybrid-xAVIC modes */
vmcb->control.avic_physical_id |= AVIC_MAX_PHYSICAL_ID; /* Enabling MSR intercept for x2APIC registers */
svm_set_x2apic_msr_interception(svm, true);
}
}
/* * If running nested and the guest uses its own MSR bitmap, there * is no need to update L0's msr bitmap
*/ if (is_guest_mode(&svm->vcpu) &&
vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_MSR_PROT)) return;
/* Note: * This function is called from IOMMU driver to notify * SVM to schedule in a particular vCPU of a particular VM.
*/ int avic_ga_log_notifier(u32 ga_tag)
{ unsignedlong flags; struct kvm_svm *kvm_svm; struct kvm_vcpu *vcpu = NULL;
u32 vm_id = AVIC_GATAG_TO_VMID(ga_tag);
u32 vcpu_idx = AVIC_GATAG_TO_VCPUIDX(ga_tag);
/* Note: * At this point, the IOMMU should have already set the pending * bit in the vAPIC backing page. So, we just need to schedule * in the vcpu.
*/ if (vcpu)
kvm_vcpu_wake_up(vcpu);
kvm_svm->avic_physical_id_table = (void *)get_zeroed_page(GFP_KERNEL_ACCOUNT); if (!kvm_svm->avic_physical_id_table) goto free_avic;
kvm_svm->avic_logical_id_table = (void *)get_zeroed_page(GFP_KERNEL_ACCOUNT); if (!kvm_svm->avic_logical_id_table) goto free_avic;
spin_lock_irqsave(&svm_vm_data_hash_lock, flags);
again:
vm_id = next_vm_id = (next_vm_id + 1) & AVIC_VM_ID_MASK; if (vm_id == 0) { /* id is 1-based, zero is not okay */
next_vm_id_wrapped = 1; goto again;
} /* Is it still in use? Only possible if wrapped at least once */ if (next_vm_id_wrapped) {
hash_for_each_possible(svm_vm_data_hash, k2, hnode, vm_id) { if (k2->avic_vm_id == vm_id) goto again;
}
}
kvm_svm->avic_vm_id = vm_id;
hash_add(svm_vm_data_hash, &kvm_svm->hnode, kvm_svm->avic_vm_id);
spin_unlock_irqrestore(&svm_vm_data_hash_lock, flags);
/* * Inhibit AVIC if the vCPU ID is bigger than what is supported by AVIC * hardware. Immediately clear apicv_active, i.e. don't wait until the * KVM_REQ_APICV_UPDATE request is processed on the first KVM_RUN, as * avic_vcpu_load() expects to be called if and only if the vCPU has * fully initialized AVIC.
*/ if ((!x2avic_enabled && id > AVIC_MAX_PHYSICAL_ID) ||
(id > X2AVIC_MAX_PHYSICAL_ID)) {
kvm_set_apicv_inhibit(vcpu->kvm, APICV_INHIBIT_REASON_PHYSICAL_ID_TOO_BIG);
vcpu->arch.apic->apicv_active = false; return 0;
}
if (WARN_ON_ONCE(!vcpu->arch.apic->regs)) return -EINVAL;
if (kvm_apicv_activated(vcpu->kvm)) { int ret;
/* * Note, AVIC hardware walks the nested page table to check * permissions, but does not use the SPA address specified in * the leaf SPTE since it uses address in the AVIC_BACKING_PAGE * pointer field of the VMCB.
*/
ret = kvm_alloc_apic_access_page(vcpu->kvm); if (ret) return ret;
}
/* Note, fls64() returns the bit position, +1. */
BUILD_BUG_ON(__PHYSICAL_MASK_SHIFT >
fls64(AVIC_PHYSICAL_ID_ENTRY_BACKING_PAGE_MASK));
/* Setting AVIC backing page address in the phy APIC ID table */
new_entry = avic_get_backing_page_address(svm) |
AVIC_PHYSICAL_ID_ENTRY_VALID_MASK;
svm->avic_physical_id_entry = new_entry;
/* * Initialize the real table, as vCPUs must have a valid entry in order * for broadcast IPIs to function correctly (broadcast IPIs ignore * invalid entries, i.e. aren't guaranteed to generate a VM-Exit).
*/
WRITE_ONCE(kvm_svm->avic_physical_id_table[id], new_entry);
return 0;
}
void avic_ring_doorbell(struct kvm_vcpu *vcpu)
{ /* * Note, the vCPU could get migrated to a different pCPU at any point, * which could result in signalling the wrong/previous pCPU. But if * that happens the vCPU is guaranteed to do a VMRUN (after being * migrated) and thus will process pending interrupts, i.e. a doorbell * is not needed (and the spurious one is harmless).
*/ int cpu = READ_ONCE(vcpu->cpu);
if (avic_logical_id_table) {
u32 logid_entry = avic_logical_id_table[logid_index];
/* Nothing to do if the logical destination is invalid. */ if (unlikely(!(logid_entry & AVIC_LOGICAL_ID_ENTRY_VALID_MASK))) return;
physical_id = logid_entry &
AVIC_LOGICAL_ID_ENTRY_GUEST_PHYSICAL_ID_MASK;
} else { /* * For x2APIC, the logical APIC ID is a read-only value that is * derived from the x2APIC ID, thus the x2APIC ID can be found * by reversing the calculation (stored in logid_index). Note, * bits 31:20 of the x2APIC ID aren't propagated to the logical * ID, but KVM limits the x2APIC ID limited to KVM_MAX_VCPU_IDS.
*/
physical_id = logid_index;
}
/* * A fast-path version of avic_kick_target_vcpus(), which attempts to match * destination APIC ID to vCPU without looping through all vCPUs.
*/ staticint avic_kick_target_vcpus_fast(struct kvm *kvm, struct kvm_lapic *source,
u32 icrl, u32 icrh, u32 index)
{ int dest_mode = icrl & APIC_DEST_MASK; int shorthand = icrl & APIC_SHORT_MASK; struct kvm_svm *kvm_svm = to_kvm_svm(kvm);
u32 dest;
if (shorthand != APIC_DEST_NOSHORT) return -EINVAL;
if (apic_x2apic_mode(source))
dest = icrh; else
dest = GET_XAPIC_DEST_FIELD(icrh);
if (dest_mode == APIC_DEST_PHYSICAL) { /* broadcast destination, use slow path */ if (apic_x2apic_mode(source) && dest == X2APIC_BROADCAST) return -EINVAL; if (!apic_x2apic_mode(source) && dest == APIC_BROADCAST) return -EINVAL;
if (apic_x2apic_mode(source)) { /* 16 bit dest mask, 16 bit cluster id */
bitmap = dest & 0xFFFF;
cluster = (dest >> 16) << 4;
} elseif (kvm_lapic_get_reg(source, APIC_DFR) == APIC_DFR_FLAT) { /* 8 bit dest mask*/
bitmap = dest;
cluster = 0;
} else { /* 4 bit desk mask, 4 bit cluster id */
bitmap = dest & 0xF;
cluster = (dest >> 4) << 2;
}
/* Nothing to do if there are no destinations in the cluster. */ if (unlikely(!bitmap)) return 0;
if (apic_x2apic_mode(source))
avic_logical_id_table = NULL; else
avic_logical_id_table = kvm_svm->avic_logical_id_table;
/* * AVIC is inhibited if vCPUs aren't mapped 1:1 with logical * IDs, thus each bit in the destination is guaranteed to map * to at most one vCPU.
*/
for_each_set_bit(i, &bitmap, 16)
avic_kick_vcpu_by_logical_id(kvm, avic_logical_id_table,
cluster + i, icrl);
}
/* * Wake any target vCPUs that are blocking, i.e. waiting for a wake * event. There's no need to signal doorbells, as hardware has handled * vCPUs that were in guest at the time of the IPI, and vCPUs that have * since entered the guest will have processed pending IRQs at VMRUN.
*/
kvm_for_each_vcpu(i, vcpu, kvm) { if (kvm_apic_match_dest(vcpu, source, icrl & APIC_SHORT_MASK,
dest, icrl & APIC_DEST_MASK))
avic_kick_vcpu(vcpu, icrl);
}
}
switch (id) { case AVIC_IPI_FAILURE_INVALID_TARGET: case AVIC_IPI_FAILURE_INVALID_INT_TYPE: /* * Emulate IPIs that are not handled by AVIC hardware, which * only virtualizes Fixed, Edge-Triggered INTRs, and falls over * if _any_ targets are invalid, e.g. if the logical mode mask * is a superset of running vCPUs. * * The exit is a trap, e.g. ICR holds the correct value and RIP * has been advanced, KVM is responsible only for emulating the * IPI. Sadly, hardware may sometimes leave the BUSY flag set, * in which case KVM needs to emulate the ICR write as well in * order to clear the BUSY flag.
*/ if (icrl & APIC_ICR_BUSY)
kvm_apic_write_nodecode(vcpu, APIC_ICR); else
kvm_apic_send_ipi(apic, icrl, icrh); break; case AVIC_IPI_FAILURE_TARGET_NOT_RUNNING: /* * At this point, we expect that the AVIC HW has already * set the appropriate IRR bits on the valid target * vcpus. So, we just need to kick the appropriate vcpu.
*/
avic_kick_target_vcpus(vcpu->kvm, apic, icrl, icrh, index); break; case AVIC_IPI_FAILURE_INVALID_BACKING_PAGE:
WARN_ONCE(1, "Invalid backing page\n"); break; case AVIC_IPI_FAILURE_INVALID_IPI_VECTOR: /* Invalid IPI with vector < 16 */ break; default:
vcpu_unimpl(vcpu, "Unknown avic incomplete IPI interception\n");
}
staticbool is_avic_unaccelerated_access_trap(u32 offset)
{ bool ret = false;
switch (offset) { case APIC_ID: case APIC_EOI: case APIC_RRR: case APIC_LDR: case APIC_DFR: case APIC_SPIV: case APIC_ESR: case APIC_ICR: case APIC_LVTT: case APIC_LVTTHMR: case APIC_LVTPC: case APIC_LVT0: case APIC_LVT1: case APIC_LVTERR: case APIC_TMICT: case APIC_TDCR:
ret = true; break; default: break;
} return ret;
}
int avic_pi_update_irte(struct kvm_kernel_irqfd *irqfd, struct kvm *kvm, unsignedint host_irq, uint32_t guest_irq, struct kvm_vcpu *vcpu, u32 vector)
{ /* * If the IRQ was affined to a different vCPU, remove the IRTE metadata * from the *previous* vCPU's list.
*/
svm_ir_list_del(irqfd);
if (vcpu) { /* * Try to enable guest_mode in IRTE, unless AVIC is inhibited, * in which case configure the IRTE for legacy mode, but track * the IRTE metadata so that it can be converted to guest mode * if AVIC is enabled/uninhibited in the future.
*/ struct amd_iommu_pi_data pi_data = {
.ga_tag = AVIC_GATAG(to_kvm_svm(kvm)->avic_vm_id,
vcpu->vcpu_idx),
.is_guest_mode = kvm_vcpu_apicv_active(vcpu),
.vapic_addr = avic_get_backing_page_address(to_svm(vcpu)),
.vector = vector,
}; struct vcpu_svm *svm = to_svm(vcpu);
u64 entry; int ret;
/* * Prevent the vCPU from being scheduled out or migrated until * the IRTE is updated and its metadata has been added to the * list of IRQs being posted to the vCPU, to ensure the IRTE * isn't programmed with stale pCPU/IsRunning information.
*/
guard(spinlock_irqsave)(&svm->ir_list_lock);
/* * Update the target pCPU for IOMMU doorbells if the vCPU is * running. If the vCPU is NOT running, i.e. is blocking or * scheduled out, KVM will update the pCPU info when the vCPU * is awakened and/or scheduled in. See also avic_vcpu_load().
*/
entry = svm->avic_physical_id_entry; if (entry & AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK) {
pi_data.cpu = entry & AVIC_PHYSICAL_ID_ENTRY_HOST_PHYSICAL_ID_MASK;
} else {
pi_data.cpu = -1;
pi_data.ga_log_intr = entry & AVIC_PHYSICAL_ID_ENTRY_GA_LOG_INTR;
}
ret = irq_set_vcpu_affinity(host_irq, &pi_data); if (ret) return ret;
/* * Revert to legacy mode if the IOMMU didn't provide metadata * for the IRTE, which KVM needs to keep the IRTE up-to-date, * e.g. if the vCPU is migrated or AVIC is disabled.
*/ if (WARN_ON_ONCE(!pi_data.ir_data)) {
irq_set_vcpu_affinity(host_irq, NULL); return -EIO;
}
enum avic_vcpu_action { /* * There is no need to differentiate between activate and deactivate, * as KVM only refreshes AVIC state when the vCPU is scheduled in and * isn't blocking, i.e. the pCPU must always be (in)valid when AVIC is * being (de)activated.
*/
AVIC_TOGGLE_ON_OFF = BIT(0),
AVIC_ACTIVATE = AVIC_TOGGLE_ON_OFF,
AVIC_DEACTIVATE = AVIC_TOGGLE_ON_OFF,
/* * No unique action is required to deal with a vCPU that stops/starts * running. A vCPU that starts running by definition stops blocking as * well, and a vCPU that stops running can't have been blocking, i.e. * doesn't need to toggle GALogIntr.
*/
AVIC_START_RUNNING = 0,
AVIC_STOP_RUNNING = 0,
/* * When a vCPU starts blocking, KVM needs to set the GALogIntr flag * int all associated IRTEs so that KVM can wake the vCPU if an IRQ is * sent to the vCPU.
*/
AVIC_START_BLOCKING = BIT(1),
};
/* * Here, we go through the per-vcpu ir_list to update all existing * interrupt remapping table entry targeting this vcpu.
*/ if (list_empty(&svm->ir_list)) return;
if (WARN_ON(h_physical_id & ~AVIC_PHYSICAL_ID_ENTRY_HOST_PHYSICAL_ID_MASK)) return;
if (WARN_ON_ONCE(vcpu->vcpu_id * sizeof(entry) >= PAGE_SIZE)) return;
/* * Grab the per-vCPU interrupt remapping lock even if the VM doesn't * _currently_ have assigned devices, as that can change. Holding * ir_list_lock ensures that either svm_ir_list_add() will consume * up-to-date entry information, or that this task will wait until * svm_ir_list_add() completes to set the new target pCPU.
*/
spin_lock_irqsave(&svm->ir_list_lock, flags);
/* * If IPI virtualization is disabled, clear IsRunning when updating the * actual Physical ID table, so that the CPU never sees IsRunning=1. * Keep the APIC ID up-to-date in the entry to minimize the chances of * things going sideways if hardware peeks at the ID.
*/ if (!enable_ipiv)
entry &= ~AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK;
void avic_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
{ /* * No need to update anything if the vCPU is blocking, i.e. if the vCPU * is being scheduled in after being preempted. The CPU entries in the * Physical APIC table and IRTE are consumed iff IsRun{ning} is '1'. * If the vCPU was migrated, its new CPU value will be stuffed when the * vCPU unblocks.
*/ if (kvm_vcpu_is_blocking(vcpu)) return;
if (WARN_ON_ONCE(vcpu->vcpu_id * sizeof(entry) >= PAGE_SIZE)) return;
/* * Take and hold the per-vCPU interrupt remapping lock while updating * the Physical ID entry even though the lock doesn't protect against * multiple writers (see above). Holding ir_list_lock ensures that * either svm_ir_list_add() will consume up-to-date entry information, * or that this task will wait until svm_ir_list_add() completes to * mark the vCPU as not running.
*/
spin_lock_irqsave(&svm->ir_list_lock, flags);
/* * Keep the previous APIC ID in the entry so that a rogue doorbell from * hardware is at least restricted to a CPU associated with the vCPU.
*/
entry &= ~AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK;
if (enable_ipiv)
WRITE_ONCE(kvm_svm->avic_physical_id_table[vcpu->vcpu_id], entry);
/* * Note! Don't set AVIC_PHYSICAL_ID_ENTRY_GA_LOG_INTR in the table as * it's a synthetic flag that usurps an unused should-be-zero bit.
*/ if (action & AVIC_START_BLOCKING)
entry |= AVIC_PHYSICAL_ID_ENTRY_GA_LOG_INTR;
void avic_vcpu_put(struct kvm_vcpu *vcpu)
{ /* * Note, reading the Physical ID entry outside of ir_list_lock is safe * as only the pCPU that has loaded (or is loading) the vCPU is allowed * to modify the entry, and preemption is disabled. I.e. the vCPU * can't be scheduled out and thus avic_vcpu_{put,load}() can't run * recursively.
*/
u64 entry = to_svm(vcpu)->avic_physical_id_entry;
/* * Nothing to do if IsRunning == '0' due to vCPU blocking, i.e. if the * vCPU is preempted while its in the process of blocking. WARN if the * vCPU wasn't running and isn't blocking, KVM shouldn't attempt to put * the AVIC if it wasn't previously loaded.
*/ if (!(entry & AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK)) { if (WARN_ON_ONCE(!kvm_vcpu_is_blocking(vcpu))) return;
/* * The vCPU was preempted while blocking, ensure its IRTEs are * configured to generate GA Log Interrupts.
*/ if (!(WARN_ON_ONCE(!(entry & AVIC_PHYSICAL_ID_ENTRY_GA_LOG_INTR)))) return;
}
if (!lapic_in_kernel(vcpu) || !enable_apicv) return;
if (kvm_vcpu_apicv_active(vcpu)) { /** * During AVIC temporary deactivation, guest could update * APIC ID, DFR and LDR registers, which would not be trapped * by avic_unaccelerated_access_interception(). In this case, * we need to check and update the AVIC logical APIC ID table * accordingly before re-activating.
*/
avic_apicv_post_state_restore(vcpu);
avic_activate_vmcb(svm);
} else {
avic_deactivate_vmcb(svm);
}
vmcb_mark_dirty(vmcb, VMCB_AVIC);
}
void avic_refresh_apicv_exec_ctrl(struct kvm_vcpu *vcpu)
{ if (!enable_apicv) return;
/* APICv should only be toggled on/off while the vCPU is running. */
WARN_ON_ONCE(kvm_vcpu_is_blocking(vcpu));
avic_refresh_virtual_apic_mode(vcpu);
if (kvm_vcpu_apicv_active(vcpu))
__avic_vcpu_load(vcpu, vcpu->cpu, AVIC_ACTIVATE); else
__avic_vcpu_put(vcpu, AVIC_DEACTIVATE);
}
void avic_vcpu_blocking(struct kvm_vcpu *vcpu)
{ if (!kvm_vcpu_apicv_active(vcpu)) return;
/* * Unload the AVIC when the vCPU is about to block, _before_ the vCPU * actually blocks. * * Note, any IRQs that arrive before IsRunning=0 will not cause an * incomplete IPI vmexit on the source; kvm_vcpu_check_block() handles * this by checking vIRR one last time before blocking. The memory * barrier implicit in set_current_state orders writing IsRunning=0 * before reading the vIRR. The processor needs a matching memory * barrier on interrupt delivery between writing IRR and reading * IsRunning; the lack of this barrier might be the cause of errata #1235). * * Clear IsRunning=0 even if guest IRQs are disabled, i.e. even if KVM * doesn't need to detect events for scheduling purposes. The doorbell * used to signal running vCPUs cannot be blocked, i.e. will perturb the * CPU and cause noisy neighbor problems if the VM is sending interrupts * to the vCPU while it's scheduled out.
*/
__avic_vcpu_put(vcpu, AVIC_START_BLOCKING);
}
void avic_vcpu_unblocking(struct kvm_vcpu *vcpu)
{ if (!kvm_vcpu_apicv_active(vcpu)) return;
avic_vcpu_load(vcpu, vcpu->cpu);
}
/* * Note: * - The module param avic enable both xAPIC and x2APIC mode. * - Hypervisor can support both xAVIC and x2AVIC in the same guest. * - The mode can be switched at run-time.
*/ bool avic_hardware_setup(void)
{ if (!npt_enabled) returnfalse;
/* AVIC is a prerequisite for x2AVIC. */ if (!boot_cpu_has(X86_FEATURE_AVIC) && !force_avic) { if (boot_cpu_has(X86_FEATURE_X2AVIC)) {
pr_warn(FW_BUG "Cannot support x2AVIC due to AVIC is disabled");
pr_warn(FW_BUG "Try enable AVIC using force_avic option");
} returnfalse;
}
if (cc_platform_has(CC_ATTR_HOST_SEV_SNP) &&
!boot_cpu_has(X86_FEATURE_HV_INUSE_WR_ALLOWED)) {
pr_warn("AVIC disabled: missing HvInUseWrAllowed on SNP-enabled system\n"); returnfalse;
}
if (boot_cpu_has(X86_FEATURE_AVIC)) {
pr_info("AVIC enabled\n");
} elseif (force_avic) { /* * Some older systems does not advertise AVIC support. * See Revision Guide for specific AMD processor for more detail.
*/
pr_warn("AVIC is not supported in CPUID but force enabled");
pr_warn("Your system might crash and burn");
}
/* AVIC is a prerequisite for x2AVIC. */
x2avic_enabled = boot_cpu_has(X86_FEATURE_X2AVIC); if (x2avic_enabled)
pr_info("x2AVIC enabled\n");
/* * Disable IPI virtualization for AMD Family 17h CPUs (Zen1 and Zen2) * due to erratum 1235, which results in missed VM-Exits on the sender * and thus missed wake events for blocking vCPUs due to the CPU * failing to see a software update to clear IsRunning.
*/
enable_ipiv = enable_ipiv && boot_cpu_data.x86 != 0x17;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.