From nobody Wed Feb 11 05:37:56 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1734103550; cv=none; d=zohomail.com; s=zohoarc; b=Cz4++qgOTXDnx/UKvRXs/ExCIEs9l5gHBDj5iNAz2dXnDNtezaqyVoI1KWgMu3bI3EuF+2zeMUDMj60w4H79eYII7f9AK2kGCImfH1WYGuxflSuLHn9ZwylKp45ZUcAh1A3PuYctAX/JeAHB74XSyA3RKvJxRXAMPf+0ypsNbOo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734103550; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jbiG06Qj2eVtNM1RZ8Zpr4IJcnCvDLdL2ENhuYJnNHE=; b=VS3yurpTiCateQmJQkstUtEURsD8dt3ydaFm3fwRkMvXMruQ+yQJdcXLZkRj76ZQvieisZ1/CjFwxDfyCPlyS/ULMT/dBpgrIcrgiUKmtD2muDbeYHzn3gXp2f3MsJZYn83y8UJip/yN9nX98QCaF0oc274aQMNyzwVEm9NfUTQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734103550742646.1339663975873; Fri, 13 Dec 2024 07:25:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tM7Sd-00065N-Qm; Fri, 13 Dec 2024 10:20:12 -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 1tM7S9-0004qt-Dd for qemu-devel@nongnu.org; Fri, 13 Dec 2024 10:19:41 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tM7Rs-0005Mr-9I for qemu-devel@nongnu.org; Fri, 13 Dec 2024 10:19:40 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-aa543c4db92so366351166b.0 for ; Fri, 13 Dec 2024 07:19:23 -0800 (PST) Received: from localhost.localdomain (h082218084190.host.wavenet.at. [82.218.84.190]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aab8dd35b19sm29284166b.33.2024.12.13.07.19.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Dec 2024 07:19:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philjordan-eu.20230601.gappssmtp.com; s=20230601; t=1734103163; x=1734707963; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jbiG06Qj2eVtNM1RZ8Zpr4IJcnCvDLdL2ENhuYJnNHE=; b=zDDozi3URzuy3BD/2wxsvWSTPemoukV14WC6mIB2bNeg7qgi0vvK48LE3DqTGwBJuj bBayp1K3urSPCRjc2HEa/5WqUgMGVjNrAzHTMyDJgNj58wFPXB/mCfUZ6rI15H1igYuq zJVoIGn0ooons/yl4bc11XcV9DIMH6E04CyvQ0PJP381cO2aFDy7Nh4xH1x5zbMIXOhE IhGQX1gpdg2hm+tBAHTmipa6+oAk1xvW6piggwMMocPshkQyBqMqkrWLsYB/Ia2OyG6S 9P0YN8O4ccvd5ms76zDuCiA0/xkPGzqU/npxx/tXr4Gq4qyV4xM0PH/jBXl4zjE5ZKUI E1LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734103163; x=1734707963; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jbiG06Qj2eVtNM1RZ8Zpr4IJcnCvDLdL2ENhuYJnNHE=; b=buyCc4t3xqs3ieSNCLbiqiwz6a7QbcP0e8DkbJxV415LrWvplQwl3ShCINwj235GpA MKVuimkdDw5XTm+iEbiOKBLgZJvMpGTyFumXugYNZDBlHJ7GyqTH/gX9AiXeurzmnmPz 1Bo/3uaplutxt7PVaV2Q1fWcssOWSGmBq2eQOOa/fdCVtuOYaNDlCCMEBE2+AUd78cPV pdJGE00jjR+3XIUoL6XucRtwDzzmBnC+3TVBe+87fWhwQz1rkIBGMCvzox4lZFti12dh 1gNcts5DvZX/ZvUf1Z1qbv+k+HX7Y/XU9QBqQYF+WbOOWFU2VANYD8ew5khzkm0YB3g4 CFxw== X-Gm-Message-State: AOJu0Yz+5/WRU3QNFbbpvsrtfdAn6ofl9X33uh43FLmFiT+S6gmsFPHB jHlmvTku47oH2Tr+dlzR0Zhk2Ttt0CTcvSje9m8xZqVJB9y/R9aGOl+u/0lyM0L7WFApNsTJRKV dRg== X-Gm-Gg: ASbGnctISovv/qRs1b0ulqKCVsKHnLo8/i4pARQGQLyH7UmBIQqTG1DcQHn1L+e4mVh sqDvP7TJz89/GBoOV7OAPs3rm24apl8sJTVU5px1OTl8VFy2500NaZqt3bLDMtb4H4Fg6G4kH92 cjCgoUWabV5cwdy/Zfjby0WleTt1R6nnKBZ437KoBsf84Z2oktc8HH5Ru/2dRCiD4BarBiSLM0x jUxuVTK/W7z/DmV8yXb4zj0jLAWBBnfqu75D95aOso5gdxbf0J0vFCFH9wPu7HL+TAp5L8YagCT 7Aku9BlbH8wT/Krxtjwc0qCxoSuURSPW X-Google-Smtp-Source: AGHT+IF5PPSX3PcdDyLMno1xB5YKxsDErOLFv9wfZNBM++bTd6w9SsB9zRDRId5ALtwVW3/qmpEZ5Q== X-Received: by 2002:a17:907:7ba2:b0:aa6:8275:223c with SMTP id a640c23a62f3a-aab77e7b67amr342828166b.44.1734103162677; Fri, 13 Dec 2024 07:19:22 -0800 (PST) From: Phil Dennis-Jordan To: qemu-devel@nongnu.org Cc: agraf@csgraf.de, phil@philjordan.eu, peter.maydell@linaro.org, pbonzini@redhat.com, rad@semihalf.com, quic_llindhol@quicinc.com, stefanha@redhat.com, mst@redhat.com, slp@redhat.com, richard.henderson@linaro.org, eduardo@habkost.net, marcel.apfelbaum@gmail.com, gaosong@loongson.cn, jiaxun.yang@flygoat.com, chenhuacai@kernel.org, kwolf@redhat.com, hreitz@redhat.com, philmd@linaro.org, shorne@gmail.com, palmer@dabbelt.com, alistair.francis@wdc.com, bmeng.cn@gmail.com, liwei1518@gmail.com, dbarboza@ventanamicro.com, zhiwei_liu@linux.alibaba.com, jcmvbkbc@gmail.com, marcandre.lureau@redhat.com, berrange@redhat.com, akihiko.odaki@daynix.com, qemu-arm@nongnu.org, qemu-block@nongnu.org, qemu-riscv@nongnu.org, balaton@eik.bme.hu, Alexander Graf Subject: [PATCH v14 08/15] hvf: arm: Ignore writes to CNTP_CTL_EL0 Date: Fri, 13 Dec 2024 16:18:14 +0100 Message-Id: <20241213151821.65748-25-phil@philjordan.eu> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20241213151821.65748-1-phil@philjordan.eu> References: <20241213151821.65748-1-phil@philjordan.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: neutral client-ip=2a00:1450:4864:20::633; envelope-from=phil@philjordan.eu; helo=mail-ej1-x633.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @philjordan-eu.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1734103551741116600 Content-Type: text/plain; charset="utf-8" From: Alexander Graf MacOS unconditionally disables interrupts of the physical timer on boot and then continues to use the virtual one. We don't really want to support a full physical timer emulation, so let's just ignore those writes. Signed-off-by: Alexander Graf Signed-off-by: Phil Dennis-Jordan Reviewed-by: Akihiko Odaki Tested-by: Akihiko Odaki --- target/arm/hvf/hvf.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index ca7ea92774a..d75e504dcda 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -11,6 +11,7 @@ =20 #include "qemu/osdep.h" #include "qemu/error-report.h" +#include "qemu/log.h" =20 #include "sysemu/runstate.h" #include "sysemu/hvf.h" @@ -184,6 +185,7 @@ void hvf_arm_init_debug(void) #define SYSREG_OSLSR_EL1 SYSREG(2, 0, 1, 1, 4) #define SYSREG_OSDLR_EL1 SYSREG(2, 0, 1, 3, 4) #define SYSREG_CNTPCT_EL0 SYSREG(3, 3, 14, 0, 1) +#define SYSREG_CNTP_CTL_EL0 SYSREG(3, 3, 14, 2, 1) #define SYSREG_PMCR_EL0 SYSREG(3, 3, 9, 12, 0) #define SYSREG_PMUSERENR_EL0 SYSREG(3, 3, 9, 14, 0) #define SYSREG_PMCNTENSET_EL0 SYSREG(3, 3, 9, 12, 1) @@ -1620,6 +1622,13 @@ static int hvf_sysreg_write(CPUState *cpu, uint32_t = reg, uint64_t val) case SYSREG_OSLAR_EL1: env->cp15.oslsr_el1 =3D val & 1; return 0; + case SYSREG_CNTP_CTL_EL0: + /* + * Guests should not rely on the physical counter, but macOS emits + * disable writes to it. Let it do so, but ignore the requests. + */ + qemu_log_mask(LOG_UNIMP, "Unsupported write to CNTP_CTL_EL0\n"); + return 0; case SYSREG_OSDLR_EL1: /* Dummy register */ return 0; --=20 2.39.5 (Apple Git-154)