Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2636519lqb; Tue, 28 May 2024 06:17:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUodFe30l2TkZUzo71DEW/T/Vud0Vxt3LgdZXY1Uq0qGbiJ2PMSypP+5BLyXtm5LVKy5FJfgfGoH4IPG02b++d31yEpP/zDrjjafsDwGQ== X-Google-Smtp-Source: AGHT+IFlAWg4Frcz4LC7RC7ZET1Ix+IbM5UIyHSKCUOQcp0S5gviDo0AEUeDI5RXd73G+lY9torU X-Received: by 2002:a05:6a21:3391:b0:1b1:ce04:e80a with SMTP id adf61e73a8af0-1b212cc4de0mr14095577637.13.1716902236639; Tue, 28 May 2024 06:17:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716902236; cv=pass; d=google.com; s=arc-20160816; b=frI0z1zXhytOtb8XRYC3ctWWxZwT8qFI5yTl943fefk1nd73CUFUP8j1Z+Vao1zSIz m8E5kZkqdWFOcUGPjFEj/SPwrHdYtkqbNPHQqaYtJ8cGzAZKm6sZbejY4JV1xVt/7y8R iZaWIIwDah+m1uizih97nrEVZK6FlPc2smIrPdeHdgglk3v7UX5qgIvRKMKG8gZlJvKA Litir8KLFhfG9v+qF4yROv6ZvOh9EnuUfitaAQi5E2x1RBXy8jDv6Cah7YI7A6X7ZmZu EKA130TFjNlfQYiaUtVaP7F7isT/6LOqtq3EjK7eM3ofbNZM3aGjfaqoLyFC4i3Bguv7 HxFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=KKO5pF0AuV1bNrDCOnTfXew1j1QeUsaF7EgHEwrkyxQ=; fh=EauUUtKoR0UR7fBfwL8MXeT5EQFFSIR2D7eJwrGXWrA=; b=DEhO+1VM1hhlulsaW5U5IfvpRHwGXS0Q9eX+V/tntPkYOMhQwMl9w5lQYSDGDf6/J5 2n0iSikYezhHNNCUD2+6vf22D4u1QEnN4etGukhISqEUZI8gIxynw3Zh+mSJv9k4uSAu 47JwEBaRuLabE53lIczLIdpd40TGVfRasj1KJeyXittf7oz37nOGelq1yrkSiDit0Yol D5FtbBuf7cCdUUQuOJxm/gHUKE5hogp8vR/lY5ZUkpoMpf0T+u00RvItVjv96DQDvFZB L1pO2PRr9l2uCLAwguSoSIfMuuxDjBAXeouMPTJnUChUfvlc+IK+29bK8Pl7ijokS26p VhVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=Bp90HijQ; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-192341-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192341-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f8fc04df96si8039501b3a.67.2024.05.28.06.17.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 06:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192341-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=Bp90HijQ; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-192341-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192341-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id F2AC6B255E8 for ; Tue, 28 May 2024 12:57:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0818F16D9B3; Tue, 28 May 2024 12:56:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Bp90HijQ" Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 1D8E613E3F6 for ; Tue, 28 May 2024 12:56:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716901011; cv=none; b=oM3wIp8dxcpF67XHfmUWJolm1cxioWV3SQJNvneN3uThyJ+wRBdj6Qi3x68IMB7rTd6rEt3MA8Xr6XuJkdEL0jAfAJ/ZtjHh1JBIuTd2FVWNdJP4AUgGy8udmaZL/TH5lDJZpptaSjHfQNbLWOrlIJWrZroEvMSRtbPmrd3+8pE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716901011; c=relaxed/simple; bh=t2lYJZE3I1GCMRmE8dQbZmlshZxpMe2Hp+kMcyTO3fE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=d0gg7wLo3QffHmrHb2DXwtIcke9Yt562nftIyeikuKNHXKlpNPHLbmyuqbxqG4qWx3bEQvyHVYFGiH9o19nP/FisMo4s7woX42GM0AhhQ3EpFx3e25kRslReM+Pu5R5+g+NFtXBh86Nqp3VYcCkov7YjkhXEfKDF2/ux4noVBwg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Bp90HijQ; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a6302bdb54aso119179866b.0 for ; Tue, 28 May 2024 05:56:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1716901007; x=1717505807; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KKO5pF0AuV1bNrDCOnTfXew1j1QeUsaF7EgHEwrkyxQ=; b=Bp90HijQ4mv/oHIDqIbPUcr8FTly2F8b9NyUJi9C/mZOfQ/NkhpIwLmNQVXPaiVHwU tyQNDmN+4ItHSbjrSXGrCza2JXyQNR/GXK+9BGWJwpdDudf5Vd6qrajFLXyDn+bxXuJM S4sK4NUX8htlKHNsr3Ko51ncOVQJO+/Aj+38d86B2m+BblWfmITMqI+wXvkozrkntS46 Zf2yxlFtx/Sqb9tBNJy1UpSKnRiGa5nzm5QjOgvqV1qlyIWciHVporSkyz7Sgq0SXtx4 Y6yGsjpVrxqu3Qk5VFyrMCHMHjDgkZqbNfuS0StxCyPI/ilBQa+/jrYjacnlDCS6bpGQ QcSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716901007; x=1717505807; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KKO5pF0AuV1bNrDCOnTfXew1j1QeUsaF7EgHEwrkyxQ=; b=NKtKPtnCSZ4dj07AZciIfDXQ0hdPXR3LwtupuSTV/EXQxdqvpshOtaGXmHayFY7c1m BlhsbQrEqeV+wx7jWj6SwJDMw63c+izEJmag42Zgt4+gItgrnJ7vOBxK6B8ockQ6lMCm Gu5IEBFfiKidYWBA4xH87P2/SvfS/3FIe8QZVath/9g/rJr8cTOmYh8v/21XOjQs4gAb Hn0uPmpVM5wIni8/ExWnFuCJWlohhEMz3mKbMeWOlDuUo1VXBvgWPHHE2y24AX1jq04W 9iB8Fqf16E+IOYsha2r4udPEx9gJRWaqKWtsNvL9jCSL/vn2VcFbpLuPv9wDG2f5AEp3 wcAA== X-Forwarded-Encrypted: i=1; AJvYcCXmZxUUE9x9FrbYsCS1ZXYGjLVj3cLKSd80LOWBegaIRQ3sIVvT9mMEixtjtQM0Sx6lzdXSSKIs3GvHC+Ok+An0QfpPWAwq0qg0vKc2 X-Gm-Message-State: AOJu0YzE/Retv1jaHzaJ8CwFq5nga+BvS9uwUXX3e4R4yJ9GqPUZq/mV DDwgXE2uglrYen9YIp2eqDs+VYlX4UgUhdWiw4qDQJpcy/118vvm7GLaXzOcQzM= X-Received: by 2002:a17:906:6d88:b0:a5a:6367:7186 with SMTP id a640c23a62f3a-a626536e538mr707619866b.70.1716901007554; Tue, 28 May 2024 05:56:47 -0700 (PDT) Received: from ?IPV6:2003:e5:8729:4000:29eb:6d9d:3214:39d2? (p200300e58729400029eb6d9d321439d2.dip0.t-ipconnect.de. [2003:e5:8729:4000:29eb:6d9d:3214:39d2]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626cc8b980sm608662466b.154.2024.05.28.05.56.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 May 2024 05:56:47 -0700 (PDT) Message-ID: <293200d3-5fe8-44da-a0c3-95e6f9899670@suse.com> Date: Tue, 28 May 2024 14:56:46 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/4] x86/pci/xen: Fix PCIBIOS_* return code handling To: =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Konrad Rzeszutek Wilk , Ian Campbell , xen-devel@lists.xenproject.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org References: <20240527125538.13620-1-ilpo.jarvinen@linux.intel.com> <20240527125538.13620-3-ilpo.jarvinen@linux.intel.com> Content-Language: en-US From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= In-Reply-To: <20240527125538.13620-3-ilpo.jarvinen@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 27.05.24 14:55, Ilpo Järvinen wrote: > xen_pcifront_enable_irq() uses pci_read_config_byte() that returns > PCIBIOS_* codes. The error handling, however, assumes the codes are > normal errnos because it checks for < 0. > > xen_pcifront_enable_irq() also returns the PCIBIOS_* code back to the > caller but the function is used as the (*pcibios_enable_irq) function > which should return normal errnos. > > Convert the error check to plain non-zero check which works for > PCIBIOS_* return codes and convert the PCIBIOS_* return code using > pcibios_err_to_errno() into normal errno before returning it. > > Fixes: 3f2a230caf21 ("xen: handled remapped IRQs when enabling a pcifront PCI device.") > Signed-off-by: Ilpo Järvinen > Cc: stable@vger.kernel.org Reviewed-by: Juergen Gross Juergen