From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4312EC624A4 for ; Mon, 31 Aug 2026 16:34:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4IoIab5cIoM5o/andWQrmzeZTVfKs+JrBkuCBRlHKV8=; b=47MnK6AGRZj23X9GR4z7BxyfJH Cibt03megcXzWILWkDgrT+aJ6fcL5RyayQsrjvU36LNOZTen+SUGXOG1Hlcq6UQTFm1Phb7EeAy/4 IOZGBpX3MBOLi0JhXwJcvoJ3irbiW0OKg5Wx62fp3LqI9BnH35M4Mcc+1q/NazvwPeiCoUoGs0Izb +girERHyFNa3KDtLg4X98ssx5j/L3SDlLcLBoAa6bVe4dK4jDrbl2PtcZFUyugIEWJ4/YQKIBH0cm fsQfshUAvrTmxepRkIMfozGilij2+6HRF2LBMmGOh3neO8nt2TEsH0UBaarQL/jXjaOZaGw6R9EyR 8OR1HCWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x14xt-0000000A3XX-0mjY; Mon, 31 Aug 2026 16:34:33 +0000 Received: from out-69.mta0.migadu.com ([91.218.175.69] helo=mta0.migadu.com) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x14xo-0000000A3UR-0QlD for linux-arm-kernel@lists.infradead.org; Mon, 31 Aug 2026 16:34:29 +0000 X-Envelope-To: linux-arm-kernel@lists.infradead.org DKIM-Signature: a=rsa-sha256; bh=FNewsXbgZk6ir7Tq/DaFYrMHnt1LVf+kHlt1OXPPVRQ=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1788194063; v=1; x=1788798863; b=PG9dyAEND8VSa8noM1PtoqkPn7vLScwS6NbOplgGV5p6S5EVBWZn5rbU8XVR7E9xRTPifAWM faWo9HN+mpbLgAzLlTuHkJjc+jYmuetKFAl3LoSM5jjfzJvoN7snrAcGWiXKvibiVVpfRwwJRs2 d80Wpd9nPEG0QMppjXINcERY= X-Envelope-To: linux-arm-kernel@lists.infradead.org Received: by smtp.migadu.com with ESMTPS id b210bfa048418e89; Mon, 31 Aug 2026 16:34:23 +0000 X-Mizu-Trace-ID: b210bfa048418e89 X-Migadu-Flow: FLOW_OUT From: Fuad Tabba To: Marc Zyngier , Oliver Upton , kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Catalin Marinas , Will Deacon , Joey Gouly , Steffen Eiden , Suzuki K Poulose , Zenghui Yu , Vincent Donnefort , Quentin Perret , Fuad Tabba Subject: [PATCH 02/17] KVM: arm64: Advertise the capabilities that protected VMs support Date: Mon, 31 Aug 2026 17:34:06 +0100 Message-Id: <20260831163421.272420-3-fuad.tabba@linux.dev> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260831163421.272420-1-fuad.tabba@linux.dev> References: <20260831163421.272420-1-fuad.tabba@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260831_093428_337898_A86720E1 X-CRM114-Status: UNSURE ( 7.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org kvm_pkvm_ext_allowed() denies every capability it does not name, so a protected VM reports 0 for interfaces it implements: KVM_CHECK_EXTENSION denies KVM_CAP_ONE_REG while KVM_{GET,SET}_ONE_REG stage the guest's boot state. Allow the capabilities that work for a protected guest, the vGIC and the I/O bus being host-managed, subject to the restrictions the rest of this series adds. Signed-off-by: Fuad Tabba --- arch/arm64/include/asm/kvm_pkvm.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/include/asm/kvm_pkvm.h b/arch/arm64/include/asm/kvm_pkvm.h index beea00e693a0a..c4c834d55e503 100644 --- a/arch/arm64/include/asm/kvm_pkvm.h +++ b/arch/arm64/include/asm/kvm_pkvm.h @@ -42,6 +42,15 @@ static inline bool kvm_pkvm_ext_allowed(struct kvm *kvm, long ext) case KVM_CAP_ARM_VM_IPA_SIZE: case KVM_CAP_ARM_PTRAUTH_ADDRESS: case KVM_CAP_ARM_PTRAUTH_GENERIC: + case KVM_CAP_ONE_REG: + case KVM_CAP_MP_STATE: + case KVM_CAP_VCPU_EVENTS: + case KVM_CAP_VCPU_ATTRIBUTES: + case KVM_CAP_IMMEDIATE_EXIT: + case KVM_CAP_IOEVENTFD: + case KVM_CAP_IRQFD_RESAMPLE: + case KVM_CAP_ARM_IRQ_LINE_LAYOUT_2: + case KVM_CAP_ARM_INJECT_SERROR_ESR: return true; case KVM_CAP_ARM_MTE: return false; -- 2.39.5