From nobody Mon Feb 9 07:39:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1511734126208332.5479852968389; Sun, 26 Nov 2017 14:08:46 -0800 (PST) Received: from localhost ([::1]:58182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJ56B-00061V-9E for importer@patchew.org; Sun, 26 Nov 2017 17:08:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJ4xq-00072q-Mf for qemu-devel@nongnu.org; Sun, 26 Nov 2017 16:59:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJ4xp-0002ub-RJ for qemu-devel@nongnu.org; Sun, 26 Nov 2017 16:59:50 -0500 Received: from mail-io0-x242.google.com ([2607:f8b0:4001:c06::242]:40551) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJ4xp-0002uG-Lv; Sun, 26 Nov 2017 16:59:49 -0500 Received: by mail-io0-x242.google.com with SMTP id d21so12098492ioe.7; Sun, 26 Nov 2017 13:59:49 -0800 (PST) Received: from localhost.localdomain (173-29-146-33.client.mchsi.com. [173.29.146.33]) by smtp.gmail.com with ESMTPSA id n184sm6517218itg.9.2017.11.26.13.59.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Nov 2017 13:59:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=1D6D4D+EEW+DmRhqVSXquFmHWOWoJJE5BzTUo/5DgyY=; b=Fynvea6FkL7UpHL4BnjDyYiimf3v8guZsrq/vajRLxHX5I/6v/n0R19BqkgKyM9tqk kL3GBBgb9n46wH9cD/V5hVUb8fe6+iW9fLv0WLUV+5pTU2iFwLrWZmXp3zyS/mHhRmHX Jeww32D9aws4X1GPkBTSFTXKflNw8EKHTQguXNszxZRhLsU+3of4+cr40K7WczTuTaww 3Ev+75eS0naVLviQoFf+obUxaa6kkFwNqINSBsKjqEBn4bykntd578qKPcKyJAhbMGdN wpI7gktERVPBo9tDP8r6ifY9d6bZ52XZOTP7212QHAXM/drudCqOD5KDLi7Gr68qzE02 svyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=1D6D4D+EEW+DmRhqVSXquFmHWOWoJJE5BzTUo/5DgyY=; b=SZVscsijZ6sKOnlf143NFrKFBNq1LXYIn4lY+35f0SvCjDme3/UUDUvLN6WLj7Rjlx VwLruTxye6+VcolQLxnyvAENHn5fbU9cr6mAAsdCeRR7DYO0kmkXLI0jN+lYATDmCgmb 6KDCDfSd4QXZwqKBeMce6n6uw41vcR/sy3WCYHRb6b4ZFMqZT7riXUTNDSWc6i+BRbqB te+au7FsmWSxAhlibYtjY80skyertYevDyW1/BqEIBpLoymtOuGQ8jt/1oLSUyEavpCI oBlmhjef4iscM0xxmb3jXIG9Md5RWvocm5QvSfVGbtFgWkSH+bPPqsBf8Et5aC8uC1IH E7aQ== X-Gm-Message-State: AJaThX65VDPpIs5lsOORktL8jaR1Tb7Ek2oFBrZS5XLrKYOXqwouui3m yLSGdh+EzI9xr3/KFsFyXsU= X-Google-Smtp-Source: AGs4zMYA6sayBW6eqz/kRhIFlWc5cgt4Xyz0eIhS46cVbaig0YwZVC/M927jHq3ZkVXEf5E1zvGYyQ== X-Received: by 10.107.171.68 with SMTP id u65mr38707632ioe.210.1511733588953; Sun, 26 Nov 2017 13:59:48 -0800 (PST) From: Michael Davidsaver To: Alexander Graf , David Gibson Date: Sun, 26 Nov 2017 15:59:05 -0600 Message-Id: <2e4d338f84913729f8ab51837fbcb94b0958a745.1511731946.git.mdavidsaver@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::242 Subject: [Qemu-devel] [PATCH 07/17] e500: fix pci host bridge class/type X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Davidsaver , qemu-ppc@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Correct some confusion wrt. the PCI facing side of the PCI host bridge (not PCIe root complex). The ref. manual for the mpc8533 (as well as mpc8540 and mpc8540) give the class code as PCI_CLASS_PROCESSOR_POWERPC. While the PCI_HEADER_TYPE field is oddly omitted, the tables in the "PCI Configuration Header" section shows a type 0 layout using all 6 BAR registers (as 2x 32, and 2x 64 bit regions) So 997505065dc92e533debf5cb23012ba4e673d387 seems to be in error. Although there was perhaps some confusion as the mpc8533 has a separate PCIe root complex. With PCIe, a root complex has PCI_HEADER_TYPE=3D1. Neither the PCI host bridge, nor the PCIe root complex advertise class PCI_CLASS_BRIDGE_PCI. This was confusing Linux guests, which try to interpret the host bridge as a pci-pci bridge, but get confused and re-enumerate the bus when the primary/secondary/subordinate bus registers don't have valid values. Signed-off-by: Michael Davidsaver --- hw/pci-host/ppce500.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index f2d108bc8a..8073d396ff 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-host/ppce500.c @@ -423,11 +423,6 @@ static void e500_pcihost_bridge_realize(PCIDevice *d, = Error **errp) "/e500-ccsr")); MemoryRegion *ccsr_mr =3D sysbus_mmio_get_region(ccsr, 0); =20 - pci_config_set_class(d->config, PCI_CLASS_BRIDGE_PCI); - d->config[PCI_HEADER_TYPE] =3D - (d->config[PCI_HEADER_TYPE] & PCI_HEADER_TYPE_MULTI_FUNCTION) | - PCI_HEADER_TYPE_BRIDGE; - memory_region_init_alias(&b->bar0, OBJECT(ccsr), "e500-pci-bar0", ccsr= _mr, 0, memory_region_size(ccsr_mr)); pci_register_bar(d, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &b->bar0); --=20 2.11.0