From nobody Wed Dec 17 10:24:14 2025 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5075418858A for ; Fri, 21 Mar 2025 14:32:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742567579; cv=none; b=rtgj19A8vtLMv0mPPabOIvbL8FWzMAFdDfsbZCguCDidCyyxZPBsgbFQVEEKCVOwB99mEfYRCV03byuxV55R8DTqWxAehtVcb59OqtuwflzyD1jDeAaj4S340HL1RTdsuTzZawFQSMpT1BR0YplNQA/PX5ctFBFYsJERmauAH18= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742567579; c=relaxed/simple; bh=+LDlUo8we7HXs412riW2XVXscOex6Sq1qjsJfiM5m7E=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=a0gHZOk8a+MeWp7xShIlmKMVOVUqtvJO4F4xbj7cT/dyOlvyi4C0Az8pgFqANovhoHJO6229ZgFN/4tk+C22YUzxLJ4/1/Dj5sLcdmKVEIWyKeMnee2SOfZEMmLrIvh8NRigi7EcXgVo4Wg+qfu3IrfpAzAFDrX3RuHfhUseEQE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kFi/D4Yz; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kFi/D4Yz" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-43d0359b1fcso13539295e9.0 for ; Fri, 21 Mar 2025 07:32:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742567575; x=1743172375; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=MzFQfhx5F8dx0RL9AvvQYwg76iw5NXa4lMy+vsdeqMg=; b=kFi/D4YzOt770w/wvjc7ZyU62UJBn2euObrJKUlP60/QTnDz0WjYNyRKXyenjj3+d+ 8AZk3BM6HBEhEuboEEWBdaPijot2KJk1R+mOkr/H2hAabQl1NOd8ELA/Kl6wLzjp3oCE IQS4KvAYfhJhHX3vNTbRQ45jI04kVFtmuoFZ4sBeuddZ/kmc1iXJHZwePNhOfdULDkny SkrHecAg8qF0Y1r4LiI6qYbEg7biHopf4dE11IDR31/F71iIP9Wf7vCeaN5gGqCnh9Af KDhGkmBACtb8vNrH4I8mFFoVQUwY5gm059dGJMQT/7vZ7WJhZiJQdq1vWCauE8RtREL1 t0Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742567575; x=1743172375; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MzFQfhx5F8dx0RL9AvvQYwg76iw5NXa4lMy+vsdeqMg=; b=H4N4tKuj3D6sxrrVhVJ++rIo2tT/pNthEBstSuTYbBBZevpx8Ldhu3eAmhtglm+FGA b0eVJNIbIq1VqqM5vtVYxGUp1qxl9YoPwkR9o9fmBxMf62UbCPW4EUoozdZy1X4h6vO0 NSxUDD9Y+Y66D1BAZz9WObnaKzR0CFrx2upFlayBqiunJX3QOikhpZlDUEygi6zyBK7u F++TEypOIZhj2vqLMaUv3dZfBFmNbcMNU144HD3aTKngzGgf28ALBeuo0dIBnT0uWARB MX5GOAUVdd+pVffQM70hG7Mm9Ngn3IM2wdJCDuSU4eOJTvO2otZQLHtZfGAihedd3JS5 DEuQ== X-Forwarded-Encrypted: i=1; AJvYcCVhFYZ6kFHASvH4WW5KNIeFmh/jrLAOwplxoXi9c2w94QzPMRnT6Q9ABf/EQWZqs8ZvAg3SKZztPfUckhw=@vger.kernel.org X-Gm-Message-State: AOJu0YxDxSu3+LS+ugtA+iIiLvIEum20F8FD3Rn2iRORDGlLDNk6PHMG fZOX9tT19cg+I1u2U534QcGEgLXPKE+9Pr+phH4ckcgxCKwvqMsfsvew5o6nS0Y= X-Gm-Gg: ASbGnct6tzhWw/GUGvzkZwFr0If9LHjChclgW1x3uYrNJ5ylX3GAJj5wUejXKcfD6aK Bdn7KGUTpNkVm5+w8MW1o6/LZ55aie0PotBZnboclZaUJwGBr+xTcj5yTj5zuk/X9V3p7rVo4tI /O0z3ne5mo4hGoIYBNwNj4hGIqvWqDPxOjBgz264aa/NsmV40QflhldSI9pTUswng1U6jNaJ0qW GhZFV9ByhK5LJDBka2IL3CeeMxYaEWXtxhORZekwJE054iDCQ35VqUwMrey7KIeEzG7vKxafi31 lTk1TYXpBTlQNNWRCCyFWa88BPD99JGfNIBGi/mJeyGzF6OSCg== X-Google-Smtp-Source: AGHT+IFdHgCx4C5nFq7a41Rl1TdfpLB7mC6eqzVe1FxFvJX3eQdkfF3U3LPtyEx8bVlfn1VSsrBleA== X-Received: by 2002:a05:600c:1c02:b0:43d:5264:3cf0 with SMTP id 5b1f17b1804b1-43d52a08ed8mr22225315e9.11.1742567575525; Fri, 21 Mar 2025 07:32:55 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-43d4fd27980sm28845345e9.21.2025.03.21.07.32.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Mar 2025 07:32:55 -0700 (PDT) Date: Fri, 21 Mar 2025 17:32:53 +0300 From: Dan Carpenter To: Ricardo Koller Cc: Marc Zyngier , Oliver Upton , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Paolo Bonzini , Shuah Khan , Andrew Jones , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] KVM: selftests: Fix a couple "prio" signedness bugs Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is an assert which relies on "prio" to be signed. GUEST_ASSERT(prio >=3D 0); Change the type from uint32_t to int. Fixes: 728fcc46d2c2 ("KVM: selftests: aarch64: Add test for restoring activ= e IRQs") Fixes: 0ad3ff4a6adc ("KVM: selftests: aarch64: Add preemption tests in vgic= _irq") Signed-off-by: Dan Carpenter --- --- tools/testing/selftests/kvm/arm64/vgic_irq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/kvm/arm64/vgic_irq.c b/tools/testing/s= elftests/kvm/arm64/vgic_irq.c index f4ac28d53747..e89c0fc5eef3 100644 --- a/tools/testing/selftests/kvm/arm64/vgic_irq.c +++ b/tools/testing/selftests/kvm/arm64/vgic_irq.c @@ -294,7 +294,8 @@ static void guest_restore_active(struct test_args *args, uint32_t first_intid, uint32_t num, kvm_inject_cmd cmd) { - uint32_t prio, intid, ap1r; + uint32_t intid, ap1r; + int prio; int i; =20 /* @@ -362,7 +363,8 @@ static void test_inject_preemption(struct test_args *ar= gs, uint32_t first_intid, int num, kvm_inject_cmd cmd) { - uint32_t intid, prio, step =3D KVM_PRIO_STEPS; + uint32_t intid, step =3D KVM_PRIO_STEPS; + int prio; int i; =20 /* Set the priorities of the first (KVM_NUM_PRIOS - 1) IRQs --=20 2.47.2