From patchwork Sun Jan 12 23:13:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 856821 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp1190509wrc; Sun, 12 Jan 2025 15:14:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWApbU6wsnWVev4e5RfTC7aDG5C8RSmYk7F2Mxtno5XrOhqb27B+s8yUwIOp1efLW15cKtQtA==@linaro.org X-Google-Smtp-Source: AGHT+IFGg9F0/SNMARgbZPAfFcdqoMrXsmohJv9bZ8CkrbyJGY96wjgDAHzTG8oiXz6xXOuncu4L X-Received: by 2002:ac8:5fd1:0:b0:46a:3709:6780 with SMTP id d75a77b69052e-46c710057a7mr314503921cf.19.1736723689450; Sun, 12 Jan 2025 15:14:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736723689; cv=none; d=google.com; s=arc-20240605; b=AV+6Kjyz5595E9gNwYFqx9cUhaIx4EAXCL5pkPX0XKM6dKQroemnjreLEF4cIvdTTJ /AvjWYb5lJ0mxuRGrdhJcmrdgHfX+cWkyPFm/ujh/X3Smv23a+HOAegVqfuMSqQoQPNs sSxHICDXv7nrAfRecOM5DXjPi/GApjfKa7SqtxPtbyI7qEv0XRY7zPfdhzZEy2exScIe 4gjJHSrXjqzZtAlkxiUzr/ziPbD7RKO/fl4r4+szY+Z6GMAfbHI15F32qf8x/cwLaRiX hq5e1fRnbZwkoboaWltKOKXmEs/MSx+u87xhVaXOnCHK2bpmKOAKcBdsM0tZrRX919KD wq/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=q1BZuJ/3m/XEdW/VfGC3pXpwHIJtrElJlYbu+OJQj4Y=; fh=qLUM6+i5Sr66QbW5oLTDFWSW8hM1Ez4Sa0oPnXX51EU=; b=bNoyNXSZqjllASENhylHKtxjHKjFPoKSZ5G3aaVJZC9ffvRuykeoan/brw7HZrveWE +OZzOIuFpbO2tAcweYkE2yOo7Fpm/FrH6yA/omhU1x51ODOJIBCdCW4PMWrzFEaI/ukl iuGgjL27gUK4R6C9xOoFvOGS6uGxEaunIZYdEbNEPfZME1/vqZs4khCKVEGQI/HAayH9 B9aHzcEvocrmj7htYs+NT4hl4JQ3JxLY3viqVrDOjcpBoqsiATi8ZEePnCr3hTX4iYT6 ERrCA20YZzG39FlvW0EfxAZCo0nrNe0PiUvUH6Vwx4U/qUS7JzWB8GjdCcERAZGkmBX7 VEtg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JxqtrhBa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46c873e5232si74814151cf.323.2025.01.12.15.14.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Jan 2025 15:14:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JxqtrhBa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tX79X-0003yQ-Dz; Sun, 12 Jan 2025 18:13:55 -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 1tX79R-0003xz-QC for qemu-devel@nongnu.org; Sun, 12 Jan 2025 18:13:51 -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 1tX79Q-0003Tv-7P for qemu-devel@nongnu.org; Sun, 12 Jan 2025 18:13:49 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-385ddcfc97bso3179396f8f.1 for ; Sun, 12 Jan 2025 15:13:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736723626; x=1737328426; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=q1BZuJ/3m/XEdW/VfGC3pXpwHIJtrElJlYbu+OJQj4Y=; b=JxqtrhBaiysti9bXafYlXRfH0BjzfnQITJFHmB08h59PuzaOfZqWS2J92sdIEK9OaR AGZmk5vK5EDVO9pQT0CQllyso77rBALzfteArZ8/26se8BImLRsBIIm/lmGWLmz/dsQU OmcRfiiVMnmeCwGKCZGJ7eFcXG+8NCybOgFcx0NSZhb8YXhTEhqLPgEi7APCQ0YTZIU2 V50CD5fRd/uk88UMH9FTufYVJGuKP94wwFOctRUYBrj6hl4ctqhKthFfD/dYNhszY7c1 QBCo8KjOc8OsgmbjV1dxdmMDfSz+x/B/2MXpUY6Qe/pPdxAUSCDDPd4XZBcqREuX55Cf X10Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736723626; x=1737328426; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q1BZuJ/3m/XEdW/VfGC3pXpwHIJtrElJlYbu+OJQj4Y=; b=IiFpY6EAeQRIL044heetOPIsRgsJMq8u28qOGdRHC2lMI7+pS+ghYaRGcKlrhZo0Ak MslBJRGvZTs/l0CvDFsctJwbj1zfaT70Ng7FVkk/6Tbra+Oz2EMtwoSOiJMS0VXGKFzE IIRDXyQb7ZM7lQTteibN9h6yAVPDN0gshW5T2Vb0ruhlk+1EKxU6nJc11z5/4fI/MXPI H7KImU6bHM+XfXkVzaoRW6vy2RmCxWtEGCwdR6B6cIAuyIfzXMG+0ovyYolYG9ptFwZ9 YajzihS2KcvWF88TjurlCjHclJtQ3Cf+HQgxXBpQCXmzHJ7MUDtxnq3zczQGBhUj6xCh yeoA== X-Gm-Message-State: AOJu0YyjC0pMEAIXlEdN4DUaLwHbizlHRacYgd/b0vZWEoVvrrxDn8LA FyNhJuhTd7NaQYt1hbjlYlSNkhXUnOy+As3rAHpQYGpo3h7aPEvCMxchZGtAzR8S/7hFNoACj0z 46No= X-Gm-Gg: ASbGncuJk2FkYt2oGp1K/JFe1HWjeAyHMxKQ2y+ZlhEuyN2b1Ni+J3DOx+KFkNwgUSt 9gt0DLwuuqgPPqMePElAwsh0HQ3a45edPCwHWQsKD9glSCadn02tlC9NsSbOYgHY34j2Gwf1Vgi uUv6lBTzMeB8Dplmp6AOUfp7e5eXuB0aLao66EkPZTxlSJuKOGqOtxtjgPInxzHteSpybsikpth yCa7fdr0cDdBlUWpD8RFA9gkttbRyPilvomW4lu1gcDosMMUGCZUJhnXm8mgQ8nb2j0kgfU5ZXA eUyjPBUOdeIpDASmlCg0nDKTF3kKoOo= X-Received: by 2002:a05:6000:481e:b0:386:37af:dd9a with SMTP id ffacd0b85a97d-38a872f534dmr17772354f8f.35.1736723625957; Sun, 12 Jan 2025 15:13:45 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e38c76esm10455112f8f.47.2025.01.12.15.13.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Jan 2025 15:13:45 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, Liu Zhiwei , Bin Meng , Weiwei Li , Alistair Francis , Palmer Dabbelt , Daniel Henrique Barboza , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH 0/2] hw/riscv/virt: Remove unnecessary use of &first_cpu Date: Mon, 13 Jan 2025 00:13:42 +0100 Message-ID: <20250112231344.34632-1-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Pass RISCVCPU to kvm_riscv_get_timebase_frequency(), then access the first vCPU via Virt::Array::Hart[] rather than the &first_cpu global, which is going to be removed as part of the heterogeneous emulation effort. Philippe Mathieu-Daudé (2): target/riscv: Have kvm_riscv_get_timebase_frequency() take RISCVCPU cpu hw/riscv/virt: Remove unnecessary use of &first_cpu target/riscv/kvm/kvm_riscv.h | 4 +++- hw/riscv/virt.c | 2 +- target/riscv/kvm/kvm-cpu.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-)