From patchwork Mon Jan 22 14:35:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 764638 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:10c4:b0:337:62d3:c6d5 with SMTP id b4csp1131890wrx; Mon, 22 Jan 2024 06:36:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGm6Y20kmelpKT76B6hx3jkX/tOkSPRtCZoxJ7O50OgXMaw2YG+24KKm9mWXzovA1LSA5Pi X-Received: by 2002:a05:620a:a11:b0:783:8505:6a7c with SMTP id i17-20020a05620a0a1100b0078385056a7cmr4334924qka.134.1705934177543; Mon, 22 Jan 2024 06:36:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705934177; cv=none; d=google.com; s=arc-20160816; b=XY1cwglQ2qd/WtugjX+vsj4gjXHFhYJw0UkwTmMz2i9O5BB8tUynDYJ5zsrqbdXnWi FWRuETNzj6JGdA7kWEVl4QPN8730mbG0uMYAcRVKclmbjDW0dvGFdE5xLWLxoMTPHTkl dyTgK/2p7y3FapZCNkcfy7BD7qy7w+coBZVDWPE5Mj8amVaWhtO9asmH3/2kpoyxFKma OTRWNOrc/0GH7t2SifTQ5tc5V/glDiNMowalcaqrv2+w8unTQRoiYCPhdJFoQhcwTA4A PUO53Hmmww1icGZ3l2sBipHXVC9SOYqqVFVwoz+ctSrNf1+aw/q12Z53P3Q62X61Pk9t XRcw== 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:dkim-signature; bh=Vf0m1wyMlr7cRTuzG2EUgLd0A0rBjsSs6MaGJHgZJIU=; fh=VnLaRVPcN1gpaQWLnE0jAsSHd7/auwbL0WCytLamgZU=; b=IZFb6PpRuCJzlOG7A8jRs3Cqpth7rgu14yciYFkvwrD2x7PZN0KX7ddwcrM79gbAK6 E4jl3GC2gt2aGhkGJYJwh/t7IR9kUhRE9B85jRRLrvOj64wILmpkQUKdo24P0No3O3Jc Gnj3b0w7Tsb/qRzp5ns+Vq3+M8ak97477lzRtEO8Jp/HBHxHXkGmMtwOU1oI/n0lJTdh NUc7xV4b27O1J2XgsLDmg5fkcLqIcXk/4LGeBn0mzdqU8b/YsnQz0TJmuUMR2gXeKniH 8HZDIOn6z296CvBq6CLIQq9U13KyKd5ziOMiF+M/LOiq42uI5H4S1vxg3cZL5Zi75vt3 FciQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s4rQMHhR; 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=pass (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 u11-20020a05620a0c4b00b0078154e525besi6189157qki.485.2024.01.22.06.36.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2024 06:36:17 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=s4rQMHhR; 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=pass (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 1rRvOu-0006Rf-Vm; Mon, 22 Jan 2024 09:35:49 -0500 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 1rRvOs-0006OC-36 for qemu-devel@nongnu.org; Mon, 22 Jan 2024 09:35:46 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rRvOo-0003Zv-St for qemu-devel@nongnu.org; Mon, 22 Jan 2024 09:35:45 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40ea5653f6bso25560665e9.3 for ; Mon, 22 Jan 2024 06:35:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705934139; x=1706538939; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Vf0m1wyMlr7cRTuzG2EUgLd0A0rBjsSs6MaGJHgZJIU=; b=s4rQMHhRMd1CgM93Icgh2ZujbhE4igpyF6r11+Aax3kPqg0sfmixKTApnErNRYqhhZ 5XJDSc4ixMGnkeRSxbxfXXfgb9jesHMmdPiw0BA7gMIYwklRFJ7Aak3jh1DoqNN19MAm r1Ey76JhWLt0CcO9bw3y+uWCFNBd+pXNg1+6ugdxMUvNH0Q4fenpJsgo2V/ncBLyBfdY Ws6J804oY15COHG+4Xja6Yb5MOPO3HFGDvY9tcH/lJ8RnYPeCTfdv4YP6l2Sr199fyKY 5kLPJxL+rioEQLL+gcRPgWYwAsqjeODAzvavSs5NPCBkKbN89DU5BK/fQb93oBHR9pLW UiwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705934139; x=1706538939; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Vf0m1wyMlr7cRTuzG2EUgLd0A0rBjsSs6MaGJHgZJIU=; b=lCg5KTG92Yjib3gBIwJ+/mKfZmPxFashfNFb17ZFrLzs7Nm0h86yWUXQ/ZzRmNADZE F4J9zrd/8cD7LAoJhBHS0quSobuEeyQoKiFG5OvBP1+8MneF/08jUnEpCJnmlsrk3iAM HkCyckHM78C4flnahIaqpIkc8mJKyNkPNPUKrg1hexaKY/0vc6Ws0OEvoWC5R4gsLH4a 3oN3RDcL3INpEjyR5nYLiNzmfA67kDUwO6EKXwhzaGeQLnxQaTRCAyEby33Y8eXa83Cp uKHa5s7VzsiS7wb30iVRSHA70PaWfsFt8yf0o/rDqT+gNN4jDa2Hho8MQms/VnFuKn30 RxkA== X-Gm-Message-State: AOJu0Yzmkno9tt2KadtPewB7Bd2zIkgXbH9DzBaVLw7gS3T2mDgyfPcx hMrgPNpfiUw/Q985ilc8ow69qR/+SoWzJQ1WaZUebs1jM/CgSvaQxoP6jdpv0XQ= X-Received: by 2002:a05:600c:3c93:b0:40e:596a:9850 with SMTP id bg19-20020a05600c3c9300b0040e596a9850mr2217878wmb.240.1705934138939; Mon, 22 Jan 2024 06:35:38 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id je6-20020a05600c1f8600b0040d8d11bf63sm39559584wmb.41.2024.01.22.06.35.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 06:35:38 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Leif Lindholm , Marcin Juszkiewicz , Ard Biesheuvel , Shannon Zhao , "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v2 0/3] virt: wire up NS EL2 virtual timer IRQ Date: Mon, 22 Jan 2024 14:35:34 +0000 Message-Id: <20240122143537.233498-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 This patchset wires up the NS EL2 virtual timer IRQ on the virt board, similarly to what commit 058262e0a8b2 did for the sbsa-ref board. Version 1 was an RFC patchset, originally sent back in autumn: https://patchew.org/QEMU/20230919101240.2569334-1-peter.maydell@linaro.org/ The main reason for it being an RFC is that the change, while correct, triggers a bug in EDK2 guest firmware that makes EDK2 assert on bootup. Since the RFC, we've upgraded our in-tree version of the EDK2 binaries to a version that has the fix for that bug, so I think the QEMU side of these patches is ready to go in now. To accommodate users who might still be using older EDK2 binaries, we only expose the IRQ in the DTB and ACPI tables for virt-9.0 and later machine types. If you see in the guest: ASSERT [ArmTimerDxe] /home/kraxel/projects/qemu/roms/edk2/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.c(72): PropSize == 36 || PropSize == 48 then your options are: * update your EDK2 binaries to edk2-stable202311 or newer * use the 'virt-8.2' versioned machine type * not use 'virtualization=on' I'll put something about this into the release notes when this goes into git. (There are other reasons why you probably want a newer EDK2 for AArch64 guests, so this is worth flagging up to our downstream distros who don't take our pre-built firmware binaries.) changes v1->v2: * the change in DTB and ACPI tables is now tied to the machine version * handle change of the ARCH_TIMER_*_IRQ values from PPI numbers to INTIDs * bump the FADT header to indicate ACPI v6.3, since we might be using a 6.3 feature in the GTDT * the avocado tests now all pass, because we have updated our copy of EDK2 in pc-bios/ to a version which has the fix for the bug which would otherwise cause it to assert on bootup * patch 2 commit message improved to give details of the EDK2 assert and state the options for dealing with it (this will also go into the QEMU release notes) thanks -- PMM Peter Maydell (3): tests/qtest/bios-tables-test: Allow changes to virt GTDT hw/arm/virt: Wire up non-secure EL2 virtual timer IRQ tests/qtest/bios-tables-tests: Update virt golden reference include/hw/arm/virt.h | 2 ++ hw/arm/virt-acpi-build.c | 20 +++++++++---- hw/arm/virt.c | 60 ++++++++++++++++++++++++++++++++------ tests/data/acpi/virt/FACP | Bin 276 -> 276 bytes tests/data/acpi/virt/GTDT | Bin 96 -> 104 bytes 5 files changed, 67 insertions(+), 15 deletions(-) Reviewed-by: Ard Biesheuvel