From nobody Wed Nov 27 06:47:40 2024 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=1700764654; cv=none; d=zohomail.com; s=zohoarc; b=PKJR6o+eds+qKwui2RBtenDd1ITbI/sJZjPXCtl4I+j262njD9rO1BoE760DoUzHhgnh6qGfNcAQg6EqHEmIUp2i0aroq5kZt6ZZZttXRbgVjB0zPEcndJy5xF5nHvy2/tZ3igoDTuTC57Y4JmXBmUM+PHSuHXDq4A0yfqz9H7A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700764654; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cqp56K59q3umRruYVBhFmPPZuHH1N9xP5Bn9Um8qZmE=; b=Bos8kGUqiLFVPpaxQOn0DDdNuL3KbpqB8JFZPZoeFOtjPnygiOrUdMB/+akVemRtDQ2hRDRqejqCmXkgE5jEXb+hPaNMTh5+OH2ia6ikuFLtr9uy3P89UieFgPYDzXyQfd2maHC7MUQGoAmsua4HfEPUU6WpnUUdj5NbJtxiVEI= 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 1700764654679794.5751338706515; Thu, 23 Nov 2023 10:37:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6EZF-0002y8-Ae; Thu, 23 Nov 2023 13:36:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r6EZE-0002qP-3g for qemu-devel@nongnu.org; Thu, 23 Nov 2023 13:36:48 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6EZB-0004dj-D7 for qemu-devel@nongnu.org; Thu, 23 Nov 2023 13:36:47 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-332cb136335so755726f8f.0 for ; Thu, 23 Nov 2023 10:36:45 -0800 (PST) Received: from m1x-phil.lan ([176.176.165.237]) by smtp.gmail.com with ESMTPSA id h4-20020adfa4c4000000b0032d8eecf901sm2346025wrb.3.2023.11.23.10.36.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Nov 2023 10:36:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700764603; x=1701369403; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cqp56K59q3umRruYVBhFmPPZuHH1N9xP5Bn9Um8qZmE=; b=HLqYtlMnh0jWNf19X2dsHZN85dajy7ar8QpIWU6ci8yRmzx4jyMXFLhwEvjFnHv6Mp UBBfDXrXxB/QNB2v+3NPywiMQ9issPeNS0naUg3/R6nXXPglZ9mAZlUIQoZN/wjnY/2W EdHqCXS5pL60oVWkYL+tmePJ09YQefQ+XL2/r7QJQvofek2ZTQXLPxChd9A9ScggD8R5 Dt/t6KD/O4REpDehJotMTrsI4iuXXv8oR6uifZLMzuhCJeZ8hHXfpUBQOrgENWisksnQ BpUkE5EhYS8anW+ep9AHxfaROX0NvUp6HzzxRqqoDRQITv44ChQOxpwhzr489beHlZ8I RxUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700764603; x=1701369403; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cqp56K59q3umRruYVBhFmPPZuHH1N9xP5Bn9Um8qZmE=; b=F0AKUSZufrh72hiIosWpptaYtWQdaortQzIZgT+D60qBY599v4/N/RILAkU6k9WeA4 inK6m44OjhpRKJlXvGnxqgWVhhA5C9xz//8xT1dc4Q2upRDt9/yZWfyPvy7Te79zkjHg t8C7yBTy4PKVqj1YXHZrpdWRnP9quBUDWrwWuJY3A6g5ZzmjKAtM3B3054feIcEKFyuK F4FVl6/OZGDcu7YRsUATyVQXYk0mNUbsmofMtJ4qbhMrTtOil9qmRCkANkdt/B1ASUZH DO9pOKQsgT5sINS/W0tKLa9j1slxIdWukOBfE79bK1LizyvmKNRrs5ZNWsZMBq8g1Umv wpMA== X-Gm-Message-State: AOJu0Yz1c0TvZDe+Me6OuyAWgySPvKL7VUH3+BcJzWd5ETLnGq7YCmY4 BaNNGkhbbU1NhP3Fy8EN6tMMvk1+30LdcvX2Rds= X-Google-Smtp-Source: AGHT+IHytQoZi9KH8CyFExLRcgAcv8tHyMDkToDBwOGPZdW9JwNZM10ep/0eQg9tIrJxtcYAlwyL4w== X-Received: by 2002:adf:f88c:0:b0:319:7c0f:d920 with SMTP id u12-20020adff88c000000b003197c0fd920mr198305wrp.57.1700764603697; Thu, 23 Nov 2023 10:36:43 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, kvm@vger.kernel.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.0 15/16] target/arm/kvm: Have kvm_arm_handle_debug take a ARMCPU argument Date: Thu, 23 Nov 2023 19:35:16 +0100 Message-ID: <20231123183518.64569-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231123183518.64569-1-philmd@linaro.org> References: <20231123183518.64569-1-philmd@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::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700764655885100001 Unify the "kvm_arm.h" API: All functions related to ARM vCPUs take a ARMCPU* argument. Use the CPU() QOM cast macro When calling the generic vCPU API from "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Gavin Shan --- target/arm/kvm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 9f58a08710..1f6da5529f 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -1344,7 +1344,7 @@ static int kvm_arm_handle_dabt_nisv(ARMCPU *cpu, uint= 64_t esr_iss, =20 /** * kvm_arm_handle_debug: - * @cs: CPUState + * @cpu: ARMCPU * @debug_exit: debug part of the KVM exit structure * * Returns: TRUE if the debug exception was handled. @@ -1355,11 +1355,11 @@ static int kvm_arm_handle_dabt_nisv(ARMCPU *cpu, ui= nt64_t esr_iss, * ABI just provides user-space with the full exception syndrome * register value to be decoded in QEMU. */ -static bool kvm_arm_handle_debug(CPUState *cs, +static bool kvm_arm_handle_debug(ARMCPU *cpu, struct kvm_debug_exit_arch *debug_exit) { int hsr_ec =3D syn_get_ec(debug_exit->hsr); - ARMCPU *cpu =3D ARM_CPU(cs); + CPUState *cs =3D CPU(cpu); CPUARMState *env =3D &cpu->env; =20 /* Ensure PC is synchronised */ @@ -1426,7 +1426,7 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run= *run) =20 switch (run->exit_reason) { case KVM_EXIT_DEBUG: - if (kvm_arm_handle_debug(cs, &run->debug.arch)) { + if (kvm_arm_handle_debug(cpu, &run->debug.arch)) { ret =3D EXCP_DEBUG; } /* otherwise return to guest */ break; --=20 2.41.0