Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp16827lqm; Tue, 30 Apr 2024 11:16:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV4Ed/eEd2er70KmgL5zdzW9MoZIBoyu9BW5fCg0iOuVsujIVJpK9bHGV7Mm9k4PtlFkR8LpML0Lf5FhYFoauY4iDkxolCtUqDjxmfjJA== X-Google-Smtp-Source: AGHT+IE+ABfNKXA2xfG0Oy0qpVjNsBZtOj7iFuFsKRS6FogGDNezcGWl0KbT2ra9VEzIeeOo4Qpt X-Received: by 2002:a05:6a00:2e9e:b0:6ec:e785:98b9 with SMTP id fd30-20020a056a002e9e00b006ece78598b9mr505317pfb.27.1714500977158; Tue, 30 Apr 2024 11:16:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714500977; cv=pass; d=google.com; s=arc-20160816; b=XWd2LM3FcEmmKUgf1P9xo2O1UN5XpKR2thbDcEdV21eYKHT0z72bP/GXRKeZs9VnHb +gPIgQC32Tt7FWsLs11O5eI24PVIG3gRsdQwK//z9EnWmTX0jkkVcUn8dBODtqervNm6 MyNQOlKkMNrWF+kL6mlAz4jxbGH+2zr8xSAx34uYHRqonGYtjp7Io9gS5ogN6BAYJUeC ggmDhyzT4p53VU0mIDek09B8ORAAtj/4ABQR6kWS7tTy+WaKvPkjhL5V4r2xmgm0YUXH qID3senxCMgKWrKQ4HkpKmrxYwGQOppBfVWBEMQuYqgEs9tBFX7zrCUaKHQ6eRVQ8dKZ 5Ibw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=OOND0Wc6LHFDakdT/Gp/z0KSYn+8JMGA/w2gsPmNcgU=; fh=TfeOKUyvpy3Q4qqHucFoTYfwRhnSwMkPrbBKXqwDewU=; b=muCPhJJd3aAY5GwOF7vuiafuhOHbBNjX8/wWDEL+DyQFWI5+pDHSgE/csnujCRiWtp FPc8AOmZgIVqwcUi6vpPO+BZWMqn4SK4YPIOzHpv6XNQSEoPtwrToF3DQTf+VOxV3vZo jMaJFscQsZnLVUuGQEYAm4MZ4dV/y/aw2V6thEyoUzBSbXe4+MSFh0yXWDr1Hqe8gYbr nHIGhB/9cOEvKO5QEkfni6EiN0ISx0Nfnlb4X2G9G1+fApUVHsnkAdeQhJa1LI8hThWx yK8o5QCrnRJFKWbAXYabzrUiM2zwyRkh+1DdDd6fVRoZHQq+BP/9Oh5LA3Hw2F96ykEY OqqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Oz88CH8m; arc=pass (i=1 spf=pass spfdomain=flex--coltonlewis.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-164576-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164576-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y20-20020a63fa14000000b005f75f3269d4si22480827pgh.96.2024.04.30.11.16.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 11:16:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164576-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Oz88CH8m; arc=pass (i=1 spf=pass spfdomain=flex--coltonlewis.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-164576-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164576-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 06F26B2190A for ; Tue, 30 Apr 2024 18:15:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0066B181D0F; Tue, 30 Apr 2024 18:15:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Oz88CH8m" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16423179650 for ; Tue, 30 Apr 2024 18:15:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714500929; cv=none; b=mwr9gbYv60F5goi3lqWnUr+k9Cg07sl8Xsb+zZZXnru9ScnfGBCulvvkME53zyPmTrwuENsWvQxF4Yy5NMgcXZdFXZRQ0RhT2x11EfA9oYmmgnEjUVYJYQuD7+dmzrdQpTrJOt4N0x8GGMYPApjPw9z+jNINmaBvilWBz1gTxpc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714500929; c=relaxed/simple; bh=SV3V6cxCe1hxXs4ffQ+5SRGEEiW4ZwMlBo8pUcrukNY=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=t3iTy4wbcMp14i6KTRJyPXlt0562aGnhs++NdmJzeuNdeAAtjJfWXMxKhqP/FdUrxga59izW2APxKD0ztKF2elNrYcCoWujtN3ee3WkVdj5uVCiQdMvq8DB99k7vV8SEoVesaz7vE2jhzOC8yk38eZzgZjOcI7p3BrSD7zkNwKQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--coltonlewis.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Oz88CH8m; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--coltonlewis.bounces.google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dcdc3db67f0so113236276.1 for ; Tue, 30 Apr 2024 11:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1714500927; x=1715105727; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=OOND0Wc6LHFDakdT/Gp/z0KSYn+8JMGA/w2gsPmNcgU=; b=Oz88CH8mqh6o35dBzdcjkkKovrwnc//WDCrQLlaRk2unbbqCKnNohasbxRjlr4/qRi vSOiAGCk7/W5DBSPaqyJUJ6fzZg74duANRLCwTETfruSgWEUaNukfQ0r0omCEqlpMgkX BBTLRy68BFr08szpsE1LsdIu61PNmYU8utBYjMtB7jGUWBctq4fln9bfbz3Jp7+pJz2y AkNGVLOpb/hGW9yqmoVTKchdvw/fBmDUHVUkM220Fb+tqvjHvtmvALg4NwSIaUhxv2P6 7FIwv7XX/wnw7ZYgV6dYCDVh65hlHcAe5c0IukQ1OPhlPcb6cSMfx1fHLKwPAkZqC+eE QCeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714500927; x=1715105727; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=OOND0Wc6LHFDakdT/Gp/z0KSYn+8JMGA/w2gsPmNcgU=; b=p4E1vHsV+Fx7Rm0A/PX7HFYAoMIRVaF/YP/axNy5HB7gh4M4TBKGqGvjgA3GsEU58c 0cutzuw8Ls3JdC/semSlAHzfaW6ElG/28RTdHhLHxY0Uas6T2otHYr77S78MO44N/6ah kX5i2ftp0KQZHQkbeL9hXADhpJ5YEkDQQDvv1Uem61ijthWD7CQTpqQTThaD5kN2PiMU QqCqOKgIo0zbjPc5E2CJRCyiwcs1JHT5vL1l3JnPT9NMeXWi8mWxg6a4ciggJzTsY9b8 mVu/ry2aFYmm1CeD/BJXfsslxLYnIeGv1tNMfxkpmw8vm5VuEBd3NSYg0aLc62JprV6u 0Hwg== X-Forwarded-Encrypted: i=1; AJvYcCV/cYb//AVv08EO2pi9cYriJf5t6O/IMZcbMomW3/ICOGR2+1unCqfcrWiQ4rgKTft2NkvBaci86zOEiTMdCfPdskbqMG0Gc0vlXyBE X-Gm-Message-State: AOJu0YxjB9+Fv9tvMVme+pYt0XbkcwDOjSaVe9jgCjc+QYNMF5T/W7gO 0DAPh17r1GYF4yid7ce9wc/AWztQun4G0ucOZoLqKIa355t6WZozjqLQPVTVSFts9xW/NmClADo KkEefHpIwkLjgyGFCP2ISuQ== X-Received: from coltonlewis-kvm.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:14ce]) (user=coltonlewis job=sendgmr) by 2002:a05:6902:110c:b0:dda:c4ec:7db5 with SMTP id o12-20020a056902110c00b00ddac4ec7db5mr176675ybu.4.1714500926956; Tue, 30 Apr 2024 11:15:26 -0700 (PDT) Date: Tue, 30 Apr 2024 18:14:44 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.45.0.rc0.197.gbae5840b3b-goog Message-ID: <20240430181444.670773-1-coltonlewis@google.com> Subject: [PATCH v5] KVM: arm64: Add early_param to control WFx trapping From: Colton Lewis To: kvm@vger.kernel.org Cc: Jonathan Corbet , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, Colton Lewis Content-Type: text/plain; charset="UTF-8" Add an early_params to control WFI and WFE trapping. This is to control the degree guests can wait for interrupts on their own without being trapped by KVM. Options for each param are trap and notrap. trap enables the trap. notrap disables the trap. Absent an explicitly set policy, default to current behavior: disabling the trap if only a single task is running and enabling otherwise. Signed-off-by: Colton Lewis --- v5: * Move trap configuration to vcpu_reset_hcr(). This required moving kvm_emulate.h:vcpu_reset_hcr() to arm.c:kvm_vcpu_reset_hcr() to avoid needing to pull scheduler headers and my enums into kvm_emulate.h. I thought the function looked too bulky for that header anyway. * Delete vcpu_{set,clear}_vfx_traps helpers that are no longer used anywhere. * Remove documentation of explicit option for default behavior to avoid any implicit suggestion default behavior will stay that way. v4: https://lore.kernel.org/kvmarm/20240422181716.237284-1-coltonlewis@google.com/ v3: https://lore.kernel.org/kvmarm/20240410175437.793508-1-coltonlewis@google.com/ v2: https://lore.kernel.org/kvmarm/20240319164341.1674863-1-coltonlewis@google.com/ v1: https://lore.kernel.org/kvmarm/20240129213918.3124494-1-coltonlewis@google.com/ .../admin-guide/kernel-parameters.txt | 16 +++ arch/arm64/include/asm/kvm_emulate.h | 53 --------- arch/arm64/include/asm/kvm_host.h | 7 ++ arch/arm64/kvm/arm.c | 110 +++++++++++++++++- 4 files changed, 127 insertions(+), 59 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 31b3a25680d0..a4d94d9abbe4 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -2653,6 +2653,22 @@ [KVM,ARM] Allow use of GICv4 for direct injection of LPIs. + kvm-arm.wfe_trap_policy= + [KVM,ARM] Control when to set WFE instruction trap for + KVM VMs. + + trap: set WFE instruction trap + + notrap: clear WFE instruction trap + + kvm-arm.wfi_trap_policy= + [KVM,ARM] Control when to set WFI instruction trap for + KVM VMs. + + trap: set WFI instruction trap + + notrap: clear WFI instruction trap + kvm_cma_resv_ratio=n [PPC] Reserves given percentage from system memory area for contiguous memory allocation for KVM hash pagetable diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h index b804fe832184..c2a9a409ebfe 100644 --- a/arch/arm64/include/asm/kvm_emulate.h +++ b/arch/arm64/include/asm/kvm_emulate.h @@ -67,64 +67,11 @@ static __always_inline bool vcpu_el1_is_32bit(struct kvm_vcpu *vcpu) } #endif -static inline void vcpu_reset_hcr(struct kvm_vcpu *vcpu) -{ - vcpu->arch.hcr_el2 = HCR_GUEST_FLAGS; - if (has_vhe() || has_hvhe()) - vcpu->arch.hcr_el2 |= HCR_E2H; - if (cpus_have_final_cap(ARM64_HAS_RAS_EXTN)) { - /* route synchronous external abort exceptions to EL2 */ - vcpu->arch.hcr_el2 |= HCR_TEA; - /* trap error record accesses */ - vcpu->arch.hcr_el2 |= HCR_TERR; - } - - if (cpus_have_final_cap(ARM64_HAS_STAGE2_FWB)) { - vcpu->arch.hcr_el2 |= HCR_FWB; - } else { - /* - * For non-FWB CPUs, we trap VM ops (HCR_EL2.TVM) until M+C - * get set in SCTLR_EL1 such that we can detect when the guest - * MMU gets turned on and do the necessary cache maintenance - * then. - */ - vcpu->arch.hcr_el2 |= HCR_TVM; - } - - if (cpus_have_final_cap(ARM64_HAS_EVT) && - !cpus_have_final_cap(ARM64_MISMATCHED_CACHE_TYPE)) - vcpu->arch.hcr_el2 |= HCR_TID4; - else - vcpu->arch.hcr_el2 |= HCR_TID2; - - if (vcpu_el1_is_32bit(vcpu)) - vcpu->arch.hcr_el2 &= ~HCR_RW; - - if (kvm_has_mte(vcpu->kvm)) - vcpu->arch.hcr_el2 |= HCR_ATA; -} - static inline unsigned long *vcpu_hcr(struct kvm_vcpu *vcpu) { return (unsigned long *)&vcpu->arch.hcr_el2; } -static inline void vcpu_clear_wfx_traps(struct kvm_vcpu *vcpu) -{ - vcpu->arch.hcr_el2 &= ~HCR_TWE; - if (atomic_read(&vcpu->arch.vgic_cpu.vgic_v3.its_vpe.vlpi_count) || - vcpu->kvm->arch.vgic.nassgireq) - vcpu->arch.hcr_el2 &= ~HCR_TWI; - else - vcpu->arch.hcr_el2 |= HCR_TWI; -} - -static inline void vcpu_set_wfx_traps(struct kvm_vcpu *vcpu) -{ - vcpu->arch.hcr_el2 |= HCR_TWE; - vcpu->arch.hcr_el2 |= HCR_TWI; -} - static inline void vcpu_ptrauth_enable(struct kvm_vcpu *vcpu) { vcpu->arch.hcr_el2 |= (HCR_API | HCR_APK); diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 21c57b812569..315ee7bfc1cb 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -67,6 +67,13 @@ enum kvm_mode { KVM_MODE_NV, KVM_MODE_NONE, }; + +enum kvm_wfx_trap_policy { + KVM_WFX_NOTRAP_SINGLE_TASK, /* Default option */ + KVM_WFX_NOTRAP, + KVM_WFX_TRAP, +}; + #ifdef CONFIG_KVM enum kvm_mode kvm_get_mode(void); #else diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index a25265aca432..5ec52333e042 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -46,6 +46,8 @@ #include static enum kvm_mode kvm_mode = KVM_MODE_DEFAULT; +static enum kvm_wfx_trap_policy kvm_wfi_trap_policy = KVM_WFX_NOTRAP_SINGLE_TASK; +static enum kvm_wfx_trap_policy kvm_wfe_trap_policy = KVM_WFX_NOTRAP_SINGLE_TASK; DECLARE_KVM_HYP_PER_CPU(unsigned long, kvm_hyp_vector); @@ -456,11 +458,6 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) if (kvm_arm_is_pvtime_enabled(&vcpu->arch)) kvm_make_request(KVM_REQ_RECORD_STEAL, vcpu); - if (single_task_running()) - vcpu_clear_wfx_traps(vcpu); - else - vcpu_set_wfx_traps(vcpu); - if (vcpu_has_ptrauth(vcpu)) vcpu_ptrauth_disable(vcpu); kvm_arch_vcpu_load_debug_state_flags(vcpu); @@ -1391,6 +1388,72 @@ static int kvm_vcpu_set_target(struct kvm_vcpu *vcpu, return 0; } +static bool kvm_vcpu_should_clear_twi(struct kvm_vcpu *vcpu) +{ + if (likely(kvm_wfi_trap_policy == KVM_WFX_NOTRAP_SINGLE_TASK)) + return single_task_running() && + (atomic_read(&vcpu->arch.vgic_cpu.vgic_v3.its_vpe.vlpi_count) || + vcpu->kvm->arch.vgic.nassgireq); + + return kvm_wfi_trap_policy == KVM_WFX_NOTRAP; +} + +static bool kvm_vcpu_should_clear_twe(struct kvm_vcpu *vcpu) +{ + if (likely(kvm_wfe_trap_policy == KVM_WFX_NOTRAP_SINGLE_TASK)) + return single_task_running(); + + return kvm_wfe_trap_policy == KVM_WFX_NOTRAP; +} + +static inline void kvm_vcpu_reset_hcr(struct kvm_vcpu *vcpu) +{ + vcpu->arch.hcr_el2 = HCR_GUEST_FLAGS; + if (has_vhe() || has_hvhe()) + vcpu->arch.hcr_el2 |= HCR_E2H; + if (cpus_have_final_cap(ARM64_HAS_RAS_EXTN)) { + /* route synchronous external abort exceptions to EL2 */ + vcpu->arch.hcr_el2 |= HCR_TEA; + /* trap error record accesses */ + vcpu->arch.hcr_el2 |= HCR_TERR; + } + + if (cpus_have_final_cap(ARM64_HAS_STAGE2_FWB)) { + vcpu->arch.hcr_el2 |= HCR_FWB; + } else { + /* + * For non-FWB CPUs, we trap VM ops (HCR_EL2.TVM) until M+C + * get set in SCTLR_EL1 such that we can detect when the guest + * MMU gets turned on and do the necessary cache maintenance + * then. + */ + vcpu->arch.hcr_el2 |= HCR_TVM; + } + + if (cpus_have_final_cap(ARM64_HAS_EVT) && + !cpus_have_final_cap(ARM64_MISMATCHED_CACHE_TYPE)) + vcpu->arch.hcr_el2 |= HCR_TID4; + else + vcpu->arch.hcr_el2 |= HCR_TID2; + + if (vcpu_el1_is_32bit(vcpu)) + vcpu->arch.hcr_el2 &= ~HCR_RW; + + if (kvm_has_mte(vcpu->kvm)) + vcpu->arch.hcr_el2 |= HCR_ATA; + + + if (kvm_vcpu_should_clear_twe(vcpu)) + vcpu->arch.hcr_el2 &= ~HCR_TWE; + else + vcpu->arch.hcr_el2 |= HCR_TWE; + + if (kvm_vcpu_should_clear_twi(vcpu)) + vcpu->arch.hcr_el2 &= ~HCR_TWI; + else + vcpu->arch.hcr_el2 |= HCR_TWI; +} + static int kvm_arch_vcpu_ioctl_vcpu_init(struct kvm_vcpu *vcpu, struct kvm_vcpu_init *init) { @@ -1427,7 +1490,7 @@ static int kvm_arch_vcpu_ioctl_vcpu_init(struct kvm_vcpu *vcpu, icache_inval_all_pou(); } - vcpu_reset_hcr(vcpu); + kvm_vcpu_reset_hcr(vcpu); vcpu->arch.cptr_el2 = kvm_get_reset_cptr_el2(vcpu); /* @@ -2654,6 +2717,41 @@ static int __init early_kvm_mode_cfg(char *arg) } early_param("kvm-arm.mode", early_kvm_mode_cfg); +static int __init early_kvm_wfx_trap_policy_cfg(char *arg, enum kvm_wfx_trap_policy *p) +{ + if (!arg) + return -EINVAL; + + if (strcmp(arg, "trap") == 0) { + *p = KVM_WFX_TRAP; + return 0; + } + + if (strcmp(arg, "notrap") == 0) { + *p = KVM_WFX_NOTRAP; + return 0; + } + + if (strcmp(arg, "default") == 0) { + *p = KVM_WFX_NOTRAP_SINGLE_TASK; + return 0; + } + + return -EINVAL; +} + +static int __init early_kvm_wfi_trap_policy_cfg(char *arg) +{ + return early_kvm_wfx_trap_policy_cfg(arg, &kvm_wfi_trap_policy); +} +early_param("kvm-arm.wfi_trap_policy", early_kvm_wfi_trap_policy_cfg); + +static int __init early_kvm_wfe_trap_policy_cfg(char *arg) +{ + return early_kvm_wfx_trap_policy_cfg(arg, &kvm_wfe_trap_policy); +} +early_param("kvm-arm.wfe_trap_policy", early_kvm_wfe_trap_policy_cfg); + enum kvm_mode kvm_get_mode(void) { return kvm_mode; -- 2.45.0.rc0.197.gbae5840b3b-goog