From patchwork Wed Sep 13 14:06:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Juszkiewicz X-Patchwork-Id: 722127 Delivered-To: patch@linaro.org Received: by 2002:a5d:4387:0:b0:31d:da82:a3b4 with SMTP id i7csp320745wrq; Wed, 13 Sep 2023 07:07:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEf8pVq8Ug0Q/cC/4mahKi3OwefloScSlcwa+0KRpKZ05PdPHfn6CSI6/6Qrnrpsb+1n1Qw X-Received: by 2002:a05:622a:50b:b0:403:b645:86fa with SMTP id l11-20020a05622a050b00b00403b64586famr2971069qtx.24.1694614059471; Wed, 13 Sep 2023 07:07:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694614059; cv=none; d=google.com; s=arc-20160816; b=UDWFxoUITaFSm1Kb2VWshSTbvRP650KTzTtRAShp8SSlHxRHU2CkcHBhtBmNArmb9p GHVMZCtxL7CMlGjpYbEjkn3L+yWfgpoi5VJf632PT/VxZONhdmopmT0Mv08pOyxHQicg I6OvGSi+45twHsMGiPOzHbfmb9/NpShX2ooQmArDgCkhFSOBzTjhI4M+a2lhsMTfJ/3c O5STEn21B1hmby8MSRXPJlmyVpGZ1SJ2phTMLKWOOhisdvsBU+GUzxRbQ5B3Ymy/o1Dq h4OATa1cK4F4bv3CgDRFAboRIW0gSxe4T7noIbG2csuOgYI1YnkOoHFlqqoLGLRM0eGT SgQg== 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:message-id:date:subject:cc:to:from; bh=jjPrK7fAatfOGbJGaqIKRz5Sxee0T+5HJNHMRe4gPj0=; fh=mEZyouRtxfiyfuPooUBunR13dbh3J4hBhCqVSpYjthI=; b=iDKZmxkXlYKs44AZCUz0tATn12cmAD7YlpLLaoDG19SRnKMLN/pkvCTtWtKS7JXGEY QlP1ElCiXj9t4xR1N02GP6dY8G048ChMTvzv3mzfmkGw9CkYl9nIX7mj2Qbvs9x47E/P /UolwNfAHLkqZ43koMllccnxfbLSaFLsF5h7GQv7KhESXV4V79OkR+z0dGPJo3wKle3C FOHOE5YpB/SWEEaVsnwBpWC9cTVJd+T00Btyy6Lh9egCUDb8oTET6qEKGSDHpxAz+yx3 qvyOP9Wdg7ETQ3peB+NlG3zfLmNCH+LtC+PnaH3I2BMnHGkeEfRf9rzzNzEAnaOznzYD SNFw== 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 b1-20020a05622a020100b00403a745aff8si7290865qtx.309.2023.09.13.07.07.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Sep 2023 07:07:39 -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 1qgQVy-0004F4-8f; Wed, 13 Sep 2023 10:06:47 -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-0004DE-LM; 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-00036b-Ge; 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 E8211260B83; Wed, 13 Sep 2023 16:06:16 +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 Pvd2mRImotoE; Wed, 13 Sep 2023 16:06:14 +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 E63C126000D; Wed, 13 Sep 2023 16:06:13 +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 0/1] sbsa-ref: add non-secure EL2 virtual timer Date: Wed, 13 Sep 2023 16:06:09 +0200 Message-ID: <20230913140610.214893-1-marcin.juszkiewicz@linaro.org> X-Mailer: git-send-email 2.41.0 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. >From firmware side information about timer needs to be present in GTDT acpi table. If it is there with suggested interrupt 28 then BSA ACS test 266 passes: -------------------------------------------------------------- 226 : Check NS EL2-Virt timer PPI Assignment START Received vir el2 interrupt B_PPI_02 : Result: PASS END -------------------------------------------------------------- On Armv8.0 cpus this timer should not exist as there is no VHE. I hope this code is correct. Tried to compare with other emulation targets but only "virt" and "sbsa-ref" use cpu cores newer than v8.0 ones. Marcin Juszkiewicz (1): sbsa-ref: add non-secure EL2 virtual timer hw/arm/sbsa-ref.c | 2 ++ 1 file changed, 2 insertions(+)