From patchwork Wed Sep 13 14:06:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Juszkiewicz X-Patchwork-Id: 722128 Delivered-To: patch@linaro.org Received: by 2002:a5d:4387:0:b0:31d:da82:a3b4 with SMTP id i7csp320781wrq; Wed, 13 Sep 2023 07:07:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGpq/GkrqNwEoxh/va8Z50CgKxEnhiSYLHAvbAH/WJGHIVFFpVQsQMSXBcu16FGBbpIPof X-Received: by 2002:a05:620a:c4c:b0:76e:ff2e:44c5 with SMTP id u12-20020a05620a0c4c00b0076eff2e44c5mr2998947qki.37.1694614063941; Wed, 13 Sep 2023 07:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694614063; cv=none; d=google.com; s=arc-20160816; b=Lo9AaO7m2NM1rofIoB7lWZezQdG9bUI71OI1M9PIMfkr12jr8y1b0U4lM6MFdbnKCG UUiwHtQx4sBrYDu62fcdDlL3MWxyLNWyK4kWR9BzsACjeicQ+ZlJD7IJQOPCpzfkNyGi L1Rwzhv/96LdLYfYKoZleV27uEKd3nRBBhLZVxSuVvkGlzOisWUr0KBqb+5z1fctkIVh i3V6QgWepHnYOEYmTFrVAZHKMwruKIWmLAiOvGT0hkSjIMjey/FV/ZbP7lmQSu0eJXXJ F0j+85LhqN4+SRrLjTKBn/ByuUFpYRsGN8H2Qzm3WMeF11bjveYPdUsXQKLasT/MBYqq 1kdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=VM0TqcBnM1/8Y4jxrjyXUMrfsUx4BZkvRKt6XfZelmY=; fh=mEZyouRtxfiyfuPooUBunR13dbh3J4hBhCqVSpYjthI=; b=NxRHErfEebGhsbzNZZ73kk5hj48r2gSs2pFtCcuQ80CnVQo9WkXdUwz2K4szuGucdt yM/8W5hyrmOgJ9KWNxuWAdkYHzTS5nShnXu6edikWuIk6magImiQKgnB+vP2i6LQggX5 oZwynbftys/NOML3eK/AMi4Zcwz8zaMzwDwAhjxbpiMS/fzu3EXDNrLmGD6r3m7HhJmV 8DnCeHPZ325g27pMbQHu3k8iDraaIMbxE6nKgQBWUsZZ7noPqOD1ozzWWe9UfqyVQBN1 +l1KEl5lEMvLKQFrrirmHAzZ/qXTU5rd9++Ys/cwi+odiKXJYdt66G6ZCchDuqeg+kmv 9lug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j12-20020a0ce00c000000b0064f5138c43fsi5143394qvk.449.2023.09.13.07.07.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Sep 2023 07:07:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgQW0-0004Hf-Uv; Wed, 13 Sep 2023 10:06:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgQVj-0004D8-Hf; Wed, 13 Sep 2023 10:06:31 -0400 Received: from muminek.juszkiewicz.com.pl ([213.251.184.221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgQVe-00036i-Gj; Wed, 13 Sep 2023 10:06:31 -0400 Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 7723A26000D; Wed, 13 Sep 2023 16:06:17 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id 9eRBhpP2TxH0; Wed, 13 Sep 2023 16:06:15 +0200 (CEST) Received: from applejack.lan (83.21.94.247.ipv4.supernova.orange.pl [83.21.94.247]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 81A20260ABA; Wed, 13 Sep 2023 16:06:14 +0200 (CEST) From: Marcin Juszkiewicz To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Leif Lindholm , Peter Maydell , Radoslaw Biernacki , Marcin Juszkiewicz Subject: [PATCH 1/1] sbsa-ref: add non-secure EL2 virtual timer Date: Wed, 13 Sep 2023 16:06:10 +0200 Message-ID: <20230913140610.214893-2-marcin.juszkiewicz@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230913140610.214893-1-marcin.juszkiewicz@linaro.org> References: <20230913140610.214893-1-marcin.juszkiewicz@linaro.org> MIME-Version: 1.0 Received-SPF: softfail client-ip=213.251.184.221; envelope-from=marcin.juszkiewicz@linaro.org; helo=muminek.juszkiewicz.com.pl X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Armv8.1+ cpus have Virtual Host Extension (VHE) which added non-secure EL2 virtual timer. This change adds it to fullfil Arm BSA (Base System Architecture) requirements. Signed-off-by: Marcin Juszkiewicz --- hw/arm/sbsa-ref.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index bc89eb4806..3c7dfcd6dc 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -61,6 +61,7 @@ #define ARCH_TIMER_S_EL1_IRQ 13 #define ARCH_TIMER_NS_EL1_IRQ 14 #define ARCH_TIMER_NS_EL2_IRQ 10 +#define ARCH_TIMER_NS_EL2_VIRT_IRQ 12 enum { SBSA_FLASH, @@ -489,6 +490,7 @@ static void create_gic(SBSAMachineState *sms, MemoryRegion *mem) [GTIMER_VIRT] = ARCH_TIMER_VIRT_IRQ, [GTIMER_HYP] = ARCH_TIMER_NS_EL2_IRQ, [GTIMER_SEC] = ARCH_TIMER_S_EL1_IRQ, + [GTIMER_HYPVIRT] = ARCH_TIMER_NS_EL2_VIRT_IRQ, }; for (irq = 0; irq < ARRAY_SIZE(timer_irq); irq++) {