From nobody Thu May 2 17:10:13 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=reject dis=none) header.from=hostfission.com ARC-Seal: i=1; a=rsa-sha256; t=1604707281; cv=none; d=zohomail.com; s=zohoarc; b=HFHKnOhfoKeQzYMRnYFIN2aG8QNS5laphJJU1GiBMvEaYJ4Aweusa1MJ7oVqOAQgBTupujwNT6r4wknV8e/6b0/q/4sdfMGvKoGi4CfSxn4hUpPdstc3bQ+AHK/W5lHJ89UcHN5+f7oUIxYL79/sXGoNvsNlvsS0fwCBCwz0VRY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604707281; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=HxTk0YETj6dMN2d4BW8yzpxkA22RcQ4RrIN4HnS8Lgc=; b=fZkMw9yPSNEG19PtvcQKEEKvMyRNBNKe8V8eLBd5LvBEyEXYSzmEffM6RZHQMoChlr9ATy04V0v3f89NKkhDFdyg/waP6yrNgRt3cHtzEOA1KLu+CYZXwYP5BF+Euqk20jlA7daEd5kpzPWG91BGeN9bwfO4F9x+P6v7EVWxxow= 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=reject dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1604707281411870.5381667976816; Fri, 6 Nov 2020 16:01:21 -0800 (PST) Received: from localhost ([::1]:39368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbBfU-0006OK-Bq for importer@patchew.org; Fri, 06 Nov 2020 19:01:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbBZn-00029L-Lg for qemu-devel@nongnu.org; Fri, 06 Nov 2020 18:55:27 -0500 Received: from mail1.hostfission.com ([139.99.139.48]:39692) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbBZl-000500-Oh for qemu-devel@nongnu.org; Fri, 06 Nov 2020 18:55:27 -0500 Received: from moya.office.hostfission.com (office.hostfission.com [220.233.29.71]) by mail1.hostfission.com (Postfix) with ESMTP id 2EA8E44921; Sat, 7 Nov 2020 10:47:12 +1100 (AEDT) Received: by moya.office.hostfission.com (Postfix, from userid 0) id 0BC323A0604; Sat, 7 Nov 2020 10:47:11 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hostfission.com; s=mail; t=1604706432; bh=X7tqLsPs9uZlHZgC5m25vMr/ME74Vg0G4E2S1VTpVlc=; h=From:To:Cc:Subject:Date:From; b=NZotzykiur64vIeuBfPqXpaY2p1jJhRl5iTDr49nARgaLrGJK6d003vE+0hDBYzsc HWWw229PhkNouSunk8A4QTOlCiY4nPsRGq50D+UyXIuCm/Qd8yoR5tqozDJT2RgEny roEz5FJponTLhKAQIjRq5eZJXchDReDFW7YRMxEE= From: Geoffrey McRae To: qemu-devel@nongnu.org Cc: Geoffrey McRae , philmd@redhat.com Subject: [PATCH] hw/core/qdev-properties-system: allow bus addresses > 0x1f Date: Sat, 7 Nov 2020 10:45:11 +1100 Message-Id: <20201106234510.2101-1-geoff@hostfission.com> X-Mailer: git-send-email 2.20.1 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: none client-ip=139.99.139.48; envelope-from=root@moya.office.hostfission.com; helo=mail1.hostfission.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/06 18:47:13 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @hostfission.com) Content-Type: text/plain; charset="utf-8" The commit bccb20c49df1bd683248a366021973901c11982f introduced an error in the checking logic that validates the bus addresses for PCI device addresses preventing usage of devices via vfio-pci that sit at a bus address of 0x20 or higher. This patch resolves this by reverting the checking logic to the original maximum value of 0xff Signed-off-by: Geoffrey McRae --- hw/core/qdev-properties-system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-sys= tem.c index b81a4e8d14..e62644bc69 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -882,7 +882,7 @@ static void set_pci_host_devaddr(Object *obj, Visitor *= v, const char *name, bus =3D val; =20 p =3D (char *)e + 1; - if (qemu_strtoul(p, &e, 16, &val) < 0 || val > 0x1f || e =3D=3D p) { + if (qemu_strtoul(p, &e, 16, &val) < 0 || val > 0xff || e =3D=3D p) { goto inval; } if (*e =3D=3D ':') { --=20 2.20.1