From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935798; cv=none; d=zohomail.com; s=zohoarc; b=fSsSeb0ikKyWC+lYeik0m80mmwPCRQLjgaB7fJRSHJ2uCuTgi+4cyhP6EzZmTO+/rSweCDasvoWxoJB4+m4ta3dBMPEEubM6kmsPIw0xvWQs7SGRGBl8eNBtsQazdONm3HTQ5IdnRpP4RNpWYRYCdAi9xqiSVwlf4d0zdtdm0dA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935798; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=LPeA/g+pch0tkk30DBEizWt4XL6uVfpnMmfjPQ5229E=; b=GAQsUf5+ohyS8oDfdKbWjzGQj/p81x6KACf6Ic1JKqhOhCM6nbf+KnXxNitKKxII5YlIm2kIIL2gAjCHz/OrOHiY8zBYjDFCgGRPM1ZTmZdHmK4AXpFITITgGxpvgP24S1T/kQM+ll/tsylCHpxWCDT6czRMd+2hdF+1/hG0Ewo= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935798724436.47351822141843; Fri, 31 Oct 2025 11:36:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwQ-0004HS-Di; Fri, 31 Oct 2025 14:33:38 -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 1vEtwM-0004Fx-LI for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:35 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwB-0006Aq-D7 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:34 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-426f1574a14so1697383f8f.3 for ; Fri, 31 Oct 2025 11:33:17 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935593; x=1762540393; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LPeA/g+pch0tkk30DBEizWt4XL6uVfpnMmfjPQ5229E=; b=qtEuOZ5E0+SHc0+ACOvDrRGB4GeaeytXZguRKfg0WoK7if2b30Gklq80zq5sck5nm9 eB8KzeS/Wf0auTsv4W72n5zu3UomQ2hyCI17Dd6v0Eh59eRGCJnkm5YkYEik5ONoRuWd 1AYmCVh7JlqERuNbWcZi9NqF8VJpNcc7fWsmF8okPTiyYEJA/Gq132vCs/R1O/8BPjUR 2gaSTW8hZbsQEdNfhc9kauM58WpDiiB71ZRTBtmrdR9RbwZVgeK56XgIgXFVlBO3mxUt cS18SPOTaCTNkBitRbgLv2Wfj6ULvEACf2tScnszHh66dA3ZnJUFKoQe5PiPD0o4HZcZ luVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935593; x=1762540393; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LPeA/g+pch0tkk30DBEizWt4XL6uVfpnMmfjPQ5229E=; b=e7QwHJCOKbAckKYEQ57lIqJ2HDuYgHRE+LtPreqXQlUtQLnd6ep5zPaXsqJNNhoi27 taEMQ3V7bUjs634CaWMlkhmNp1jg5ktmtkMWo8zYrgdcjRYVLb1kMsl/be9cnlKsBL7I SChvFRsn8nIyqcCBvk0WS6RJdISHjeIn0x//18WUAQbave3ci5xE3KQpgNl7iW6xeeDx +xisJdK4MYMl5BsIgq+2bb+5BoO1EOlxAPV/qqsmzDHKtqETT2v9vmAa7MH05MqWC0Z4 W/fYp5T8RqOwFJD8PK0zl4x1+qJqc9nxGyki+CEGY4q1N7UKhdVPreUI1ASgDqyLnkIl paCg== X-Gm-Message-State: AOJu0YyIKgBCCetfAUvYNObTC1gdmgCuAxS6DYGzhJs6IjPKM2Wi6Rl+ sMo31OUlczRuhL7QxZB6eirIZPYt3d2IkWHuZibp2fXmYDZVUcHjIcB4qsj4rrdRWYIrXkx5W3B AwPC2 X-Gm-Gg: ASbGncuORiXQNQMNL/c0npx9LQtGBuqJp85TUxR+OQ3eZe4x2Ikv5R0+V1Cu76v3JOe 8Th2zMabebg6UnpG18lk9RPdQIvVuI6QQZtAvF1lbG30imjDRdHr7yVeyDfaauYT3Q9UPga4zv9 5UDNuhZqhg4V2OuY+e3q5merZmie0+hdkDQuD2I/YOMlThnkC9Sb93NXXTvV+7G8TSU5DWCPH7a bkoYATgPjG661W2BCFI2SfQtz//kKgoB4O2rI/u/8r6J/OCYm+AZ6JMM/ZAN8FxxPJP71QGd0GG YElcOzZwP8L61O96Q7uOriPX1oVgzD+zfWbAB07YzjOirwFlyPIZR6czWC4qpMJVJwRHHXIVtvg KfMv4LH+hP1u3bafmNSk3PXwPCImmA2SMUI1Q1eptXdEcFiYyF7W5GSzFBppjpbOr+bbE4Yz2eg 85Od/a1HBuBZjqXrBD X-Google-Smtp-Source: AGHT+IG3UnxSrzCEDqfE5N1jTAO1mG6iSQGTIlKe1Drl+tINLCzcWgkfXnn8JsE9ciGjaVkdNy5zvg== X-Received: by 2002:a05:6000:18a3:b0:428:3cd7:a340 with SMTP id ffacd0b85a97d-429bd69914fmr3914605f8f.35.1761935593309; Fri, 31 Oct 2025 11:33:13 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/38] hw/gpio/pl061: Declare pullups/pulldowns as 8-bit types Date: Fri, 31 Oct 2025 18:32:33 +0000 Message-ID: <20251031183310.3778349-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935800730154100 From: Philippe Mathieu-Daud=C3=A9 uint8_t is good enough to hold a property "between 0 and 0xff". Define pullups/pulldowns properties using DEFINE_PROP_UINT8() macro, remove unnecessary range checks in pl061_realize(). Update the two caller sites. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/virt.c | 4 ++-- hw/gpio/pl061.c | 16 ++++------------ hw/vmapple/vmapple.c | 4 ++-- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index d07cfe16512..b3ecd6dce36 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1136,8 +1136,8 @@ static void create_gpio_devices(const VirtMachineStat= e *vms, int gpio, =20 pl061_dev =3D qdev_new("pl061"); /* Pull lines down to 0 if not driven by the PL061 */ - qdev_prop_set_uint32(pl061_dev, "pullups", 0); - qdev_prop_set_uint32(pl061_dev, "pulldowns", 0xff); + qdev_prop_set_uint8(pl061_dev, "pullups", 0); + qdev_prop_set_uint8(pl061_dev, "pulldowns", 0xff); s =3D SYS_BUS_DEVICE(pl061_dev); sysbus_realize_and_unref(s, &error_fatal); memory_region_add_subregion(mem, base, sysbus_mmio_get_region(s, 0)); diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c index 1acca3f2f80..a3ac038c2f7 100644 --- a/hw/gpio/pl061.c +++ b/hw/gpio/pl061.c @@ -79,8 +79,8 @@ struct PL061State { qemu_irq out[N_GPIOS]; const unsigned char *id; /* Properties, for non-Luminary PL061 */ - uint32_t pullups; - uint32_t pulldowns; + uint8_t pullups; + uint8_t pulldowns; }; =20 static const VMStateDescription vmstate_pl061 =3D { @@ -547,14 +547,6 @@ static void pl061_realize(DeviceState *dev, Error **er= rp) { PL061State *s =3D PL061(dev); =20 - if (s->pullups > 0xff) { - error_setg(errp, "pullups property must be between 0 and 0xff"); - return; - } - if (s->pulldowns > 0xff) { - error_setg(errp, "pulldowns property must be between 0 and 0xff"); - return; - } if (s->pullups & s->pulldowns) { error_setg(errp, "no bit may be set both in pullups and pulldowns"= ); return; @@ -562,8 +554,8 @@ static void pl061_realize(DeviceState *dev, Error **err= p) } =20 static const Property pl061_props[] =3D { - DEFINE_PROP_UINT32("pullups", PL061State, pullups, 0xff), - DEFINE_PROP_UINT32("pulldowns", PL061State, pulldowns, 0x0), + DEFINE_PROP_UINT8("pullups", PL061State, pullups, 0xff), + DEFINE_PROP_UINT8("pulldowns", PL061State, pulldowns, 0x0), }; =20 static void pl061_class_init(ObjectClass *klass, const void *data) diff --git a/hw/vmapple/vmapple.c b/hw/vmapple/vmapple.c index 1e4365f32c9..f3cff329244 100644 --- a/hw/vmapple/vmapple.c +++ b/hw/vmapple/vmapple.c @@ -326,8 +326,8 @@ static void create_gpio_devices(const VMAppleMachineSta= te *vms, int gpio, =20 pl061_dev =3D qdev_new("pl061"); /* Pull lines down to 0 if not driven by the PL061 */ - qdev_prop_set_uint32(pl061_dev, "pullups", 0); - qdev_prop_set_uint32(pl061_dev, "pulldowns", 0xff); + qdev_prop_set_uint8(pl061_dev, "pullups", 0); + qdev_prop_set_uint8(pl061_dev, "pulldowns", 0xff); s =3D SYS_BUS_DEVICE(pl061_dev); sysbus_realize_and_unref(s, &error_fatal); memory_region_add_subregion(mem, base, sysbus_mmio_get_region(s, 0)); --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935690; cv=none; d=zohomail.com; s=zohoarc; b=cg3DA5X+x9zoDQs5gtS9ngBMsjAKVBCvyQPtzOcu4vyH1IdTTRiNBzQfqWb+MJAHLoe4qtuqPHVIJaYLb/d6NNxYdFr1P1aEZ1joP/VCJvl6numnCzja1c8zZPU2Sp1wQ1ATWWzDLBYvc6MBWEgos0YS6AVlmslO5XE6AaR/q7g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935690; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=wmyQkb2QsvUuGjFN9atNXZMMVdCdxzDZe72zwMmx34w=; b=J0TW/E3AKYa6chvVwoi3mLUey3FSy1NksOn0KOC3m4SwIEmrnZ+oQFkleiX3asWA22REXf3enOG7moi/yefzq/HBzS47Hqs6xr+xs9M7LUsYzRyNDPeMZyKGadgqgF6SZpy0/qRU2+2ssW3fyK3oH7zCnBowZFvwM2jZr2X9AnQ= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935689899276.4098249147503; Fri, 31 Oct 2025 11:34:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwI-0004Bz-5R; Fri, 31 Oct 2025 14:33:30 -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 1vEtwG-0004An-CT for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:28 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtw8-0006Ar-6n for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:28 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-429bcddad32so1072449f8f.3 for ; Fri, 31 Oct 2025 11:33:17 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935594; x=1762540394; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=wmyQkb2QsvUuGjFN9atNXZMMVdCdxzDZe72zwMmx34w=; b=BPbei9lJv3mcd/Bt99mM8VeSatPqle8lZcyARxQhVc72GYqynd2Pn2K7F6SVv+3B9K SkVFYnaFO7Qa7HIqoBo88GGtxurgwgwBkFosVCbqu0kfsCJBr4KFMxUAecCBbB/0ieB5 F3/73700KGSi37zy0eE6fNlDWrXjc2q4IlPtNtNh5EJDzVQK/b4Bs7lxxJKOocaq7K9D ciYPa4AavEejKb8YMWSFnYObFqUpXXZiIj7N1O8WtpZMN+2lYgYQpXx6tWQwCi+UyPJ/ DCpgUz3AHM/liLIxa/0YdxEhl5mrZhPSBgxajQlYLNpB1HbkSZmY6SbseZigjhL9I8iM ANHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935594; x=1762540394; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wmyQkb2QsvUuGjFN9atNXZMMVdCdxzDZe72zwMmx34w=; b=RKm163Vn61HmklgWZi9rLClSShb5rrsHq8qMf6L4218Jg3B75DUS7yRs4/AmJ4N1Oy a/4Gd7WEG8n3tn7KkjO/v2EMcUi1f9M1meyU48raqxj6Dv4mE1QJmGiGHcc+qckoDBvK OlwS9fYV/RfH7CykYCKU/NPs2geDYiSdV6SHaBNpYQNqe2q0LXxAwkjo+RHZXW2vFxa6 JihQ47o6B7Plba2S075kTGKb97tedcK8ryu33dh6aIMAyHbcD1gLWfCVQ3cbG8IEV4yh vA8SvlmApeQ82xrICfIEuu7FzwyxqEbSwS6+OPlWONzS/rkpQIQ09H7XPEoSfTlQHIfW HqVQ== X-Gm-Message-State: AOJu0YzgWsraTfDl89CSjikZfL+Fht7qrSXJGtC9D1JoPweGTo+TrjCe qhJRguFdKO5kP6UXb9BOfUpSbR8vZfsuol/O5r4tIem2GKVHUAEGNuOA+FIHYa6b7vP+dR3LZpR SK9r4 X-Gm-Gg: ASbGncuei+wK0UG4AyPpsDD9eiLzB5ZpbFH52OIapkqN2+hp+adW1upZYFAfmGaWaO0 lWCN0o1u3bwyH7cIp8L99e7EAJ2qsqJ4QgC+N/GdAwXBy/rM/cWXgNS6zHtMarrFe/6A1OWimZO ziPK10uMpo82ZKGSzBhESIqmzKYCjSXj6mxoa79OfY7xEa7OxVIoG8Jj2Mb2Rgq8FMeuLhRPpSF ecUmZ7CYSZTuSBkCKeR70xAYscc1l2b6BaAx07SmGNeXp+9LIHq8ygE4aL+0+qY+/ZBnjGRZDQE isxi2uhpTMlc8Tnozkc9TtOLvF4YTbxv91+7THHf0TfKEL3rDj2Qmb+biDLhD7bkw7I/NTo6MmI wJRWFhf9/Luk1gdpiZvHtYby1ywC28RBLAi/RE7zsR3xLUsgrx0IZR8bQxU6DKQlaStGMqXYIdu +Q/9kf2Q== X-Google-Smtp-Source: AGHT+IGg0a7p2mMgHx5XucSmnkWzlOmSEyoRvddkEfCDPJ8HEE/LizzR7Un3uour7bKZ9faXifDYnA== X-Received: by 2002:a05:6000:2585:b0:428:3f7c:bcfe with SMTP id ffacd0b85a97d-429bd6c1ef3mr3599375f8f.57.1761935594114; Fri, 31 Oct 2025 11:33:14 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/38] docs/system/arm/virt: Document user-creatable SMMUv3 Date: Fri, 31 Oct 2025 18:32:34 +0000 Message-ID: <20251031183310.3778349-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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, WEIRD_QUOTING=0.001 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935695744158500 The virt machine now supports creating multiple SMMUv3 instances, each associated with a separate PCIe root complex. Update the documentation with an example. Signed-off-by: Shameer Kolothum [PMM: some minor wording tweaks] Reviewed-by: Peter Maydell Reviewed-by: Eric Auger Signed-off-by: Peter Maydell --- docs/system/arm/virt.rst | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/docs/system/arm/virt.rst b/docs/system/arm/virt.rst index 10cbffc8a70..e5570773ba1 100644 --- a/docs/system/arm/virt.rst +++ b/docs/system/arm/virt.rst @@ -37,7 +37,8 @@ The virt board supports: - An RTC - The fw_cfg device that allows a guest to obtain data from QEMU - A PL061 GPIO controller -- An optional SMMUv3 IOMMU +- An optional machine-wide SMMUv3 IOMMU +- User-creatable SMMUv3 devices (see below for example) - hotpluggable DIMMs - hotpluggable NVDIMMs - An MSI controller (GICv2M or ITS). GICv2M is selected by default along @@ -176,7 +177,7 @@ iommu ``none`` Don't create an IOMMU (the default) ``smmuv3`` - Create an SMMUv3 + Create a machine-wide SMMUv3. =20 default-bus-bypass-iommu Set ``on``/``off`` to enable/disable `bypass_iommu @@ -219,6 +220,36 @@ x-oem-table-id Set string (up to 8 bytes) to override the default value of field OEM Ta= ble ID in ACPI table header. =20 +SMMU configuration +"""""""""""""""""" + +Machine-wide SMMUv3 IOMMU + Setting the machine-specific option ``iommu=3Dsmmuv3`` causes QEMU to + create a single, machine-wide SMMUv3 instance that applies to all + devices in the PCIe topology. + + For information about selectively bypassing devices, refer to + ``docs/bypass-iommu.txt``. + +User-creatable SMMUv3 devices + You can use the ``-device arm-smmuv3`` option to create multiple + user-defined SMMUv3 devices, each associated with a separate PCIe + root complex. This is only permitted if the machine-wide SMMUv3 + (``iommu=3Dsmmuv3``) option is not used. Each ``arm-smmuv3`` device + uses the ``primary-bus`` sub-option to specify which PCIe root + complex it is associated with. + + This model is useful when you want to mirror a host configuration where + each NUMA node typically has its own SMMU, allowing the VM topology to + align more closely with the host=E2=80=99s hardware layout. + + Example:: + + -device arm-smmuv3,primary-bus=3Dpcie.0,id=3Dsmmuv3.0 + ... + -device pxb-pcie,id=3Dpcie.1,numa_node=3D1 + -device arm-smmuv3,primary-bus=3Dpcie.1,id=3Dsmmuv3.1 + Linux guest kernel configuration """""""""""""""""""""""""""""""" =20 --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935651; cv=none; d=zohomail.com; s=zohoarc; b=cIprE2oVOwdzpvsI7JMh1g8QkoM83YBXuWSXLyNg82aRdP2aXA8sVrfh5Ly7P2n7GxyifjtCv1ZGm7CpjfkpDR4GUl9jaTcOALKZk8wMBMmsGraM1zo8CyJhyuHNwkaWMRwv0HHcbPX8xw0wEvcELumOsalgPqweZLxeBe6brOQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935651; h=Content-Transfer-Encoding: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:Cc; bh=4a5pZGC2LeA5EmYHWr+77na5jmR1RmVRW3azsXbL3Ag=; b=JeeO1mJbALTEcS3BxA84erhmrEgljOckpxOJSwvpHg/IAeapLObRpNfZXZixqba89KTgmA4cer+jd75nsPzBTgL9rkmwJ4CTlZxg2syq8f0a9Nd/XTOypd+jtAUAmaFAYAj2mIszPAcRRlQAMCoXE7iWt4fCvXVU74Tmh80cFk4= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935651772381.2376673226162; Fri, 31 Oct 2025 11:34:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwG-0004Ao-PA; Fri, 31 Oct 2025 14:33:28 -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 1vEtwE-0004A6-EI for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:26 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtw7-0006B0-F5 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:26 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-421851bcb25so1515572f8f.2 for ; Fri, 31 Oct 2025 11:33:18 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935595; x=1762540395; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4a5pZGC2LeA5EmYHWr+77na5jmR1RmVRW3azsXbL3Ag=; b=xBVJITi5pXbmADfJvEYwki58zFj8hFx519qwYUrXcKIE/hhWut696AXG16U36NFdVm TY7FxeU046QiykzijK5Ja1sC2U9AFl3f9fbGIPoCbFrr1ze6TESD/mw0dpqeUdwwQ144 ukZXU33bKnNg5r/+gOyl+F23UUaU37EghZbXwMyTryTfjsHeZfSd0YaMuzRilXdVQLbW AnZODFa6Om5fOY2+3dcTDkaJ/Gnrn8FSuEOzsrV7k5a30JF7dkuWABbCg34hjQyJcwxh NTeD8yda833fAJEmd7QBz/X4U9sUAvxDdma37boosHrSlG0XC7wuBxdsO+a+3oKxciIQ CIeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935595; x=1762540395; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4a5pZGC2LeA5EmYHWr+77na5jmR1RmVRW3azsXbL3Ag=; b=O+NhofCiDx1vzXEAw57WCyrzvqGtfHTDXXUvlQrNLndBwMc3Re88NJX9KSiUSbl5ue 7QAd1dz3yc3dl2irCZhi8/ZfRTfFiaPUtUnBHsNCoVmf6+pKpb3mlwYaarsLkhYVj/Y9 535Iy0sX4hvVxhDT0/xOtQqZkUz+36rPGKtaiDAx5p95oGFmFBJF4vJzkomszZE/mEEA i5pI76xBEUp1t8UWLPinDKHUrwXOCS9IIoZ95ZAnPxFOSIqLnP+/hKBaIxyFZbLpfWfk Y/k8uKk6aiZmekKjqQ4hCp2ptpZondpGY5Dc6Dr1V9D8CF2IamMFFJj8Yf4eJ36L58eE 0d6A== X-Gm-Message-State: AOJu0Yyaci5UODfdbhXbmiyxg3/eddDbxs/b3wbqomS5/LkrsarQaHdv n22tGU2cFWA+b1t9MaVyn1JX61zom44RgKIBl8Ul/8X20iuDJlNP+9k8yrIYV4e3/9/c4XWg3bx IcnKb X-Gm-Gg: ASbGncvaMkk+4psd2ufzUGXfJimBTf+g9aRI9TFvFH7SbDtWDO/YWlnZkpThfURnyjw hirmIrJ8OGXV5YztO1am+rbm7i0yw63atcqbsGFGg6OB2bzWPHv/+NasTC/cV121H6j/oSUtfkT s2VnSFRMaBGWsu0DBJiDq7hxo/Hc/kUbG5CqLQYJxGxiD2JCz4bUSpJXj1NJLvDbkGEh+mF+uj9 UGlUALY9pmh4s5hQMflg1GNpcdAeKZdmhQj/K9Hq056maoXp4xAlJUYEQDakJT+SG3yZ9h/KkxZ ADcmVgf5I8Q3c+0vCuv3UVg9MzXQMZmleNvaq5yOwi5ZkMUK/m9CgxmY//4APivqDlYc+c4WRzq F/6UYKpsCk4+in3Rx0QMsZFFLD6U6sjCLZZo52P5ndyl0UyWq18KL0wQwPdZRCFGWNUeNUKxQuw 6uaHbX3+ReT0qMzS3W X-Google-Smtp-Source: AGHT+IEmxmmVfnuU31DzwJtrdRjeNcXi/MPq5LWYn8FFJYykp0yN3PGotZh4vuTfT5TKfBg66iZrUg== X-Received: by 2002:a05:6000:240c:b0:429:bb21:94dd with SMTP id ffacd0b85a97d-429bd6ad96cmr4012366f8f.46.1761935594943; Fri, 31 Oct 2025 11:33:14 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/38] docs/system/security: Restrict "virtualization use case" to specific machines Date: Fri, 31 Oct 2025 18:32:35 +0000 Message-ID: <20251031183310.3778349-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> 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: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935657369158500 Content-Type: text/plain; charset="utf-8" Currently our security policy defines a "virtualization use case" where we consider bugs to be security issues, and a "non-virtualization use case" where we do not make any security guarantees and don't consider bugs to be security issues. The rationale for this split is that much code in QEMU is older and was not written with malicious guests in mind, and we don't have the resources to audit, fix and defend it. So instead we inform users about what the can in practice rely on as a security barrier, and what they can't. We don't currently restrict the "virtualization use case" to any particular set of machine types. This means that we have effectively barred ourselves from adding KVM support to any machine type that we don't want to put into the "bugs are security issues" category, even if it would be useful for users to be able to get better performance with a trusted guest by enabling KVM. This seems an unnecessary restriction, and in practice the set of machine types it makes sense to use for untrusted-guest virtualization is quite small. Specifically, we would like to be able to enable the use of KVM with the imx8 development board machine types, but we don't want to commit ourselves to having to support those SoC models and device models as part of QEMU's security boundary: https://lore.kernel.org/qemu-devel/20250629204851.1778-3-shentey@gmail.com/ This patch updates the security policy to explicitly list the machine types we consider to be useful for the "virtualization use case". Signed-off-by: Peter Maydell Acked-by: Christian Borntraeger Reviewed-by: Bibo Mao Reviewed-by: Thomas Huth Reviewed-by: Harsh Prateek Bora Reviewed-by: Bernhard Beschow Message-id: 20251016131159.750480-1-peter.maydell@linaro.org Acked-by: Markus Armbruster --- docs/system/security.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/system/security.rst b/docs/system/security.rst index f2092c8768b..53992048e65 100644 --- a/docs/system/security.rst +++ b/docs/system/security.rst @@ -35,6 +35,32 @@ malicious: Bugs affecting these entities are evaluated on whether they can cause dama= ge in real-world use cases and treated as security bugs if this is the case. =20 +To be covered by this security support policy you must: + +- use a virtualization accelerator like KVM or HVF +- use one of the machine types listed below + +It may be possible to use other machine types with a virtualization +accelerator to provide improved performance with a trusted guest +workload, but any machine type not listed here should not be +considered to be providing guest isolation or security guarantees, +and falls under the "non-virtualization use case". + +Supported machine types for the virtualization use case, by target archite= cture: + +aarch64 + ``virt`` +i386, x86_64 + ``microvm``, ``xenfv``, ``xenpv``, ``xenpvh``, ``pc``, ``q35`` +s390x + ``s390-ccw-virtio`` +loongarch64: + ``virt`` +ppc64: + ``pseries`` +riscv32, riscv64: + ``virt`` + Non-virtualization Use Case ''''''''''''''''''''''''''' =20 --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935894; cv=none; d=zohomail.com; s=zohoarc; b=XQLE9OvD0ZDzuaVFcQidKqQmF80T6AUcSTP2RY1rXm5z1HJHHTpk3F6sVu/BIcpweGcJv2TJFjyYa2NHlemMiPh7Ig/SQCcbl3hhw2vHXsOu/PVcL3KycquGQ901mgx1qiY61ugE6yDTCeUkdfZeLH4Jn4RPuFajbkW7bQiY8Ho= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935894; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=DbjOgOkfCwrBdURCcMUb2IkYqGbbFToEjPFT+iXympU=; b=Av9ylRU4BZe9wfStcooD9cRP98XoP9jGoyH8p4Aqoh/BzC4KUyaiyLe4Bl2ybQULyWCnscLcFCkQKlq3XKMvM83OjNbCcyLKJ/ysqeXXaI4qiWACFT9DQkskHbxSap8PD6gnw5HwQLd0t/CPpfpJG/UrjQGK5dy7wZJ5yvdE3pk= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176193589441441.82619272524141; Fri, 31 Oct 2025 11:38:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwK-0004DU-7S; Fri, 31 Oct 2025 14:33:32 -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 1vEtwI-0004CX-Pu for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:30 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtw9-0006B2-TN for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:30 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-427007b1fe5so1949576f8f.1 for ; Fri, 31 Oct 2025 11:33:18 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935596; x=1762540396; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=DbjOgOkfCwrBdURCcMUb2IkYqGbbFToEjPFT+iXympU=; b=xEatXUGgHUjGFnLBLuGMz1wIyOLdLb99qJOLzEhxuoRG43fUzsouM3Koyy2zuqdevW DbU4o0dzfFVsLOg9g47rqb/A7BtI9GNn2vtY88tKsF/hGzTjG18YRKyu1752wQO115eF O0LpmuGsdb8PJ5crp6Dpw9h7F/A5EJX+Yybo+KWKNh2JFnY7jhQWZZUW7WANdo520xi+ hmckkyT65TJmQyrJwFIMWgOu3TkSB4G68oq2jpSv1zxslanXME99QswTk2BX0v/JuDBs DpL8p8eWwUZ4+hl6m2wD3GKs8ejLJojIATYZF0vpBih1VU1aEDX2t7JH5/kHLJ1Fg67j P5Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935596; x=1762540396; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DbjOgOkfCwrBdURCcMUb2IkYqGbbFToEjPFT+iXympU=; b=Bm9lBFewZCKCwr0ByIHHlklaYnBFwjpO06AWSG9D1V5+CRMIivFCMIL42K+sUfvqe+ 8FWKBkJ5iGl32Rjrsx3XV6QKzetD80Qt4Rd8XYw+UN1QJ757AuTVp7ns8eGEh5myTiam c7OtjdgOsj2gzPc8qM4YnjXXlhXTACZV88q0hVri1tN5MmFUqo57lth+8SuX7mqOeHKG WMMotA0m2++aWRV+5oQtdI7f7Dx2R2BIsVStDmuboddgfv5kFXddxMvzsHX0ZP7cF3BG t2yiEyKoNCKb/EbTKmIakAcWvJu6HT39LIzw6C8B95rOiQmLPeXgRZ4qR2uD62byDMty oVcg== X-Gm-Message-State: AOJu0YzFRVeeykbjXnnCrpFFVVsn2hdXWaSW/wCWvK1qeKtlWU0txDmb zjFl1l0gDZTopdmxf7RT4N5d2MTYYlyQ37zNDn/5gP7PVlEWPfwVE1vc5QwN9HN45InLP0yCB+c g1ix7 X-Gm-Gg: ASbGnctVgoZTuocXM1ZiQ06bTOwLnWB3vfx7DwE0NHvEuo/+l9BEDMZ673FTmct30oe ze7dj9exZSN9cpPu2ZtQZh7R46sbzBnk3GWNN6gwANaSGDvi3fIfAKcAj5noKSjhrl2Ud1kgJn5 BzRGeuju1Lwjalg2NBRSAT3x6dfvmsPof8jIoPmjDIHDxEk3UnaUUbmZPpYb2tykjRBCrwQ1+mC VBwLVKJKXdiHwaYZjIp3exlWzKGreFchPdVdTPdBViJVSun8hKJyHwwwcG3awha8054MnljvKJY jc4dbFRq5xET1Gw2NWnDudqCHKoYSXxglSSsJATULvQ8wjCprigXjb+9PN1mKTLN/xLSyPXfmvD wHH/lbczTXmTeAIZXA5MoTRhUMho+IRX59UB+X/HTQ2YOD4rcnHf87fyL3y55l1+tnOYqUaMkiw UtF5ksEnLJ48n6tCsF X-Google-Smtp-Source: AGHT+IFPCX5wqeU2TGO0V9X7is8dNJFVDpvQSM+8edbEqwHJi/v5dyS2Safv7gnx/lhkMC1fhaWIhQ== X-Received: by 2002:a05:6000:4387:b0:429:b1e4:1f74 with SMTP id ffacd0b85a97d-429bd683753mr4358098f8f.20.1761935595757; Fri, 31 Oct 2025 11:33:15 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/38] target/arm: Add assert to arm_to_core_mmu_idx() Date: Fri, 31 Oct 2025 18:32:36 +0000 Message-ID: <20251031183310.3778349-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935896078158500 Before commit f76cee647c ("target/arm: Introduce mmu indexes for GCS") it was impossible for arm_to_core_mmu_idx() to return an invalid core MMU index, because NB_MMU_MODES was 16 and ARM_MMU_IDX_COREIDX_MASK was 0xf. That commit raises ARM_MMU_IDX_COREIDX_MASK to 0x1f and NB_MMU_MODES to 22, so it's now possible for a bogus Arm mmu index to result in an out of range core mmu index (which can then get used as an array index in the CPUTLB struct arrays). Coverity complains that this might result in an out-of-bounds access. The out-of-bounds access can't happen because we construct all the ARMMMUIdx values we will use for TLBs to have valid core MMU indexes in the COREIDX field. But we can add an assert() so that if we ever do end up operating on a corrupted or wrong ARMMMUIdx value we get an assert rather than silently indexing off the end of an array. This should also make Coverity happier. Coverity: CID 1641404 Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20251023101339.1983809-1-peter.maydell@linaro.org --- target/arm/internals.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index 6fbf7e1ca49..4c0fa28ef84 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -969,7 +969,9 @@ bool arm_cpu_tlb_fill_align(CPUState *cs, CPUTLBEntryFu= ll *out, vaddr addr, =20 static inline int arm_to_core_mmu_idx(ARMMMUIdx mmu_idx) { - return mmu_idx & ARM_MMU_IDX_COREIDX_MASK; + int coreidx =3D mmu_idx & ARM_MMU_IDX_COREIDX_MASK; + assert(coreidx < NB_MMU_MODES); + return coreidx; } =20 static inline ARMMMUIdx core_to_arm_mmu_idx(CPUARMState *env, int mmu_idx) --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935672; cv=none; d=zohomail.com; s=zohoarc; b=hv7V6vdzKfSET8AehO9x0p/S+SvS6f07XLBZS2o4uIdrRogeEN92ObEwWpstUjK6YZSzrGThMVn0R98WJe/4ncw0z7ahNyuPmcVdvrjH1liWOtACThoBqYnnnHJbPhU5x4sFzvhiCCknhZDQe905SE7ru4AEYaOKoNhFDb2rJgE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935672; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=JeZCJ18nW2KfVj2kUx0tBO8E3UT79l4WIZlMywShnuA=; b=WzaAr7pvNTsuvLyeaKxwCtYbYJyNEJ54cvzNS8Bj6CYW/LMLSXjcu7veDAS6BLW1TrPET+yQblt9PqIOJBoH6gA8+qLd+0okcnL0WIG7UNsbDz03jE6Dei3nZKoJXQyXmYPb0cJ/Gbn7sgl2is8unvWhXegU0IDVhboFiOyByIQ= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935672036475.3189961492702; Fri, 31 Oct 2025 11:34:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwQ-0004JR-Q9; Fri, 31 Oct 2025 14:33:39 -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 1vEtwP-0004HW-DK for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:37 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwE-0006BE-0l for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:37 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-429bccca1e8so959464f8f.0 for ; Fri, 31 Oct 2025 11:33:20 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935596; x=1762540396; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=JeZCJ18nW2KfVj2kUx0tBO8E3UT79l4WIZlMywShnuA=; b=wnwoTY6sb4qRh/BDlfTryv9Qvtm7wYZw/tRhWEgqlIx7nLewKdSH0KHpNpIfBfLFGE mtqMjqZsNoy2xXJ74Z7ZPschkJf8lGw71UzcAXZdncy3HgExX/KxOa6hAy2e8wNZHimS +PBsyFZEbJHuqu6XcY15ZwJ8zWvOXS0tbmz3kgHxqqiuhFcgfljr2fsEp7iKz9iabaGt 4jRlbLj5SDXb8ySWojqZLnFajYxwMswMwmECxHrnl3JWc0t7y1fkRcMIlN+UpjFE2jpP Yt3B6n99Gc8YzWiJiTtjZLYWvdUQy7W6CTGXMlXxsrOt8Ts6Nqe1n/N6xzAAYa/tq6ms Xmqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935596; x=1762540396; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JeZCJ18nW2KfVj2kUx0tBO8E3UT79l4WIZlMywShnuA=; b=RGMWTUu1hWEqP6b4dMX2toM998DH79W8729LRxJ6isZxmtcCJTRYy2KuRfP3LDoh6+ 0RYAcmv+GxmzVPyK6fGRIByhvJU1Eo3PMBfay1AAdQXzRSOZ+sNmFf0M5FQcw9iLdQyD zVi6WR9t6+nUXOSFauKFUArXMvfGvWPs51lFNp4d6+WFr7/sHfb6shO9Gj7a1T2n0GPv idD57ujePw+XNGrMvVqY2vRAYtOiqyaU7MJh1DlWDtt00U5Qyt5ItuONlhHP6wJ9JXtc 4MfcvyFGWUt45hHe60Eg2JOZzrIVzQDh9t4G4iTRow4SCfDPbUjK3rwPV4yqS/YRgaHE afig== X-Gm-Message-State: AOJu0Yw99ZMJhtN8++6/SDvNuU7omEu5APTvJub/nJTHrwM7JM5bUSF9 MLI5VKnehGHvSjxZlTq+734zZ/dQoWPaDKi/zd4/LEt29S3Ucl7MwVz6BKFXHR0b4h7aJ+NWCqS LW8XU X-Gm-Gg: ASbGnctrxVWzJUHySswyq/t0YMLZAeQgdzPKKh00HrbGKVLsujZgJ2ngOFp1a3beY4i zKIitG8H4FdWNNpUXe6k0eabcADWh0DFApyNDZrYmctBL02LZ6FP4HRxOnTZzx53QD2FlVHai1P 0s0ddomjvbO04QsGZ81aE5x/mSvE5MqBlCDz33Vjo0BvIbwhnnT8T8fZWON8UstH4XFgzweiXjG G4c3BYQO0LcLBZf5404Q5tdagz6QnRRqPSlbyFFsoeFPphatbm6DyGH+YZzcDOBaY2Tor2yyTaI jDbMCOcLQcWZbPsTvostbGIzq93NPr07mvz31CXP+sMhvuOoQ/c0V5hMAOs8IP/surBhkk09aYD 97W55DhwIfm402nb728BVVitBoHRtaNR5AdLL9yI2zvonilwgqQD2epMAp6GnZO5ybD1bOi/VIz fRc85bPah1c+BZaedy X-Google-Smtp-Source: AGHT+IHRHveF7HXbIPzblNABwmZkeFEvKJeyD0bYkqN/gWMYdGjV5ec2N01BYU4hXFhzI9V9B74hsA== X-Received: by 2002:a5d:64e4:0:b0:429:66bf:1475 with SMTP id ffacd0b85a97d-429bd67242fmr4160990f8f.3.1761935596552; Fri, 31 Oct 2025 11:33:16 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/38] hw/arm/virt: Remove deprecated virt-4.1 machine Date: Fri, 31 Oct 2025 18:32:37 +0000 Message-ID: <20251031183310.3778349-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935675619158500 From: Philippe Mathieu-Daud=C3=A9 This machine has been supported for a period of more than 6 years. According to our versioned machine support policy (see commit ce80c4fa6ff "docs: document special exception for machine type deprecation & removal") it can now be removed. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20251020094022.68768-2-philmd@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/virt.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index b3ecd6dce36..6cf8ed58d56 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3711,14 +3711,3 @@ static void virt_machine_4_2_options(MachineClass *m= c) vmc->kvm_no_adjvtime =3D true; } DEFINE_VIRT_MACHINE(4, 2) - -static void virt_machine_4_1_options(MachineClass *mc) -{ - VirtMachineClass *vmc =3D VIRT_MACHINE_CLASS(OBJECT_CLASS(mc)); - - virt_machine_4_2_options(mc); - compat_props_add(mc->compat_props, hw_compat_4_1, hw_compat_4_1_len); - vmc->no_ged =3D true; - mc->auto_enable_numa_with_memhp =3D false; -} -DEFINE_VIRT_MACHINE(4, 1) --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936113; cv=none; d=zohomail.com; s=zohoarc; b=H0XtzWSMgGyGxq8v+bflbW7kuBHFBqMsQIxbrg2O6rmSeQJxLSXaZ1xdCf6Y+DOnSGpcJ973E7aPT8bQ7cu8BCNkpYtin9HWwY791EhGj8YuWc+X8DOdwHeLFmHiRT6yRNO+sp9bRw7j0UGY4nzRSh9dRkUK3L27CZ3RcU0KI2s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936113; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=+m+D8DJcKrrz35Vp3pPzkIZBB0yV5mheHpZZV4UZZi0=; b=XZYCSlA5fj9A9DYUIvGqYujHaaHFJtJ68n/amH/jAWwRa6CC3/o3dVkLP9vx7xdHjSKeBADv3jblhc/42C68HHTQvNl02zICzYVQRK1n/RyfwH7KTvw4rdmLK9bhZz1tqWRPtj28sE7uUz4nk0tS4/QxtxXEjd9RtGu0ZnCkJeA= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761936113027558.4916121709279; Fri, 31 Oct 2025 11:41:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwL-0004FG-R0; Fri, 31 Oct 2025 14:33:33 -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 1vEtwK-0004Cr-7M for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:32 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtw9-0006BQ-R8 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:30 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-4283be7df63so1334326f8f.1 for ; Fri, 31 Oct 2025 11:33:20 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935598; x=1762540398; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=+m+D8DJcKrrz35Vp3pPzkIZBB0yV5mheHpZZV4UZZi0=; b=RYc5h/fYjASw+Qhw1ZAiZ2J8YQf4BZtAm8lsPUiYkdnwD8wmZuCdgP87qutE6HRPtC n0D9OoHJ5/lDG0NrW3zanl+8v1LgxHgoG6/8DfN0sXpzVuOmTTB6bGkh5RwZ9s54UN3J GOhF8XR9GeEgRmu/YQe3Yz9KLygo7BGMGho1f9PYsb5313FLGcYYEERuAjrOtreu8PhF nU8NhoWNU/G0cnDozrJWLwygcqeTLabYWCUVvYuMD4yrLVrm+aKlWj+7gO88G8u/+9sX RKxUA4wEqHoFAn3Use0o7jNHq22elGGdRWKB/wUFcSYshk52gyRgyI30183mtrB/JQ+j ahIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935598; x=1762540398; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+m+D8DJcKrrz35Vp3pPzkIZBB0yV5mheHpZZV4UZZi0=; b=WSWSRcs9y2sXzR42bWst39nJoXKP/y4r3ewTuo7gTLbgut1PLGVAJFFGCkC15Exae4 BafCuAPNFwNVEMr50nDJEyB9on0/pPZhraV/DRiPmtJhjHrEjbO9iUaEHQXb3/YN1aBF zt16d/kpuCTI03PPE8uX8KjCL1i2WzSF2r1zRXlujqhxGbi3ClRpjfnHo9HnzVlDQyNp /rpf8Pqwlnz6bWwmulnKON/xICeOx6J5ZiHjYfxVN94EsRO4aLSujCN6mOdSRrvnp85d B9KT+3JrtA67KrHSwzgSTyipHvRutwHgNhropmh65IKn+fuYMupE1X/JBteXnUCLnF7h ok3A== X-Gm-Message-State: AOJu0YzGJoNEuHo+2ceLHO8CsVp/U64mPqsl756fM+GKUIzZ0F3QdY+a B4iE81gO5eqWiB5J0z0dH8J8gZ5J6Cm3OIOluf1SDfHWspZkh1GHNQBjX7AZooRssfmP0MTL0k0 4x+Us X-Gm-Gg: ASbGncvbxQRmu+z8aNvLpkjZgrysIycmit0ymRgeJ/57aj+uWfnkfLv1lXaIKeRS7SM jOc6/EvTQbbJGIkRF/+ONXJvodocIvWzUVS2PsAwE5uMqCGDowZQMcrJ6GBqPjgNIoF/R/Ghgt9 2fNk5RjcyRHMwRgmUKWTVa/+fngFg2aQYxlXBlmDvp+C5os2jaJlhhX289TZeMOO6rHje4v23OS ksXq0KjZxnebFO+6JiW5tusejSmyiu3fDxd3vVCclQ9m4iNp/EB69vcOa11IPuwebbEcczKUbHL JLUAiiZDzFTQV9d5wUPRN35+3EUIB4MBr8TNxsmuZmXXM1U1UlvSoLDkVrfskPfmRjG7JDXrvDS rdSZnW2LVmPdpgXFcPHi5v8YmCk21G+0Ea0a65TnZyhAlKQk0wiYwPaJlLIfVw+IKCYv+p5lkWh KMkzbyUebQYERXJVvJ X-Google-Smtp-Source: AGHT+IEfTNCxnJcNeJW6kgWIPH6E1lhcn0760HsRkiGMwVTv5uVdSqJuKaz9bhcI/5XbaKQx4K2Icg== X-Received: by 2002:a5d:5f55:0:b0:3e9:2fea:6795 with SMTP id ffacd0b85a97d-429bd6b0e8emr4154734f8f.53.1761935598070; Fri, 31 Oct 2025 11:33:18 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/38] hw/arm/virt: Remove VirtMachineClass::no_ged field Date: Fri, 31 Oct 2025 18:32:38 +0000 Message-ID: <20251031183310.3778349-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936114360154100 From: Philippe Mathieu-Daud=C3=A9 The VirtMachineClass::no_ged field was only used by virt-4.1 machine, which got removed. Remove it as now unused. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20251020094022.68768-3-philmd@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- include/hw/arm/virt.h | 1 - hw/arm/virt.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index 04a09af3540..993872bb680 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -123,7 +123,6 @@ struct VirtMachineClass { MachineClass parent; bool no_tcg_its; bool no_highmem_compact; - bool no_ged; /* Machines < 4.2 have no support for ACPI GED device */ bool kvm_no_adjvtime; bool no_kvm_steal_time; bool acpi_expose_flash; diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 6cf8ed58d56..4d03317b599 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2213,7 +2213,6 @@ static void machvirt_init(MachineState *machine) int n, virt_max_cpus; bool firmware_loaded; bool aarch64 =3D true; - bool has_ged =3D !vmc->no_ged; unsigned int smp_cpus =3D machine->smp.cpus; unsigned int max_cpus =3D machine->smp.max_cpus; =20 @@ -2515,7 +2514,7 @@ static void machvirt_init(MachineState *machine) create_pcie(vms); create_cxl_host_reg_region(vms); =20 - if (has_ged && aarch64 && firmware_loaded && virt_is_acpi_enabled(vms)= ) { + if (aarch64 && firmware_loaded && virt_is_acpi_enabled(vms)) { vms->acpi_dev =3D create_acpi_ged(vms); vms->generic_error_notifier.notify =3D virt_generic_error_req; notifier_list_add(&acpi_generic_error_notifiers, --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936091; cv=none; d=zohomail.com; s=zohoarc; b=H0kLFqD4lE96v71k+rwTDwagRP8wYP/AyFzirFcgUIeb7Pki/fk+id8xtKTvoiKb1fd166NAgubehjLcdc0j1IyEz4kMfq+LYJyftutpdiXBss4r7vTECFUtY97XMU1TJxl9/5p4LgRG3NnaxdSNvj4hXF+B+4P1sHpkioZwx8Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936091; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=uC51IGSZ6aKIQJarGBBFkxEx1ZqCq4mk7PN16zUVOWQ=; b=n2Ew6UASJNJ0nuHSGUI3F6sn+2aiKC5JA+iLfRQcuIJxZOOkryvhrjvM/aFTa63QNr1xBPoPd0uo3+XplO7fbueZtLjHQg1vues3mH/NqwwfdilN/WqT4TzoEWwEY0LTUMDBNIwuFWkQoAMpOaCIB/0sAYAFKL6iZPdUALSqSNU= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761936091600352.4126538214308; Fri, 31 Oct 2025 11:41:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwX-0004OU-Lc; Fri, 31 Oct 2025 14:33:46 -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 1vEtwS-0004NY-R8 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:40 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwE-0006Bg-KD for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:40 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-426fd62bfeaso1204944f8f.2 for ; Fri, 31 Oct 2025 11:33:22 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935600; x=1762540400; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=uC51IGSZ6aKIQJarGBBFkxEx1ZqCq4mk7PN16zUVOWQ=; b=op3ErCc7Bk4hj1AEaRQbtptDATL3I5N2K5fNrSAJaLkO/nUUx1XZOyGqiAAemZE074 rlnjY4zasEOfhNVrC8aBNfwP5vZng5qLZW0Res6NS0bIQIj7rZrcbnN5N/2wJHvrles1 nD88oIBv6QpZdBrxVPUdNSHUraA9KJEi7AeMJ3yAjlE2xAkJ8unrlu0xu1G282+dP5UT ILf3/1VNUAkTAHXSM5e49n6/WlvD+e9LjVTwGIqRc4A85LsluQb983ZlZzfKqPjduB/T O8K7c3L4sSTIIqL7zHBMzbeYVImVDhwDEO7RMDwbIZLC9nsTDJyaHgprsMf3CLR1f5lO 8Wow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935600; x=1762540400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uC51IGSZ6aKIQJarGBBFkxEx1ZqCq4mk7PN16zUVOWQ=; b=LjJKOi4OGJ/V9wSLVTFFQ/8uH1ScNiyUiu1lZNLzQWB8fVJ3PVGsbFlCtj2PVUjnx5 Y2yltMbnv0MAVpnT7/jeqzDgWOGHOcX907SkAqlyrCRwQAqJxWqkSZTxNAaPRXdlb85l qQ9aShueVIjtvA0LsjwcLwzlc1K+n4NaIsSBHRip2BBkgrTQ2z4yJIWG61wlMl9FZdqI 8+bMO0P9xYy49B7fsQE5uNGbz2Hxphgz7liQHNHDeaXW8UuxW4hWzYs8ydP2KszgdXbX GRmqBVB5ctrzK3Iuce/EG8wtF2q91UJxWQGTQW0RCLej17hDy8ZwkaLpLN48rzt1Fz/f mmEA== X-Gm-Message-State: AOJu0YzsjuCMAnavEJTYnHMIr3wk1V6pt2DSuoG8RyBTTa2WXw7GeOe0 Ea6Tl5dl46qDWpYOsd8QD3FVJfaKy5ptijGgBGscAZxUX6kdGl2sxCyfyBwX/RrLxBD+1yraaPC eEE72 X-Gm-Gg: ASbGncua7R8iijtnNtRgIz8fhDT2iO7Hc+UMqyjq/HOvkvz7D24PBcq/r2TuzYjs7dz 4nSVeEcB6UVtaRM9YGCxnrLo6ciqMy+I/nbdb4fRIMa1/GGDODuI8t/41rZjKTvIzGb7vbSNP3p d9Ij5y/q55G6UheQkuwxRxzDGSRnpcjucF8xiX1dM7F1VVMLyoJgfq3LKbSx8ClchCQ62mHUz+P JJmQi3/tDvWKTR5JV7otH7hiFVsjGTVKIJ1xAqVI4UimWtSg6/7LvD4x0krUKiD2lzhCI9wx15r k0i1XQNAS3c8KR+zn4od1EHf7fl8DqiEww/lJEk497zjWy0zqvTG6ya9js6AlSMUuFYkZBgfSpZ 02J9NbeZByszPsElrkxihF9qTT3+Gg6OugL3mR2lUu3CV+hSFjRC0oD3Ikz3QpSsZMzIOqmIik4 DahTCmbA== X-Google-Smtp-Source: AGHT+IHnLoWrotTZh1sMBT9XrD+4g1qRpFV9gO2E5APbWAxu3F2oUWTWcf4Je5l41uY5P/J2FzeHvw== X-Received: by 2002:a05:6000:41d3:b0:427:62b:7f3 with SMTP id ffacd0b85a97d-429bd6c1a33mr3981056f8f.33.1761935599636; Fri, 31 Oct 2025 11:33:19 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/38] hw/arm/virt: Remove deprecated virt-4.2 machine Date: Fri, 31 Oct 2025 18:32:39 +0000 Message-ID: <20251031183310.3778349-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936094098154100 From: Philippe Mathieu-Daud=C3=A9 This machine has been supported for a period of more than 6 years. According to our versioned machine support policy (see commit ce80c4fa6ff "docs: document special exception for machine type deprecation & removal") it can now be removed. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20251020094022.68768-4-philmd@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/virt.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 4d03317b599..751e22e6f42 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3700,13 +3700,3 @@ static void virt_machine_5_0_options(MachineClass *m= c) mc->auto_enable_numa_with_memdev =3D false; } DEFINE_VIRT_MACHINE(5, 0) - -static void virt_machine_4_2_options(MachineClass *mc) -{ - VirtMachineClass *vmc =3D VIRT_MACHINE_CLASS(OBJECT_CLASS(mc)); - - virt_machine_5_0_options(mc); - compat_props_add(mc->compat_props, hw_compat_4_2, hw_compat_4_2_len); - vmc->kvm_no_adjvtime =3D true; -} -DEFINE_VIRT_MACHINE(4, 2) --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935678; cv=none; d=zohomail.com; s=zohoarc; b=Y4cJIHvfzugJJ7HNNkYI78E6AVkSAbI1UiGtqLoOuSlwpLvqiKfdC6vdklWWeVicjBq+xN9YjGKdpWX4yWAcVTTR/xFVqotpRhvzIFkNZ5mVtgjBzwzBim1/FL+U2hwOx83tD+MEGkHSPbpMmJxeoO9C4Vb9+y7idAudF3wHq0s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935678; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=BhBtli8BAcXvy3RsLsAt6zM5vhvDriswJPSjYGCYQo4=; b=Lsd6PpbtePeRtweAqNrHn+c24b2LDm27ErzkkgR0oHYe02ZhcRHpt9iKjxVtvD6zOpGRApmWpg834mRAxAOacBAoB63EiaR2kPgiyMtJ+tJgS6Le5EP++IPrUFIQ/hQGJGgbW9uDySrC9I2/U6CH4aIgVGOBS6wLizzMoognJgk= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935678560688.0594995374186; Fri, 31 Oct 2025 11:34:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwc-0004S6-Nc; Fri, 31 Oct 2025 14:33: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 1vEtwU-0004ON-Gz for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:42 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwF-0006Bn-12 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:41 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-426f1574a14so1697465f8f.3 for ; Fri, 31 Oct 2025 11:33:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935600; x=1762540400; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=BhBtli8BAcXvy3RsLsAt6zM5vhvDriswJPSjYGCYQo4=; b=IZn9wgEcFkWfsKjmGWjSuGspk0KhLBCrajiuNXmyNWnPSoNloAA8PC1Gdy/mjQSK2Z t/G2MQ/cHRWfrjhS2I+XPkJ5T6srh+nF/0bT/N39xiuKHyaAIGAxk+tN0SvSBfJ9eJ4V AGMc+BxuEvU+fdu8Gk8mBiAIGmPB4sF1145EIaA+V39zV3GDzovT537qWZYRy21eYThD FVlMpi7Zq4iSZ7QyI4ObRlBS6j78YmOE1HfWo76BWJ1QJuPTrRRQ+udEDBo70pEcrkG1 ItT+J4sHI1o24b9uf3QeS6TJAS8SiUa/YAS1oEh+lJ6xG8Y0aMIJ0UeVW9P5xu1ys0lD YcXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935600; x=1762540400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BhBtli8BAcXvy3RsLsAt6zM5vhvDriswJPSjYGCYQo4=; b=BQlghxUqwcrNspSuCvULokUe4kTqklDa6CNnoirzzz4BdMK54Hh9x8MYzIxUE9s6Ro YJqj93ns4cI7tcchpeXmLnObPTKKajA5GfO7k7s6vvTelaE7Xnm6H+EoxMU3mcWQDbmF mkdbSsjydmvMrzUZO6Yiaik4zagR0q0X8TVYREL9z6YyHv+eF8Y1fLWufVTzlOyR6jRs 5vqD2iG4cy9XJhd9nQAYa1F/p/N8apE82MP+fi0jFJTfUgXOEEKCJwkj99//V/7jyrBi wb2DPY+MXjCDFm8b0O7S3lFuhax04+SlIjdX64KphxDa3ZTx8De5ouGYpQNb8a64yK+U yDCA== X-Gm-Message-State: AOJu0YxByVkhX3Re5EBcNLdeHuScTvFb5vE4mE1ZRlEvGgc0FLeWTUCb v30JaK79AaOceE3OY0PbiRCQ9JJ3zumswbqcFK82K8LB5Ha0MPozVuX8fmzInMZ1IrEsAeEHvm/ wXs/G X-Gm-Gg: ASbGncuNDlxCYByqoOFQx3M5T6Gj1aVOCKXkhVsIl1C8hqsvX7LUHqbazDzxltxxO8c +03NA3gZCHuH6EPAQLz1/wV3Qw5JkTpQv8X73cVOcgrwFCbM0VW5XgaQCrBl7IBezU1uahpn8yu uUh4g6KduEdgfP4ZdgmC602EHaA9G2XuFYHnnIXaCTFYvaAKe4gpc7vTS5qg3F2TX/MwPOIlOGH ovFVGw/WwPxA66eSpYIIEjF2zLqRHX27D4pxxSTH1rY7GxAGsZRL9PU2PKYw3vFYyTDdAus7gto 1Kz9q2DsP0QcbZ+30hW3Lm592B399RgjLcitZIUTNadajmMPUUaq74JJzOm5FPSXuBctfzmV4wP QJTKI16CT4KiaQSW9NGpPQJJ1FXlNdZtTcZhwoBwQzuL3Ia6e+QydotibqqO+TH9WZNQaQqtdk0 esQEiJhg== X-Google-Smtp-Source: AGHT+IHKoAx8WKkVDZcxQ4+IzxbPQUOP/4m30Ih+FuBSVtl1KW0B5R9tt8KrQTp1K3BVpuKHnzTthw== X-Received: by 2002:a05:6000:200c:b0:429:ba95:3a6e with SMTP id ffacd0b85a97d-429bd6a6194mr4120964f8f.46.1761935600451; Fri, 31 Oct 2025 11:33:20 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/38] hw/arm/virt: Remove VirtMachineClass::kvm_no_adjvtime field Date: Fri, 31 Oct 2025 18:32:40 +0000 Message-ID: <20251031183310.3778349-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935679673158500 From: Philippe Mathieu-Daud=C3=A9 The VirtMachineClass::kvm_no_adjvtime field was only used by the virt-4.2 machine, which got removed. Remove it as now unused, but keep the ARMCPU homonym property. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20251020094022.68768-5-philmd@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- include/hw/arm/virt.h | 1 - hw/arm/virt.c | 5 ----- 2 files changed, 6 deletions(-) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index 993872bb680..c77a33f6df2 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -123,7 +123,6 @@ struct VirtMachineClass { MachineClass parent; bool no_tcg_its; bool no_highmem_compact; - bool kvm_no_adjvtime; bool no_kvm_steal_time; bool acpi_expose_flash; bool no_secure_gpio; diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 751e22e6f42..25fb2bab568 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2365,11 +2365,6 @@ static void machvirt_init(MachineState *machine) object_property_set_bool(cpuobj, "has_el2", false, NULL); } =20 - if (vmc->kvm_no_adjvtime && - object_property_find(cpuobj, "kvm-no-adjvtime")) { - object_property_set_bool(cpuobj, "kvm-no-adjvtime", true, NULL= ); - } - if (vmc->no_kvm_steal_time && object_property_find(cpuobj, "kvm-steal-time")) { object_property_set_bool(cpuobj, "kvm-steal-time", false, NULL= ); --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936053; cv=none; d=zohomail.com; s=zohoarc; b=TUwIhbu4lA+/w3EEvlC3QXpL+C1SNVoz2FVzBtW/OXjn91E6UWk0gJJuSN1G99TKdvdJWJEVVKImke6ROE6X7xgBvTbQJdx7WiO/ov3pZWCOGlEOM8bT0XPZ6fOYzSZJ8l4Fmilatgxf6TGhvmZgorZn8JdxxwvjaWUeb8udFAE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936053; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=REfuEoYYWsxL5VHgmLIdH3KQEed0GHE9hAwD3zw5rt8=; b=SPKVtD3M9kUG+8GicMlZo1ewrZIlAQFifVgw2W+5NlncG2qaYhH9yln8raXgCGaKxR/XqDAdoojb6sOgr/JB3p/NCio0bPp88fbIRUGSVvnsV1O467huMv2Z/iVhDco+ZDYYjdpPVD4N3RK622RqrW+YFssYQhNpOR8YK5Kj/t0= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761936053590351.69719333541013; Fri, 31 Oct 2025 11:40:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwd-0004UO-Gp; Fri, 31 Oct 2025 14:33:51 -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 1vEtwV-0004OR-4G for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:44 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwG-0006C3-MH for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:42 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-475dbb524e4so15613595e9.2 for ; Fri, 31 Oct 2025 11:33:27 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935601; x=1762540401; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=REfuEoYYWsxL5VHgmLIdH3KQEed0GHE9hAwD3zw5rt8=; b=FsKoqk5KTr1d0NwSxJpHJeumJVmFB9jwydA/scL2SoO0qWc1Y4LYHJG90dfeYyuoYO tycAwPBWTnF8shK32BUOvAacksuA37w2CioNC+/WM+xnqSBLq2OuJMYp8YzIyAzWqoGG PliIuJ1Sew+qQKAqWOSy0U5ZaxUVHthuZk6HMtcN80yxqwcbBauSdWhUdw34cIzVS+46 n8zWPe+sDBYEidi0ENQJNUibTgm/CeQFMY/DgN8+XyNO5iyXpUa2vbrqtYxzttA/upzt pMFfH2N8a5iIZdZ7LgmSdgS7UwHEcmOk3bA5ijdaBUUPfF5gCTxSt1Cbx/gzbT9eMifF s3ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935601; x=1762540401; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=REfuEoYYWsxL5VHgmLIdH3KQEed0GHE9hAwD3zw5rt8=; b=gj0XcGnsCdzRh3YECZ4tc2O9tJEMNCet9MgyjPiLVXVMI08K7rqHc8WeXJPrNuu0Xg 5I9Zw698WMTx5UorPCagr59Q6wwQzSUmXmA3XXhg34aOgAz94xRpQv0rXAQ5C7yTW8NY a7FOlfoSSYmTDpG68/1e2AuG0MNULZbsBlvi6pfhle112TC/hJjS3IW1zO2XVutbPhOq TYQFueE/LkhFpE6TlqBvTzJBuNypAl02o6hBRy0qZU1Tq4A2A4apIAOgATRQKU7SzCU5 Eb01DHADSQp9tqxGCWMCd5WuYX8jwLp6DMCdqEZEZa2C+rFH8wCg7aLN7AeV4SgYqmLR rW4g== X-Gm-Message-State: AOJu0YxDzGK/cwd+kA2oD72C02U/RBOjJDK5o7cSkf+GUihtARbJXQbb QBTUi1L23yj3jeGE3exnJMRoTd7JOAWa2p8tcBKxdI9rUp2dd4W7QjK/6Tr0p43wSDOMzyIXcnZ eAU0S X-Gm-Gg: ASbGncu/mgG+mOrI9re//zS4f7IK+iOTDS2byJAXUbfSyUnKTGklXZsdJ1OVe+Ac+jw bbjdXJ25hYdIzYPx9+6lXEPhCvbYvDs1uIUBHFYq5wrUXfik9gTlRurnleMBx7PVGMdldJryOUw brQDnajwu31Z83kxbirpctr8JJw7aB6KnyP4WL6Wt4mCD+dEL43dYeeQjkXk+2gY+WAG51cGhxM hwX400jrhGxPxnF4lOw9FfyPSiJUoGPneP2my0M3HrTXRI9SXNwm3kGChxmcSPzNb3kvv1p4nY4 obKeTCkwj2N+C8ijS+57x3IByOUbyQHJH08pnWwEjfop294eyMVkO6PlLdmlGvdQp2q9wDR/Eiy sB+S8ME2Jh7fqlDHlTPRVsBxORmrkdEhZvNrxpvJ4Xl7S9cHoUFlRjiYqdQaMZazwqubk7jWP3e bnUcj6kA== X-Google-Smtp-Source: AGHT+IGRgh9fEn55AXacTroGovT78yyLccxS1WDn+fTSIfHd/GfYKyjUutksnwlOKOzCogK/tQgg0w== X-Received: by 2002:a05:600c:35cc:b0:475:d8f3:71c1 with SMTP id 5b1f17b1804b1-477308be6f1mr41372185e9.27.1761935601248; Fri, 31 Oct 2025 11:33:21 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/38] target/arm/hvf: Release memory allocated by hv_vcpu_config_create() Date: Fri, 31 Oct 2025 18:32:41 +0000 Message-ID: <20251031183310.3778349-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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, T_SPF_TEMPERROR=0.01 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936055647154100 From: Philippe Mathieu-Daud=C3=A9 hv_vcpu_config_create() is documented in as: /*! @abstract Creates a vcpu configuration object. @result A new vcpu configuration object. This should be released with os= _release when no longer used. */ OS_OBJECT_RETURNS_RETAINED OS_WARN_RESULT hv_vcpu_config_t hv_vcpu_config_create(void); Release the memory allocated by hv_vcpu_config_create() with os_release(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 0658a99a2d1..83db1088384 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -150,6 +150,8 @@ void hvf_arm_init_debug(void) max_hw_wps =3D hvf_arm_num_wrps(config); hw_watchpoints =3D g_array_sized_new(true, true, sizeof(HWWatchpoint), max_hw_wps); + + os_release(config); } =20 #define SYSREG_OP0_SHIFT 20 --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935697; cv=none; d=zohomail.com; s=zohoarc; b=R7B2FEEsLDEyeWTUW0N3ozwi0FVNHPXCyk9rgoV1lfzAkHZ6nO5IwC/Na/eHyJPL5vUnwKy4RSl95HW6mH1r5YA3y6XZscbk/V8T7GPwqsFC9DJZSnCf9K8NEawUb3S7nIiUrojp31baKGZ0hW2WKCE1SzRuV7lDvv7dJnNjaSw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935697; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=PGUX2D/mVgJffc35+CNcs3kiIp9mGri+SCs7fWEJdZY=; b=d4XdV8cL/kH1Skp9dQ1604nyg0cDVWp+i+BbTQg5y7zXfSyPeYNA7EkzF+1lOxMVoFods0sc5Y557Hxbl5lOaMwiEIL4F004QjhIUojMoF1hLtm76tA+UXyPceSK9pUACs6nEcmhVBe6qAC2FSqm9WY0fPszbWzMFQs5e4YHCg4= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935697210111.97289112951944; Fri, 31 Oct 2025 11:34:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwU-0004Ni-BR; Fri, 31 Oct 2025 14:33:42 -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 1vEtwS-0004N9-Di for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:40 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwF-0006CJ-Ra for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:40 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-429c4c65485so678470f8f.0 for ; Fri, 31 Oct 2025 11:33:26 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935602; x=1762540402; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PGUX2D/mVgJffc35+CNcs3kiIp9mGri+SCs7fWEJdZY=; b=hv+6Ygx4WFXlLcZeKp4KuJ6phJmyY9hyeY5TLrhrdi16Ak0zG7MPXtv4sx49YecynA vaJ/sbDtmEdLev2eCZBev6w2JlgooSsSqbakQOdKB9alkt+/2GPfh4zsQuAfCq3E9sgZ j+oWYqwxsiyKQm9cJjt23QqTO4CWwR45OK+drID7KdaaQ9pHqtZUGr9pyj4M+2+HQEHK GiX9Vc/5fij5NWmjnkLrXQT+gaM597Vie8bxaI93JBZkQcf1VhaQmQU8NSHxixQntz1P cqNMGSFtD0L5CfNxVlvNqZGzDDPQAjtmfoomvtUjFeqeyzvGrDAVax67PKvJ0Ae1sBBY ePbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935602; x=1762540402; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PGUX2D/mVgJffc35+CNcs3kiIp9mGri+SCs7fWEJdZY=; b=h4ToPbJ3CG0VPQERfBDbAPPWIHbAn2mTXmB8W+0PJbnYgMyOXFnVN+vnJ0SmdHIsV/ yAZLIH0aec/8EWiT2q/eH4Ntq4ykHigF2+FA3EF3zGhiZnfv/98D3ALL0cZrDvlQBXOc xtev3FO3cAJNIRJdw74jFxdxy3DOl8ujI2s0YxoMUpNRuKcTC0XDIpmG9p65KCyCwTB+ vG7vwnzKPdog6sKhhmiP4Zo9zNz73Lqodl+2UFqj3C6o6W9g+ohRXJlX/SPQmoc7Vk9O 32zcrS0bab+uisb5A1KHWtuUjnHs0uiz4/zFpLmdMNthMeDI5SkwCclfZSIFxbcVEmYY iUUQ== X-Gm-Message-State: AOJu0YwNU+mYJ3mJS7eygfgGpt4oWHwNq5LdSPULO8QgIpubTU26bl0Q 4mJ5+vNHv40DJZgkmOELb8EAdh5p/dqyUL9XSHnlrbKr0uQNFAZc5uyh+6thwD3dm+VyD/BeRzx MRXZt X-Gm-Gg: ASbGnct2P2WJIPomeTtSst8MldGrxc7xwrzNC/xyWD29RYFEURm8SAhSZY8jkz6FxJ5 WgSdXWBMLaskn3oB1yzB8ctRr4dE+igjR9NLgVuLOmgJVSoIjEMpOzzZC48In5QVuY5k5wNcxg+ 7StTtuk/n9ZvvUYJZ9OI88fi65r/4uGVlO/FJbfdncJEPmHKjNXIR5lM6/R8f36fyPtuRcWf9hb oHm/tcIEAI1MgUUc3mD9JFzZKkslTgReelhsFeNH/qv+CCGaCSuFUJ14SrXCcDccYFkEvu3sOPk F+vwKS+duLEXpQ8Iz2OHm62LQIypd9MlJORMuhotLb8b1INa7VUQdBP44OW09czN8OPFUCq4qYw axk4LNOPuQOx/9VPSr59SCJFRltMYj0rvxmhJSULcNTwt4AI7TfkftJXJYv12gBeu3FqWkW4dte z5JdM+uS6/FPgylU9X X-Google-Smtp-Source: AGHT+IHeqwAMJ/ZwtDrzVJdxcXA0wIjRTNd0jTdw41YVhYoKQh9Ltix+soMgizN2lVMnk0F1o5qwzw== X-Received: by 2002:a5d:5d13:0:b0:429:c4bb:fbc5 with SMTP id ffacd0b85a97d-429c4bbfdfdmr1478195f8f.7.1761935602056; Fri, 31 Oct 2025 11:33:22 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/38] target/arm/hvf: Trace vCPU KICK events Date: Fri, 31 Oct 2025 18:32:42 +0000 Message-ID: <20251031183310.3778349-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935699869158500 From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 1 + target/arm/hvf/trace-events | 1 + 2 files changed, 2 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 83db1088384..91bbd3a6aae 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -963,6 +963,7 @@ int hvf_arch_init_vcpu(CPUState *cpu) =20 void hvf_kick_vcpu_thread(CPUState *cpu) { + trace_hvf_kick_vcpu_thread(cpu->cpu_index, cpu->stop); cpus_kick_thread(cpu); hv_vcpus_exit(&cpu->accel->fd, 1); } diff --git a/target/arm/hvf/trace-events b/target/arm/hvf/trace-events index b29a995f3d3..538af6e0707 100644 --- a/target/arm/hvf/trace-events +++ b/target/arm/hvf/trace-events @@ -12,3 +12,4 @@ hvf_psci_call(uint64_t x0, uint64_t x1, uint64_t x2, uint= 64_t x3, uint32_t cpuid hvf_vgic_write(const char *name, uint64_t val) "vgic write to %s [val=3D0x= %016"PRIx64"]" hvf_vgic_read(const char *name, uint64_t val) "vgic read from %s [val=3D0x= %016"PRIx64"]" hvf_illegal_guest_state(void) "HV_ILLEGAL_GUEST_STATE" +hvf_kick_vcpu_thread(unsigned cpuidx, bool stop) "cpu:%u stop:%u" --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935848; cv=none; d=zohomail.com; s=zohoarc; b=dr8y1lVW/S0zB6YKaiNvrdz6+KgLpOPJlr046qk5yB+2AbdhYfUn0wYfVuLKPllVYvv69RDR9cgdEef3VTXNtJROe85f5sBmI337ZSAm0bWsQapLyuDWuI6tod4AE+5m1V+pn0PRBKekJpmCVJNWcsj7eWDVA3XfdE64a0vZQJE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935848; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=TMuql+NtLKlA8GuIs7V478yv/XgT4Lrb4R1PECeADQU=; b=K68xzReWC+wo5RyaugSwI+o39CuPjqAiHmZzjKr2XTqPpoDB4bPfpnQ97B0MqTSp48bu2nVFIR63pXPGKkzt6AhD+Xa6jKyg+G1E4bbbuqoB4drDDBAslkhpqjeL9yG3hAP2M8dp5JW/zWpy2QO7jzoMboe/WY8nMm7I3bbVho0= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935848877114.2830484742093; Fri, 31 Oct 2025 11:37:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwj-0004cZ-UL; Fri, 31 Oct 2025 14:33:58 -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 1vEtwd-0004Se-68 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:51 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwD-0006Ce-Vi for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:49 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3ee130237a8so1621122f8f.0 for ; Fri, 31 Oct 2025 11:33:25 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935603; x=1762540403; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=TMuql+NtLKlA8GuIs7V478yv/XgT4Lrb4R1PECeADQU=; b=pf+sbmjVVKO8hXLj91N5I/qazttK2Su97AazTQluDqP9W7khVh72UIMjYXtvY1OFgD tXC2iOdwW7Gqg7H0b0cnVAvro+UXs4Eym880PtODeLEY46nJ2Rdo0J9yxYLHoKyDgj3i sVfy7X2ICmrQA3b9/7L5NNiahYLvB+Bu6VOSugqXRJ7F/16fY9LGOge2EgqfkgEKDXAI FE+0jBlCA/aCMC9rK18r43Y+hUN2X5ZidXwI1mT5QcFpz7PAD4xbXV4i2x4Ab7RypqYF 0RzgWYzagDwATKbWkIxNcs1HsTriTDGa5cL+jzwilTlMfUQjvO7iTS7L9ZT3ObY01YNS q7sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935603; x=1762540403; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TMuql+NtLKlA8GuIs7V478yv/XgT4Lrb4R1PECeADQU=; b=l+aFbP4b2ZXPDmO0EPkc+VaMk4cvfXIjSnHoPBTOtpjNstZ5R4Qi0la0ooTtzpYEsn Dp0bDatU6voa0pUk0IyaBpYbAuRwvVZVevVxqbbboXbbhjWKIWiPoGPyB+gsqa8H3sTF rjVXGGO2evH0nBGZ5Kdhxo0WmnPR66uzUTWCEXIoy/JrZhld42Qw+rpPWegWe0StAtUt 7JLQmBywMXolarPqx38+P+lb/5VJoEbAu7AxLnZ3TRkdK6rGooCmt2g/dXvzpoY+LkD1 UOIkZu08KtmO+i/y3vcSxYf+Eo7vOl5dBQ56/b6/wfUrK6STUhuSL7D6ltebJ18JRXTV 8OLg== X-Gm-Message-State: AOJu0YxqnYM38GDLHHtsfOsk1CdxrLj1LOJiWSONanr9S3R9HTMgv5pY KIhAezYAXLhaKcMCo8AFAypCoaDjfO0+Yd5W065EbbCK5LSeWo5kq+/Enq1j3oR8AiJNAJhP4nA Os5US X-Gm-Gg: ASbGncv3OrjA7bvYtDT6th8hTQD/llu/MnuVP7MpZbiZkzjpsBbQnRwrX+9TfsHNN65 mEDyrBZJSE7C6erpoM8xXag7HTjaELLFsPzlC3BXSo4SXwnEUZsIratEu5L6oSHtrlpYguIlvzG vExzFCTZdNFvXVuV1FRosNcUSY/zRu+2qs2fyVL2gbm0iy7Xdm+HTulNtoUhr0mH7oB68fC4Slc aOBUlHW/3Vy2pOvrHkQeWTBQoK7oJFx+B6HK4hp5IBBn4YOD3it8U1iBvhlf4KSacALUyxnMRGh hGgGRkHVmERUsqlc933uoCJWnvcOZy11fyhwII+4LmY1JEE23tq7CH9xgI7COQz4tamUZekpZV0 6rNHt+LtRlD2IQAPCnGv8ifjQzvHAEPpJhnktffAPjFvocR2zsVOKrIhuVudGAgJFqJUIDglWKv 3yJR2cD4rxmVN2vBqI X-Google-Smtp-Source: AGHT+IF1uhTJ21yDjLgrLB3wbPKJ3VpMfH/t055T0VkGRBX5sh4wBjzk4KMPtN5T/T43YWcEJdiuGw== X-Received: by 2002:a05:6000:26ce:b0:426:d5ac:8660 with SMTP id ffacd0b85a97d-429bd6e3dbamr4377473f8f.58.1761935603174; Fri, 31 Oct 2025 11:33:23 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/38] target/arm/hvf: Check hv_vcpus_exit() returned value Date: Fri, 31 Oct 2025 18:32:43 +0000 Message-ID: <20251031183310.3778349-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.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, T_SPF_TEMPERROR=0.01 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935851318154100 From: Philippe Mathieu-Daud=C3=A9 hv_vcpus_exit() returns a hv_return_t enum type (defined in ). Assert we succeeded, as we are not ready to handle any error path. Suggested-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mads Ynddal Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 91bbd3a6aae..4c98faebbed 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -963,9 +963,11 @@ int hvf_arch_init_vcpu(CPUState *cpu) =20 void hvf_kick_vcpu_thread(CPUState *cpu) { + hv_return_t ret; trace_hvf_kick_vcpu_thread(cpu->cpu_index, cpu->stop); cpus_kick_thread(cpu); - hv_vcpus_exit(&cpu->accel->fd, 1); + ret =3D hv_vcpus_exit(&cpu->accel->fd, 1); + assert_hvf_ok(ret); } =20 static void hvf_raise_exception(CPUState *cpu, uint32_t excp, --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935782; cv=none; d=zohomail.com; s=zohoarc; b=Kvxn649Hv/bj10+LSJVAcNiN/LuYNIHVgTE+QnFo9DFYxuFEFwsvuWHtfjcD5jNzy/mQlVK3JbBxdDAnrfxA44qaHj9s/7vmWqObZTirq+fYpu2hbl3cZ4ZIsegj9zL0jXOOebioo5gzhUeUeldPLpOizF9Zrx7gjQ7x89sb3GY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935782; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=hYWusgSLwsq3JoCnz8OuuHdxyiM6ED8v8+TExKETtAY=; b=MsmzYOdlJlQNgi9TdHIC+v2wvHLzdTd2iKkHakb3fgX08Xfl5y0DX1OzsmOHStu3BWWUcceXDLFxVZdwlpoF071YWn/931ZCuGORoo9UG0/P9FRaX5wBtA2jJWuvnovQzpIFwdU4laT+dhP3mg94i4UQ6HWVJYI29QZCLthyEbM= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935782641652.1101666197618; Fri, 31 Oct 2025 11:36:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwj-0004f7-Sq; Fri, 31 Oct 2025 14:33:58 -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 1vEtwf-0004XW-EM for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:54 -0400 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 1vEtwM-0006Cm-8Z for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:53 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-471b80b994bso32170675e9.3 for ; Fri, 31 Oct 2025 11:33:26 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935604; x=1762540404; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hYWusgSLwsq3JoCnz8OuuHdxyiM6ED8v8+TExKETtAY=; b=maYsWRvGMnjWfxy1iXqwT3IqaqpMOuuxGhLTz2uyMVVZzJudm22Jcd5AfqRhr8KABu QLNpK46DSKxPHQ2dnU+o5RsJexKuCZwWS6sAa2kPSWPqT37mInbF0u8+R1p3DQe8JY35 630CdrWi+os00tfN/7jDvuTsw9D1ywoku5OZj6mqed+AZ+kB2vFaHnZuW6Icp8lstUdJ WMEb0vrlsngKYZQpJoo22r7jYmITOGd4YalmuRSuBRmCZcgZBARBahpq3KGxibpgOg9K lMnv8pjKKmK9z/bgdgZ4yOTIJWqtslAY8oxsKmaOGJeb1sgp5ynK+fZV4NYKLT0UHt5q C+dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935604; x=1762540404; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hYWusgSLwsq3JoCnz8OuuHdxyiM6ED8v8+TExKETtAY=; b=uIQgBrnl5w/ZDaNyV5a/IQmWOtXCnydaWwBGdj8WTDKh9TK+hQjrBaAVE96SGWlMOa IBNfExBqZuF+XKz9Vs24dELuwb8hxMs1L0xZUgbOF4fWOuXxB9NhZTqZqdYyZcqL9a5m KSdALqIeAprwuRIbhks50RczhdFDLGpefCRtlg2I8Qxhitdl0WBDzszyHlvu+TuNSio8 j4GbU3LIvpAS2oTVyeiRSZqUt6oh6mJN+/vuYwmGZ+Iafg3mZSHJ8Stw4Ckf6kFDqK/7 OU78WJPQ5K+RAqYtOcfvEC7yktXtuydPBQXOIBtQ8BHk0l9DoSe0C+IjhCLVycNkS/Ej wUYw== X-Gm-Message-State: AOJu0Yx6kxx7Bqi3AEs0RL2oAXJ84gOBVY5xR3vprD61czajDps3Pk0k DkTcWsEkXfN/YJS+QaD0Ph+Qfor8X7l4cGCOREvm3ttud21GJ6eru87NC3mkvK9Yae3iD0KqBdU SBLV6 X-Gm-Gg: ASbGncsu4prkF6rsay0b2qKtRzzK8/jW4eG60eYsfUTHYdoefrmSgRBcJkBeKBLe5ZB FRaoHiuHCXIjp+3RSG8tGErNN9s43MN0df07Kbv3xHxHe1LWtZdXjiXLjP4nNjmRA2JqflBVPJe lxwuUaPpn5N2hWvbfe/i4YoQY/S0LfjWb1ZBCid1Bz1ijOyZ5/JC6OVfulamlSSbYPdWypm/ZS5 FdZeet3dzSxBJg1/AZOJJT7wAGEX6jKWmW/0IXEeTPavAXPBu0bbbFiIPXWsj0V7IHQrGSfxBT/ WiLdWkGcUxkg39+RYGAtn2XqEPe315UmCJwfECSfcxPuLlIOC2uer5D9//XSTba+bd1Xq5eEJTh vORcOf00LoTW9gM/0Thf01AFrX2j8ByQSMqgxql8f4DIT+E1jR6qTQQ878uLG9mIUj08W63dLi+ 8/KJYMeQ== X-Google-Smtp-Source: AGHT+IEWTATtu7YDs7WOHHtInrfo+7QmDGqX50hre4FpxulE6XvEyMQF5cPzl4vS+TdQPVQdlkfVAA== X-Received: by 2002:a05:600d:8310:b0:477:326c:b340 with SMTP id 5b1f17b1804b1-477326cb6demr20127375e9.10.1761935604137; Fri, 31 Oct 2025 11:33:24 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 12/38] target/arm/hvf: Check hv_vcpu_set_vtimer_mask() returned value Date: Fri, 31 Oct 2025 18:32:44 +0000 Message-ID: <20251031183310.3778349-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: 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, T_SPF_TEMPERROR=0.01 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935788862158500 From: Philippe Mathieu-Daud=C3=A9 hv_vcpu_set_vtimer_mask() returns a hv_return_t enum type (defined in ). Assert we succeeded, as we are not ready to handle any error path. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 4c98faebbed..bbe0b24b821 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1782,7 +1782,8 @@ static void hvf_sync_vtimer(CPUState *cpu) =20 if (!irq_state) { /* Timer no longer asserting, we can unmask it */ - hv_vcpu_set_vtimer_mask(cpu->accel->fd, false); + r =3D hv_vcpu_set_vtimer_mask(cpu->accel->fd, false); + assert_hvf_ok(r); cpu->accel->vtimer_masked =3D false; } } --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936036; cv=none; d=zohomail.com; s=zohoarc; b=kabpc4AY/I7nzIyJ7VTgN/q/82eVcn9m+jPGpTxcl3V8w5D4zg7e9tQBaYuEpKwioowzOPyZpSh6PHaq2DvjuH5p4Bbl+M97N99ai+VUmdOMY3PsnSVew9U+Be4sZpDO1AjCYieG3IJlGox23o0VTMH/S6OsbSJJPtfNmbpvZtg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936036; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=PHTqkOaXOVQe6AabY3bz99btZKhsmQw/SbC2lr7Fuog=; b=mGf1dQ/QhocwE9OkLaneziFPgANCzogXzqJKkO6TW4W56IfjZVjEWlhCHUUyGm2t3I+VIT0qx7bLoUBK/KIigtgFBCjvtj/67SaNvUqJj6Rz7Irt2Oa+3BdllvZp3qaQNwfPHtGVM51RK0fUW2gwq/SJ+AcSnl2tM29hW4TonIo= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761936036847394.1561764601597; Fri, 31 Oct 2025 11:40:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwq-0004lj-1A; Fri, 31 Oct 2025 14:34:05 -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 1vEtwY-0004Ok-F8 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:47 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwG-0006D3-Kl for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:45 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3ecdf2b1751so1699120f8f.0 for ; Fri, 31 Oct 2025 11:33:27 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935606; x=1762540406; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PHTqkOaXOVQe6AabY3bz99btZKhsmQw/SbC2lr7Fuog=; b=BQo1ONWGwYJFSclhsi6SL0kSG07H7kbx7VderQNDO5wcB2jselZz+GnWZOgfmSys7/ y/59q0gvsrl8KzIzQHicAmjXA/SYuR8xzCMA9HbYlpS5uQcWNSBLXYB9+7dmXjyd/Gyp CFhVrRu7vzNV522vke/PiryApqAVDdhACZswlKEhl3OGQuthlw5rALuX6BPnC0l/D9kt Oudnxdc8G39q3I9mi5hVzsT2Hq6WJtEsDFv8vX5FayXLZsP/dR2SR07yin9coXJR7Flb mQiahmi3dn0WR933p0aBr+P8XU4tzdIboy42b/QowBxWdjSrl4HyWvxt4zrNcC1V0asd tnCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935606; x=1762540406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PHTqkOaXOVQe6AabY3bz99btZKhsmQw/SbC2lr7Fuog=; b=YFLukju7m6UPb2WY6XdOWMWdtnD0v7Hr0+22PUkYEAYbwbIEoZpX0f8NLkBfKWUbIR aEU6iGmWjJhIfGJ99XK+8Q/oVGNx2KfpN+8I1owNJUu7sY6oPRWn0TnM3g4+PkxSfSnL MHAifpK5qLP/J5tTvdP3ia4G6CZDSegVf18z1ulty0D5XYc9XcpLh7bvJwmsdED2Q2fy ehRQ3KXVZVkE1dc/rSmPSexallPZSdOX2ihQ2QVJGCuB0+1KcugOTPyKk4ZtYrP2aS6C 4OMCipEnQ3NWP+/U4jqIZPAsyEkG24Q6lPJqXWKrNWNfuO3UqbvTfD91MVNgVtbhrlh+ ebrA== X-Gm-Message-State: AOJu0YyHUFi/WZGKODa+FDHI4nKLq9vC3HlDRPHiqUlKNF77jHycDZH2 KWxN10ROFnj4qYVw7DjjVv/DZqqHUSKEuEOKovnH2g699N473l0nFnBly6nzRIvnvc23zqmeHfQ Uqhe/ X-Gm-Gg: ASbGnctemsci7FPK7PTZf/mYzZproefu7IR6zi/s4BGC4gf+hzzwm+OPPhPWchgndIw /hRPFAqUDeFK2g1r249xzknh1IGFtDjFAP+crCz/3rMNPkqqOIhUmvzoW1Zwsyc+zcUorwh82F9 3QW5pxQD8ZWEQVuwQXUyIZEKMIg3j3h3P/sgYdNNrNETV1IjayRxc3ycAHsU5pT16aJNvBgl8bE 2BXop2oWY5p4qVeCmV7sf+XXhP3ZAKLD6kbPuEWbZ9fjmBtkPirBLs5nnWFYe1Nc/9hbnDUjWKs azNEngzL5FW+PriJEgtNx02Br4ymUQR4B3AUJH3T4ZeG7LFkV85FObZNJfXxi5W+6z9fi0rwuH5 Eosb6uynX81Vk3SgzQ0JJy61tRQjqIUaunS+GGjIZpjwez11SfMNo5Vot14HoTqYCwoF6wTfL/3 wr67nIwQVYqXQo1ylP X-Google-Smtp-Source: AGHT+IGajp8+eNzshW6v05xrpc22js6hRmEfJHV/7uC5u1i+1NqdCwlol0NCBiu09RHbzJ8RyNxASw== X-Received: by 2002:a05:6000:1acb:b0:425:75c6:7125 with SMTP id ffacd0b85a97d-429bd680bb9mr4166962f8f.16.1761935605709; Fri, 31 Oct 2025 11:33:25 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 13/38] accel/hvf: Rename hvf_vcpu_exec() -> hvf_arch_vcpu_exec() Date: Fri, 31 Oct 2025 18:32:45 +0000 Message-ID: <20251031183310.3778349-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936039669158500 From: Philippe Mathieu-Daud=C3=A9 hvf_vcpu_exec() is implemented per target, rename it as hvf_arch_vcpu_exec(), following the per target pattern. Since it calls hv_vcpu_run(), mention it must be called on the vCPU. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- include/system/hvf_int.h | 4 +++- accel/hvf/hvf-accel-ops.c | 2 +- target/arm/hvf/hvf.c | 2 +- target/i386/hvf/hvf.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index a3b06a3e75b..32b32e1d024 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -73,12 +73,14 @@ int hvf_arch_init(void); hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range); int hvf_arch_init_vcpu(CPUState *cpu); void hvf_arch_vcpu_destroy(CPUState *cpu); -int hvf_vcpu_exec(CPUState *); hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t); int hvf_put_registers(CPUState *); int hvf_get_registers(CPUState *); void hvf_kick_vcpu_thread(CPUState *cpu); =20 +/* Must be called by the owning thread */ +int hvf_arch_vcpu_exec(CPUState *); + struct hvf_sw_breakpoint { vaddr pc; vaddr saved_insn; diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 8b794c2d418..005e2bd891a 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -194,7 +194,7 @@ static void *hvf_cpu_thread_fn(void *arg) do { qemu_process_cpu_events(cpu); if (cpu_can_run(cpu)) { - r =3D hvf_vcpu_exec(cpu); + r =3D hvf_arch_vcpu_exec(cpu); if (r =3D=3D EXCP_DEBUG) { cpu_handle_guest_debug(cpu); } diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index bbe0b24b821..9111c1d717b 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1788,7 +1788,7 @@ static void hvf_sync_vtimer(CPUState *cpu) } } =20 -int hvf_vcpu_exec(CPUState *cpu) +int hvf_arch_vcpu_exec(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); CPUARMState *env =3D &arm_cpu->env; diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 33f723a76a7..b2bf59cb483 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -721,7 +721,7 @@ void hvf_simulate_wrmsr(CPUState *cs) printf("write msr %llx\n", RCX(cs));*/ } =20 -int hvf_vcpu_exec(CPUState *cpu) +int hvf_arch_vcpu_exec(CPUState *cpu) { X86CPU *x86_cpu =3D X86_CPU(cpu); CPUX86State *env =3D &x86_cpu->env; --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935967; cv=none; d=zohomail.com; s=zohoarc; b=YiUSYfmNN3b/KSB4KyDIB+HI8ik7l+fagYm3strd9xPUSubHqwmr/SKU5at00OBVXCtVYUNimCxrSHlHhnmWl54iPbeXKbs5JyVL359DAgTYW5vk+Fs0zTws3tMZ7i8N8IH535qfY9WE/RDReaEijnIX0C8NA7hVlKwgppSNxhA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935967; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=EtLB+ZJuZimYKJnmKMi+iGzTZfn8He8nFmy5E1ucho8=; b=hpZDg8emnJQ9EC+UpWJfKyt40R/gi+wWjkKPB6hkNAVJahdQudzUkp8NcvIYp6wVTH+XEAHTKZ3bJKkrrLUCIvXpwgMY2V20XjuXed4/Cukd2cPj2LUMtjd/W7GRueq5rBAq3INUACYO5M9OWXEOmUJdiNtEbLYFt4bkZRbEweU= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935967137945.2210706792521; Fri, 31 Oct 2025 11:39:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwh-0004Y5-U2; Fri, 31 Oct 2025 14:33:55 -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 1vEtwZ-0004SA-MM for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:47 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwJ-0006DA-Hh for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:47 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-474975af41dso19434965e9.2 for ; Fri, 31 Oct 2025 11:33:28 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935606; x=1762540406; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=EtLB+ZJuZimYKJnmKMi+iGzTZfn8He8nFmy5E1ucho8=; b=Pw0X+4pLNbiEOEvD8CyjuIJArAf7dRxSA3Pk2P4i7SN+IRn98O/0ZzdezELDT8YzFn N1JLFA7ZXraSG+aXW/PjY2fph0SfXY5E6Y4ncSCYGnBYigvI3Ki9JeMc8bz+GqJlpEDZ WMXZWOys3KSZXxjp28jhZKPQPyY71Lp8a49uazGascc3bJgij2AB/laVykk0rYoLtYS8 CHCIqZZLBrRhSRGV903Odk8tLG0/teEmlDYEPv6gy3QKhRFqFo5AzIsAfytpO+C3xE8v xbNYG0co0Sg4OJ1VtG9AJaA10A7v6ekDU6jLsmHMN8JHR2PP4L2k5vOPDMtElHnfqqq7 a2bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935606; x=1762540406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EtLB+ZJuZimYKJnmKMi+iGzTZfn8He8nFmy5E1ucho8=; b=DiV/3jNYvwRMiaJXnto/JDxK2JPLtn7Z2VSaYoK69QTf5IWVQjBQmpDqbHPa9vxyRz gK4XqTN1SuzCTWx5gBeS3RgY95pv8+Yv+bTLW7bQXkyjkb0MKO6rz6FCKyf3oD6cArAA JhTiID+08rQNHxHKvNz2I2FW8AuRu18LmjcrqdwUG//g0D2tPlTIIdKQZleZ3agNOT8k exz4iEIkLymcWAlSTjkftOoQAVP0Svl+5sd9FS4wkU8JqN47hsXL3Mfr+hI9uRRnIka4 0ED3A6jNyBrXJLvj7qcuof1PDWTsfKr4jR6doLhYTX9vgeL5JS7AjkNGDtKT5ZuW5mzd pmDQ== X-Gm-Message-State: AOJu0YwAh/fwG2kjSp4kStIdPjtinnGKE5A8v60g+aTy1sF6qWpSfWNf 5hFBMWJe1cNBQI+8dYHvuSFwsSikXPiWDp8fgiCeMWAhDpnnTMYXtpcXoxj9Wflg193IFtBv2d1 jlIFL X-Gm-Gg: ASbGncvEo7R1e/hES8xnmwVLRhuRQRK9gswH1MZx6Nj9Bwn0ezvnQxeJleOR8OPgPsM MuD+siF3pzq2UPkzOCh9J6QGqsWZVCPxHJUteGQsCuH3xo4FYakhlrXBy+Uv9YW/wIT1E6MgHsO kzQMUUwrzW1TALw8etvFTSvUPqjsgv6lhDiCzObEuCF4OEcy7ih49iYblFOULeNmCcEMe5sgz7t WVqkwHOMYTAYcM1V0tAM9pkz/SsY8bPqKiLa5vDEA+K39e2PoUpp9VITWuF5HvtedzS/flO9IYW fjIH67fTei1ncL9GRRXt0EOdqegVJ/MI0WVCsIGn/zNWAeMzgXiSFhwQfVPVWjj+k9EW7RL7Pom gIRKsVcciAqnhA1chjxmFVfUoWQmT2Tj6zscJMHYsVV9J5+/7g9hFIBrhmkUDwDsNTRtzzzQTIf 7jH0YWBA== X-Google-Smtp-Source: AGHT+IEdBE8juyq4UD3OmdTXf+rfOn+Qn9kAidMhTq+owbaa+nOIikXsLTvgiajs5WHDj7rzD/G9SQ== X-Received: by 2002:a05:600c:699a:b0:477:1326:7b4b with SMTP id 5b1f17b1804b1-47730872322mr48377365e9.19.1761935606467; Fri, 31 Oct 2025 11:33:26 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/38] accel/hvf: Rename hvf_put|get_registers -> hvf_arch_put|get_registers Date: Fri, 31 Oct 2025 18:32:46 +0000 Message-ID: <20251031183310.3778349-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935968708154100 From: Philippe Mathieu-Daud=C3=A9 hvf_put_registers() and hvf_get_registers() are implemented per target, rename them using the 'hvf_arch_' prefix following the per target pattern. Since they call hv_vcpu_set_reg() / hv_vcpu_get_reg(), mention they must be called on the vCPU. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- include/system/hvf_int.h | 6 ++++-- accel/hvf/hvf-accel-ops.c | 2 +- target/arm/hvf/hvf.c | 8 +++++--- target/i386/hvf/hvf.c | 2 +- target/i386/hvf/x86hvf.c | 4 ++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 32b32e1d024..8fce627b08c 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -74,12 +74,14 @@ hv_return_t hvf_arch_vm_create(MachineState *ms, uint32= _t pa_range); int hvf_arch_init_vcpu(CPUState *cpu); void hvf_arch_vcpu_destroy(CPUState *cpu); hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t); -int hvf_put_registers(CPUState *); -int hvf_get_registers(CPUState *); void hvf_kick_vcpu_thread(CPUState *cpu); =20 /* Must be called by the owning thread */ int hvf_arch_vcpu_exec(CPUState *); +/* Must be called by the owning thread */ +int hvf_arch_put_registers(CPUState *); +/* Must be called by the owning thread */ +int hvf_arch_get_registers(CPUState *); =20 struct hvf_sw_breakpoint { vaddr pc; diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 005e2bd891a..3e5feecd8a7 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -81,7 +81,7 @@ hvf_slot *hvf_find_overlap_slot(uint64_t start, uint64_t = size) static void do_hvf_cpu_synchronize_state(CPUState *cpu, run_on_cpu_data ar= g) { if (!cpu->vcpu_dirty) { - hvf_get_registers(cpu); + hvf_arch_get_registers(cpu); cpu->vcpu_dirty =3D true; } } diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 9111c1d717b..f0a0e5d1a75 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -424,7 +424,7 @@ static const hv_sys_reg_t hvf_sreg_list[] =3D { =20 #undef DEF_SYSREG =20 -int hvf_get_registers(CPUState *cpu) +int hvf_arch_get_registers(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); CPUARMState *env =3D &arm_cpu->env; @@ -564,7 +564,7 @@ int hvf_get_registers(CPUState *cpu) return 0; } =20 -int hvf_put_registers(CPUState *cpu) +int hvf_arch_put_registers(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); CPUARMState *env =3D &arm_cpu->env; @@ -692,11 +692,12 @@ int hvf_put_registers(CPUState *cpu) static void flush_cpu_state(CPUState *cpu) { if (cpu->vcpu_dirty) { - hvf_put_registers(cpu); + hvf_arch_put_registers(cpu); cpu->vcpu_dirty =3D false; } } =20 +/* Must be called by the owning thread */ static void hvf_set_reg(CPUState *cpu, int rt, uint64_t val) { hv_return_t r; @@ -709,6 +710,7 @@ static void hvf_set_reg(CPUState *cpu, int rt, uint64_t= val) } } =20 +/* Must be called by the owning thread */ static uint64_t hvf_get_reg(CPUState *cpu, int rt) { uint64_t val =3D 0; diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index b2bf59cb483..76a58cb0350 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -734,7 +734,7 @@ int hvf_arch_vcpu_exec(CPUState *cpu) =20 do { if (cpu->vcpu_dirty) { - hvf_put_registers(cpu); + hvf_arch_put_registers(cpu); cpu->vcpu_dirty =3D false; } =20 diff --git a/target/i386/hvf/x86hvf.c b/target/i386/hvf/x86hvf.c index 3838c9f5a6f..bb480311b0f 100644 --- a/target/i386/hvf/x86hvf.c +++ b/target/i386/hvf/x86hvf.c @@ -236,7 +236,7 @@ void hvf_get_msrs(CPUState *cs) env->tsc =3D rdtscp() + rvmcs(cs->accel->fd, VMCS_TSC_OFFSET); } =20 -int hvf_put_registers(CPUState *cs) +int hvf_arch_put_registers(CPUState *cs) { X86CPU *x86cpu =3D X86_CPU(cs); CPUX86State *env =3D &x86cpu->env; @@ -280,7 +280,7 @@ int hvf_put_registers(CPUState *cs) return 0; } =20 -int hvf_get_registers(CPUState *cs) +int hvf_arch_get_registers(CPUState *cs) { X86CPU *x86cpu =3D X86_CPU(cs); CPUX86State *env =3D &x86cpu->env; --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935798; cv=none; d=zohomail.com; s=zohoarc; b=O0UK5KdhYy64D9Q2YBCNKaYiloUDzjQRP9s1bVVgPSmlVKCaFoR3OtQy3eCE6jNryQ0yAn0hTbNZVFAgn5/gHH1GC07xDQAjD2yaZUkey3MiHAdvMWxgP2UUVjgVUxTW9JlxBwi9eAggVT3mvjOQ18MEeW8NrJpqRNR3KX/HFHk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935798; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=kqI4MYI8GnUxg5j5Y7KOURLYQbvHppTj0TQY6qGs/XQ=; b=apFk8lDjn/GPMfyWcKjdHAe1tDTn2iKJ7dCIANV1ln8zNsAnV70K17T6dQTsQigIjqOYQY+29ScbW0+5dzED7h4X7UHIwFz4KfLSOpmti0rPC//tK73tJervvrSNMcJVT+a95ll0MmPIQK6s4hJL26R48Dq9efmHe356hZzadQw= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935798067632.0583119229766; Fri, 31 Oct 2025 11:36:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwk-0004fO-8z; Fri, 31 Oct 2025 14:33:58 -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 1vEtwe-0004Wh-0I for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:53 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwK-0006DD-LV for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:51 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-429b7ba208eso1496087f8f.1 for ; Fri, 31 Oct 2025 11:33:29 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935607; x=1762540407; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kqI4MYI8GnUxg5j5Y7KOURLYQbvHppTj0TQY6qGs/XQ=; b=IKS7NzF8wkqIsC3dT7tdEgVVc+TaxhZ2bSFOK2ljZz+pZbAaPMvWcGslIPNMCFF5WQ Opf5xeZK+NZhcFyNGwUH83ql+Z0xhCvsYG6oaNPUQczsotdrvGVO/z+a9zK5xqxks8Xg +4R5OKhiedBbEgq91IrNK1zEIPPNAT6rXghlFHr/hhThuuudJ69YgqRFiyMNqlvrOAgZ OnZZfY3tp1mMrx7m+lFqCaUgBFR3xf8vLJx1qEeaoLar3cpPvF4X1LuTwUGAXat4Mt3/ VTPVQBpVmOIGENhF0K5XCdS7sD1RKFAL981whgMFzhby2fUPmpjxVzyPMcWc7wQ4Nxdk Nnbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935607; x=1762540407; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kqI4MYI8GnUxg5j5Y7KOURLYQbvHppTj0TQY6qGs/XQ=; b=tdp1EeLnEhQo4CTpvrKSibOh8kT7OvvVXD476C6QpoEF90ktdlkkqXPdNHazYPsWG3 PNpsV2Lrgd5LCd6TATomqrcQyrX9qltyhrstxPOrU4sKDWWrfo8dGFZnn5LjaStU64x2 NSY3SpX5kma3Z48Y1am9RCUFrNN87J2VH2cSE3JIRxmH7/B2BCQuCQxqN0H9J/7ddMNU L9P+iwolbhS1A55EqzWQJ9UPL6MvPACvLV8GiXD7a4P2YHOG58lMjE0Eqep4bbCBepw/ dt7ZGyfW+EuKVQ7EQoI0HRHjWVB9LpCijnvvyUx5nF1Y0zAwSSgACJkFujuyDReVurVg 7Huw== X-Gm-Message-State: AOJu0Yw3B4Iq6KtFP1iBu/46ei6SndonHg7gkTgzg3koN1yA7+ei4Ezk 5Cf+o5FPi2JqHWEmVeaH/UvqonTTDi3i7xkbw0jjFDMWJPhqXFRTzZJz/4IcvnjCVnRcA4pflex f4q06 X-Gm-Gg: ASbGncudB6LRjBgtJrXhCfYBvJebPGNb3wD5mPPdVAcKBuE+89vn/8FeNEC39BF3ZYg c0UsKTjPHb+KItTTBeNoCPN4S3pr7E4wiJ3OcBVBe7vimBRIFCEjCrQp7zKNXdyTlVCZ5QFxLjf fj25AoqQvHvhO2JZlR2GhD+bQjwHd6/ISU4wkQkUFpdsikMv9IpB7rBY57nzb/QnCoDp6HI2/c2 59wl3ZoX04kon1xqkLD8FLSnejo66u2E8wt1zcMDtFB+v1LrBuszWBcC5caRc0UL09KBkaVniDq ls7IdxAr6Pg/+4OEyBQpgdTjK7JyBSss5AerqWUAg0piDTMEqCcdRrqiu8Tlp33hCrUJh3Y8FYI 4memYwQoknGdx2xaWs1LciFS7kglcoirFja5Ze3LDMoALJZ4P5jzAPKGChFHYnUS9cga4sD5Tp4 1mzWzHIau7E793kSysD5TGuiEmWpM= X-Google-Smtp-Source: AGHT+IETAPeFSPquQEBM6kuw27NSHDl2p4e8UwC9WY+PzOCdj2URk+OzMM4H4FKadVNg9fUjVCnDMg== X-Received: by 2002:a5d:5888:0:b0:3e9:3b91:e846 with SMTP id ffacd0b85a97d-429bd676a88mr4309239f8f.10.1761935607275; Fri, 31 Oct 2025 11:33:27 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 15/38] target/arm/hvf: Mention flush_cpu_state() must run on vCPU thread Date: Fri, 31 Oct 2025 18:32:47 +0000 Message-ID: <20251031183310.3778349-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 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 @linaro.org) X-ZM-MESSAGEID: 1761935800986158500 From: Philippe Mathieu-Daud=C3=A9 Since flush_cpu_state() calls hvf_arch_put_registers(), which must run on a vCPU, it also must. Mention it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index f0a0e5d1a75..fdf8df09d4b 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -689,6 +689,7 @@ int hvf_arch_put_registers(CPUState *cpu) return 0; } =20 +/* Must be called by the owning thread */ static void flush_cpu_state(CPUState *cpu) { if (cpu->vcpu_dirty) { --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935903; cv=none; d=zohomail.com; s=zohoarc; b=TMPTAUIIILLJOfgQxJ2waW24XIaPoVhmFsOZBnCImjnTc5MpNTcTAYz7xzyJXn49nxxJodOQ0TTYKVnFQks6pw1V3Qv+4wWVRuolJc47st5Jl4+PI1p5cAoEYUOMd/ENgndAwrF6eL69EuJxew3J7MJ8H5/3haQcaFjsoq86gqo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935903; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=PZmkhsZKvN6EJpvyQwrzTxRS8P0qQq1BnzId2LTKpiQ=; b=kJsL5oHBUpGLhyG2TtPwor/YFKEw6sVHXkcLlnc2ntWsArKYSuwtInr788Wcl31USn42QpDuIOojB29X+tEHB2FEkRfRH2vDQn0gCFmhCMZUSeBvyq1c7W/B7LS08b1bV2eKBQc1kcUBx0uvnUhSqzUJfD3WAIW8ipj5G8VmIts= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935903679268.89251581698875; Fri, 31 Oct 2025 11:38:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwh-0004XB-JV; Fri, 31 Oct 2025 14:33:55 -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 1vEtwZ-0004SF-Ve for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:50 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwL-0006DZ-LD for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:47 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4711810948aso19099565e9.2 for ; Fri, 31 Oct 2025 11:33:30 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935608; x=1762540408; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PZmkhsZKvN6EJpvyQwrzTxRS8P0qQq1BnzId2LTKpiQ=; b=qBydAEdxLeL/i6kXXgL1q/MEAyVS5WE4asmuaDMwPHoz8qNqKjmFrtTPuonFvGknEq 31H/aX9o9/uX3f3eVan77vNEAXEK/GA5AEP6nzdtlAPX76PdlGVYCkek8SthvawZyazq 2GCCEoAR4G/g7xh0qfn5ejdTJVQk5jXTwOc9gMNahV398klCx9wBGc6g43j/ViQPnL4U 0cUZTXZCJqdMSV2t6Us6Q4+3ONFS8p0t/OlceO2BRoKddySbXAQakUXmhyuwPcwgVH9f 2jy5i10SDGXGt5Np/nFhVz7nuw5wDU7hedznzl4i7y4YqcSi/CASpDtsQ3xmoB0joI6v KOMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935608; x=1762540408; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PZmkhsZKvN6EJpvyQwrzTxRS8P0qQq1BnzId2LTKpiQ=; b=Of16l4cdswghrDXmHhM1iyc8wvS7dyRiMpfKTqtjzvLIdq45a7dQPiAncrhwlbJy3G r0NXDH5X+blhZTivdSbEVuwxvJP412G9NRXj7a+sQ3fvIgC3hnFBZer4+rUElQ1upGTM pdb9EDbmFSMvXJLUQwLTg0wwlDVCsQJphXZlgRCPgZZZ/70etzNXR4dIe7rPntRvLcm6 jhI/efUKz67YlR8odfD5XGKYwU2e6/brGhgxIJC4f1pFnI7d2OimIlf/UFWwNtBsPAKp DHFxMPB9mNLgZrtdOnyCWw7ppRc+cWh8+DxWjHczGeJyNpCjPLU0/Zdcs4yi7KUw7sON PP+g== X-Gm-Message-State: AOJu0YycIY2mLcnzuOzPJLO54HQ2cunjJhFVk7566+zIgg2Z3LCqtyXj lyqhMjdCT7MaquhOnsM/waK+SvAjHseAaDwyQFoiiHIB3SwXz6G9MHLJYB8C6afWtv8TPsuzFa5 HzyVk X-Gm-Gg: ASbGncv30ocIqxToWxNtkVoVRyXRI89T/cCmTHPSmadTp89SWHZJNdBvGApqEcpkeBn FgHAk+ieuwkzbfyRYOlwvjLPDcQeMLeFxPh7q25Vxwlkp1UXjpOgQYZ8JRgGmyrz9/T1G09K2Ni /kK8mtw/8pBfQhaqBzGe3/BgAD9D3NoMZ2883JR2H150GSc4bFsv2G/vkPhQK0astY7vs3bfhnF NsvQYteNb/Ba3sL6EODfMItcZ3608uflBO0UekTtQ3Gu3p1QReMSqlg+ZFkFI37FTl9BWqwW1B0 heApk8NwhLvtLi6rjzPFMem1UZi5hXYHZYf6FJCuA+Az9aVPSUYSg5EpXn8rPHRUIpUFcvOdxfi TZANL+l5ZrFYglvUyhej3S8UB8mUSLrgpkC8YVkBO1Y62HfN/AJADK9f9MEoaXY+xa7VUsxRIXb kKRsMMJg== X-Google-Smtp-Source: AGHT+IELf41mK8kyYCIbDwZQuZUmQQLjoUXDt24qNV3IYlU2UlyP2/Qo4Yy6MkrN/Zc4X1yqO3U8Xg== X-Received: by 2002:a5d:64c3:0:b0:428:436d:7d7e with SMTP id ffacd0b85a97d-429bd6f08a9mr3857114f8f.60.1761935608128; Fri, 31 Oct 2025 11:33:28 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/38] accel/hvf: Mention hvf_arch_init_vcpu() must run on vCPU thread Date: Fri, 31 Oct 2025 18:32:48 +0000 Message-ID: <20251031183310.3778349-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935908191158500 From: Philippe Mathieu-Daud=C3=A9 hvf_arch_init_vcpu(), along with hvf_put_guest_debug_registers() and hvf_put_gdbstub_debug_registers(), calls hv_vcpu_set_sys_reg(), which must run on a vCPU. Mention they also must. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- include/system/hvf_int.h | 3 ++- target/arm/hvf/hvf.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 8fce627b08c..0c335facc3b 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -71,11 +71,12 @@ void assert_hvf_ok_impl(hv_return_t ret, const char *fi= le, unsigned int line, const char *hvf_return_string(hv_return_t ret); int hvf_arch_init(void); hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range); -int hvf_arch_init_vcpu(CPUState *cpu); void hvf_arch_vcpu_destroy(CPUState *cpu); hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t); void hvf_kick_vcpu_thread(CPUState *cpu); =20 +/* Must be called by the owning thread */ +int hvf_arch_init_vcpu(CPUState *cpu); /* Must be called by the owning thread */ int hvf_arch_vcpu_exec(CPUState *); /* Must be called by the owning thread */ diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index fdf8df09d4b..8095cb0805a 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2119,6 +2119,7 @@ void hvf_arch_remove_all_hw_breakpoints(void) * Update the vCPU with the gdbstub's view of debug registers. This view * consists of all hardware breakpoints and watchpoints inserted so far wh= ile * debugging the guest. + * Must be called by the owning thread. */ static void hvf_put_gdbstub_debug_registers(CPUState *cpu) { @@ -2157,6 +2158,7 @@ static void hvf_put_gdbstub_debug_registers(CPUState = *cpu) /* * Update the vCPU with the guest's view of debug registers. This view is = kept * in the environment at all times. + * Must be called by the owning thread. */ static void hvf_put_guest_debug_registers(CPUState *cpu) { --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935846; cv=none; d=zohomail.com; s=zohoarc; b=ZU4DbgN99wgIKCgueUgmYqIEyYMp9nURp2gglrMqRIf5XNwQGfBdADklm2cGyEqCtEbdExcezt10Y6NJ+BOF4F0nhOCGlJEikBWLW2moIuor7X/SioQMYhLMJSz3+cdpPP8lPvjNA4vf1HW0d0G4lUiysKd+mUNUlnR4lhSB2DE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935846; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=ky8qouZZIqPMdqQhVv4oLwP8VZNBD8cex2YUmgYsXNc=; b=EeCm7pJcmQiUtf4NsPrRmgEzFpGjskr5YjTbud9n5igndx8DPClG4zPucyuJOsEcXsYN19KLZdu4z84Rzn+6PEVG7jiLSE56hkeXpFP5W7bxjkPnyJ61Ry0UOuUIQlFHGm8S5xEQbCwkNdaTMEsrOurxjyspfJtSEwrKK62UGdo= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935846029127.62838101668399; Fri, 31 Oct 2025 11:37:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwm-0004iO-OH; Fri, 31 Oct 2025 14:34:01 -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 1vEtwb-0004Sc-PW for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:51 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwM-0006Dl-JK for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:48 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3f0ae439b56so1549515f8f.3 for ; Fri, 31 Oct 2025 11:33:32 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935610; x=1762540410; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ky8qouZZIqPMdqQhVv4oLwP8VZNBD8cex2YUmgYsXNc=; b=Vui9/Ayb8b33kv/lVIBkBEDoPAcheEFfl1/Ajtd0Q4QHzLuHetGfDPjr360GXMe8ab YPO4uxnMKWOyJ/DOvQLKW1i17ytnxW6YwI0A48ck9HJGxoI8hFRc9kNRgKwQTNqL6v99 rVUV6nYrBGCiPuTxAUpWZC9UxZmvU8ezDRKM4v2LxNXxQvxjlT3oZcs4E90hVy88uNAb eTMjqo4q59xhkLH9Ruf0VsF8zxespfqYiKlVnBQlLRu5r2pOBi4RvObVq26yZtDw0h/e qnIpGOBrTR/4ILGQBQBHspozoK55nh466rr0zN5R/oiovPxYHq6W/wmQdaT0Pk4WyktI LdOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935610; x=1762540410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ky8qouZZIqPMdqQhVv4oLwP8VZNBD8cex2YUmgYsXNc=; b=H+sTzCcNlf/aL03lQ1YzFNhHbHdlFVj3z1/dlD4y6L/u27OfzN7RZEJfS/JPkyj0lU hQDRhyUSvvsZ9UcgfG5R+nThgXmUloo1wMd/oPy+8tMNZLSXnKjic2vpF0fomHy9WmCm BbhwydmJH9c1YiWaMhb6Nns4JHb2p9WlwLvWx4TxC3vAsTk0XXLU/7pwxfPAMOf41uBf WcunTzMKLEYUiTFijxuSCXSZiMIFZTvA3H+DS1hd1h1atMmQZ1Dl1GLxTSL5sWFOCWfR lCwvAywlpEV3Sw6LkIyT1gWzBYYixcqy3Q+yxBJ59iofb4QRVwUptCG/BNn/kX3vW/pN UIFg== X-Gm-Message-State: AOJu0YwMPp9zbzLHzdBP5dCMSqi+WYy5O85vajWbyXEM5FJb3/wUUSdD jUyrGBgya/R4tROA57LHZOcLPSPuF1fBalQXYs7Nts1ZT8I1I6cFk5Guq7pacgnasW1FE/aaZBU HczBo X-Gm-Gg: ASbGncueztrCuHnFCAxPfX4n2sk2H32+yMt/dAKQbLSG/HDQHy3h2WYFHj+m/iEkDyO zfZFPXnLCIfSs2Ww0pYX8giNQ0OdzZyb7sKjV+yz1dVZs35h0fo276tiZgyRQKn9ceMRHG3J5ub cowr0rQ/M0zh0UQHID4IqFi1jiRjm9aKJunJ91e7Xa4r3Z4tpDQpUIqXD6l5uwjn5C8MpCCwudl /BIYcgL/nxmV0aUIpOKRlb3ay008Ru8P6IZFvt5pjCFnVjIXMglh5z3OBaJnElpd+H3nAxH2JDP 3l7nt6m9eORJkoI9CKPBxFTqn4jb+ZDnN3eH0H6E+G7MEec7QTdwoqZuuWXS6jEjSCpmMBLFs2f YXv5sKVzblJJbMmqpHFidnZggbg/Nqu+Ccd93g6+kdB4VHkJ/8CAQqGA4tjjqfZSuffbjt06kZY Fp3ifg6iKuNtSdPvPM X-Google-Smtp-Source: AGHT+IEpwqvX4rW7IefYq1RkmPnrK7VFyKu+54RKAtjdEgPqHLj0dQxKSACIwwdFx1bOhZKp6+6B4A== X-Received: by 2002:a05:6000:1a8a:b0:429:bc68:6cb6 with SMTP id ffacd0b85a97d-429bd6a7f2dmr4061321f8f.45.1761935609716; Fri, 31 Oct 2025 11:33:29 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/38] target/arm/hvf: Mention hvf_sync_vtimer() must run on vCPU thread Date: Fri, 31 Oct 2025 18:32:49 +0000 Message-ID: <20251031183310.3778349-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935847249154100 From: Philippe Mathieu-Daud=C3=A9 Since hvf_sync_vtimer() calls hv_vcpu_get_sys_reg(), which must run on a vCPU, it also must. Mention it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 8095cb0805a..bfccf5e9a2a 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1764,6 +1764,7 @@ static void hvf_wfi(CPUState *cpu) hvf_wait_for_ipi(cpu, &ts); } =20 +/* Must be called by the owning thread */ static void hvf_sync_vtimer(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935852; cv=none; d=zohomail.com; s=zohoarc; b=Ta0UQFnUxul4vv2azJKprbn9n/Qw0vt1mSy8dul3OSgl3MumUOAm4lmjKMI1glmDcrpZ5+fv/Y9oTxD+BJAhVql87YCOhueO0azCrbmmHdUOsfdHqlYUaFWvPzgV8uT/YmHglDhaVlBibWlsRYuiiIvo3Zfjn0x1DW5tTKNj6n8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935852; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=U9gKnb3/MsOXv7HSh7ovN2NpAyCHwloJjEdIUMYAtFs=; b=GuwZP1G0eC5iDUVZMy7BtxG9ZwmTH5qRoHVkjlffnOpLJZTFi/4cIZGFF92bxBZdINEo9z/HYOA5sySunAxP4/WwlUQQO0N5tSAOEGUCY0uje4Yax1rneQ6oUyRA0dhg3TaM+bD8BeV6EEsFG3Q9o+hGgNwXu+ZsSpdtD15p6J0= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935852918945.2189130514497; Fri, 31 Oct 2025 11:37:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwn-0004kF-9j; Fri, 31 Oct 2025 14:34:01 -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 1vEtwk-0004hV-JL for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:59 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwO-0006E2-42 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:57 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-429bcddad32so1072574f8f.3 for ; Fri, 31 Oct 2025 11:33:33 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935610; x=1762540410; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=U9gKnb3/MsOXv7HSh7ovN2NpAyCHwloJjEdIUMYAtFs=; b=IGp1EiZgQkxrrkp9L0VExu9njuSfPwc9Dqq4E67pZ+CP7dDMtfW07Qn2HZqv4CKyXP MzEqCUlxNKCrEkeS0+Qia7QnLM0XXB6UAwnsfb1t8dw6mOyJIrw/4YO1a+WhrSFtCHtg Ym+djANeib5alNIqvtIqNI5EsQk3+rFxaumntdF5ewKgvRo9jVJVDskt9O1TIGAiReGF y02g0RSu6XPru5qhxVdi/+e4/69Te84Nj0I07ty74bV1cBevcnu+s5Vbj54hnqToURds Olf8aMReX3Ty+Hc1MUdzlr783Loj2KALqcLXG91bKGFzLdMUv8yU7b5mn9W4H49xQkBU l63g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935610; x=1762540410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U9gKnb3/MsOXv7HSh7ovN2NpAyCHwloJjEdIUMYAtFs=; b=f1nYyC1YYGHkS9cDtU0G38vuOMMmtb83njcKr5+ZkZp62fn5JUV7mOkCbRSxEbxX5W 6Gjqe5VxOOKo2Y18b4fhckjngrIZg/H9LEUv+SrvEddh8o5EBweth2e45Xxu7Oq6TniU EnLwUKh7S9esvg+flEm8nHSD3fFnD2xUZ+3GVkrbY/8aKT8oudb4yzza28OLlq7rrlPh oRCp/RAy4Dmsy8eJ+qiCOGrrtJT81RcXcFt/N00EGfrfMYCveQkA3Spyp9gw+VECYA6v U7yebnFPZvTg3nvx0bwkZJnnPO2V1GOlaf4sGMAUsU6VXtuepulB2ZXXf1QZVq2ylgQO WHNg== X-Gm-Message-State: AOJu0YynpJQLgJ695uwIgvg0oAgEDIbLVaLtF4uuCP9P3wFVuukuw7XQ LMjdhUYoNAlOZbVxpqbE5CNE/ZIMlWYqD3JR8M0n7kY7InRVj5ttDtb0iwl9RSUOdoEIZdp2cmQ LXo/2 X-Gm-Gg: ASbGncswNrbeHvVuhwUbqlaM/xdzfheVk3szDbdn1iPykSjhTWBoiw1skma68yesDMS TBR/ApzadJEmu9DP9hcITe2epodWJfd+bjW9t4bTm/VEMixyIAzSjjMqXkbqGuUHgOh86ukfyT6 b/Cn6NP4ZTLXZTCtT9H+05jFg0z1bzDjbAtOdyI/2bTPtDlVNQ3E2bFcTvIAxfWDVXy9PeXYSVy t3jDamK43qYOK1zLq1VzMS3rJ65puBLnm8KEs2IR3kKb1JVFDunZnIaAA5Mva9MsQjugft/nvYT hjxUBGb1LOYZnUHoeJaYrPlouucxhgODXglSqocg2PT4mx10xZo2bTIYtI8ksj62nBUUnWLiY4y WDyVNVcNLDHbKrxzrYPlZYWBgS+wzJtmBIQsDSL1F09+shOsSilvU6D1Zq5XbiLlpznbf+z4Isj p5JMz+tcENvj30Nip0QpWyrDaCimc= X-Google-Smtp-Source: AGHT+IFKla6hTfvgUeu3xr1dj98apkFBuF7D/5iavKgGywj5O27W3EikONDNtk7X3C87QAdSuENeHg== X-Received: by 2002:a05:6000:24c2:b0:426:d5de:e454 with SMTP id ffacd0b85a97d-429bd6a4578mr4120053f8f.31.1761935610503; Fri, 31 Oct 2025 11:33:30 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/38] target/arm/hvf: Mention hvf_arch_set_traps() must run on vCPU thread Date: Fri, 31 Oct 2025 18:32:50 +0000 Message-ID: <20251031183310.3778349-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935855643158500 From: Philippe Mathieu-Daud=C3=A9 Since hvf_arch_set_traps() calls hv_vcpu_set_trap_debug_exceptions() and hv_vcpu_set_trap_debug_reg_accesses(), which must run on a vCPU, it also must. Mention it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index bfccf5e9a2a..ee04943b0f8 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2192,6 +2192,7 @@ static inline bool hvf_arm_hw_debug_active(CPUState *= cpu) return ((cur_hw_wps > 0) || (cur_hw_bps > 0)); } =20 +/* Must be called by the owning thread */ static void hvf_arch_set_traps(CPUState *cpu) { bool should_enable_traps =3D false; --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935732; cv=none; d=zohomail.com; s=zohoarc; b=NvrKA0R65a8EfzgGuTNF0jVYb4X6Sby22DPjrHJ+lXefiYg3FayE9pyZse+9ZbjKkyyvh1XnufBlAh+xYwXkKZXRWKKtTuI6hA56PGyQRB5w92j6H8Y7NN6HZ+O5XU8LxHH4hIjCSbuzRLM3Q9xzned0qeHTCcjdnoQpposgLzU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935732; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=Bcg7GXTvqWbBwUT5qCuTYDd8DaBbj7mnR+TS0dZGLf4=; b=GoFronYjZxX7X16zsTqsV2TXn+RRQGiI0QIuafeOTCkgTIVyzIircNb+fstLKrttw7U9HqmxETKwWZcuwcdODaxx9cgi+vPaI4ha9HtyKou35CKtgiYl7WXE/TfSW8ObQ1JtLJs3fP3X/EHACATfdt3klFGNLcqrK2UdHyJjqn0= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935732509636.9694549489658; Fri, 31 Oct 2025 11:35:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwu-0004p9-9d; Fri, 31 Oct 2025 14:34:09 -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 1vEtwq-0004lq-AO for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:04 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwP-0006EE-8F for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:03 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-4270a3464bcso1797482f8f.2 for ; Fri, 31 Oct 2025 11:33:33 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935612; x=1762540412; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Bcg7GXTvqWbBwUT5qCuTYDd8DaBbj7mnR+TS0dZGLf4=; b=p/i773dFS7Un6WRLBpvG2UrPVot8k0G6ZZlzGe82PcuLN+3bb2pdbEmPNK+WN7Cdyl vm/XfaOLAX0wEoTdFgRisbP0GNE1iwyCcjqH7o3ICiPzWCxITeF2gXLdnAdo7nBhVDh1 WS8pfZLzO2hLlvzki3IM4FI/oBDTLkDIGCzBlMaUCdM8GwmlCsczBsJz+607VMetbq+v ejxksXFVtnfr3TPjgCvQlrQzyw0z271girbQGM968LN4FxE1QPr+9Mh0E9+h9hKJki6s 6v6236Sg3qciiW9Ktl3Ybd84Z40s2gzblS8vnLHxUzMvHs4Sjui0sn8x3qcxaAsRKAAb BlsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935612; x=1762540412; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bcg7GXTvqWbBwUT5qCuTYDd8DaBbj7mnR+TS0dZGLf4=; b=Zpc8tLZKck5FQ3UYBD9MfzlOS/HgMN/CqT8iMf6rO9sw9YynoUadEsEPs0rJDF1q9N rdZsD14vQmgPKCt9d12SeAJClrL2Q5DuVV2gDoWuVRS1qdnKuHQwglPnoVN8vVLsR454 De1E50aA3EgNME7HOA61rtpmjJ4CkFhdRU0euprbPSPRTGzoGBkZpWkceXeGs9BYKgdS KklhN4Ww26XdPcP5ohzheY6Ug2jfgx4cvWWkQZzeQrzvw+WBfal6G6FQQf7IocFzLjcd 8c8+5RJ3bxIyXtjC+JKxn/WcKQHIPB6Cd88qzWVY/yJejLb1dG62wpo/wbqIQNQMgiqG iIVQ== X-Gm-Message-State: AOJu0Yx471wdhVBoWSz5d6P9Ni8Cmu6masQdtWs6Nw3XGqtQsVQ5FGtM dGCdTV0jVwlxR+r9DHe6brAjuUsdcNuXk8Gf9PANIdnaE1c9eam8yNK/0/i0naTyY5SJCaoxrd7 UPUMs X-Gm-Gg: ASbGncttHoTA1U1psL47FOIbb3iBx8jhD0PCKT7Xk2kqpieVc+1eWAfW4eYpHj/Sgl7 xuqoXN8195pW9oSBnjeYJ1GsNBrpC+A0HgemtB+GTvymO55WopVCWoSuK2hhg/kstt3RQ8PMmLw YZZ0Vz6Vo+/BcFcHtI1OD39dfxSfJm9sVcmUYH4lEigauYAOgUNINUar7mtB4iFUUyWaebDWROI KxR/2zWp3PrYYOzc251WwWRpZ8qr693Jtvu5UYhk/YLj1PXUvzDjs2pTasx3sMvZI3xNI0nietw K+NTFtMV5yLbu/gKxdmk5LsEQrypE3IONZ9rahgyIXeWxSp59eAvH2owamI36ws2sOlnwyH6IPd lsR191a0GNXBAdsbbOwZax1BuyN5coBa2XSLDVLwKB2tdPGKJ8jAJ1BuO2v7L3c5/T6AO7679IJ w18s5Wn5lnYm2rgxZk X-Google-Smtp-Source: AGHT+IHZlHrdPZg48A8koWkls+EhiRx6zMsRm7dh7868mmH4iCNqx0vNFsWCHmKPG1mUhi3NYuA3KA== X-Received: by 2002:a5d:64c7:0:b0:429:ba36:5fa2 with SMTP id ffacd0b85a97d-429bd6c1837mr3812145f8f.59.1761935611949; Fri, 31 Oct 2025 11:33:31 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 19/38] accel/hvf: Mention hvf_arch_update_guest_debug() must run on vCPU Date: Fri, 31 Oct 2025 18:32:51 +0000 Message-ID: <20251031183310.3778349-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 @linaro.org) X-ZM-MESSAGEID: 1761935734383154100 From: Philippe Mathieu-Daud=C3=A9 Since hvf_arch_update_guest_debug() calls hvf_arch_set_traps() and hvf_arch_update_guest_debug(), which must run on a vCPU, it also must. Mention it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- include/system/hvf_int.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 0c335facc3b..241c668795e 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -83,6 +83,8 @@ int hvf_arch_vcpu_exec(CPUState *); int hvf_arch_put_registers(CPUState *); /* Must be called by the owning thread */ int hvf_arch_get_registers(CPUState *); +/* Must be called by the owning thread */ +void hvf_arch_update_guest_debug(CPUState *cpu); =20 struct hvf_sw_breakpoint { vaddr pc; @@ -109,7 +111,6 @@ void hvf_arch_remove_all_hw_breakpoints(void); * handled by calling down to hvf_arch_update_guest_debug. */ int hvf_update_guest_debug(CPUState *cpu); -void hvf_arch_update_guest_debug(CPUState *cpu); =20 /* * Return whether the guest supports debugging. --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935773; cv=none; d=zohomail.com; s=zohoarc; b=Z6w1h69isu6+9TjRwM8KT/Y39rlaaJ2a3wOGX+oF0yr3Frc/6wWIJYo2kwTFeShFfkF9EHM4w+maKUWH4zRexoJlApoefw3v9qLxoFkyhO0P1GjXfItBzbjwPcD42up2m8Hp8NLHbL0DAklEWoH8yiWvt5tK3ltfp9z8wcKbIjs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935773; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=qOE3oOcQ2vXEJvzQtPpnmIuRlktDL0KnYr8jhqNcteY=; b=DCK7sPY7IEymsJiSs2MGfl9KnSCFUX53HESZKiG4lMemthVyWwKgtxLSs9IIe0SAWLrX6Sk81wPJ7Zi0KsdqbqbSLlK4VL16mON98+gSyYFuXs7aK1zIVTwXxI5D84FYnrF01EgHU5CgOiBWAkuYzzjYtGlN1fPg9nHxJPqsn70= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935773891945.7241499674475; Fri, 31 Oct 2025 11:36:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtwm-0004jJ-PI; Fri, 31 Oct 2025 14:34:00 -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 1vEtwk-0004fm-2g for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:58 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwO-0006EK-U2 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:33:55 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-429bccca1e8so959615f8f.0 for ; Fri, 31 Oct 2025 11:33:35 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935613; x=1762540413; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qOE3oOcQ2vXEJvzQtPpnmIuRlktDL0KnYr8jhqNcteY=; b=iPRZnMo0dZHIPJPnGZ6DCupBHHl/pqOt45azdIK26NFwX65JGz+7EJg9jUBMH9Nk7x N/kfj3cGk0ypchk/5ou4FcHN1RAXTbE3Dux1dzG/yB5+9xTRnxGqvbQ8PwQMXA+eGGn7 j5WF/fNc7hRoRP2kNencEsqKvut1FfW/nVCX2InV0yC3l7MlSlIgCeC5rUUUvZ3G3kaw 6RQ8uAvtCcWHvxGmw4wcFLdHopbIOm7uLVB6NqH9fHs8edh4UWtR2Vxar7Bze3jxJ8Ar B4P58pHqUs3QrjGl4dljJTNsYOUcanGiD1viN5lF2dkLopMnNwKFB28LXtYodJmXPt2E 7IzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935613; x=1762540413; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qOE3oOcQ2vXEJvzQtPpnmIuRlktDL0KnYr8jhqNcteY=; b=QRUr/sghE770StK/FniTuf23HtZ604rw4kHwXCkR80BFY0DymUd3SqT2O4z3xg7/mA cHlrfWpAdvNSbMfivSSKReSD00tMJzr2m5ylLv2BlLNZoJqXAAIK4B5nMWX9uCW1pDhe noouSzJUpVvARLzD74tuhujvDXVi1w/DaZEU4Q+JZdEklC0+nvwUVS6g4LMGy9hk/RAs 5+TdStRBUTE1BnoIOfqVblDrb6DbgLhsr87+BKyCEF6fhmelcVLeEeZdJYYb+U4p+4J6 XARpCfLVtMp6X4pgnRPBKHLfwr8x+lgmJhhor+Nu+ZzwBtxT1edokNH0DJ+oHl1WLeKl siAg== X-Gm-Message-State: AOJu0YwTvAZoqY6LMvr7bSbdzxTheDoCzGb4DPte8IpvxSxyvAwakref kxjGziGQNS5UFxVTeqeGSiLPvNYF8SXfEUhPV/lZ3HN08ayJG+/suFo5LUs5wxlO0iKBv9MFTrx UPc+0 X-Gm-Gg: ASbGncsPowMVdVVKjm1ESVTwZ8kfjWv1b7ttmsgNb81MVdQGc89d3YLDlY1kMW5hRfA YdqFEcPARC5qZ1J1SMMzwBXHPirEGAwZ+gHyZtmlPgzn5mcwELwyjEGmD7tgcmia7UCLIlHe+cI OEHv/9vt956483qcJvSWag9zPtyxOI6fIKDLr2BeEFf2GA6/FKMm2OjitOBKT6SIq0LQQPhrZ4d L7EkSmJDy6EZQvJuA1+E1aP0GX0x4+LHgxGe0a7EfOLzsWLlk/guRSpj+XkBDX3B4uSvNTDbV5d vQtlnh3bBof90/aRE7pYB3kXuCApu1FUILXYzs6HK4H3i8QmbNBeNfzxYyKMqZDaMszJp9SElmq Y9OKfOOSMyw32tjn1xZQSDQrrdf1PnhPQUi26/mDvh49xZQWkMSz0Z5oZo2KuGroq00ayLc3v4x Ywmxgu+ts4WYX63H3S X-Google-Smtp-Source: AGHT+IGpijhIY4Qcl8CLprfBlIvUUxbmIcnJups3iwFlvsOFBLTjFywzPqv2YPFSEScqdEAczTUZWA== X-Received: by 2002:a05:6000:2f88:b0:429:ba8a:a860 with SMTP id ffacd0b85a97d-429bd67243bmr3900479f8f.12.1761935612765; Fri, 31 Oct 2025 11:33:32 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/38] target/arm/hvf: Mention hvf_inject_interrupts() must run on vCPU thread Date: Fri, 31 Oct 2025 18:32:52 +0000 Message-ID: <20251031183310.3778349-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935776332154100 From: Philippe Mathieu-Daud=C3=A9 Since hvf_inject_interrupts() calls hv_vcpu_set_pending_interrupt(), which must run on a vCPU, it also must. Mention it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index ee04943b0f8..0d8ff49ae15 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1664,6 +1664,7 @@ static int hvf_sysreg_write(CPUState *cpu, uint32_t r= eg, uint64_t val) return 1; } =20 +/* Must be called by the owning thread */ static int hvf_inject_interrupts(CPUState *cpu) { if (cpu_test_interrupt(cpu, CPU_INTERRUPT_FIQ)) { --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936072; cv=none; d=zohomail.com; s=zohoarc; b=ns9pMrroDKeaq34wYKlQVrk0/bsQPle39Wf8hWPBXhZMaOHA2hNcy1LkxtQeCYEHkOpuZw3Es9ETXmoOCqtedABOZx57qu3cDa4Gzt8XFuOYIOZDfTHN1k2i4egSmAt8gY2JyO5FNbr35evLui7Jb69JUiOqcHYOa2iuR2GL0AI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936072; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=XYmvxURxPONYpllqUnIy8FBLR5WOckrc+aRse284MPM=; b=TPNbzXvQ+EvD3BPpcWifTJD1xGg2ksp7ZKyVZN6AzJBltk4LrNqctFNXC0tQlJMDCWSukzZ5VKyqoQnveb1VljExgmFbpsCBh6YIyMao4A1CUCvN3ml6+7yY1tdV0K3q41Gg1jlQ7bcnRabpLnc0INyUzWMGWtxYN8KfcnFkYTI= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17619360723592.9480336506353524; Fri, 31 Oct 2025 11:41:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtx5-0004um-1I; Fri, 31 Oct 2025 14:34:19 -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 1vEtx0-0004tV-KF for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:14 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwT-0006ET-2s for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:13 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-471191ac79dso28309905e9.3 for ; Fri, 31 Oct 2025 11:33:36 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935614; x=1762540414; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XYmvxURxPONYpllqUnIy8FBLR5WOckrc+aRse284MPM=; b=GuYv2l3HVBxdzdTZAq/cV0ZPIqkprR9G+agEyEN5X3CA3EO81OklGe0MpvHx1SMcgw D91PGfT5Tw0b5MfnfTmLQrIb2LuAGFKXUEKP5D6pZ0Ar/vftN8NSh9EV3LuO3gg1GHwa CfBxaD8HaTOV4n5phVzWSV2a/nS9chtCGEUgNBZuQpcYTutrLAO249X4FtKe4fBH+F7z GWnZWeaYbVE9g29k2kb8fBxuAUJ/TJwSH3Rjz+MwdJiL6n+EeGrhKeT1KbJ40K22URFc EyqFARi/n6XRsGbkTRxCrPT4QHv7ffxZacMGuX9ivu5eBMU9IQOeN+8farHtH0aB7Sf8 qaDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935614; x=1762540414; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XYmvxURxPONYpllqUnIy8FBLR5WOckrc+aRse284MPM=; b=HoMk/qU2YkEM0RnV2cvoJNHwpEc/sds4+549ajYfa8pEqm8qa3Jd3Og9ZRbBULn1WJ vEGmCsQIPfDZhyU7y+B1EPyL3Wpu2v4n/aJW/+Z7ib8XEKZZjbUp6lccZPN3NPcVNGJ/ wvdqu4v5JcbSUKETD5rNMQCl7NPRSl46SIzpGx4VEa3WsvjS2vMLAVfUtnbnQCzJDCb+ vbLVopFXearPaMNj5FHwubc9nQuaKxMf8N9rzKQRIXrkxyLgEU+SiVj3U+X8+5OXnvH5 TLpZ5qEH6iENh3A0WlYiPgeLthxzrUQx7PnZ3JGQplUQzyq7dolIw70KT+g0V3tRw0yo BGsg== X-Gm-Message-State: AOJu0YwLkO9cNNwvVUgAGXx5yS9colrURQIQg1lknCYg6Lr1MnGhNUH9 9zQxokwZqaneN9U7i9oJjdfB92mGezjFj9JQAhI8nnVGNf6v1aBFItUFi903bmRXXPtb6ndBh0S kJnzO X-Gm-Gg: ASbGnctU63+AjkIu2/+zlc6X+qCvWUoqZV5KY1BSMpCyNzfQNHJyutMC8ZTgOZvWsGT xHjXlWFejhesReiDQdi5L7Xo6VJ4d3gUbrlwIvrBimIYO2u4S/jsiJ3D9ejop8KC1N7+4Id/5tr ZZZrqCSrgdHmFRxJ49JLf3zVbFX+eaQILFB5rkz1Mv/zumzRfyw7QnEugIzu3l9E3JM1yAqUnQz /FvMCEGhVGVwv3tXFaOgTRuvqgjBFOcEvUaqdb4nj39lZ0SoUnFGsVzgt0qTkGMhknw7Zlg6wPW B5sWrPd7wqlVZKrHFbtuk5UlXtSCqyu5PVgDKu1KOxd5QxZeFGRQEki37uikOwRvcfBIkJgLYig eBKhgV8mShen7zY1yw78Hkrt/jDOYvTg4Y7OrEKwHENktbHjW9Qcun8IaPMe95iqZpApICNnAy5 RwHbOK+A== X-Google-Smtp-Source: AGHT+IFK4UblqWtn6XTSyDXYIqPfPnpuiWstSPz6cz+af8XrotbDF5WGsTCrf3TWTTs/fQIgnQNw9w== X-Received: by 2002:a05:600c:524f:b0:471:c72:c7f8 with SMTP id 5b1f17b1804b1-477308b6117mr45059175e9.21.1761935613553; Fri, 31 Oct 2025 11:33:33 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 21/38] accel/hvf: Implement hvf_arch_vcpu_destroy() Date: Fri, 31 Oct 2025 18:32:53 +0000 Message-ID: <20251031183310.3778349-22-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936073875154100 From: Philippe Mathieu-Daud=C3=A9 Call hv_vcpu_destroy() to destroy our vCPU context. As hv_vcpu_destroy() must be called by the owning thread, document hvf_arch_vcpu_destroy() also does. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- include/system/hvf_int.h | 3 ++- target/arm/hvf/hvf.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 241c668795e..195d64dcf18 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -71,13 +71,14 @@ void assert_hvf_ok_impl(hv_return_t ret, const char *fi= le, unsigned int line, const char *hvf_return_string(hv_return_t ret); int hvf_arch_init(void); hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range); -void hvf_arch_vcpu_destroy(CPUState *cpu); hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t); void hvf_kick_vcpu_thread(CPUState *cpu); =20 /* Must be called by the owning thread */ int hvf_arch_init_vcpu(CPUState *cpu); /* Must be called by the owning thread */ +void hvf_arch_vcpu_destroy(CPUState *cpu); +/* Must be called by the owning thread */ int hvf_arch_vcpu_exec(CPUState *); /* Must be called by the owning thread */ int hvf_arch_put_registers(CPUState *); diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 0d8ff49ae15..d13ccf5508c 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -868,6 +868,10 @@ void hvf_arm_set_cpu_features_from_host(ARMCPU *cpu) =20 void hvf_arch_vcpu_destroy(CPUState *cpu) { + hv_return_t ret; + + ret =3D hv_vcpu_destroy(cpu->accel->fd); + assert_hvf_ok(ret); } =20 hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range) --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936113; cv=none; d=zohomail.com; s=zohoarc; b=D9fKfuoonkz9l31ZgwK7AoA5ivKVd3F4qlFwcPKeMMUx+CPPQFs/GQWgpNjouav0E93QR7pxenjF0tY0orfQVM5S5cwUypo/N1asTWaUzTnpvGtAu8iOjTUC62DO17snOyFQjlV4unpYSgkPd0PvxQ1flUVWRd4RzXS8i5TYVxI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936113; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=yxFpFZHpZvf91gNqpi2WxKJQUxaoggcUXU1IuJQju8s=; b=RBZo9U+reJ+ixg7Qy/c4LMYIDy+foFt23l8Bweappvif7xpJ3bo8FbQK7SYx3j8euMgeY5Yqpm562v9MDLzp6/lgPe1ofzG3SDYEgF4Fc0QzA1sy+2ZOJoMBHKEIKjqNfmrznsJXbA7j/5OI54CiArIzUfeNgpfrOG+wstmGNGs= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761936113377864.4439323555162; Fri, 31 Oct 2025 11:41:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtx0-0004tn-U0; Fri, 31 Oct 2025 14:34:15 -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 1vEtwx-0004sH-Op for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:12 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwQ-0006Eq-Mp for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:10 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-4270a3464bcso1797507f8f.2 for ; Fri, 31 Oct 2025 11:33:38 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935614; x=1762540414; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yxFpFZHpZvf91gNqpi2WxKJQUxaoggcUXU1IuJQju8s=; b=YuU/vkcV+Gnx5r/G7JaJRCi7mNZNrLHOTsx44NpJq7bDsbLuwOLnlNoOtQRD7iBF39 SbSiVNrHrZVasyafBSycLwC2Xy6gi0/Ssr8wzLpz9/lWk+JDWM77RQ3PxjRV/4WMU4M2 U3u7EcEunyg03KMBrakfnqGryhFrHoY+C9EVAH4LEF4BTfDf47VycFf/yPOGWQaomeLu XRL1IrTYQaXf3EjXwbhyzCCjtBAKCGGN97yucIjyoXlc2G5rDCp+5RT2AsrpegOn9L39 EHwyffGl3X2FyG5aK5bu5mi9p1dBakgdE2nMhtyyGYpQZFiPD9j80EtkxE/t2cW9rozZ nO3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935614; x=1762540414; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yxFpFZHpZvf91gNqpi2WxKJQUxaoggcUXU1IuJQju8s=; b=qwve8pjG2Z2W8Jgx/KWGWxecvtRbSAfjb2Hldc8CZvwMxXpsa7hX8BrHxnSXe9lNe1 2V820vpBxateIDi5ogNXJBhCKbqqP1mukVijXpmHvs+SK7dv8V68gXzhyDpstXmmdi8c r7P6EgTr+EhozP5rkPMK/5Dzfp+vJ2EXpD6y7VjStVMB7p/Z3u+IYoXDAsjUNPgn6Wpv DUfeTSzQo1pl8pgKiB13bqLWIQXmXEmrBksUQolrQ0HaswnH4bQWGMkojtw1Ie6hvCzt jy6UE8B2WiWHzU9mN09zJ4SFXWKG2BsA1wgFyUCTtpsKEj5aHRyvVJJ8FL51xwzOEjlu Ro9w== X-Gm-Message-State: AOJu0Yyhi0dJSChe4vrjq7hfSE9G6MUhNHodJtdfkdQj6VpK6eZ4WqmU HWmgxq0hcXVufzcJ92UEgxXRgDmVIcNp+HDtG6y0s18fy9ILYmMqDDlK7TvPvqTAE/TesMCuT2f SQM5Q X-Gm-Gg: ASbGncsL3FPMpDY/W89iWczEKeNbcISzFnRURJOjH9fz408LhnXLyvBYOYU9DCYV2Ae MHmZIrSWrqKVqO95uRgJ6fiF645a8Yb1yRgkp/K1aTVRfm4aJxJpnBEuBHsbZ1Jh/OJA4D4DCnM K7EhDMFfe6zgjbqQJ2vsgeIjYnVO6a0NOh1TYRWKnBrQY4k42Ewfvdobprj6RmN8yA77S04tAKw +cQFCW4qbINo/oPyTQJ/1/8Tl4mjx5xLys1Z5EBR0Jb3tt3skAhUKtuyaU9eeFOBTv6OftCLPJ4 fYZxse7eRnlzZhS1ByuMF2TZ5xxWSbqw3vBx74o8sZ6TBLCESeqJ9oNehUY6Yrc0rSASZSJK4Vx zIO2PnqC3iQrd57pdM5uYwbsd4PrfRjMClWPajoTIimhkFcvDrDulaouroVdaVMZTYzvj18HyNg nRqOPJvA== X-Google-Smtp-Source: AGHT+IEyNhA0u3kd2uTTXsFoEZZX8rEWtEbCY55Ru5n+2LQ1gqrqDFpn2pMyjYa6YzFsS5qJo+IKLw== X-Received: by 2002:a05:6000:1846:b0:3f9:bc33:2fab with SMTP id ffacd0b85a97d-429bd6c18a5mr4400889f8f.60.1761935614337; Fri, 31 Oct 2025 11:33:34 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/38] target/arm/hvf: Hardcode Apple MIDR Date: Fri, 31 Oct 2025 18:32:54 +0000 Message-ID: <20251031183310.3778349-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936116566158500 From: Mohamed Mediouni Hardcode MIDR because Apple deliberately doesn't expose a divergent MIDR across systems. Signed-off-by: Mohamed Mediouni Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index d13ccf5508c..890e9266f93 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -763,6 +763,7 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUFea= tures *ahcf) hv_vcpu_t fd; hv_return_t r =3D HV_SUCCESS; hv_vcpu_exit_t *exit; + uint64_t t; int i; =20 ahcf->dtb_compatible =3D "arm,armv8"; @@ -781,9 +782,19 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUFe= atures *ahcf) for (i =3D 0; i < ARRAY_SIZE(regs); i++) { r |=3D hv_vcpu_get_sys_reg(fd, regs[i].reg, regs[i].val); } - r |=3D hv_vcpu_get_sys_reg(fd, HV_SYS_REG_MIDR_EL1, &ahcf->midr); r |=3D hv_vcpu_destroy(fd); =20 + /* + * Hardcode MIDR because Apple deliberately doesn't expose a divergent + * MIDR across systems. + */ + t =3D FIELD_DP64(0, MIDR_EL1, IMPLEMENTER, 0x61); /* Apple */ + t =3D FIELD_DP64(t, MIDR_EL1, ARCHITECTURE, 0xf); /* v7 or later */ + t =3D FIELD_DP64(t, MIDR_EL1, PARTNUM, 0); + t =3D FIELD_DP64(t, MIDR_EL1, VARIANT, 0); + t =3D FIELD_DP64(t, MIDR_EL1, REVISION, 0); + ahcf->midr =3D t; + clamp_id_aa64mmfr0_parange_to_ipa_size(&host_isar); =20 /* --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935799; cv=none; d=zohomail.com; s=zohoarc; b=QxW1iwczPWYH+dhuBbVlhmYE4dXYvYOcwIWoGBd+pYYiC7MkZr7VH9YGwW4xkme4mn+ghTo8Y0XrzpCPluLnPggWSUu00SGNy5HHPhebObftxgEhG7f39ZLH/HS3WeuNKCX6yJYtAH7MPcUvhR3t/9zwNpOlNONgJGJRk1Sh+D8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935799; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=h94wgQCnwPK/CyYz1RjeCmxtDplpfFb/9H5sqCClSa4=; b=Hg/Y/kjeRrSI+h9TZjPvcRiLEhyUBNBrfP03QnKxwuI58xsO7psiSBCsgp1TEF8pKb6mqr32AO0mu5xQFlshXwfdNJTcyIeQPu4Ge2l4Yr6tOr4swYXpkpx4nqzKmCts9qrL+4aN158aF1nk6czlEOcI6AAbmxkJOVi0ErvpR7Y= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935799575378.56395599859025; Fri, 31 Oct 2025 11:36:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtww-0004s1-EO; Fri, 31 Oct 2025 14:34:10 -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 1vEtwv-0004ql-Go for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:09 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwR-0006Et-Nu for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:08 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-429c19b5de4so855002f8f.3 for ; Fri, 31 Oct 2025 11:33:38 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935615; x=1762540415; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=h94wgQCnwPK/CyYz1RjeCmxtDplpfFb/9H5sqCClSa4=; b=xRSZV/H+bjE/f6wKQSYeAkgyuEqc1GGuHj4Mo7YAK1/Y4GIjdMgIH4VGvrLoTzr+3u z/6bukxbVJN3RlUxpNAYmN6B/sN67kaUooHZVi8QPPSbJpczSL4RZlW2rqH6POS1yQ91 DUbB+h8aDGJn4vkv/YPJik2rxk1jQgo/jOpoIc4NiFleqh4GwIauZOxzU5yBJpUkeQrZ VDf3lZ0gyj96sYNmkH2HazU4AHH/nk+AxNdgOnk42pgge6tcyyejr/mE46qG4IPpg97g y5jOgBDNTV1m87hi4A9sQBPPBH8wXKtrm1SGWK327OR+UsuCaM1jqt5o52soZL8//mxI 9F5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935615; x=1762540415; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h94wgQCnwPK/CyYz1RjeCmxtDplpfFb/9H5sqCClSa4=; b=Bim7Gg63rSUTe6uY6z8AiuhFgiX91hwisJfqL77cHrKe3hvscm5ONkeN0pvYHBA9eU uqOXFk9GQzMUNrzqR02yvXjzd0jLBndUZ69Q9KgecBXbQ+DySHw8G3Fq/+4I7D7QJwvM GmzWHjtSbOBFk7tXGEV5ajzMpCxl/6n0NzAhRTOqLjq1NhBkCM3m4wiYMxHVmy+KL1m9 QCCqRt9hMVBwsehqJ3tC6inm5UnNb3UZwGshdkkLC4e42yqYObpUAR9KmtYDe/Vbwo7e j8PAfad3CrAOY0d50RimLhkTE2J4TnArHlJiiyRqRVIhe1ZkB3Cigr/lEB6LEZeMcuRL 0h3w== X-Gm-Message-State: AOJu0YwspFAlqn2f4kbUdoyiZxm28dLJAJJ1PtbmOXpyeo0thct1TUac uHfW6h4PLICF+XSfnI7wkajRmbjzqb6f5oKPnwYBAN048PPZ0ACYoY1zzJSlzF5WvCO1Ejtlct6 52Lg2 X-Gm-Gg: ASbGncvCpiEtTMA4/KChVwg9mAFigh6Whjl36v9vhbTtSHOF3fngCfcCMvQWlsjTQvK J+q3S3EfoeRR/w9qQsQD9HjNRFELsz1+sSkDS+/ie03VoO8M46OilbE2XynWlzPAKoh4iWsVNjo giSXFLNg5TV2cu8scXVNzcTrnHowXNk77W9gz35YhrjHIFxmnkhgTU6FGB3FaFbi9pQ/jY37xZa A+ZN342d41wXtIg2Dcs0hrQ4IsBX7o+EoAFC9ej8eLrPpyhUZ3a6qVdr/MxF1qwLhIRtXvV2IPH x+kqcrRfRG31CGmFdyshlliN1UmxB4teZE3+2hnaO+YIOtFr5ojo8tVwn4lyCtm2TLnMOVtmVJH Z1P7kUFTRR5o3GFA+P8x4kmf/Ed+xUeOOiZCY7RLbMrPlD0EBhFx/VDb7as65oV9oLjZDvjO5pN pSQ9j28o1diL1MpWW3 X-Google-Smtp-Source: AGHT+IEF0CKnTGiMhO1s/Ax/7g3Bss99/29uOU7sJxzkwNSq4ybRnovCLWBr8DJ81T6hpPF48WVKrg== X-Received: by 2002:a5d:5f43:0:b0:428:3c4f:2c40 with SMTP id ffacd0b85a97d-429bd6c11b0mr4330913f8f.56.1761935615098; Fri, 31 Oct 2025 11:33:35 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/38] target/arm/hvf: Simplify hvf_arm_get_host_cpu_features() Date: Fri, 31 Oct 2025 18:32:55 +0000 Message-ID: <20251031183310.3778349-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 @linaro.org) X-ZM-MESSAGEID: 1761935800655154100 From: Philippe Mathieu-Daud=C3=A9 Use index in the structure, dereference &host_isar.idregs[] once. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 890e9266f93..dea1cb37d1f 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -743,21 +743,21 @@ static void clamp_id_aa64mmfr0_parange_to_ipa_size(AR= MISARegisters *isar) static bool hvf_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) { ARMISARegisters host_isar =3D {}; - const struct isar_regs { + static const struct isar_regs { int reg; - uint64_t *val; + ARMIDRegisterIdx index; } regs[] =3D { - { HV_SYS_REG_ID_AA64PFR0_EL1, &host_isar.idregs[ID_AA64PFR0_EL1_ID= X] }, - { HV_SYS_REG_ID_AA64PFR1_EL1, &host_isar.idregs[ID_AA64PFR1_EL1_ID= X] }, + { HV_SYS_REG_ID_AA64PFR0_EL1, ID_AA64PFR0_EL1_IDX }, + { HV_SYS_REG_ID_AA64PFR1_EL1, ID_AA64PFR1_EL1_IDX }, /* Add ID_AA64PFR2_EL1 here when HVF supports it */ - { HV_SYS_REG_ID_AA64DFR0_EL1, &host_isar.idregs[ID_AA64DFR0_EL1_ID= X] }, - { HV_SYS_REG_ID_AA64DFR1_EL1, &host_isar.idregs[ID_AA64DFR1_EL1_ID= X] }, - { HV_SYS_REG_ID_AA64ISAR0_EL1, &host_isar.idregs[ID_AA64ISAR0_EL1_= IDX] }, - { HV_SYS_REG_ID_AA64ISAR1_EL1, &host_isar.idregs[ID_AA64ISAR1_EL1_= IDX] }, + { HV_SYS_REG_ID_AA64DFR0_EL1, ID_AA64DFR0_EL1_IDX }, + { HV_SYS_REG_ID_AA64DFR1_EL1, ID_AA64DFR1_EL1_IDX }, + { HV_SYS_REG_ID_AA64ISAR0_EL1, ID_AA64ISAR0_EL1_IDX }, + { HV_SYS_REG_ID_AA64ISAR1_EL1, ID_AA64ISAR1_EL1_IDX }, /* Add ID_AA64ISAR2_EL1 here when HVF supports it */ - { HV_SYS_REG_ID_AA64MMFR0_EL1, &host_isar.idregs[ID_AA64MMFR0_EL1_= IDX] }, - { HV_SYS_REG_ID_AA64MMFR1_EL1, &host_isar.idregs[ID_AA64MMFR1_EL1_= IDX] }, - { HV_SYS_REG_ID_AA64MMFR2_EL1, &host_isar.idregs[ID_AA64MMFR2_EL1_= IDX] }, + { HV_SYS_REG_ID_AA64MMFR0_EL1, ID_AA64MMFR0_EL1_IDX }, + { HV_SYS_REG_ID_AA64MMFR1_EL1, ID_AA64MMFR1_EL1_IDX }, + { HV_SYS_REG_ID_AA64MMFR2_EL1, ID_AA64MMFR2_EL1_IDX }, /* Add ID_AA64MMFR3_EL1 here when HVF supports it */ }; hv_vcpu_t fd; @@ -780,7 +780,8 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUFea= tures *ahcf) } =20 for (i =3D 0; i < ARRAY_SIZE(regs); i++) { - r |=3D hv_vcpu_get_sys_reg(fd, regs[i].reg, regs[i].val); + r |=3D hv_vcpu_get_sys_reg(fd, regs[i].reg, + &host_isar.idregs[regs[i].index]); } r |=3D hv_vcpu_destroy(fd); =20 --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936201; cv=none; d=zohomail.com; s=zohoarc; b=IodX2uV0G2qhF0LCiOfFesn6p8+id9WxBC+JLfT2f+085km+dcAYc4GaNQK53rVdh2qk4mJe2o+L3o+NygxJ6fk4bk5+8Zd3fpmLDNEmfzkgX+c0WhszGGj6FfXrdHzPvCCi5iDi55iDtXJz/38RxmmhZLl25pnQSYAPvyMZV88= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936201; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=U3XL23GQR2hlJ1ZtK1FxEFFucrtJdMwMPprsPYQAxQU=; b=eNjiygk9SW3L3gWyTdCPjMxibRFMEVledrc+FgJe25RngHtjRdwOZ47JxXUVpP5u7/ZjDrcRN1zOPZ/lV4dKzUKjuqcuO6s74bmDHChjKR9lBD4qPmHejrk2MofICQRZt7z4tYWsRh0vZfoR+RZiHvwKSgRzRL413VORqfSeUMg= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761936201420938.7218359906033; Fri, 31 Oct 2025 11:43:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtx4-0004vO-Ls; Fri, 31 Oct 2025 14:34:18 -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 1vEtx2-0004uO-6n for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:16 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwU-0006FC-0F for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:15 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4710022571cso26896215e9.3 for ; Fri, 31 Oct 2025 11:33:39 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935616; x=1762540416; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=U3XL23GQR2hlJ1ZtK1FxEFFucrtJdMwMPprsPYQAxQU=; b=TQCtHAmxkniKVwvdevvVETSyvzd4CNtQ+NDv/NibxjNIWmkOGXIyXQSztMxMJQ3W+1 w8vlP3rmU00wVNcqD74t4cFMwi2EetuXs07Ze04yKT9Wd8ZbRBl8F+VjJGKNgQcPttkU Cig7ON2EV+3plZt/YH68sWSq6i9CmfycWL32ai/8gxaPrdwLNQPXJ6A64pig5XfhCfqs e78EbdRR+yi8A2joYdQqD4a/eBTGlKdFkXUA4fHJ5QS71pWedE9YlDNhjBBHEvb++bXG wxB7eMvAQu/3fKnxsj9kHnPenT/7w4Ql8+4A4O543gvRlBBBQdmV5MeCFYWw0dOEuC+k fR6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935616; x=1762540416; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U3XL23GQR2hlJ1ZtK1FxEFFucrtJdMwMPprsPYQAxQU=; b=ReI1ClpWKdVvhkWi38ZzXCZkTpB1Qn/0bG3WJYCpa+IqxIAlmR19UZpWg8o3a4LSA3 IOGm3evvkUrIbiVeineplEcidyWXMjL5IyyJiwPWXjlHUlYVWGi9XlAYVQkL9qZ13Sft T3/CBXm6miErizH6q5sM1xthlQuiMRwQIr69oU22TgHRqDU48QgtUMrbYhT0fH3onZkf fYDBboY28xGvhMmTSZQM1+uUggwsqJTviGBnFZBIMxhoff8VKtIQT2QEFNNx4b/GtAQj IizXEkXCPPlMXXwc5CzKPSnj0txQ1WlXyPymDb9XWyJX+dr7wOSx2e/Vs9HLP3l+cDLt 0hEA== X-Gm-Message-State: AOJu0YwOLFH+Hc5IXy2tuYmjbn2/x4HbtrK7L8pZKSf83PvTMDhBEdXj zvzzmLCgADi9TiQ3tiZ925omMfm0zS2DB3XOCha+aJzmpWJZlAKF4xRp8F3NkPCcHkqqxUf6EDA u5Jdn X-Gm-Gg: ASbGnctR6m+Hr4woLGc0aakKzslNFLXBIQlqZ4Ht8diXZZXSkLfQkAStpfEMYk5j6md dPNk6yOg2gXBdVTqPfKr6JOGNQfQmSCqNLCVIh7pZlLG3n11JmYF3YMAZJyzeP5wwCtvpnxfyAE hheFfcxyoVrfjMe1g58DsV3XwEMBO8mngFMz7LTMi0yRiCbGFwARatd+4G5jVEKR74YtiCLAn98 trJ14q3Ij+0/IGcouR6AKeq+4Xi63AYN5dpMiL73RFx5jTQhCgl5BNXUOpFu9T4Q4Az/+X5mfUx KpSovjkHntdWVXHqZGq7y0X3yd4q0eldB+rLmBHLmMj8+PUuKtI5AFaWTulKO6hByiWYVOB6bvR E1rxAePxti5awznPXiZh0MVNbGDNDArfV7eg/X9MXgTtMIRjric9AGzn68NZqYYzSBfK3+ISVwy kxnrgAqw== X-Google-Smtp-Source: AGHT+IFsFdsNhMlvCdEAwW+tLZSj4kYVIbRCDIEsxjw/mY6RReIsVwHAIZiewPHEliUFc8sfhLmcVA== X-Received: by 2002:a05:600c:8185:b0:475:da13:2566 with SMTP id 5b1f17b1804b1-477308a690dmr46931695e9.35.1761935615934; Fri, 31 Oct 2025 11:33:35 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 24/38] target/arm/hvf: switch hvf_arm_get_host_cpu_features to not create a vCPU Date: Fri, 31 Oct 2025 18:32:56 +0000 Message-ID: <20251031183310.3778349-25-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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, T_SPF_TEMPERROR=0.01 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936203355154100 From: Mohamed Mediouni Creating a vCPU locks out APIs such as hv_gic_create(). As a result, switch to using the hv_vcpu_config_get_feature_reg interface. Besides, all the following methods must be run on a vCPU thread: - hv_vcpu_create() - hv_vcpu_get_sys_reg() - hv_vcpu_destroy() Signed-off-by: Mohamed Mediouni Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mads Ynddal Message-ID: <20250808070137.48716-3-mohamed@unpredictable.fr> [PMD: Release config calling os_release()] Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index dea1cb37d1f..fcb6950692b 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -744,25 +744,24 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUF= eatures *ahcf) { ARMISARegisters host_isar =3D {}; static const struct isar_regs { - int reg; + hv_feature_reg_t reg; ARMIDRegisterIdx index; } regs[] =3D { - { HV_SYS_REG_ID_AA64PFR0_EL1, ID_AA64PFR0_EL1_IDX }, - { HV_SYS_REG_ID_AA64PFR1_EL1, ID_AA64PFR1_EL1_IDX }, + { HV_FEATURE_REG_ID_AA64PFR0_EL1, ID_AA64PFR0_EL1_IDX }, + { HV_FEATURE_REG_ID_AA64PFR1_EL1, ID_AA64PFR1_EL1_IDX }, /* Add ID_AA64PFR2_EL1 here when HVF supports it */ - { HV_SYS_REG_ID_AA64DFR0_EL1, ID_AA64DFR0_EL1_IDX }, - { HV_SYS_REG_ID_AA64DFR1_EL1, ID_AA64DFR1_EL1_IDX }, - { HV_SYS_REG_ID_AA64ISAR0_EL1, ID_AA64ISAR0_EL1_IDX }, - { HV_SYS_REG_ID_AA64ISAR1_EL1, ID_AA64ISAR1_EL1_IDX }, + { HV_FEATURE_REG_ID_AA64DFR0_EL1, ID_AA64DFR0_EL1_IDX }, + { HV_FEATURE_REG_ID_AA64DFR1_EL1, ID_AA64DFR1_EL1_IDX }, + { HV_FEATURE_REG_ID_AA64ISAR0_EL1, ID_AA64ISAR0_EL1_IDX }, + { HV_FEATURE_REG_ID_AA64ISAR1_EL1, ID_AA64ISAR1_EL1_IDX }, /* Add ID_AA64ISAR2_EL1 here when HVF supports it */ - { HV_SYS_REG_ID_AA64MMFR0_EL1, ID_AA64MMFR0_EL1_IDX }, - { HV_SYS_REG_ID_AA64MMFR1_EL1, ID_AA64MMFR1_EL1_IDX }, - { HV_SYS_REG_ID_AA64MMFR2_EL1, ID_AA64MMFR2_EL1_IDX }, + { HV_FEATURE_REG_ID_AA64MMFR0_EL1, ID_AA64MMFR0_EL1_IDX }, + { HV_FEATURE_REG_ID_AA64MMFR1_EL1, ID_AA64MMFR1_EL1_IDX }, + { HV_FEATURE_REG_ID_AA64MMFR2_EL1, ID_AA64MMFR2_EL1_IDX }, /* Add ID_AA64MMFR3_EL1 here when HVF supports it */ }; - hv_vcpu_t fd; hv_return_t r =3D HV_SUCCESS; - hv_vcpu_exit_t *exit; + hv_vcpu_config_t config =3D hv_vcpu_config_create(); uint64_t t; int i; =20 @@ -773,17 +772,11 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUF= eatures *ahcf) (1ULL << ARM_FEATURE_PMU) | (1ULL << ARM_FEATURE_GENERIC_TIMER); =20 - /* We set up a small vcpu to extract host registers */ - - if (hv_vcpu_create(&fd, &exit, NULL) !=3D HV_SUCCESS) { - return false; - } - for (i =3D 0; i < ARRAY_SIZE(regs); i++) { - r |=3D hv_vcpu_get_sys_reg(fd, regs[i].reg, - &host_isar.idregs[regs[i].index]); + r |=3D hv_vcpu_config_get_feature_reg(config, regs[i].reg, + &host_isar.idregs[regs[i].inde= x]); } - r |=3D hv_vcpu_destroy(fd); + os_release(config); =20 /* * Hardcode MIDR because Apple deliberately doesn't expose a divergent --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936011; cv=none; d=zohomail.com; s=zohoarc; b=WKiTe4diItGeKifKw28S9g9jRY0igPcys850UA3+TewwxVihjHRhe4BedefSr6vTL5rmRScvFtMeWorFK4J1p6LA9yZ9UyzvyeMzVgEeFzwK/oRM6a6qqatSvTOG1RTOId/eB6IG2fNF7ECKAI/j3y1+mkYRBs2uSwXAW11AW6Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936011; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=ANpFGbNGmlcXCWtT3fqz3aKKSVJvWIseEjhgN0BfcDQ=; b=Dht0M4LPzdao+yyWKTOgKjQCYBkNLwloFkLK8gWQz+49jp4ywOijUm2xmVm8W/c0qEkR0GFjpyIKO3V8Tl1vkwTsYj0D/0iYT+aeoQOtbMSMXtHFfvgJFRFAL8XI1zu4CZYFc1hAMXu4nXHGamOuowB7UbBAW7P6iL26k1cbOrY= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176193601172712.713593146080484; Fri, 31 Oct 2025 11:40:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtx3-0004uM-2I; Fri, 31 Oct 2025 14:34:17 -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 1vEtwz-0004so-9m for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:13 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwT-0006FG-2L for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:11 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-429c2f6a580so698966f8f.1 for ; Fri, 31 Oct 2025 11:33:38 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935617; x=1762540417; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ANpFGbNGmlcXCWtT3fqz3aKKSVJvWIseEjhgN0BfcDQ=; b=hB8kTHkrBPs9Zkfzx2PBAZewLhPYkIX2EYWJo78IiVA1W1xR3DAfFyfYixB5Dautps 4laVXZttLXKlJmOLagZqQUxPTbJohozt9amIu8v7Z+yxysCnPZQ+521M9PnYdcQ53LIq xSss8PyIVDM9l+kyWVs9L9EwisIN9foM+X2VzkkUqoYYmYTCFTIHreQSMIzzepBI7ukU wf6b/3US94RG3TYz/A2gwadIwn6YsZpLvoU/a3g5lpT/apkh/8REC5phWLdXOtObotqt zf2E+YhLjcYGPRb08AHyUu9J0Td375fa02/7/yncJfggkN/dTG5L6Qlxcx/qHJDn07U5 YVTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935617; x=1762540417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ANpFGbNGmlcXCWtT3fqz3aKKSVJvWIseEjhgN0BfcDQ=; b=c1wYigZsvxK/nJo8LZSJya5gevhn94Bqi5AmBDN+wGD2+jJKmrmIta2IabMOStfx4C qsQIx4w5xJl8XwPbmrtx7TolFpX6CwV1jM4Ho/PL5xiQu4YqxE0QqXnIZlKbcZyOKJZP OUAJXCYZsVUu0CDRF+dSDl4H15Zly1IU5vHRakHWInFIJLmyIdB4ZrM+vhAe1Kbe5PoC KoGvlbkYvceUZoCZLpSIsxj1NB0xQwL5iemPViVUmcBE0P9TFqhRYaMPwCAXQBDRzdEz yZ2kyoKRC1IUPKBSal6IMiY4IfZBTi5eTo6AIsv7u2hudFXuzHuJX+vg4qvtyFZEFRwH pkzQ== X-Gm-Message-State: AOJu0YwVPmgoBY6KmRtTsNxvqadMRnrr24F/CnFS5Rh/zgbfjgghfSEW D7B7NvWqHWjK02YbuWK+GdfTZdqoRpdWhadW8bFic/ZjkqUIAdqnY80KsLN6tPCvdir/Y2kG2o6 BhlFi X-Gm-Gg: ASbGncsM1cAajXM+Rmgen/7NQJ2IU2iqYd4C1iras071mALN+HGReoDvUzGK6+UzzTk fshurIlv/SwMGrOBt7UHRMgQhByy+pLbhMO6KYdPlOrzyQDIwze9wyED1ZWZy+rdXP6/KuBGUOK AeWzbpoUHYq3cMYgMxUXUxzqBIQrRG8DHWOK47j39a8HGvBfJrw+W4MH2i3UwpHWLOjXRQy0MlH iscZHxyvFTERKN1WMDK9d9MKeqS2MtFQRdUBiU4wTXcKrq9KA1YchhcGg5ASGjtq2xeVD56dvta 6Griooyl7cFx1gxYNaSoAhGaSX12r/LeAe9fLNpWhU3BbmQWfiKTTQwZf4ixCNNSeHd48k71BSV tHVXDaLGrysG9kJPCfLoM/vU7Qg/EfdYM4OptP/kRaBp2fkiqH/Kb3b6SnrtmLWr/Jc4dxvWAT8 FVsUcJwA== X-Google-Smtp-Source: AGHT+IEiCvEhmnEUluYvrneZOJPgbWKLeHS75hCXLn5Wr+TMAysJLk5+fgmoLyvBw0sK/8JWw1GJ6A== X-Received: by 2002:a05:6000:2507:b0:3e7:46bf:f89d with SMTP id ffacd0b85a97d-429bd6ac0bemr4318491f8f.44.1761935616738; Fri, 31 Oct 2025 11:33:36 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 25/38] target/arm/hvf: Factor hvf_handle_exception() out Date: Fri, 31 Oct 2025 18:32:57 +0000 Message-ID: <20251031183310.3778349-26-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::435; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x435.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936013179154102 From: Philippe Mathieu-Daud=C3=A9 Factor hvf_handle_exception() out of hvf_vcpu_exec(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 123 +++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 58 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index fcb6950692b..8553ce6adc2 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1802,61 +1802,15 @@ static void hvf_sync_vtimer(CPUState *cpu) } } =20 -int hvf_arch_vcpu_exec(CPUState *cpu) +static int hvf_handle_exception(CPUState *cpu, hv_vcpu_exit_exception_t *e= xcp) { - ARMCPU *arm_cpu =3D ARM_CPU(cpu); - CPUARMState *env =3D &arm_cpu->env; - int ret; - hv_vcpu_exit_t *hvf_exit =3D cpu->accel->exit; - hv_return_t r; - bool advance_pc =3D false; - - if (!(cpu->singlestep_enabled & SSTEP_NOIRQ) && - hvf_inject_interrupts(cpu)) { - return EXCP_INTERRUPT; - } - - if (cpu->halted) { - return EXCP_HLT; - } - - flush_cpu_state(cpu); - - bql_unlock(); - r =3D hv_vcpu_run(cpu->accel->fd); - bql_lock(); - switch (r) { - case HV_SUCCESS: - break; - case HV_ILLEGAL_GUEST_STATE: - trace_hvf_illegal_guest_state(); - /* fall through */ - default: - g_assert_not_reached(); - } - - /* handle VMEXIT */ - uint64_t exit_reason =3D hvf_exit->reason; - uint64_t syndrome =3D hvf_exit->exception.syndrome; + CPUARMState *env =3D cpu_env(cpu); + ARMCPU *arm_cpu =3D env_archcpu(env); + uint64_t syndrome =3D excp->syndrome; uint32_t ec =3D syn_get_ec(syndrome); - - ret =3D 0; - switch (exit_reason) { - case HV_EXIT_REASON_EXCEPTION: - /* This is the main one, handle below. */ - break; - case HV_EXIT_REASON_VTIMER_ACTIVATED: - qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1); - cpu->accel->vtimer_masked =3D true; - return 0; - case HV_EXIT_REASON_CANCELED: - /* we got kicked, no exit to process */ - return 0; - default: - g_assert_not_reached(); - } - - hvf_sync_vtimer(cpu); + bool advance_pc =3D false; + hv_return_t r; + int ret =3D 0; =20 switch (ec) { case EC_SOFTWARESTEP: { @@ -1895,7 +1849,7 @@ int hvf_arch_vcpu_exec(CPUState *cpu) cpu_synchronize_state(cpu); =20 CPUWatchpoint *wp =3D - find_hw_watchpoint(cpu, hvf_exit->exception.virtual_address); + find_hw_watchpoint(cpu, excp->virtual_address); if (!wp) { error_report("EXCP_DEBUG but unknown hw watchpoint"); } @@ -1913,8 +1867,8 @@ int hvf_arch_vcpu_exec(CPUState *cpu) uint32_t cm =3D (syndrome >> 8) & 0x1; uint64_t val =3D 0; =20 - trace_hvf_data_abort(hvf_exit->exception.virtual_address, - hvf_exit->exception.physical_address, isv, + trace_hvf_data_abort(excp->virtual_address, + excp->physical_address, isv, iswrite, s1ptw, len, srt); =20 if (cm) { @@ -1928,11 +1882,11 @@ int hvf_arch_vcpu_exec(CPUState *cpu) if (iswrite) { val =3D hvf_get_reg(cpu, srt); address_space_write(&address_space_memory, - hvf_exit->exception.physical_address, + excp->physical_address, MEMTXATTRS_UNSPECIFIED, &val, len); } else { address_space_read(&address_space_memory, - hvf_exit->exception.physical_address, + excp->physical_address, MEMTXATTRS_UNSPECIFIED, &val, len); if (sse) { val =3D sextract64(val, 0, len * 8); @@ -2030,6 +1984,59 @@ int hvf_arch_vcpu_exec(CPUState *cpu) return ret; } =20 +int hvf_arch_vcpu_exec(CPUState *cpu) +{ + ARMCPU *arm_cpu =3D ARM_CPU(cpu); + hv_vcpu_exit_t *hvf_exit =3D cpu->accel->exit; + hv_return_t r; + + if (!(cpu->singlestep_enabled & SSTEP_NOIRQ) && + hvf_inject_interrupts(cpu)) { + return EXCP_INTERRUPT; + } + + if (cpu->halted) { + return EXCP_HLT; + } + + flush_cpu_state(cpu); + + bql_unlock(); + r =3D hv_vcpu_run(cpu->accel->fd); + bql_lock(); + switch (r) { + case HV_SUCCESS: + break; + case HV_ILLEGAL_GUEST_STATE: + trace_hvf_illegal_guest_state(); + /* fall through */ + default: + g_assert_not_reached(); + } + + /* handle VMEXIT */ + uint64_t exit_reason =3D hvf_exit->reason; + + switch (exit_reason) { + case HV_EXIT_REASON_EXCEPTION: + /* This is the main one, handle below. */ + break; + case HV_EXIT_REASON_VTIMER_ACTIVATED: + qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1); + cpu->accel->vtimer_masked =3D true; + return 0; + case HV_EXIT_REASON_CANCELED: + /* we got kicked, no exit to process */ + return 0; + default: + g_assert_not_reached(); + } + + hvf_sync_vtimer(cpu); + + return hvf_handle_exception(cpu, &hvf_exit->exception); +} + static const VMStateDescription vmstate_hvf_vtimer =3D { .name =3D "hvf-vtimer", .version_id =3D 1, --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936187; cv=none; d=zohomail.com; s=zohoarc; b=Ck4mI0IrTA2h2h8gZvgV1KSt/bqmAwESBacXUDMbjIhb2oSV7lEHZdr82qP6Rl9t/hixuzut0wZ2EIVQ7tzcxV1VodFOpMOiCJPi8ni6EL0c906XxhejXsmQxeaTBBqyQ4ufPvrTQnOnWzwB0zHyQjRXxoJg6FIqn/zuZTty4Uw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936187; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=2Mh0LFeLH94Zb/IHGtCh2CyI9et5bSgPlympa9h6fmo=; b=YjZsmjHkRyIUcWGWFI/Vk2KF+Lv7OV+L2PTBId3DItDg4rAxTPmAWG7lJVagOc7++M7RdK3TWp7KHJcBdFHuJkk69UxFh9aD0GBt6agag8nI427AUX1T4R6nRIP38bIt6IqFHzvYYELFw9k1rymjXPnaev7dh2xPLbws/o+QQJU= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761936187305904.5660246320442; Fri, 31 Oct 2025 11:43:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtx4-0004ul-1j; Fri, 31 Oct 2025 14:34:18 -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 1vEtx1-0004tx-Ok for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:15 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwV-0006Fs-Gt for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:15 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-429bccca1e8so959661f8f.0 for ; Fri, 31 Oct 2025 11:33:42 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935618; x=1762540418; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=2Mh0LFeLH94Zb/IHGtCh2CyI9et5bSgPlympa9h6fmo=; b=kLfagaZWFKTEdD9iR99znzMRn/iYTleoBg/g6DbZE9FUbuGU/fbmkrsIRi3ndxTBkc ndoungJTKSxmG3e4EXVzXuGIzfrf+dWbulVBeXx8LfH9TtLhPZp3ve9bH0A/rWeB1Qj1 YsZXbP2HrG725+QrS+J0XKsmJax3Snve5/aHLCeqIV2RZGzFiPDzoJzaXKsOHgJYtlmp bR4EP1iEqskPrW8ILyFRujj1y+aEBZLYVe8sp9krkkHJZZxx9BiLAIWpK7osk6La+FtB cjGY8tIllPkdmbp1TGCf0WM24d8XopvgHOm6cXxMdOu2/S12sTBfAInIDGj3/NvAi0a0 xeNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935618; x=1762540418; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2Mh0LFeLH94Zb/IHGtCh2CyI9et5bSgPlympa9h6fmo=; b=a1hnU1e3b8JP1JDZWBZRLC9/aQQ3DTYJLxpPBzM/1jO8rC6nEXU7vbwLp6xfnj/BnZ Gh8JIOry1/tprSTP0mPynhB2YbsxH0DShD/sC8nU5YVYWkwG88fhNZin0M6mKozPO+yC qyIjb2K7JJmm8V2s5ofrX9dnfn5RWk8xX74p43Z8OKp0rf0sQd8mRaaXgkwvuQdWfOar 4eQVD4fCe3spSAOqdRmQLHHe1QGqHSNoSf//bViVd2UpPRgYtZ9mC1Ldf8rQ0TYS+7AI vuo6sxvxzUh8AX6tfhO/yD8BdsxXrkqSMxQvg/Wtolnb4/wu4Ujv7xHnpUTx3MpK/P98 OnbQ== X-Gm-Message-State: AOJu0YxAw/Xp8tv3DSn7kXX5UyNTRGMiuiAPaT8zLG0ixfH5TtxQY6MB XI6k5FSiWdGbVM42b43pX/pZKS9Omd5lFMyDYXH+hEWWr49QmMzN+D4L2oviDoxBJhtklNLpbPh Afr9P X-Gm-Gg: ASbGncs4nW2V6P2jwoNvdxxG6c6HbDNuizAm41UvYMrfds0XAK+fAUPSLeZDWrPiKxs xRRpDQOce92HNhd5gN7CbeWvKJnc25SdVkcYOpd2ZGsJwkkKj+U1aYtLbO/9btKKtZY5yHcjrIT l3Ao8cSZ8T1/9wcC3SdA2kNMbD1PRdAhrjfFh5GCdmwEnUdJD2eh5Qil6XwsusGF8kmOItM4ziF JmlQJzoqMKX8w/aDhKmFglDRrh0lS0hlTtBv68q4OQIb9yBRkOkoQ0BpZe+DDfvv+QbZGjTaydT Atef84kpTHj5K6RRXDcmxDOVoe9vBlO9oanBEjW6NmMis+5Uoy75YLcJ0aTLDFgERnTX2uyVgDN +PDWErAAx0UChuQ0vcu2UP6yXpp06dOX0taRaibiEAxhd1XXBDWyovFDDNlEH8EA/81eybBPJfp 42mJP3k8PeSzr3As7s X-Google-Smtp-Source: AGHT+IExex/Xy7CpWdnX8gc3S5fPAFNRcd6+zmOV99fDHVgu2dlaAR1CjhIygzP2V2tRc8MkF8I4yw== X-Received: by 2002:a05:6000:2301:b0:3e7:68b2:c556 with SMTP id ffacd0b85a97d-429bd6836c2mr4045322f8f.26.1761935617842; Fri, 31 Oct 2025 11:33:37 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 26/38] target/i386/hvf: Factor hvf_handle_vmexit() out Date: Fri, 31 Oct 2025 18:32:58 +0000 Message-ID: <20251031183310.3778349-27-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936189442158500 From: Philippe Mathieu-Daud=C3=A9 Factor hvf_handle_vmexit() out of hvf_arch_vcpu_exec(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/i386/hvf/hvf.c | 478 +++++++++++++++++++++--------------------- 1 file changed, 244 insertions(+), 234 deletions(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 76a58cb0350..28d98659ec2 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -721,6 +721,249 @@ void hvf_simulate_wrmsr(CPUState *cs) printf("write msr %llx\n", RCX(cs));*/ } =20 +static int hvf_handle_vmexit(CPUState *cpu) +{ + X86CPU *x86_cpu =3D env_archcpu(cpu_env(cpu)); + uint64_t exit_reason =3D rvmcs(cpu->accel->fd, VMCS_EXIT_REASON); + uint64_t exit_qual =3D rvmcs(cpu->accel->fd, VMCS_EXIT_QUALIFICATION); + uint32_t ins_len =3D (uint32_t)rvmcs(cpu->accel->fd, + VMCS_EXIT_INSTRUCTION_LENGTH); + + uint64_t idtvec_info =3D rvmcs(cpu->accel->fd, VMCS_IDT_VECTORING_INFO= ); + int ret =3D 0; + + hvf_store_events(cpu, ins_len, idtvec_info); + rip =3D rreg(cpu->accel->fd, HV_X86_RIP); + env->eflags =3D rreg(cpu->accel->fd, HV_X86_RFLAGS); + + bql_lock(); + + update_apic_tpr(cpu); + current_cpu =3D cpu; + + switch (exit_reason) { + case EXIT_REASON_HLT: { + macvm_set_rip(cpu, rip + ins_len); + if (!(cpu_test_interrupt(cpu, CPU_INTERRUPT_HARD) + && (env->eflags & IF_MASK)) + && !cpu_test_interrupt(cpu, CPU_INTERRUPT_NMI) + && !(idtvec_info & VMCS_IDT_VEC_VALID)) { + cpu->halted =3D 1; + ret =3D EXCP_HLT; + break; + } + ret =3D EXCP_INTERRUPT; + break; + } + case EXIT_REASON_MWAIT: { + ret =3D EXCP_INTERRUPT; + break; + } + /* Need to check if MMIO or unmapped fault */ + case EXIT_REASON_EPT_FAULT: + { + hvf_slot *slot; + uint64_t gpa =3D rvmcs(cpu->accel->fd, VMCS_GUEST_PHYSICAL_ADDRESS= ); + + if (((idtvec_info & VMCS_IDT_VEC_VALID) =3D=3D 0) && + ((exit_qual & EXIT_QUAL_NMIUDTI) !=3D 0)) { + vmx_set_nmi_blocking(cpu); + } + + slot =3D hvf_find_overlap_slot(gpa, 1); + /* mmio */ + if (ept_emulation_fault(slot, gpa, exit_qual)) { + struct x86_decode decode; + + hvf_load_regs(cpu); + decode_instruction(env, &decode); + exec_instruction(env, &decode); + hvf_store_regs(cpu); + break; + } + break; + } + case EXIT_REASON_INOUT: + { + uint32_t in =3D (exit_qual & 8) !=3D 0; + uint32_t size =3D (exit_qual & 7) + 1; + uint32_t string =3D (exit_qual & 16) !=3D 0; + uint32_t port =3D exit_qual >> 16; + /*uint32_t rep =3D (exit_qual & 0x20) !=3D 0;*/ + struct x86_decode decode; + + if (!string && in) { + uint64_t val =3D 0; + + hvf_load_regs(cpu); + hvf_handle_io(env_cpu(env), port, &val, 0, size, 1); + if (size =3D=3D 1) { + AL(env) =3D val; + } else if (size =3D=3D 2) { + AX(env) =3D val; + } else if (size =3D=3D 4) { + RAX(env) =3D (uint32_t)val; + } else { + RAX(env) =3D (uint64_t)val; + } + env->eip +=3D ins_len; + hvf_store_regs(cpu); + break; + } else if (!string && !in) { + RAX(env) =3D rreg(cpu->accel->fd, HV_X86_RAX); + hvf_handle_io(env_cpu(env), port, &RAX(env), 1, size, 1); + macvm_set_rip(cpu, rip + ins_len); + break; + } + + hvf_load_regs(cpu); + decode_instruction(env, &decode); + assert(ins_len =3D=3D decode.len); + exec_instruction(env, &decode); + hvf_store_regs(cpu); + + break; + } + case EXIT_REASON_CPUID: { + uint32_t rax =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RAX); + uint32_t rbx =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RBX); + uint32_t rcx =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RCX); + uint32_t rdx =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RDX); + + if (rax =3D=3D 1) { + /* CPUID1.ecx.OSXSAVE needs to know CR4 */ + env->cr[4] =3D rvmcs(cpu->accel->fd, VMCS_GUEST_CR4); + } + hvf_cpu_x86_cpuid(env, rax, rcx, &rax, &rbx, &rcx, &rdx); + + wreg(cpu->accel->fd, HV_X86_RAX, rax); + wreg(cpu->accel->fd, HV_X86_RBX, rbx); + wreg(cpu->accel->fd, HV_X86_RCX, rcx); + wreg(cpu->accel->fd, HV_X86_RDX, rdx); + + macvm_set_rip(cpu, rip + ins_len); + break; + } + case EXIT_REASON_XSETBV: { + uint32_t eax =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RAX); + uint32_t ecx =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RCX); + uint32_t edx =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RDX); + + if (ecx) { + macvm_set_rip(cpu, rip + ins_len); + break; + } + env->xcr0 =3D ((uint64_t)edx << 32) | eax; + wreg(cpu->accel->fd, HV_X86_XCR0, env->xcr0 | 1); + macvm_set_rip(cpu, rip + ins_len); + break; + } + case EXIT_REASON_INTR_WINDOW: + vmx_clear_int_window_exiting(cpu); + ret =3D EXCP_INTERRUPT; + break; + case EXIT_REASON_NMI_WINDOW: + vmx_clear_nmi_window_exiting(cpu); + ret =3D EXCP_INTERRUPT; + break; + case EXIT_REASON_EXT_INTR: + /* force exit and allow io handling */ + ret =3D EXCP_INTERRUPT; + break; + case EXIT_REASON_RDMSR: + case EXIT_REASON_WRMSR: + { + hvf_load_regs(cpu); + if (exit_reason =3D=3D EXIT_REASON_RDMSR) { + hvf_simulate_rdmsr(cpu); + } else { + hvf_simulate_wrmsr(cpu); + } + env->eip +=3D ins_len; + hvf_store_regs(cpu); + break; + } + case EXIT_REASON_CR_ACCESS: { + int cr; + int reg; + + hvf_load_regs(cpu); + cr =3D exit_qual & 15; + reg =3D (exit_qual >> 8) & 15; + + switch (cr) { + case 0x0: { + macvm_set_cr0(cpu->accel->fd, RRX(env, reg)); + break; + } + case 4: { + macvm_set_cr4(cpu->accel->fd, RRX(env, reg)); + break; + } + case 8: { + if (exit_qual & 0x10) { + RRX(env, reg) =3D cpu_get_apic_tpr(x86_cpu->apic_state); + } else { + int tpr =3D RRX(env, reg); + cpu_set_apic_tpr(x86_cpu->apic_state, tpr); + ret =3D EXCP_INTERRUPT; + } + break; + } + default: + error_report("Unrecognized CR %d", cr); + abort(); + } + env->eip +=3D ins_len; + hvf_store_regs(cpu); + break; + } + case EXIT_REASON_APIC_ACCESS: { /* TODO */ + struct x86_decode decode; + + hvf_load_regs(cpu); + decode_instruction(env, &decode); + exec_instruction(env, &decode); + hvf_store_regs(cpu); + break; + } + case EXIT_REASON_TPR: { + ret =3D 1; + break; + } + case EXIT_REASON_TASK_SWITCH: { + uint64_t vinfo =3D rvmcs(cpu->accel->fd, VMCS_IDT_VECTORING_INFO); + x86_segment_selector sel =3D {.sel =3D exit_qual & 0xffff}; + + vmx_handle_task_switch(cpu, sel, (exit_qual >> 30) & 0x3, + vinfo & VMCS_INTR_VALID, + vinfo & VECTORING_INFO_VECTOR_MASK, + vinfo & VMCS_INTR_T_MASK); + break; + } + case EXIT_REASON_TRIPLE_FAULT: { + qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); + ret =3D EXCP_INTERRUPT; + break; + } + case EXIT_REASON_RDPMC: + wreg(cpu->accel->fd, HV_X86_RAX, 0); + wreg(cpu->accel->fd, HV_X86_RDX, 0); + macvm_set_rip(cpu, rip + ins_len); + break; + case VMX_REASON_VMCALL: + env->exception_nr =3D EXCP0D_GPF; + env->exception_injected =3D 1; + env->has_error_code =3D true; + env->error_code =3D 0; + break; + default: + error_report("%llx: unhandled exit %llx", rip, exit_reason); + } + + return ret; +} + int hvf_arch_vcpu_exec(CPUState *cpu) { X86CPU *x86_cpu =3D X86_CPU(cpu); @@ -752,240 +995,7 @@ int hvf_arch_vcpu_exec(CPUState *cpu) hv_return_t r =3D hv_vcpu_run_until(cpu->accel->fd, HV_DEADLINE_FO= REVER); assert_hvf_ok(r); =20 - /* handle VMEXIT */ - uint64_t exit_reason =3D rvmcs(cpu->accel->fd, VMCS_EXIT_REASON); - uint64_t exit_qual =3D rvmcs(cpu->accel->fd, VMCS_EXIT_QUALIFICATI= ON); - uint32_t ins_len =3D (uint32_t)rvmcs(cpu->accel->fd, - VMCS_EXIT_INSTRUCTION_LENGTH); - - uint64_t idtvec_info =3D rvmcs(cpu->accel->fd, VMCS_IDT_VECTORING_= INFO); - - hvf_store_events(cpu, ins_len, idtvec_info); - rip =3D rreg(cpu->accel->fd, HV_X86_RIP); - env->eflags =3D rreg(cpu->accel->fd, HV_X86_RFLAGS); - - bql_lock(); - - update_apic_tpr(cpu); - current_cpu =3D cpu; - - ret =3D 0; - switch (exit_reason) { - case EXIT_REASON_HLT: { - macvm_set_rip(cpu, rip + ins_len); - if (!(cpu_test_interrupt(cpu, CPU_INTERRUPT_HARD) && - (env->eflags & IF_MASK)) - && !cpu_test_interrupt(cpu, CPU_INTERRUPT_NMI) && - !(idtvec_info & VMCS_IDT_VEC_VALID)) { - cpu->halted =3D 1; - ret =3D EXCP_HLT; - break; - } - ret =3D EXCP_INTERRUPT; - break; - } - case EXIT_REASON_MWAIT: { - ret =3D EXCP_INTERRUPT; - break; - } - /* Need to check if MMIO or unmapped fault */ - case EXIT_REASON_EPT_FAULT: - { - hvf_slot *slot; - uint64_t gpa =3D rvmcs(cpu->accel->fd, VMCS_GUEST_PHYSICAL_ADD= RESS); - - if (((idtvec_info & VMCS_IDT_VEC_VALID) =3D=3D 0) && - ((exit_qual & EXIT_QUAL_NMIUDTI) !=3D 0)) { - vmx_set_nmi_blocking(cpu); - } - - slot =3D hvf_find_overlap_slot(gpa, 1); - /* mmio */ - if (ept_emulation_fault(slot, gpa, exit_qual)) { - struct x86_decode decode; - - hvf_load_regs(cpu); - decode_instruction(env, &decode); - exec_instruction(env, &decode); - hvf_store_regs(cpu); - break; - } - break; - } - case EXIT_REASON_INOUT: - { - uint32_t in =3D (exit_qual & 8) !=3D 0; - uint32_t size =3D (exit_qual & 7) + 1; - uint32_t string =3D (exit_qual & 16) !=3D 0; - uint32_t port =3D exit_qual >> 16; - /*uint32_t rep =3D (exit_qual & 0x20) !=3D 0;*/ - - if (!string && in) { - uint64_t val =3D 0; - hvf_load_regs(cpu); - hvf_handle_io(env_cpu(env), port, &val, 0, size, 1); - if (size =3D=3D 1) { - AL(env) =3D val; - } else if (size =3D=3D 2) { - AX(env) =3D val; - } else if (size =3D=3D 4) { - RAX(env) =3D (uint32_t)val; - } else { - RAX(env) =3D (uint64_t)val; - } - env->eip +=3D ins_len; - hvf_store_regs(cpu); - break; - } else if (!string && !in) { - RAX(env) =3D rreg(cpu->accel->fd, HV_X86_RAX); - hvf_handle_io(env_cpu(env), port, &RAX(env), 1, size, 1); - macvm_set_rip(cpu, rip + ins_len); - break; - } - struct x86_decode decode; - - hvf_load_regs(cpu); - decode_instruction(env, &decode); - assert(ins_len =3D=3D decode.len); - exec_instruction(env, &decode); - hvf_store_regs(cpu); - - break; - } - case EXIT_REASON_CPUID: { - uint32_t rax =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RAX); - uint32_t rbx =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RBX); - uint32_t rcx =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RCX); - uint32_t rdx =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RDX); - - if (rax =3D=3D 1) { - /* CPUID1.ecx.OSXSAVE needs to know CR4 */ - env->cr[4] =3D rvmcs(cpu->accel->fd, VMCS_GUEST_CR4); - } - hvf_cpu_x86_cpuid(env, rax, rcx, &rax, &rbx, &rcx, &rdx); - - wreg(cpu->accel->fd, HV_X86_RAX, rax); - wreg(cpu->accel->fd, HV_X86_RBX, rbx); - wreg(cpu->accel->fd, HV_X86_RCX, rcx); - wreg(cpu->accel->fd, HV_X86_RDX, rdx); - - macvm_set_rip(cpu, rip + ins_len); - break; - } - case EXIT_REASON_XSETBV: { - uint32_t eax =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RAX); - uint32_t ecx =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RCX); - uint32_t edx =3D (uint32_t)rreg(cpu->accel->fd, HV_X86_RDX); - - if (ecx) { - macvm_set_rip(cpu, rip + ins_len); - break; - } - env->xcr0 =3D ((uint64_t)edx << 32) | eax; - wreg(cpu->accel->fd, HV_X86_XCR0, env->xcr0 | 1); - macvm_set_rip(cpu, rip + ins_len); - break; - } - case EXIT_REASON_INTR_WINDOW: - vmx_clear_int_window_exiting(cpu); - ret =3D EXCP_INTERRUPT; - break; - case EXIT_REASON_NMI_WINDOW: - vmx_clear_nmi_window_exiting(cpu); - ret =3D EXCP_INTERRUPT; - break; - case EXIT_REASON_EXT_INTR: - /* force exit and allow io handling */ - ret =3D EXCP_INTERRUPT; - break; - case EXIT_REASON_RDMSR: - case EXIT_REASON_WRMSR: - { - hvf_load_regs(cpu); - if (exit_reason =3D=3D EXIT_REASON_RDMSR) { - hvf_simulate_rdmsr(cpu); - } else { - hvf_simulate_wrmsr(cpu); - } - env->eip +=3D ins_len; - hvf_store_regs(cpu); - break; - } - case EXIT_REASON_CR_ACCESS: { - int cr; - int reg; - - hvf_load_regs(cpu); - cr =3D exit_qual & 15; - reg =3D (exit_qual >> 8) & 15; - - switch (cr) { - case 0x0: { - macvm_set_cr0(cpu->accel->fd, RRX(env, reg)); - break; - } - case 4: { - macvm_set_cr4(cpu->accel->fd, RRX(env, reg)); - break; - } - case 8: { - if (exit_qual & 0x10) { - RRX(env, reg) =3D cpu_get_apic_tpr(x86_cpu->apic_state= ); - } else { - int tpr =3D RRX(env, reg); - cpu_set_apic_tpr(x86_cpu->apic_state, tpr); - ret =3D EXCP_INTERRUPT; - } - break; - } - default: - error_report("Unrecognized CR %d", cr); - abort(); - } - env->eip +=3D ins_len; - hvf_store_regs(cpu); - break; - } - case EXIT_REASON_APIC_ACCESS: { /* TODO */ - struct x86_decode decode; - - hvf_load_regs(cpu); - decode_instruction(env, &decode); - exec_instruction(env, &decode); - hvf_store_regs(cpu); - break; - } - case EXIT_REASON_TPR: { - ret =3D 1; - break; - } - case EXIT_REASON_TASK_SWITCH: { - uint64_t vinfo =3D rvmcs(cpu->accel->fd, VMCS_IDT_VECTORING_IN= FO); - x86_segment_selector sel =3D {.sel =3D exit_qual & 0xffff}; - vmx_handle_task_switch(cpu, sel, (exit_qual >> 30) & 0x3, - vinfo & VMCS_INTR_VALID, vinfo & VECTORING_INFO_VECTOR_MASK, = vinfo - & VMCS_INTR_T_MASK); - break; - } - case EXIT_REASON_TRIPLE_FAULT: { - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); - ret =3D EXCP_INTERRUPT; - break; - } - case EXIT_REASON_RDPMC: - wreg(cpu->accel->fd, HV_X86_RAX, 0); - wreg(cpu->accel->fd, HV_X86_RDX, 0); - macvm_set_rip(cpu, rip + ins_len); - break; - case VMX_REASON_VMCALL: - env->exception_nr =3D EXCP0D_GPF; - env->exception_injected =3D 1; - env->has_error_code =3D true; - env->error_code =3D 0; - break; - default: - error_report("%llx: unhandled exit %llx", rip, exit_reason); - } + ret =3D hvf_handle_vmexit(cpu); } while (ret =3D=3D 0); =20 return ret; --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935979; cv=none; d=zohomail.com; s=zohoarc; b=T5TeRYYe7PDfTO8JgL/4YKEpcsHeStG4johyDOHn1xaBEVHkr8gqxWt9lOgH9RWVzdZtL3wQthdEPjom3OhVsJkT9jv2qUer0Oz1mazl7J9lI7O/nhfUfHJwVlSVcPRQSGZjLGZJILw1XTxOZgOKwmGvZOEUs0Y5BnQnMrCNbao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935979; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=hur19iUUYNUgD6AtJZs6/SDmdazLc6Uv6UNAGUuwO6E=; b=TnYjaXwCa52P7Vp/qtAcBgUp8k3l7wp7haJmuIB+YKdafxuoeJmtbgswC8lvBhCwZW0dZGZXIggvZ/q0MYv6QNJkS7MW3nEzAIDvvSsVAxtCTu3PYd2ENLTPJqPuvyO3iDkNOkcNr5A8SACiul0vFkfiQzJ8ZhwzUeG3PQYH2LQ= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935979533445.1406287884255; Fri, 31 Oct 2025 11:39:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtxM-00055I-3q; Fri, 31 Oct 2025 14:34:36 -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 1vEtxK-00054g-MY for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:34 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwc-0006Fu-FT for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:34 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-429b7eecf7cso1756847f8f.0 for ; Fri, 31 Oct 2025 11:33:41 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935619; x=1762540419; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hur19iUUYNUgD6AtJZs6/SDmdazLc6Uv6UNAGUuwO6E=; b=MoL1qEIBNtDh1p3bkjg6ITWelw+zU9D6wYM6XO19enlEeJOX1jIx8lWoe79YkUzw+h bGeKF/jjs5QK1FdJH34kT4ySdRIPjf+m/oJC7Ul2pCWzrfAoMpEDpSykVhzVIauRLSfJ ESfGcfYxcFgXk9S5q1+HzRs7fBZSL0CUbTXEZAQ15wJTMWnC6rWJmpUDMWR5sm59HiXH 5Hr1dp7nEYiWl60H2gljQFQOxp0rorFJbOC4+BVI9aFUxMzFkWRCj7TLUFxB5w3nf5ur IbRTyzdC24ml4LBgxwzihQa14nMbyN8w07x8CEEa17TT2DofnXcnA+TcnNhUBu1SYhnr a7Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935619; x=1762540419; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hur19iUUYNUgD6AtJZs6/SDmdazLc6Uv6UNAGUuwO6E=; b=TtnAjWiJiuShZbQCuAij0TDa+53PwrB3szMGGKPxpZQZzGboANVKHrCvYLBdeqHLZx x03JyoAV0cxB3h3CzSJZWv35N+TisqQ7H0aG5qJWCeJI2nLMHC0eRCjOOWy2Kmnqi5Cs rYghCgVSpY2iQ59ZvTTkoJflpaOQfieMWapcniEXp96G1RrY4RznzrvDb1MMs2dDLwI5 /3dxLFsYQvoiKVdkUjD20+J+mKhuRUJoQNF2v6Smnh3lkTTUshU7A0jywPizFWvZdMjw 69LiwlfiJj/bgvlkbw2GebhHjT66vASNhA2QymeCq2VfOH/OwubLlAFRmCZerdB9iRfW e9CA== X-Gm-Message-State: AOJu0YxBZJe9CL1tppDN6pd6X9izU+s6Bii8KxvzD0L7Xq0Oeo475FS8 5uVd77H5OFzXLfiEcdQr+0Ju2nxbggd4pi/DHkYpaYdmQJlWpOpe/YSwIwDIu/Qc+OVx9JFVTtc KVsH4 X-Gm-Gg: ASbGnctt7NDgybiH3r3ibqbWbgZLXRgcE+70GlB0va84GJUCdQPmXmnFyt5srfywy7A hkTKp9AmzP95IGi2d/LozxZTD86UH8C2p6XXAL41qVmyjdIhqzQy/vd4vzbh2qBKXWkbOZKD4M6 +UkS8UmPu0dmcYjhL8OLwrG7jFjeCZqBN1BfR7l8eGtrG6CnUqQBTk4lrX23Cj3QXqTBOuZlXpa ntk+PBbAmKsmQYHa7049iZVT0WlcgDZ6wh8KGeUdu0qtW49VUmvkkp5qKwtv9nD6P0rK3Vn1tmd uExkdDhGlmmpW5f21w236fWyaEbn3TFrAdVRC5yxA5Ypd8A50U9mUMJQ3Bu6J3Al5nEdjZ+2Cnb n5UqQMQpxpUWjV0pv+rTu8gExQDYEjT8h0mYBKAUBODj3Ot0vppRVBprCBP6bE7RyeM0iR2JV0J UFVe5+dw== X-Google-Smtp-Source: AGHT+IFfzx3BdHDCAUWhUm4zPhzqiBrLAOChxXi6Iu2dpZyHUxvu4GEqQkyu0jsROwnMCYAiqlHp3w== X-Received: by 2002:a05:6000:2204:b0:3e7:6424:1b47 with SMTP id ffacd0b85a97d-429bcccf175mr4701743f8f.6.1761935618791; Fri, 31 Oct 2025 11:33:38 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 27/38] target/arm/hvf: Factor hvf_handle_vmexit() out Date: Fri, 31 Oct 2025 18:32:59 +0000 Message-ID: <20251031183310.3778349-28-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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, T_SPF_TEMPERROR=0.01 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935981085158500 From: Philippe Mathieu-Daud=C3=A9 Factor hvf_handle_vmexit() out of hvf_vcpu_exec(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 50 ++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 8553ce6adc2..27c600148f9 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1984,10 +1984,33 @@ static int hvf_handle_exception(CPUState *cpu, hv_v= cpu_exit_exception_t *excp) return ret; } =20 +static int hvf_handle_vmexit(CPUState *cpu, hv_vcpu_exit_t *exit) +{ + ARMCPU *arm_cpu =3D env_archcpu(cpu_env(cpu)); + int ret =3D 0; + + switch (exit->reason) { + case HV_EXIT_REASON_EXCEPTION: + hvf_sync_vtimer(cpu); + ret =3D hvf_handle_exception(cpu, &exit->exception); + break; + case HV_EXIT_REASON_VTIMER_ACTIVATED: + qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1); + cpu->accel->vtimer_masked =3D true; + break; + case HV_EXIT_REASON_CANCELED: + /* we got kicked, no exit to process */ + break; + default: + g_assert_not_reached(); + } + + return ret; +} + int hvf_arch_vcpu_exec(CPUState *cpu) { - ARMCPU *arm_cpu =3D ARM_CPU(cpu); - hv_vcpu_exit_t *hvf_exit =3D cpu->accel->exit; + int ret; hv_return_t r; =20 if (!(cpu->singlestep_enabled & SSTEP_NOIRQ) && @@ -2006,6 +2029,7 @@ int hvf_arch_vcpu_exec(CPUState *cpu) bql_lock(); switch (r) { case HV_SUCCESS: + ret =3D hvf_handle_vmexit(cpu, cpu->accel->exit); break; case HV_ILLEGAL_GUEST_STATE: trace_hvf_illegal_guest_state(); @@ -2014,27 +2038,7 @@ int hvf_arch_vcpu_exec(CPUState *cpu) g_assert_not_reached(); } =20 - /* handle VMEXIT */ - uint64_t exit_reason =3D hvf_exit->reason; - - switch (exit_reason) { - case HV_EXIT_REASON_EXCEPTION: - /* This is the main one, handle below. */ - break; - case HV_EXIT_REASON_VTIMER_ACTIVATED: - qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1); - cpu->accel->vtimer_masked =3D true; - return 0; - case HV_EXIT_REASON_CANCELED: - /* we got kicked, no exit to process */ - return 0; - default: - g_assert_not_reached(); - } - - hvf_sync_vtimer(cpu); - - return hvf_handle_exception(cpu, &hvf_exit->exception); + return ret; } =20 static const VMStateDescription vmstate_hvf_vtimer =3D { --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935993; cv=none; d=zohomail.com; s=zohoarc; b=fBOu7cVPUelbQFHUUELeSOsNxuPsBfW4ICVA34VI/QOwHP9c5Bnz15sUZN5Ymsqt/Bx5ZN8sUA7d0Aa5fANU9JVF3N42mP6eOnrQ7ka+9EWwZuDtLN0+3EsragIyaMJG6mgBMimOn4+IjVcmWAUhsTsQODj5eqVGcoFBEkK0NAQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935993; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=WX7Ee6VPJvKSDjRLMyJTsu752I/A2CwZTQzBhElT1bU=; b=HpHBvDvra9k4Ld5WJPMzRt0RWYVgTexfxsOa77j1c69ZfU0ZbUMydB1WAd04uV0Iou9rrhxTOKoLCq/eWZ6olXtHncAIo8NEjeZf1sVqbbVqaioXYaCAhtss/SwiakPY5hJzxURsD94tMrL+3kUIrtMrk4sZioUGWSYkYJyOeF8= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935993506834.7375590790836; Fri, 31 Oct 2025 11:39:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtxG-0004xv-HL; Fri, 31 Oct 2025 14:34:30 -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 1vEtxB-0004wr-Jo for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:25 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwb-0006Gu-Lf for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:24 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-429b895458cso1590736f8f.1 for ; Fri, 31 Oct 2025 11:33:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935620; x=1762540420; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WX7Ee6VPJvKSDjRLMyJTsu752I/A2CwZTQzBhElT1bU=; b=j4ntgdcTEeyTzeHk5NPES8BvAfscBvlP/3XR52OYLbNo6sTKlIdTM6W2MxuDL/By63 QfkCpQtn0VqRvI8yuPPaFb8TYfmjw4D3icUPlB8r4hyy7CXa7RC+WMZfMXD39sfLNJx8 HrO/7YSjpWyZXo44jsUUTX4VyHmKmoWW6sROLQur3A6Vex39pAUgcqYHX/EjHnbVwyCr fRt93XY4HZF/fFa9G1WcM9sHk/JS710TWIqWhh0y8lDms/MIOiA9ir3hupObrz9w479w 2WvWP8tJQzgQEYtxsngmZyjLrpCtQw0y/jIoLTG55uH84xKiZDcSnJOvIGZ0l4rQYo8w stJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935620; x=1762540420; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WX7Ee6VPJvKSDjRLMyJTsu752I/A2CwZTQzBhElT1bU=; b=ecf03oVbeo7wSg/J+ch6OKf/NS9mEW0HX8WYIS3+PQXJjeiHLJgtlnCmDGNONGJ3wJ aulLhSp6Z0NpQQ0Udg+uslsDD0j7v+twCqKRYO0fEyph2ZF9p6ySi4O/0D6kGKKThWNZ m4xf8umIKfp6FDEduSsZpMtSKRCmwsS3zz/oTMraO3cMRSRtuZddOHvrVjgW937vvv3A jLaDs+uaN9lqDsomgmhFNoL7wQyZqMf5tu8W43Xl4U0TCO5tgMtyZHUR05Ci6sK91cdc CizD4DtqO+qfVWKAiQSgkFRlFXau8lU8owelId74+wOx8UdS50gX2u8qgAVVkQVhVX99 95iA== X-Gm-Message-State: AOJu0YwSS6mtp0O9b5n+ZnlvwNIKXNfB4F+LoaDqRJ+hut/vSTv8ojCm vZb4rX+E0qFg3G4l3c0O3XL+9KDDPMRnInEXr9nleciJ1pj8cxup8Hk+N87v28xc5Cpp6MZvLxQ iGps9 X-Gm-Gg: ASbGncto3NvEzg1UAWfeiEMOl3Z1Nl3M5s7pvUmZym6hBiOCrGmCFRK40QqfILwjf/l ZzwpcO+kPFoZdlnkWMdA+geU/U2wwb1008a9fRm5rGUSJ6GwG6vB42kVVRiobvayguUTJi60gM/ jTEEKgfxxE1THuEucqJrUx9hdb03iPuMOnYAnBHsNl6I/Ibh3C+SHTQG7TvwfnRJoEOGgqP0Ezf nEvRl/6VGgIsML4SWSxbdRCkoeU1N7O56Cn14bnf+405oj5YWMBSTlc1ZwkUr+OTRvoGANfYGwk H3EpVdbDjRTMfoo4m3AxOKLCQ97YiGPIrUUPn91/Sq7ZXKU+PtgjlTj0KUhkCkUO44qi8dWDRgS QZOQSNkkH1yIWro3yGjRrY6myxFvtbajV1EVPdjcqavOiqpLCcW1G11H8e7GPZUu14GlIIh76GX C/ZZslGg== X-Google-Smtp-Source: AGHT+IFOfLoNcAYo6sIha9Tq7MqiVZpKk/HuXCQpAm1QYCLq2/b7USmq9AG9HqBGu2EWUn2H4r6nyw== X-Received: by 2002:a05:6000:2382:b0:427:6c7:66f8 with SMTP id ffacd0b85a97d-429bd6a7d6fmr4454319f8f.52.1761935619692; Fri, 31 Oct 2025 11:33:39 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 28/38] target/arm/hvf: Keep calling hv_vcpu_run() in loop Date: Fri, 31 Oct 2025 18:33:00 +0000 Message-ID: <20251031183310.3778349-29-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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, T_SPF_TEMPERROR=0.01 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935997193158500 From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Mads Ynddal Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 27c600148f9..79861dcacf9 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2013,30 +2013,32 @@ int hvf_arch_vcpu_exec(CPUState *cpu) int ret; hv_return_t r; =20 - if (!(cpu->singlestep_enabled & SSTEP_NOIRQ) && - hvf_inject_interrupts(cpu)) { - return EXCP_INTERRUPT; - } - if (cpu->halted) { return EXCP_HLT; } =20 flush_cpu_state(cpu); =20 - bql_unlock(); - r =3D hv_vcpu_run(cpu->accel->fd); - bql_lock(); - switch (r) { - case HV_SUCCESS: - ret =3D hvf_handle_vmexit(cpu, cpu->accel->exit); - break; - case HV_ILLEGAL_GUEST_STATE: - trace_hvf_illegal_guest_state(); - /* fall through */ - default: - g_assert_not_reached(); - } + do { + if (!(cpu->singlestep_enabled & SSTEP_NOIRQ) && + hvf_inject_interrupts(cpu)) { + return EXCP_INTERRUPT; + } + + bql_unlock(); + r =3D hv_vcpu_run(cpu->accel->fd); + bql_lock(); + switch (r) { + case HV_SUCCESS: + ret =3D hvf_handle_vmexit(cpu, cpu->accel->exit); + break; + case HV_ILLEGAL_GUEST_STATE: + trace_hvf_illegal_guest_state(); + /* fall through */ + default: + g_assert_not_reached(); + } + } while (ret =3D=3D 0); =20 return ret; } --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935709; cv=none; d=zohomail.com; s=zohoarc; b=DFeCOkPB++U/gUsr5S1xVAUthd4QG5n3p8AFtD77D9ItswwEc3vEMqiFZwv1UPLrwHTsT+dpDXs4xuitpKOhJoZ/JqyM1El0xRUexquAe55Fr5tYIiYHH4E8a48xVdKS8kdOZ+kRJVGXRhs02TRCJERHNUch/V+ubTKUGHsto7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935709; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=k1r0w/d09dhPJfEfi0bI+xoHmlX36d6WOod1Oi7dPps=; b=UR3o9UHQ+3NQGTTYpRyc2JpKoffGtrTySIO7lqVGdsX2S10IVHetl3HExufcHhaZWhbK0W65R2U4TyavqkX8fKj1gScsHNizZTdosZT0AycOzUJlJEsRwHiLib88wRhQSJ8g5VB0Akq8yVcWeUoAOlXlzIH7Q763lQobk0y5MbQ= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935709666545.3609319258491; Fri, 31 Oct 2025 11:35:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtx6-0004vz-Oo; Fri, 31 Oct 2025 14:34:20 -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 1vEtx4-0004ut-68 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:18 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwa-0006H0-TO for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:17 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-47118259fd8so19739635e9.3 for ; Fri, 31 Oct 2025 11:33:45 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935621; x=1762540421; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=k1r0w/d09dhPJfEfi0bI+xoHmlX36d6WOod1Oi7dPps=; b=f5jSBYZEkzhGU+IrPWgVJdZF8+OwDzQyDjwOmjsPIKYplbGCc53TG5ftMujcuW644l hW7duTCiM32RQGEcoHIs/kLnDde17/ZAT69RBwmN86g0zWzHIBlSn5rhXXEIH1r7be4v I1fhZ6lncmhj7Cp60Wk7SfwKuq9W86VwimKaOQmnKXd9SAEn2qCoVofdCyi4cIdneqUh QaMVyysjXpO4T0EOs5PbmjRtzTpGNRR2/4SG7xl95z8W1tHVzM/Ptbxkup0gsjasPGmG SSqqxqkbiyh2ocSThoMDRFTQZY3Yc8ZapTlmezIxylHUZSHro6hbGXoVyLD+be+rgGJg cd5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935621; x=1762540421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k1r0w/d09dhPJfEfi0bI+xoHmlX36d6WOod1Oi7dPps=; b=eoL25yyyu/6n/JdZyV9hvj7pOQFaOH2qvf3IndxlUqTrsfeikvZO/SC/ED10q1GRXk pg7U3x96ea9zcD8NMjo4XD/JtH4IJbSPiWEj1OxeEsFd/K631qowJ6Nkj7HzCWGuuY21 kzQX24BU8qM+ZTX5WNQ3bC63AQAZr8QRZVbiqu+FDTuASNwwH1ciCaaoD+kMmHnejkNO SEzckKyBLEGrF2y0DTVbetp/o4L09f3NbOycxmwfdtMYPgGdVtcH6MzxDcTno9OmvlRd ihI1BM5/X44KYhssARdcmjYcprihQig38ZznIP9HAYgNmuoUWWFmhnqbPqy/sN6j8Tgs KO1Q== X-Gm-Message-State: AOJu0YzfXpuFPhMEWf/XdkRX118gMZMkpoxU2jZjH8fANrSEUs9/rsBG 1nmGKVP4cKvTWpzPXE+k6ihbULQYZYgib8mIVwUcJhfssC2Ch/EhDT7jyt+JElCVgmFoHsUyKzp anTe6 X-Gm-Gg: ASbGnct4aafBuwnQ7bHgq/9SaVG6SUpetSxubkDOlmqah3GQnpZNkVqpl7hiPjaIPC4 pZGyI8psphbhFuy95SBbfCbtOE9DjK+EKmI3C7GwVAS4lLUSedM1tJ/frHiJZeETnmDsYhk1bN2 viyhqTMeQhFlTPs+l4lYbBA79MVmwPCI4jTgaBSTgsa7pIdHmRV0kYVFYZ56/6aFdhYzJcptMIJ jKVbCuIPTRksqs3207mp9c0BxmjQIkDHdV0Jf4OfWxzJyLkms8sWUvBdyYUpghS2r/ow9uHGthi dI/ZZ2E+anh+segNz1CJinhtq0Yffqm+0o7W/KfOAiySqef+QUO0zOzAsVbQBKrY7P+VpqLmhRp XtOzB0ioZkuHOgDvv5eEVsqQ7x7rV7unRhFifaThzA2Tsx3G86X//uEvrWqXGP3Q5iEgEsg9CnF bOtfbJzQ== X-Google-Smtp-Source: AGHT+IEzEMzCbExH/o72cMb7vr+MjGB5MQOv5OXKUze7FrrGu4Jh42Jz3nQLLURZ841Fc2DueuPHiw== X-Received: by 2002:a05:600c:a08:b0:46f:b43a:aef4 with SMTP id 5b1f17b1804b1-477308c9f72mr42032085e9.38.1761935620824; Fri, 31 Oct 2025 11:33:40 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 29/38] cpus: Trace cpu_exec_start() and cpu_exec_end() calls Date: Fri, 31 Oct 2025 18:33:01 +0000 Message-ID: <20251031183310.3778349-30-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935716190158500 From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- cpu-common.c | 3 +++ trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/cpu-common.c b/cpu-common.c index 0eb5c7b8f24..988d057d844 100644 --- a/cpu-common.c +++ b/cpu-common.c @@ -249,6 +249,8 @@ void end_exclusive(void) /* Wait for exclusive ops to finish, and begin cpu execution. */ void cpu_exec_start(CPUState *cpu) { + trace_cpu_exec_start(cpu->cpu_index); + qatomic_set(&cpu->running, true); =20 /* Write cpu->running before reading pending_cpus. */ @@ -319,6 +321,7 @@ void cpu_exec_end(CPUState *cpu) } } } + trace_cpu_exec_end(cpu->cpu_index); } =20 void async_safe_run_on_cpu(CPUState *cpu, run_on_cpu_func func, diff --git a/trace-events b/trace-events index 3ec8a6c7202..faeba6242fa 100644 --- a/trace-events +++ b/trace-events @@ -29,6 +29,8 @@ breakpoint_insert(int cpu_index, uint64_t pc, int flags) "cpu=3D%d pc=3D0x= %" PRIx64 " flags=3D0x%x" breakpoint_remove(int cpu_index, uint64_t pc, int flags) "cpu=3D%d pc=3D0x= %" PRIx64 " flags=3D0x%x" breakpoint_singlestep(int cpu_index, int enabled) "cpu=3D%d enable=3D%d" +cpu_exec_start(int cpu_index) "cpu=3D%d" +cpu_exec_end(int cpu_index) "cpu=3D%d" =20 # job.c job_state_transition(void *job, int ret, const char *legal, const char *s= 0, const char *s1) "job %p (ret: %d) attempting %s transition (%s-->%s)" --=20 2.43.0 From nobody Fri Nov 14 16:50:36 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936149; cv=none; d=zohomail.com; s=zohoarc; b=oHS3lKVcXNS3vT5wdoSBReezZxyQjHHD5SISFz7uTKxXpgILhxseCm1mL+gwcrmrH0pWbTxCEzCDrQu69jpFzJKlTrlYXAn2Z+i0eD8M9xpX4olCcNCXwdBvNhpwZMqcqJz7H3rhj8P8IbjsB1uVsZJIDPkmEGIPJHRcHAv6oI4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936149; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=0H/Qs0aq5jkMkZf4wHt7jLxhKz1DXfAE2FEms7PGAtg=; b=L8zWUQUA++Far9wNZ3Erw+eVlfeTjBuNOKeP9gRVcC/lJeNjBJIIgCxOiEB52D+eWxIs/3pfg9rqvJWGdN/57kev/mNJosGMEJZyKtlyTzQxzwI4ryekJ0M8PWsz13ftLBnbkaRf/muFazOXm9im+kkfsa8GRSEOMH3zqjoeYfY= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17619361495921.6436055214478529; Fri, 31 Oct 2025 11:42:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtx8-0004wL-BI; Fri, 31 Oct 2025 14:34:23 -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 1vEtx6-0004vT-3k for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:20 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwb-0006H5-70 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:17 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-429c19b5de4so855097f8f.3 for ; Fri, 31 Oct 2025 11:33:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935622; x=1762540422; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0H/Qs0aq5jkMkZf4wHt7jLxhKz1DXfAE2FEms7PGAtg=; b=ZAxFFXfsMcz2LBDGT8SDqSfkWh5yXi46d7XGQwCWjbGgfo/wKH732EEPt0kUAgbWZl 5QJu7DP4Uu1dONlVL3oe6RbRlCD0acV8Onh4I8CSKh6eOko3wMwaz9FG52UVLCT1HeMd +dTCVjDwPJhrtbxIpflYyYV5+R0y8X4yn+sZQokJjPfwBeyLHXiEa0LRnoSqaBJkIq8e YNT+8Y6c2mqrhLBghYOXbVB5N1j00HdBZYNAuAud+U6NAVs+sGltDcQgXYu/Fdrpt2tO c5OfCsDXb8PuOEc13rGoW+1+KVn/xCHhBJtCYO/kk/Bt69txevZ94pHtqMZdYA0HStGK w+RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935622; x=1762540422; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0H/Qs0aq5jkMkZf4wHt7jLxhKz1DXfAE2FEms7PGAtg=; b=edLu4V7W/T6TGx8tCdGdogzdjuv/auOdx9ksqyapElW36NRODkDlG1pUyksD4/zlJR t0uDEuX8EizNIS+5fNvKdxwos9VCBWmLGHaTeqIvVDTCh19Q2hcCiMC1idIFOmUYVPtc cMWDxmULPkq+bDFXlN9kIgrBow2vSOe75VA+PItFVwtA58A9Bou4A63SNML91Afhs0WP tXK08AB+CT2wJWHA71ctHgTm4KAS0I/DZ+ErLsAwqFRfV+0yeDNoqlLdmu9khDsbNooK 9NalXNzhy7jEzwXmq2+oQm7LoRDE3xexPN6CbAZw3YsJyzvGLr0CysmvpwaHH9bwozaw N6wA== X-Gm-Message-State: AOJu0YzBLxg4reykhFK/VpFYlwc3zSCO5O/nGfPU8nC1UGLR1gEURx8S TQrLhdXSsoqGQ9q8MLUnTynRXRfD0ZPxRi8ji2m+EQIHAGGqHt8fH8qb+/wGsoKLbydJrKyp6wh PvROT X-Gm-Gg: ASbGncuM9Wqq4jvlzHnYefUj7EvfVTIsKqMX0WyclTbIDIoYOGktlOdP++iU3a20GKE MyolYivwaE6DhFKnpvEUOpA72mOfhRBHDx6CkQPNgQIWHe+Ti+xWYTjzueUK2qiDIm0s1hmeaO/ EP8P4US4Vnc/RCVi1zUCGS2zXT92+/0Y4TVh1dl+uMly5834RWdsYsYjsOXlyxmms3u4HTIxG7c J5Yb6hnOjThL41PNVq7bP1oMZDkMjuSHAcr4uYjGkfvKoVy0r5sXmkIjDHap25FMgXhsMRUGEx+ 6IGuIQvzaBveNuMZfugg6g7bqZGyaY1Z0y79CRmbf4Lk95TPOFeQVZNVyH9Qtv3ehVkscQFEzVL VIllpe8YDsckHb+LkuHh9nWxWlACle2ySjmcLwQi3tHC8XgReMO60UQvYblF4PiIGhlNmxQTKdo Kab+b9rKBGHgkVQiDH X-Google-Smtp-Source: AGHT+IF67bW1b8DCVK0JHjNT79W6Uw/Ls0Duh7QiNJ3XLp3IXOUw8bGsTZ2KhZQKeGZo/+Yio55vtg== X-Received: by 2002:a05:6000:1846:b0:3f9:bc33:2fab with SMTP id ffacd0b85a97d-429bd6c18a5mr4401201f8f.60.1761935621646; Fri, 31 Oct 2025 11:33:41 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 30/38] accel/hvf: Guard hv_vcpu_run() between cpu_exec_start/end() calls Date: Fri, 31 Oct 2025 18:33:02 +0000 Message-ID: <20251031183310.3778349-31-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936150754154100 From: Philippe Mathieu-Daud=C3=A9 Similarly to 1d78a3c3ab8 for KVM, wrap hv_vcpu_run() with cpu_exec_start/end(), so that the accelerator can perform pending operations while all vCPUs are quiescent. See also explanation in commit c265e976f46 ("cpus-common: lock-free fast path for cpu_exec_start/end"). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 2 ++ target/i386/hvf/hvf.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 79861dcacf9..c882f4c89cf 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2026,7 +2026,9 @@ int hvf_arch_vcpu_exec(CPUState *cpu) } =20 bql_unlock(); + cpu_exec_start(cpu); r =3D hv_vcpu_run(cpu->accel->fd); + cpu_exec_end(cpu); bql_lock(); switch (r) { case HV_SUCCESS: diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 28d98659ec2..16febbac48f 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -992,9 +992,13 @@ int hvf_arch_vcpu_exec(CPUState *cpu) return EXCP_HLT; } =20 + cpu_exec_start(cpu); + hv_return_t r =3D hv_vcpu_run_until(cpu->accel->fd, HV_DEADLINE_FO= REVER); assert_hvf_ok(r); =20 + cpu_exec_end(cpu); + ret =3D hvf_handle_vmexit(cpu); } while (ret =3D=3D 0); =20 --=20 2.43.0 From nobody Fri Nov 14 16:50:37 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936048; cv=none; d=zohomail.com; s=zohoarc; b=BgGtNEgc9ro4VvET0Nuza8SGNds0UM8mIWXPYc+8IDIbYCv5P/KdWQkYrqNZyATSyVVzK928VUij5zCKfqQPiUZZNH+DJ9Ye1LHfcVrcoY9FGuLfTaOtc+1kSJ0Xj05lmxrBQ2n6O0rG6PWugaIPq8Z2Q4E+pIf/OmVbbikCslQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936048; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=GyB92fe4UqpOoI4qqm0BBnICy9YPYqxs31nBB3Pb+mg=; b=ByGrSsCY9wd7IzdgVx7inLLffdLZsI4pOTKAx333iJ125xbHsc9kuEREeJ91wK6yR2Ay0a41HV6uFYc+QTO6Zqt6cUyyk1FIliqe1PGVyfXvtI/M0HDuKZTJJUwK70TZVoszqryWSBRneVXqNgmbeimGMdG7QmNTgdSpTkCiexE= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761936048913196.69449632991052; Fri, 31 Oct 2025 11:40:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtxG-0004zz-SB; Fri, 31 Oct 2025 14:34:30 -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 1vEtxE-0004xm-NH for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:28 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwc-0006Hj-Gq for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:28 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-475dbc3c9efso16034525e9.0 for ; Fri, 31 Oct 2025 11:33:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935622; x=1762540422; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GyB92fe4UqpOoI4qqm0BBnICy9YPYqxs31nBB3Pb+mg=; b=RigV7Lj7FxYrx6VYOzPxUysb6o5ZjduYxm9wswGEtRPtSfBcF9q32QrWijplt4Dm3e bmNF55ReePHYQBVD5OIxO/bvBm6ItUTewtjWSQ/aou0h2fo+uBd4glVgFQzjHMez9zMl rJFIyFY4UYOUoUprR6g83X/Klpi19qcYo9sz4skXjcAZe5uLVVvkzcgPxOCVa+1u5rPT VXbTGWRLgk9lO/47hsimv01b8ELuUR69diO5/1b4e43nbx+9iTtG4RuynpuzJIb48jo4 nn1jMui/EuqBgRT4JlHxvjuham6KE3/ZcEQBrXjQrr9rbt5I22oxWhfJLq6h0ifYrPAi 2OIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935622; x=1762540422; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GyB92fe4UqpOoI4qqm0BBnICy9YPYqxs31nBB3Pb+mg=; b=XIc+lrZzz5H96fyEKzub8dUir4kZ8/uCdGnJ58/iDOwul4ypLYE/2IcXf66ShaVvki Ss2p9lsLZPJUC2/Uvs3W1MSXFOsBWWTD6WNk+SrxdDPLsVdaAFig1B5201P/B2P9IjNT AT/IlP52505PzWfxKFcbbY5Rjy57eiCU77gG9dZbwGCcmYegHQQrZgPDatrFpkMIlVn3 UTOyCY2rD4X8GAb5ffCwgY1e6YqsxncJJhx7lhEM73MFXiuOSao6VP3Au1BmUEbQOzRb w2ZvPYlpRs9PNLa5vgrX1ERZu/13C3nRHZpAmF8K+Z7JYkZFNtcG+3Lf/nzYQpm/DsL6 WD2g== X-Gm-Message-State: AOJu0YwljY9x7Eey3p1IMXeGN0bIxb5HlqLfpIKjn1ZIJO7B6hnEM1LP 8J1ZnC+UQe3Wqk9+fSI+0aIM3aCwmlXRU0mmJO5yu5mMpMZOykklzsDVjdckg5oIo+TOG9DluKD himQz X-Gm-Gg: ASbGncv1C4O4tbB6718r7vnGv50PYT9l2u8weJb92HC7NNrsZdt5jaw+RTcBQde/xVf Cfjd9TIQ0WU0u1ogjuhmiYkYYlpU/SwvZdyHcSssSM23/YFsr8WPz45WrGJmrgK/e0c2fHmA0I2 aenMxE7s8woUtorrUAfpm1adQvlprWkMQj+tQh263XXdq4izo7Fd5BYXvDB1tf2UrVUrP+J/XcZ VqSer3Z2rlIPMCDxTt61QQDzhflv7zFkVNUblwLneqwWaPVqnRbmUYjlHjvMNY9V5I38+C6+FIW X1Z3Dou/jyi5e7Y5iaV2SiHTlq9fiNr3WLU41egBVsbSI/Pzhlea0Y67devhY3x3BEdKgg2MSsS ElWkPOx+9Fl6TqDrEntQRszKEU5AkqpF9/0DnJe+4xXmPqRMka2x9AWTQYDcL8gttRXCm85wikT p4wqiA+g== X-Google-Smtp-Source: AGHT+IGtn51BrHRVaZ/75Q9EbqXg3XnUdaiu06M7s/9cY0QeVEc/PtwZlfx/erX94AOtg2k8A1BGsw== X-Received: by 2002:a05:600c:1553:b0:471:15bb:ad7b with SMTP id 5b1f17b1804b1-477307b5f7cmr49196545e9.6.1761935622481; Fri, 31 Oct 2025 11:33:42 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 31/38] target/arm: Call aarch64_add_pauth_properties() once in host_initfn() Date: Fri, 31 Oct 2025 18:33:03 +0000 Message-ID: <20251031183310.3778349-32-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936049802158500 From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/cpu64.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 26cf7e6dfa2..f81cfd0113c 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -762,20 +762,20 @@ static void aarch64_a53_initfn(Object *obj) =20 static void aarch64_host_initfn(Object *obj) { -#if defined(CONFIG_KVM) ARMCPU *cpu =3D ARM_CPU(obj); +#if defined(CONFIG_KVM) kvm_arm_set_cpu_features_from_host(cpu); if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { aarch64_add_sve_properties(obj); - aarch64_add_pauth_properties(obj); } #elif defined(CONFIG_HVF) - ARMCPU *cpu =3D ARM_CPU(obj); hvf_arm_set_cpu_features_from_host(cpu); - aarch64_add_pauth_properties(obj); #else g_assert_not_reached(); #endif + if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { + aarch64_add_pauth_properties(obj); + } } =20 static void aarch64_max_initfn(Object *obj) --=20 2.43.0 From nobody Fri Nov 14 16:50:37 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935742; cv=none; d=zohomail.com; s=zohoarc; b=DZ5TOqBvlhJ0wsQNbQAuzd6iPHvvcGfB6WvOTT/UYMWm2NV/zQIEdDKAO/3LeXXSBAjlk4LcAMukbgW+t6z15wTyds5BeugsYjuIyUNggxaxCgecghGTXUGOS+s/b7VEYsqXB/QlGluVAGRhGQsmeJC7wgJbSTdJ0Umh6lySdU4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935742; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=xQqGIx0Iit/mmyUQN1sJFTz/pNHetWhqs6jkhC/S2Ro=; b=K918eVXvRhZzm5YVJeoYjIIAUuzwxpkn3CzdAQiZSdozf87XxknWn9o5ROffA7NumPXWZL2j4B6dG5ReujzkP79HRLRdRFtlA5QsLHx7AH3pvcNlZxyqvj68oEBmQ5YQ2RTqVX5n9w8rucBjPs6DZUjld2gZf0O8mwFyWQMuYh8= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935742601819.8595151004279; Fri, 31 Oct 2025 11:35:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtxE-0004x3-O8; Fri, 31 Oct 2025 14:34:28 -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 1vEtxA-0004wa-1D for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:24 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwc-0006Hr-9f for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:23 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-47728f914a4so13286615e9.1 for ; Fri, 31 Oct 2025 11:33:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935623; x=1762540423; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xQqGIx0Iit/mmyUQN1sJFTz/pNHetWhqs6jkhC/S2Ro=; b=x9Rt9WRAfl0Zf04joUJr0EYvMo49+qVqCTv2enmjDAFX0W0oPYrTuYYTynHAtJ4gcn 6P2Wn77aIjkE6rrnY4yzI1IrbibBd509suW/RKQXmq+E/hbGQWxhRoSkJvh0b7i9mboV KbyH/BpqIGr6lpsClj53gBQl7boeApsWUHZDvaBNpwZtWrph195sIikluhIS8yuLGKkK wgxDC/DHvRuuUw2FkLMrCEqcLHoDfJswiCcYtu800Vvd+T1JyjEWVhqGe8Vr7UmOWYgr ix5d//fo/GhBkFFzNsn1eCuwCPh0+ExlIDMcfQ+nk4nsuT9bp0u5UMjTqgoWEVfK6y+7 pUWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935623; x=1762540423; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xQqGIx0Iit/mmyUQN1sJFTz/pNHetWhqs6jkhC/S2Ro=; b=nEDXAxohalt+xTfzMNmt9/s4LgEbmImfoFiLD2ZghMEAKsd2TGh7om/u1MIZSzsFrn +x1i3eDQMn3wmsB4a9LbPap1vfkh+c5tzKYyollGeDMTp/vX2WzFH45iSIvm7J6qreXe DjAOkBF62rlXknjMPlyI+PpBBHgqnqgYRU+JOxImlRkDuz0otrVihZIpC0uJVhFvxRp9 BWa0d49ikOLk8nHrz5vPEfy7d/9VLQngYtG0pu1qhfDYLBVHw7FS3goLOWBsSyBiEX0s IysULYmvKI14rS8wXiWPpXM5dF8inHBwUqEwIC6N/bPY9tzPX4NCRHHV9PIosbHI1xmD qduQ== X-Gm-Message-State: AOJu0Yxw0QGIpCQsi3zEtTQmV52emVCcnM/LDEuadfUVcx5m0yYnjdOU jvSrmegAeFiqVVOirYTHdpRGJ7MkquTS/pdAKrpZWRKMl0aiSLE4ar8BwCcSMoUXiwF15BPxD23 i6528 X-Gm-Gg: ASbGncuOsf3LxqG7E3zm7kaLRCggmDevFI69vOsR+XSh6jhyeLC2xdiMScaAKncQzdn X+ZLpyQ0Ce0EUE7BrEHCIMiEcxvn9HzqfVV9opzkGXuZ6NlYkLHndLUb8g4tm9kRfhTuL5TXdx+ KoxgXcvCTXNqp36AyPCzzeiIOXLyL6W+BeH5GKE2JggMvRT1jkPHkQlvGHwKD7ILeBRkY+LkAlk t7KIZPJXOwAKB31fKbjxHljXSEQ6AEYVeuvNkkWwNJ8m8GeVz/otYaMtxAW5dMv17ZIbFNl7csD 4/ihO5C7eMFr5ZzTcAX/0/ghbRZj2lPPUFAIVPa4mAAjmvFa3dUtBA+8mFtS1Zed0WSm4nfAMA3 hVaKH9JaalQqOR+S+4DR9CNfaQkgMtSYox8CvybGhf3osuC8v8K3q8/AlnZ2Jowx8PIuugDjQw0 hQrnOBUg== X-Google-Smtp-Source: AGHT+IE9SZwnCh8+2bYWudVPAjBKthV+Xv2N8ujgyPrebr6s3Je0hlniMNvWVrjw9kI29b/S09IOGQ== X-Received: by 2002:a05:6000:1846:b0:426:d5a0:bac8 with SMTP id ffacd0b85a97d-429bd6e3cc2mr4666706f8f.56.1761935623230; Fri, 31 Oct 2025 11:33:43 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 32/38] accel/hvf: Restrict ARM specific fields of AccelCPUState Date: Fri, 31 Oct 2025 18:33:04 +0000 Message-ID: <20251031183310.3778349-33-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935744041154100 From: Philippe Mathieu-Daud=C3=A9 Do not expose ARM specific fields to X86 implementation, allowing to use the proper 'hv_vcpu_exit_t' type. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- include/system/hvf_int.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 195d64dcf18..3d2be4092ef 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -59,10 +59,12 @@ extern HVFState *hvf_state; =20 struct AccelCPUState { hvf_vcpuid fd; - void *exit; +#ifdef __aarch64__ + hv_vcpu_exit_t *exit; bool vtimer_masked; sigset_t unblock_ipi_mask; bool guest_debug_enabled; +#endif }; =20 void assert_hvf_ok_impl(hv_return_t ret, const char *file, unsigned int li= ne, --=20 2.43.0 From nobody Fri Nov 14 16:50:37 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936168; cv=none; d=zohomail.com; s=zohoarc; b=in/1Id1mCQdLr0jStPmZrfTMz/FW8zjhpkGsDZMY6+BMk5uM2tkxw86W0QyUIoWPw0VjmiUDaBwL8xjnH3i2oNRdrKuBYYh3V2/wywe3UoN5YhB1w+SrwprJwHYSFB170Riw/iUy9IkUDawE7TyCP6Ow8SbOy7q4+ASyeNM4w58= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936168; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=aJP0Xy5bRdKAuM7fuA4ZOsjvPlOrGecSG1KNmEjQLLs=; b=VbXLip8iViffa+eKEAsh4kgDX3pJ3Xfbzm+MZbpesyDpdpnGX1TbCSAdxBZ+i0cPEHbhHHxG+HOrKji6uu2nTYka2aghH1/xytuw9ELfznxNSAOX76Di24hCzv175GFE5tudNdaddGG5B8jZQTXiwgAK5n5Y4PQFoEO+NMaaQV4= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761936168043502.00254622779846; Fri, 31 Oct 2025 11:42:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtxH-00051h-22; Fri, 31 Oct 2025 14:34:31 -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 1vEtxD-0004xb-L0 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:27 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwc-0006IF-Dw for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:27 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-429be5d31c9so924110f8f.1 for ; Fri, 31 Oct 2025 11:33:47 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935624; x=1762540424; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=aJP0Xy5bRdKAuM7fuA4ZOsjvPlOrGecSG1KNmEjQLLs=; b=FjtYGcxN/du47dAulf13dVHRmXdyrBm+x1seWZGhmmKAEW4R/O3Tg+66pTYW5M0L0r ajnLEIXM1xF8329kfa3aefw6/PMJuJ+hTuH5wOUg7G9AkzSWl/c6RPZJcAe4fG6kmA9S Foc288IZ6MXYDWzfvPQ2BlMB7EfsvPpBt2/VQbRF7nWyfoZQHk8vKdpqM4GW0lNkIszO ZlVA7HV/UH31eQsuKEx3kACzo47QjkXkYT8T6k69zY6tddggBOwC91lBwNg6v/dkcEvX 1ECW8Ri4QBt+FRCCBhNmqQ2xutbbrRffJ2EF7GlLzsw+0pDCa0IDK+a25huionOH0VF5 WpnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935624; x=1762540424; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aJP0Xy5bRdKAuM7fuA4ZOsjvPlOrGecSG1KNmEjQLLs=; b=dgXSbZ+yTizIzvqLbl+CZ8Idy4CkiKwhm2fTMEUy5ROJLzQvGOwzul5txb3IPVttzW zEp9lQjW52nmezLVLIGUcy9gPmZIEAL0Eo+Dy2GEN1hRG2sWFllFnfVQKQ5jhLl6x1gg Cxh75IGakG5vM+sEKVBchYQvLvGxC5i4ogcGpRAHTGRxGe48k0q8vNPfeUrdSPCQdmG/ XfOFhi5px5lspvXp2WFd7p8tWgJb0LnahyoVSfiPlXv0ohtTvVh+Y9e/HZ1nFToQUBvI uUVY5Jz7JyHENDK+NkRLhvIlM12esPcUQehxj0urIF0Nx5TtIJCmr1jRdMqGps9TtzSg KHTg== X-Gm-Message-State: AOJu0Yz1bizt73YHjG5+RdsxLXIAEB881pzud02HCehFLeoq4VZc/9ww 3EjT2UNRrQ4Fy33BzsuYpTvoxze5+s8qCYWlRT1WVJ2YP4CGYtD0TNiwrwjplu33qCRBBLkS16h CCYTx X-Gm-Gg: ASbGncsUVEtRw1PKiqcayvj1AdYzRzihcyIoG3E7RnN3/V02SxYqaPb7/K/EpdvhK/2 KSL4lfTkv+0bnRJe6TP5dJ1MoeT0Mh9jueOxxT90c7vDRM+GCVhGgRsqgEL1bX3aDoK/y8mhrLb ruVeb+fjGdqRkIN4mU/yRV15pj0gNgJK9QJDzfdrmUuCvNdtIDUHZXdduGdIYkNuIcERdSSM7mY p1FAq3Sfa54b12q/f9kUMn2hGpj8ssWxagHOxgzTsQWeeewQaDIfe79Y5yfOUIzYTO1j+m+kXGf LE+D8MiyHNlxAFVjNXGXqyPHeka6QorhabTZmiHmtebl+FkoL6r+zbj9c/vTeCFXTfPTJfQNrr8 6WJwQ0eh6I0M+R9IJBn638C/pIFEjs0EnxsGcY5RHol3or7pNHPw+7mF2Q5evdLW1jB3FRFOxE9 hYi7rMLQ== X-Google-Smtp-Source: AGHT+IFRAFia8sfDpXZNWWq5QfVlXCLoli1h/W9k12lHWJ2HqX4dFgS8peo7X1Ns75yg2zI1dzDOXw== X-Received: by 2002:a05:6000:18a5:b0:427:a34:648c with SMTP id ffacd0b85a97d-429bd6efbbdmr4282560f8f.58.1761935623984; Fri, 31 Oct 2025 11:33:43 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 33/38] target/arm: Rename init_cpreg_list() -> arm_init_cpreg_list() Date: Fri, 31 Oct 2025 18:33:05 +0000 Message-ID: <20251031183310.3778349-34-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936173211158500 From: Philippe Mathieu-Daud=C3=A9 Prefix init_cpreg_list() with 'arm_'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/internals.h | 2 +- target/arm/cpu.c | 2 +- target/arm/helper.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index 4c0fa28ef84..75677945af3 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -377,7 +377,7 @@ void arm_cpu_register(const ARMCPUInfo *info); =20 void arm_do_plugin_vcpu_discon_cb(CPUState *cs, uint64_t from); void register_cp_regs_for_features(ARMCPU *cpu); -void init_cpreg_list(ARMCPU *cpu); +void arm_init_cpreg_list(ARMCPU *cpu); =20 void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu); void arm_translate_init(void); diff --git a/target/arm/cpu.c b/target/arm/cpu.c index d2fc17eab63..39292fb9bc1 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2141,7 +2141,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error= **errp) arm_cpu_register_gdb_regs_for_features(cpu); arm_cpu_register_gdb_commands(cpu); =20 - init_cpreg_list(cpu); + arm_init_cpreg_list(cpu); =20 #ifndef CONFIG_USER_ONLY MachineState *ms =3D MACHINE(qdev_get_machine()); diff --git a/target/arm/helper.c b/target/arm/helper.c index ef6435c3efb..27ebc6f29b8 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -253,7 +253,7 @@ static void count_cpreg(gpointer key, gpointer value, g= pointer opaque) } } =20 -void init_cpreg_list(ARMCPU *cpu) +void arm_init_cpreg_list(ARMCPU *cpu) { /* * Initialise the cpreg_tuples[] array based on the cp_regs hash. --=20 2.43.0 From nobody Fri Nov 14 16:50:37 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935739; cv=none; d=zohomail.com; s=zohoarc; b=PC/3uML0qKjFME9P1kAOlKnD90sSlF04Vhf6BxMN1dASAdF9KKvZszM87ibkWrXytddMLJ+AQnuuQdFfEuBMIOf+f0F+SkDeUJtBGgeY9WMXbUqFVCOW0AJQnbB45y02QqI9ZkTeu9ecD6TgjgMRjAB/y0M95FlwFF4941IC/kw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935739; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=pd6KmT081lP+mK8y068yakZPC/MNKPhbrMK15wWgQvM=; b=U64Cw/rc/AK5L+BP9FifUM2nhtudQuBFhLMs3HJLW2/RIGSJI3zvQTfXQLFs918WQiAenDN2C1pm4VsEQQUSXrmhG4WnTWb4foQppzgtr7WDmtNxey1TZZhb2CUbxZ9mMq7OR9PZaLCQWnSFQvRbQPxoMm0g3PKq5kjZDKHtGSw= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935739125486.93717405691086; Fri, 31 Oct 2025 11:35:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtxP-000561-Gv; Fri, 31 Oct 2025 14:34:40 -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 1vEtxM-00055C-FO for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:36 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwd-0006IW-RQ for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:35 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-471b80b994bso32174075e9.3 for ; Fri, 31 Oct 2025 11:33:49 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935625; x=1762540425; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=pd6KmT081lP+mK8y068yakZPC/MNKPhbrMK15wWgQvM=; b=Qs1v1WrNthT4tw7Tv4Cg0YdkaFJf2QlLiv3OyVxBCLvYKSPQGCvn6zmu9pvV6o7tXW IbRb2U9PxsFXnwWKUWwCQlwRoYf6ajeubNwwld1NbiJcTSiVCwuEZRhDwKbWIenTfXxB hn3ctdIlyP9Xfgu80/hQe2e1Yqy1yIDVSK/HRCELWBPckOJoCo/bggXY/ug4o7H8H1GP d9BWgCCZnJgdbIqTgmYRh8W39PbiBqyAr+JCMxXG5xdZozNLkjl9fZpa6wH5jSvg7fW+ TnUg6FSnYQuvjqkOC+EdR+Ym2RY1waDz0e5iybPJJbdc1qi3L1UUYtWPFLY6qHAsOHku 0X3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935625; x=1762540425; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pd6KmT081lP+mK8y068yakZPC/MNKPhbrMK15wWgQvM=; b=sqnKvxCTVW7RhGQQYdHFryoaQBjsNO9CXS/UeUNwN/sGo4kr0/34DnGVt1jjYxNwk0 MNr4/Xn2Q/ng23y2DLDkLJwd01V4+U2j5J3CbffhsVbRvgUpI4edd1wZcNbyMP5p/RsX EfZYheIry9Uy8WuD/8s9+85VSqELV0NZm4VDxwZm79kfVcvNzEqfSVF7DKI2YEdxdR1E 6kwxEFZZicNZat1N8EiDwCRwh4PQjOwnlNcJ2htBlNq3LUGePaK1tJ0t+JLWnB/nF8t+ bPyv0/SEOg9SReSnfl3z2Ym9KQq4HODLmpxGvh6L27u5JE1flMCQev4vjF+ZLjylhr+F 2W5A== X-Gm-Message-State: AOJu0YyIxiiD1pvvbnMWYpQfXBVlcZKcuISGpdRp2I49/OU4jl2IUvHu tK56nUAwDK8Kbkk0Df9LWt3HwSF1CigSgnGy+Ug0iF+dbqppErdetJpyOHdxzAM8OHYRLiC4VYs X9jTy X-Gm-Gg: ASbGncsuAyFm65EE9108pQUbhS63gDnoHcHZ6CHJF/l7Rf+0PBS0bw5M1P828RwnQoS NYXRsUmzNyuM0SiuD9bh9VZqKuWqkFWBKqcDaxSyDR2lMUb5DRdY9Ykbs6HMt2pyPa9P+/79g7Z EMKhpm3O+ATGtdnEqDbvPEx3UgB5xI4bSxqS+6AofST+jTDjt52g5/jIHgTQHD+M0fIKyn+gdIs lngCvyjspsTQXHksAZ7mlZEvAwqKpa9/jdUU2YPUsE2D8SnlI6Um6y5KgNH7odpV7ukxQNaQRon fe5YdOcoIwHj0zAP8CKMAk7M+9+vFISKtFBOj62/73oMxNk4khDkEQN4gKorXeUTop976e652tI 2EayUnN4sRhEv8sUO2MuEd5XksHJ4bbhZSdqNufdqr8RN9OG/iPPAPeqHgwy17+wt5aFG+wep0V EpLNR4cA== X-Google-Smtp-Source: AGHT+IEX9SkvrDkMpT4JsZN/1gRg4e7eDNj/o2HLXPTeIhz4MIvhwXIlNHJdNntcDsHrxJvE5nRnLg== X-Received: by 2002:a05:600c:1c1d:b0:475:de14:db16 with SMTP id 5b1f17b1804b1-4773086e39amr42888345e9.25.1761935624799; Fri, 31 Oct 2025 11:33:44 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 34/38] target/arm/hvf: Rename 'vgic' -> 'emu_reginfo' in trace events Date: Fri, 31 Oct 2025 18:33:06 +0000 Message-ID: <20251031183310.3778349-35-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935742487158500 From: Philippe Mathieu-Daud=C3=A9 In order to extend the trace events to other registers, rename and pass the register group as argument. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 14 ++++++++------ target/arm/hvf/trace-events | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index c882f4c89cf..26bafee259e 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1149,7 +1149,8 @@ static uint32_t hvf_reg2cp_reg(uint32_t reg) (reg >> SYSREG_OP2_SHIFT) & SYSREG_OP2_MASK); } =20 -static bool hvf_sysreg_read_cp(CPUState *cpu, uint32_t reg, uint64_t *val) +static bool hvf_sysreg_read_cp(CPUState *cpu, const char *cpname, + uint32_t reg, uint64_t *val) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); CPUARMState *env =3D &arm_cpu->env; @@ -1172,7 +1173,7 @@ static bool hvf_sysreg_read_cp(CPUState *cpu, uint32_= t reg, uint64_t *val) } else { *val =3D raw_read(env, ri); } - trace_hvf_vgic_read(ri->name, *val); + trace_hvf_emu_reginfo_read(cpname, ri->name, *val); return true; } =20 @@ -1261,7 +1262,7 @@ static int hvf_sysreg_read(CPUState *cpu, uint32_t re= g, uint64_t *val) case SYSREG_ICC_SRE_EL1: case SYSREG_ICC_CTLR_EL1: /* Call the TCG sysreg handler. This is only safe for GICv3 regs. = */ - if (hvf_sysreg_read_cp(cpu, reg, val)) { + if (hvf_sysreg_read_cp(cpu, "GICv3", reg, val)) { return 0; } break; @@ -1432,7 +1433,8 @@ static void pmswinc_write(CPUARMState *env, uint64_t = value) } } =20 -static bool hvf_sysreg_write_cp(CPUState *cpu, uint32_t reg, uint64_t val) +static bool hvf_sysreg_write_cp(CPUState *cpu, const char *cpname, + uint32_t reg, uint64_t val) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); CPUARMState *env =3D &arm_cpu->env; @@ -1455,7 +1457,7 @@ static bool hvf_sysreg_write_cp(CPUState *cpu, uint32= _t reg, uint64_t val) raw_write(env, ri, val); } =20 - trace_hvf_vgic_write(ri->name, val); + trace_hvf_emu_reginfo_write(cpname, ri->name, val); return true; } =20 @@ -1581,7 +1583,7 @@ static int hvf_sysreg_write(CPUState *cpu, uint32_t r= eg, uint64_t val) case SYSREG_ICC_SGI1R_EL1: case SYSREG_ICC_SRE_EL1: /* Call the TCG sysreg handler. This is only safe for GICv3 regs. = */ - if (hvf_sysreg_write_cp(cpu, reg, val)) { + if (hvf_sysreg_write_cp(cpu, "GICv3", reg, val)) { return 0; } break; diff --git a/target/arm/hvf/trace-events b/target/arm/hvf/trace-events index 538af6e0707..29387780e3f 100644 --- a/target/arm/hvf/trace-events +++ b/target/arm/hvf/trace-events @@ -9,7 +9,7 @@ hvf_unknown_hvc(uint64_t pc, uint64_t x0) "pc=3D0x%"PRIx64"= unknown HVC! 0x%016"PR hvf_unknown_smc(uint64_t x0) "unknown SMC! 0x%016"PRIx64 hvf_exit(uint64_t syndrome, uint32_t ec, uint64_t pc) "exit: 0x%"PRIx64" [= ec=3D0x%x pc=3D0x%"PRIx64"]" hvf_psci_call(uint64_t x0, uint64_t x1, uint64_t x2, uint64_t x3, uint32_t= cpuid) "PSCI Call x0=3D0x%016"PRIx64" x1=3D0x%016"PRIx64" x2=3D0x%016"PRIx= 64" x3=3D0x%016"PRIx64" cpuid=3D0x%x" -hvf_vgic_write(const char *name, uint64_t val) "vgic write to %s [val=3D0x= %016"PRIx64"]" -hvf_vgic_read(const char *name, uint64_t val) "vgic read from %s [val=3D0x= %016"PRIx64"]" +hvf_emu_reginfo_write(const char *cpname, const char *regname, uint64_t va= l) "[%s] write to %s [val=3D0x%016"PRIx64"]" +hvf_emu_reginfo_read(const char *cpname, const char *regname, uint64_t val= ) "[%s] read from %s [val=3D0x%016"PRIx64"]" hvf_illegal_guest_state(void) "HV_ILLEGAL_GUEST_STATE" hvf_kick_vcpu_thread(unsigned cpuidx, bool stop) "cpu:%u stop:%u" --=20 2.43.0 From nobody Fri Nov 14 16:50:37 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936148; cv=none; d=zohomail.com; s=zohoarc; b=ZsS6f4BbB+tWqVadUkFkP/zD/oiwJwgLQQBBzNnqQR43bYZeKjj37hnRQ3ZFEYws4jjjMACE5dKB+GRPVm6SuC+EV5WwWAVetoWLpWypjl9JfRpHIcd4mY3UXKeJcRLG37Xtt8JpyUfGidlKlSugbOVMveH9arnzu+0KB8hBtUk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936148; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=MYEuzBXFGDsM4jW4FIPbwMx9iCFjthLPhm6pk7d7ndg=; b=RySyQuJ8FCex3H1q77uKDsDwrfmoWhR4OLsiOLWoetHR/xB7fhRFt31B7nqyK3PdY99kogtEa1pVm5mDamITRhYR50k20lJpjEMEzgQivKbEEf4yXDWfTnSHsRD76BydCSmnsHsCeK4fTb/wJ/7xiOAyPSKwWLMn4Q1ZkEh1KW8= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761936148923703.7927049512285; Fri, 31 Oct 2025 11:42:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtxL-000554-FS; Fri, 31 Oct 2025 14:34:35 -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 1vEtxI-00052j-IM for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:33 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwc-0006Ic-D5 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:32 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-475dc6029b6so25671325e9.0 for ; Fri, 31 Oct 2025 11:33:47 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935626; x=1762540426; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=MYEuzBXFGDsM4jW4FIPbwMx9iCFjthLPhm6pk7d7ndg=; b=ys/FwztWh65jpuqFDJclHmN1mctJctUtmxXvmLhLRXp/KGBJVHimbWRp5m/IyUltHm +10RSBpEfsI7ipxQ0PHrlJo6+1N3c4HXXqIzTvKSWFBujJt87aR/FlGMQTcWXjB1+iXy 7grXSl1Wg4ptymwW6/9dmeYQdVbrLnv++GVr9Ju1Rq/5z3CMUgKfyiLnwkMihryLhEIo mfTAv9ZhxOQQgWC1fun7v4D6gwUZc4tUq4uFmraiJaeEhHwI/a2CxVfVyTBdh0mSMVu1 bDjN/sDoFIS5mchISd6jkgGOI8qE1XSlgqgD4ZJRu64brgznI/Lr7rTN34gWI1vXjgbH aMiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935626; x=1762540426; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MYEuzBXFGDsM4jW4FIPbwMx9iCFjthLPhm6pk7d7ndg=; b=LTWX+HtoKP7LNnbYhQdilXdQ9Dogl7EuqoLbOpzLIkNDMuppfusp3vVrfyq+lYKV5G JTYPdKnWiP0LcGp2wrWLH1pTjWB9CLjV0UyaNywf4JUk8ufBB4UWRycrXtHAD+mCZPhZ BAfWHe8dL2eNRwcLemlCjhCD7ErplFHOw3z9wfL4urVqjRxWhOO7G2LEO+ZTweBWdzO+ eOUJrSMuiE5ylRURHpInvTV2XDn/+lJPI44Ui6DzGP6f/St2hYUfsB/uTUo+6lTfJ/HF WbOTf7B+FGkECJOH6/ChaTFk3qAHz43IsFrFBDtRRFpGibZrKtMTZJsIBCYqnleS+lsC OMxQ== X-Gm-Message-State: AOJu0YzUh1/08luNDuWV0XeKJKu7Y2ZK7FS/lOcuQs6LJux7CSoJtGPd upuxpf3VTH8Cgp2qr6E/gsBz2fJ5qmfrwsaWy+maegIIbqhvlzP2kHMx7lz4CFMkFgZRFu5xKZE rdE0a X-Gm-Gg: ASbGncvFRLEuT8YDxs5Fjrrpl18lCWorB04FiPcjWy9Ke4g40Bo368BFYTUAVCzwrma FJrNqajDfBWQx/nALIo216h0Puyr5JP17za4XFz5/vdE/0kdvW8JKDf2How1sNzEiIMpPBQ2JVY wOYBKpmz1l8bfVoG0ueAyZjukx1s8+1JiplEosZOcSm2dyp0+Xxn0KiTEd0XVqVIjTr1uoRyKYb IVJta16AD2ialEA7hp/8ofDlzVTb4t1bE9DzwsP8LaDosdLJ5Ib1VVtampOkQM2/nu7ZtrxzANc 2zzBPzRO3+gblmNIy9m73H2whgIdP8iw1OThHXHsuJHAN5t52r3xzj92Yf72rytxfGs81NjZt3k yZdoV3j3mHgksBv695zEW8tikdlkJa9vQp/qqYVz+d+rWCe3s2jLJTFn1h2cu21Yh6tBd6cYtaM r8j+ruNQi0kzJz73vD X-Google-Smtp-Source: AGHT+IHjIg+K0YyjVF7ja5VNf8y0oPjBnVe4c3ZXGLolUQCoSjYCOCYX2G42OYbgWDVHNRXE1jbLyg== X-Received: by 2002:a05:600c:820e:b0:475:de12:d3b2 with SMTP id 5b1f17b1804b1-477308a6da5mr48012425e9.36.1761935625714; Fri, 31 Oct 2025 11:33:45 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 35/38] target/arm: Re-use arm_is_psci_call() in HVF Date: Fri, 31 Oct 2025 18:33:07 +0000 Message-ID: <20251031183310.3778349-36-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936154976158500 From: Philippe Mathieu-Daud=C3=A9 Re-use arm_is_psci_call() instead of open-coding it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 26bafee259e..a3bb71e63b9 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1934,7 +1934,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) break; case EC_AA64_HVC: cpu_synchronize_state(cpu); - if (arm_cpu->psci_conduit =3D=3D QEMU_PSCI_CONDUIT_HVC) { + if (arm_is_psci_call(arm_cpu, EXCP_HVC)) { if (!hvf_handle_psci_call(cpu)) { trace_hvf_unknown_hvc(env->pc, env->xregs[0]); /* SMCCC 1.3 section 5.2 says every unknown SMCCC call ret= urns -1 */ @@ -1947,7 +1947,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) break; case EC_AA64_SMC: cpu_synchronize_state(cpu); - if (arm_cpu->psci_conduit =3D=3D QEMU_PSCI_CONDUIT_SMC) { + if (arm_is_psci_call(arm_cpu, EXCP_SMC)) { advance_pc =3D true; =20 if (!hvf_handle_psci_call(cpu)) { --=20 2.43.0 From nobody Fri Nov 14 16:50:37 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935911; cv=none; d=zohomail.com; s=zohoarc; b=gKmUIzRY/ZT0P4e4gg+Buzm55bLxw6db4Kf0Dz0P4X9g+RJkQm3gLy0iXKoCBMoam1UbpAYTzTXgH4R/ZINoCj6xh3vCbWZL5juGXGQYosRVGms7F0tqqlM/O89Z7IToMfHn9kq3PrO1vS0m4ytJTepEMOy4qb80tkb6IEJKAww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935911; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=1GsqUplheU28z2VHmMdZVSwjMXPlWcvaPd3oIL/UheI=; b=H9uz61jvO+4v59aRr+GJX42e4989bpeeuTQk9agp2qG5ODKT4+IXplzSOFGNdGdias6GNbCWQQ2PCIXqeKQSjOT87Suo34yoNvrNQWUsb2aW+tkZhoILdKpQh02kqDQ7G6/jae5S9BGXceRimvPNfFpVKPc/w3tDXpRBVg3s4qU= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935911347150.72887583169916; Fri, 31 Oct 2025 11:38:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtxC-0004x6-TM; Fri, 31 Oct 2025 14:34:27 -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 1vEtxA-0004wh-HB for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:24 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwb-0006Ik-Ov for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:24 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-47117f92e32so22486325e9.1 for ; Fri, 31 Oct 2025 11:33:49 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935626; x=1762540426; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=1GsqUplheU28z2VHmMdZVSwjMXPlWcvaPd3oIL/UheI=; b=pPl8CV2dUJpBVgyUTYf8PI1ZhJFwfiOHkONrQvFBXouYqD6xss7ePGDSi8wr33jffZ /bOM9uuYlSgQYIKY1dzmrXhZUyiVkd0nFPFPAMfZHxSzFlD9AoIArMMEM8QihrfeqUkb 2qtqviyAXYQ8U2EjK4oSt6GleBl7EnbJSD7jigL8EbXMi0/20EG7PmmKpiI6KSQCPxUW cC6WWin0P1zHFsdyyq6gwmbcSgn+yb5jeQJZFUnlasBOcKbky9edcEKja3mXAq/oJRlj xyCDmCD4WnwZdlAcxQ2vsOt9O579QkLcPYQeW0Zg/0flIOferVAj05cZVZtUc6ISZwpS v9cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935626; x=1762540426; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1GsqUplheU28z2VHmMdZVSwjMXPlWcvaPd3oIL/UheI=; b=Mv2pod1zf0Q9ocP8Y6sWD+MjVKP13NOYM5TYZqSjDzuBmxmcGNx6aaBKIPVFGU7jXW TR0XYli7leUE+XgroovlVErW983kVFREdCklLqCdvYsPB5DD07piLriRY7MuvQBaT5KA 9hF3iD960NuY0/xxRvThYmJXhAkvQOqM1E99hHfDPhmC22sg545sCIQEXh7gv6GenOCR BeTn0UPKu2/AV1DlXKeOw7n0pPcRSf63DwMIFBDuhrf0rVCFpfbX5xQHrNb7G9FeE5BE M+h98m/Gl1sbLImDlyWQtfPwXuk8ZGg+aFsrJmjePzEX2qguTp5SVwuIxLfd7DAgKIuq 0flw== X-Gm-Message-State: AOJu0YwuD3iPO6exfBnPP3xU2GPtaqR9G0cH63KM4VVRj71f96kSz2he As1MXW8figzWAxEEUVfuju7B3uswrZxYl3HUGi3Ri2w6FKVRciUjQ9ZFMZILKNwGeTYpPxMtynr dQBqo X-Gm-Gg: ASbGncs8LR9h6UO6ETXl2iX4Cyq63xWht+Xmzf6VwChxxBqyLhQe1+g6AU57TBeGUDx tljBnwSoWVOLlWms0NhKow2LlzkyoIQiQpH9cDEitGxnHy1PKX2YzmLU4K9+eEam6bmSWDmy59N eFeiwwRdrwMFMhL9OnFQWAKuzz/8KA4NtXBkqw7qmMlKhp1szZ+778Ou0IGCg+/33TW5dW3R1n5 vFdcYx4X5yDWzbCnN3u+S5GNzmAk2bt8uzWRPMXt9QmPDG4TsM6oMYWnz8AEnTtXM+csm+0kmA3 fv5Jc04i8RXoeAGvb32UBeYEHCDlgCUKP2r1yAG8OlUhui6La9VWxmmEZf0I29k9tnx9LH5Z3eC K6tXbnlJNNPdWM3Er7lYS68Iqw1xXt9qCvTy9w8jeXGORIVpvgKkhtqugoM5dAH432mIg8cgUPR 6+Gv38l3rpWEpdN9ER X-Google-Smtp-Source: AGHT+IGHbCBKBpCScV3qeEbK7X+6hToD1chbyL4j/wL9aEmduf9HOalQ2d0AynE37oMJQl0oG3uFaw== X-Received: by 2002:a05:600c:5249:b0:456:1b6f:c888 with SMTP id 5b1f17b1804b1-47730870ba1mr45148005e9.23.1761935626590; Fri, 31 Oct 2025 11:33:46 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 36/38] target/arm: Share ARM_PSCI_CALL trace event between TCG and HVF Date: Fri, 31 Oct 2025 18:33:08 +0000 Message-ID: <20251031183310.3778349-37-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761935914263158500 From: Philippe Mathieu-Daud=C3=A9 It is useful to compare PSCI calls of the same guest running under TCG or HVF. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 3 ++- target/arm/tcg/psci.c | 3 +++ target/arm/trace-events | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index a3bb71e63b9..f31b6e54ee7 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -34,6 +34,7 @@ #include "target/arm/internals.h" #include "target/arm/multiprocessing.h" #include "target/arm/gtimer.h" +#include "target/arm/trace.h" #include "trace.h" #include "migration/vmstate.h" =20 @@ -1025,7 +1026,7 @@ static bool hvf_handle_psci_call(CPUState *cpu) int target_el =3D 1; int32_t ret =3D 0; =20 - trace_hvf_psci_call(param[0], param[1], param[2], param[3], + trace_arm_psci_call(param[0], param[1], param[2], param[3], arm_cpu_mp_affinity(arm_cpu)); =20 switch (param[0]) { diff --git a/target/arm/tcg/psci.c b/target/arm/tcg/psci.c index cabed43e8a8..2d409301578 100644 --- a/target/arm/tcg/psci.c +++ b/target/arm/tcg/psci.c @@ -25,6 +25,7 @@ #include "internals.h" #include "arm-powerctl.h" #include "target/arm/multiprocessing.h" +#include "target/arm/trace.h" =20 bool arm_is_psci_call(ARMCPU *cpu, int excp_type) { @@ -79,6 +80,8 @@ void arm_handle_psci_call(ARMCPU *cpu) */ param[i] =3D is_a64(env) ? env->xregs[i] : env->regs[i]; } + trace_arm_psci_call(param[0], param[1], param[2], param[3], + arm_cpu_mp_affinity(cpu)); =20 if ((param[0] & QEMU_PSCI_0_2_64BIT) && !is_a64(env)) { ret =3D QEMU_PSCI_RET_NOT_SUPPORTED; diff --git a/target/arm/trace-events b/target/arm/trace-events index 72a2c7d0969..676d29fe516 100644 --- a/target/arm/trace-events +++ b/target/arm/trace-events @@ -23,3 +23,6 @@ arm_powerctl_set_cpu_on(uint64_t mp_aff, unsigned target_= el, const char *mode, u arm_powerctl_set_cpu_on_and_reset(uint64_t mp_aff) "cpu %" PRIu64 arm_powerctl_set_cpu_off(uint64_t mp_aff) "cpu %" PRIu64 arm_powerctl_reset_cpu(uint64_t mp_aff) "cpu %" PRIu64 + +# tcg/psci.c and hvf/hvf.c +arm_psci_call(uint64_t x0, uint64_t x1, uint64_t x2, uint64_t x3, uint32_t= cpuid) "PSCI Call x0=3D0x%016"PRIx64" x1=3D0x%016"PRIx64" x2=3D0x%016"PRIx= 64" x3=3D0x%016"PRIx64" cpuid=3D0x%x" --=20 2.43.0 From nobody Fri Nov 14 16:50:37 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761936163; cv=none; d=zohomail.com; s=zohoarc; b=WLcrBYT0YwuV+WhvUALED7gMpO8mAA6rik3UK/igmr/IjeML7L+Bbz+LmSt3EjHyVveKDlOKaQhsY8cnax3B2pYKu2k5FolyQtz1N+Stul3TGjrpQSXbDkipX9AuPsSBuT/KufaiuTQYbRBpYjiW9djFKUqzs9JYoOg/YiFCT/4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761936163; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=ZyVNJQKy9POeDYbbmUmHKlgq0fZTUfxaWogyqjot+t8=; b=mphD5SF7P9P5D1htkv+JVr2dfZOaaSYR7i9nkYoyX3K2xrcuP6+gkZht6mxihEo2eq0cgG9tAOTV5W6NY+GZGmYJp26xz1ieCL4JrL6ZPneWGqOSUt1GHXmoTNrKrQj0F9Z8+ZkdTGD/oRUFY85OGqpq1ceRa3g0uoYEVBNfwiA= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761936163223840.4310710794468; Fri, 31 Oct 2025 11:42:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtxR-00056y-TZ; Fri, 31 Oct 2025 14:34:42 -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 1vEtxN-00055o-O4 for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:37 -0400 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 1vEtwm-0006JD-8q for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:35 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-475d9de970eso17804305e9.1 for ; Fri, 31 Oct 2025 11:33:55 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935628; x=1762540428; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ZyVNJQKy9POeDYbbmUmHKlgq0fZTUfxaWogyqjot+t8=; b=klPIbsqxaMcb7IwjcA1aNgysZTYzp4q6M9tZG1ejuiepvYIJbP9wWvDYw2UCNNqHFC upt43lvnLomz2fFDnPuFLIk9knMUXzvuZ1+v3zgcLzViNLly/COyAhWxBq3yh/EvpQcI 50+WKCuIdV2FzbywacM7NSgy+ar6woH73ohmQnsWhg3Ze0PcaYreWqHELYfFijb98sAn wT1N8WNqPjEJM+5H61GXF2TMcdGIC2BCfudE9CCg7WbLbWxTZjUnPf2GCzK2GPRhCCwI YKZM6+LR1mkPqtfTCjGojqawvdPi0ZXtZMPZdiL98DxO3CCK1lLHDSf3cvZ5cPQy8U9d cTXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935628; x=1762540428; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZyVNJQKy9POeDYbbmUmHKlgq0fZTUfxaWogyqjot+t8=; b=L46RsqBh5XYYPvCFY4xNGijodpGFzuiFmlDLMLkI4fVzFd1rrF0NUmVMA84gYX0x2g ODsAmlPNsUkOMf9Sc4WGESUqTONwddDEnC5CY0XxcIjZj8h9tPZxiOZJzI9fr9j30zq0 wPbw3rH4rRgpGDc33tcuj+VFzuMb5KBYNPw+jX8HRLkziJ7xW6wm4Oz0njjNleyyuGPj VyKwwhhmAUXCNcDE4r2cS/wvh8H6KdMKVhXy5EKySkWOv/ym8LQj438U6wjwpulooOdK TVwfirrdfkovDNH3d9GF53crN9Bo9yz9s9WUqNr0s9yzaQVy8hWiamH4yBpZXCYIqNav Mckw== X-Gm-Message-State: AOJu0YwRzDoFBZc7d6epe/1A0cpwiqInMIpTdBOA4e4IF8UP3g8IQlUR nJ23UyYnOFOSXHmaQb0N7om+2dJzKULCl9QgfL8W8zXLn1tui9IuDaLNcIzv3yGuDanPnEd435j lZUR1 X-Gm-Gg: ASbGncvEZfmjYCzQ/5hYfN9es7pfWm9Oc7QGkca1JdzSYf/DKNziFir8xXIee6KgNiC X+E9y9tNnsaoMWzIlQshU2sBsnL7MKb+KP5oVLWkrOdL9MXwVZhadvbdD6yjSkkAEPbeUbpxyFy dRhcl1Xx3ULnb+8Ot2DSGHcngVGh8ELQuIlX4bHSGSQmsILv2v2cqb9vSAFrVIYKOa6TMB3lS3R DvxY4MXrVpTTs2WlTcof//aaPlvhzgFwcA1ixB5JLSDw4DZgNb/8+Q/lH41TdX6FGVA6RyM2rR8 7PMveld2nm/qwGxjak7kYyH1wdewgvNHkL9vPQNxCU7IflXCev2p6po96gCDKwcGevNfkm4kene sxL4Ln2Q4x57kma5PnbGZnSWQ/+naQxOqxYFwq+0KuWQ3mOPMGKTxiORUY6bBJxx/fOL+fF8dh4 kkE03HLlwkQPt5cKl6 X-Google-Smtp-Source: AGHT+IEnBPRE3skMkPy/gyqYFnKh9RjRNpf8aQn/dXP/oInjU6sS0p6rVqSawIkbK2ErpUSGFFTKog== X-Received: by 2002:a05:600d:8348:b0:471:14b1:da13 with SMTP id 5b1f17b1804b1-4773163820dmr26993155e9.14.1761935627786; Fri, 31 Oct 2025 11:33:47 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 37/38] target/arm/hvf/hvf: Document $pc adjustment in HVF & SMC Date: Fri, 31 Oct 2025 18:33:09 +0000 Message-ID: <20251031183310.3778349-38-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: 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 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1761936164913154100 From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index f31b6e54ee7..805fe75e6b1 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1936,6 +1936,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) case EC_AA64_HVC: cpu_synchronize_state(cpu); if (arm_is_psci_call(arm_cpu, EXCP_HVC)) { + /* Do NOT advance $pc for HVC */ if (!hvf_handle_psci_call(cpu)) { trace_hvf_unknown_hvc(env->pc, env->xregs[0]); /* SMCCC 1.3 section 5.2 says every unknown SMCCC call ret= urns -1 */ @@ -1949,6 +1950,7 @@ static int hvf_handle_exception(CPUState *cpu, hv_vcp= u_exit_exception_t *excp) case EC_AA64_SMC: cpu_synchronize_state(cpu); if (arm_is_psci_call(arm_cpu, EXCP_SMC)) { + /* Secure Monitor Call exception, we need to advance $pc */ advance_pc =3D true; =20 if (!hvf_handle_psci_call(cpu)) { --=20 2.43.0 From nobody Fri Nov 14 16:50:37 2025 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761935878; cv=none; d=zohomail.com; s=zohoarc; b=Q2pBTLzK8lquPCygtUq0BSLx/9oOmzi8Uo7XLtFPIHH46l41FlfE65c908iWciubLEo18n93kn9+xvec+bPQD//WHsodUXch/MuVUMowu05mbRIJe8EagVpvJrEZvUJxLJaJmwbqi7lwFdcnLF5S0P7j/Q7XSTlywDmBWYeOOSM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761935878; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=4El+9jx0CZWN3GoFyj+ScMNSnwLS8gAMz8wgcCQs7ig=; b=ZYLgklePe4KHP8OqOEmb8O7/OgoiS3OldJGDZaT+GF4TGSakzy7j+xlhcrgk6fTwml4IdQdx6fvNTXCEXyL1QhSnazomys5cIgwnSpDmnO7TPn2rwRmyuOjFrYL/WjpE48MFrsjOKY/kTQoUMBnyrHnbtRD8Yf63OoaBn7x8DfU= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1761935878039553.1836856171885; Fri, 31 Oct 2025 11:37:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vEtxU-00059L-Cu; Fri, 31 Oct 2025 14:34:44 -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 1vEtxQ-00056z-9Y for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:41 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vEtwg-0006JB-6M for qemu-devel@nongnu.org; Fri, 31 Oct 2025 14:34:39 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-471b80b994bso32174695e9.3 for ; Fri, 31 Oct 2025 11:33:50 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c114c944sm4859142f8f.20.2025.10.31.11.33.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 11:33:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761935629; x=1762540429; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4El+9jx0CZWN3GoFyj+ScMNSnwLS8gAMz8wgcCQs7ig=; b=OY1h6KZkMi4htvfhHUkjd81CrQK3u67yqrygPpt2RwTX8Xd8xXt8XegU50tXWasNOK C6KDnKYBCMMWVL3XQ5Z+P9Y+GmRoSv71NYMKX+FItJ+uy3XeQYsT/26PGzQS6f+QU8qo EJFvcVOi35euo5rQUBkngxY05WVIPBmB7OJybMF/OTJ1ra5QBTYISgj3D3VDJb+yzF0g LZj1isu2R1dqcIWeBRieszQNc8+/I5CG4kNTj0QetW4ZT6lE4iZ3axQOAKDKB/eYGn71 T0IEJX4UjBuMQ9YMHt0SxaSTp3Ufi8IaFRk4DsZWtDYNuUfIXrUIXG6YjCh3KfxvFgnh pM7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761935629; x=1762540429; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4El+9jx0CZWN3GoFyj+ScMNSnwLS8gAMz8wgcCQs7ig=; b=JMhqc4OeOc+QBCP2l3yCm6O4r9fEqq/Cyr6r13EwbKsScOBoHUxqgVO9Z+74YE05ha 6tsltVWWVueftmnruIisSAn562jJAomgY1Hu6U1TLdSSQMOwHSHF9ryp1h2vogTed4c7 xXIpdd/Fk6f43xBq1zYMjUL/ACY6RowyjYIOk/FnPK/V1e79V/jwbZ7tWosEc/81niei 7rB0grl8NIdlxFSK8Y4Q8sHtpcGj+LxUV5lUbnmg72D/eXnDh/yWk7WDeMVYDUp3Vncn 4IgZxjzjUiSaCivmsy4jrAO36m6thd4HO7C60bTrw6lQTcSQvmrMeQSlznjPyqZXMuDl uGbw== X-Gm-Message-State: AOJu0YwinThmSA/be9hc/KW8XDNNzk0TZuPrr6UCdENxmW+SjTOkWwlA YdffhZzf6sxSKQHw482YOnb4Z/4msIwOgzcUHDGeSQPTOKOEbXClAYnGT9TETNkwhBVmlsR8UBM /WLFi X-Gm-Gg: ASbGnctrWcUwt2c6nsypAvI6HHoGGq2E/5kheOOJQpHgO0E3ooZ3JaZ8T2Fi+qrg6Ui velJNC771jf71Ynp8jO2yqYwGUcOokGm3R3ax485N7scuBN2ySt0Oz4m56drSdkMycedOWriFZu R712dpl58X0WZCNiISh7bkFqYJUny4KE0Q4z20zGsBQD7oLSVvgLkc/a6qcKBHad/HdHCLBEr/m 0cUKawXT7aN6uu23b9gL23ridNspf8baZqovENbAEDjcGlxPiwAVG18nP90a3QWoRcWREiJeyQK KUwbqW4B7Feg9tDOOmO54yzyizxhgwyDRNU0YP0DHTSystvfjgSCRNdzMvoZc/MKmwd/K5qZuq5 L24SHOvUakJmyDcnYasZKfOQAJR3v5AeKDpnAPIBQpPV7IvL4txc2ncQXCdrxfUVhf1J5DnFUMC wKVPv/sg== X-Google-Smtp-Source: AGHT+IFMxHZk/JOK6HuOLeBrZiNTjfiREnR6Yw0LZuajZNfuaYG9AbD6fRhP3NU3mMaezpontY85NA== X-Received: by 2002:a05:600c:828c:b0:476:651d:27e6 with SMTP id 5b1f17b1804b1-477308a8967mr46458305e9.36.1761935628533; Fri, 31 Oct 2025 11:33:48 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 38/38] accel/hvf: Trace prefetch abort Date: Fri, 31 Oct 2025 18:33:10 +0000 Message-ID: <20251031183310.3778349-39-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251031183310.3778349-1-peter.maydell@linaro.org> References: <20251031183310.3778349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 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 @linaro.org) X-ZM-MESSAGEID: 1761935879597154100 From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 11 +++++++++++ target/arm/hvf/trace-events | 1 + 2 files changed, 12 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 805fe75e6b1..de1e8fb8a05 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1963,6 +1963,17 @@ static int hvf_handle_exception(CPUState *cpu, hv_vc= pu_exit_exception_t *excp) hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized(), 1); } break; + case EC_INSNABORT: { + uint32_t set =3D (syndrome >> 12) & 3; + bool fnv =3D (syndrome >> 10) & 1; + bool ea =3D (syndrome >> 9) & 1; + bool s1ptw =3D (syndrome >> 7) & 1; + uint32_t ifsc =3D (syndrome >> 0) & 0x3f; + + trace_hvf_insn_abort(env->pc, set, fnv, ea, s1ptw, ifsc); + + /* fall through */ + } default: cpu_synchronize_state(cpu); trace_hvf_exit(syndrome, ec, env->pc); diff --git a/target/arm/hvf/trace-events b/target/arm/hvf/trace-events index 29387780e3f..b0d3d7bd322 100644 --- a/target/arm/hvf/trace-events +++ b/target/arm/hvf/trace-events @@ -3,6 +3,7 @@ hvf_unhandled_sysreg_write(uint64_t pc, uint32_t reg, uint3= 2_t op0, uint32_t op1 hvf_inject_fiq(void) "injecting FIQ" hvf_inject_irq(void) "injecting IRQ" hvf_data_abort(uint64_t va, uint64_t pa, bool isv, bool iswrite, bool s1pt= w, uint32_t len, uint32_t srt) "data abort: [va=3D0x%016"PRIx64" pa=3D0x%01= 6"PRIx64" isv=3D%d iswrite=3D%d s1ptw=3D%d len=3D%d srt=3D%d]" +hvf_insn_abort(uint64_t pc, uint32_t set, bool fnv, bool ea, bool s1ptw, u= int32_t ifsc) "insn abort: [pc=3D0x%"PRIx64" set=3D%d fnv=3D%d ea=3D%d s1pt= w=3D%d ifsc=3D%d]" hvf_sysreg_read(uint32_t reg, uint32_t op0, uint32_t op1, uint32_t crn, ui= nt32_t crm, uint32_t op2, uint64_t val) "sysreg read 0x%08x (op0=3D%d op1= =3D%d crn=3D%d crm=3D%d op2=3D%d) =3D 0x%016"PRIx64 hvf_sysreg_write(uint32_t reg, uint32_t op0, uint32_t op1, uint32_t crn, u= int32_t crm, uint32_t op2, uint64_t val) "sysreg write 0x%08x (op0=3D%d op1= =3D%d crn=3D%d crm=3D%d op2=3D%d, val=3D0x%016"PRIx64")" hvf_unknown_hvc(uint64_t pc, uint64_t x0) "pc=3D0x%"PRIx64" unknown HVC! 0= x%016"PRIx64 --=20 2.43.0