From nobody Sat May 18 04:46:18 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=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1587505840; cv=none; d=zohomail.com; s=zohoarc; b=ahwz7JSa38ma+6yOwh+ujA3GxN+FI0veWd3aJuQ/36w844LRrkus44xGMHbkx5k/s3bDFr3dosUf/SdpbhDxVhDc0yJgnzapkstkiUzeYjbebDT0+wM0UCDuVGNOMXliatCH26jOCetRV786tuBautmeUB440oayvZwSpHQVjZU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587505840; 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=hxPz1+FV0NyZSt3UlOe4Pt8nN7VD9hUNy9KsDhU6z3U=; b=SkdtOqySF3EN0qupjsDcHcydB2KikABsnsLxmhMlqzzNtaqKcW4UCBE7RQ8GsnOVGaTs3xSpapiMAwTuBmUOKjJ33ZFthFgx7qNHwIesbtZ2IH3hUW5JkoGpxcgDr98Ux95/kSEhheUuhM9Qx423DFhCBkg0ZCP2KESPlsOJymc= 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=none 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 1587505840534989.6068237324819; Tue, 21 Apr 2020 14:50:40 -0700 (PDT) Received: from localhost ([::1]:36612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jR0ms-0005DH-Vf for importer@patchew.org; Tue, 21 Apr 2020 17:50:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51092) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jR0lv-0004nS-DV for qemu-devel@nongnu.org; Tue, 21 Apr 2020 17:49:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jR0ls-0006st-9z for qemu-devel@nongnu.org; Tue, 21 Apr 2020 17:49:38 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:41534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jR0lr-0006ml-Pk for qemu-devel@nongnu.org; Tue, 21 Apr 2020 17:49:35 -0400 Received: by mail-wr1-x442.google.com with SMTP id g13so12994wrb.8 for ; Tue, 21 Apr 2020 14:49:34 -0700 (PDT) Received: from hobbes.blade-group.net ([2a01:e35:2fb2:a0d0:6d28:3d72:693e:c474]) by smtp.gmail.com with ESMTPSA id z1sm5051596wmf.15.2020.04.21.14.49.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 14:49:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hxPz1+FV0NyZSt3UlOe4Pt8nN7VD9hUNy9KsDhU6z3U=; b=Ky44pJQwK1Uj5tBPWiJ7RpnKTPL7s80fa+99mURtxsWwTjd9efaNbhBJnOzC3xP31C DUkTSFVU8fZ8v+GQ45mL3rzNF3PcmDroyDuGSS97OeC2M1zo1pjCwMJRpSnSYa2IEACa HfonsjoWxH8z4mbpBvyzKGDnI2RPCde8s6djyoimmvvvJ09wOFqT/uSVAWasBck/DfJr jBZaj6G3ZNNIx9joO7ThUXKTaojix7bV5BiJdDlAt+SYwDI968Ovs+hUGDEEZCv3H688 MklyQSl+QvR6lJtA8/GXqUylHOVUlNUt4I8xMIAI5oc+OkGYwWwpHSalHg+oQbI740a7 uvww== 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:mime-version :content-transfer-encoding; bh=hxPz1+FV0NyZSt3UlOe4Pt8nN7VD9hUNy9KsDhU6z3U=; b=f+PeBIiLlKzgExIYfvXOSlORFRvOZ2xxmX54wS6IV2VIXekPR+f7iOEcCWZmhaxmGI cN8OpfwXtnkE4Yx+QK/7x2KT2U/HKjEyz3WCEca7cbtrMvyowNU4nb0YmFUrsbPj/TWt VlC0eQwMyceS/s2Lj+6GLLLwa+VOTclWOCfSMXKYLc5vN4FEobAY4TOmFStU/b364bMe CgAvuCfXCj1gMK+z1kVY8KEQdlCQ9S35hGL5EKDmnVHNPAKhainuoRx47XqCyLbwiYiu i0XxBKZiQo9tB4pXBvpOKzh+Ltv2spRugu6vXb4KzAeI0rnLKeUIJVELRJMdDfk4+YMa AkTg== X-Gm-Message-State: AGi0PuZFKNPgLwLo+EGWTNmex8VGc/QK/fOt9hZKPMt4bjc7Yvu2MRAx mPYlCgfsTMAxuBYRIiYqbcw= X-Google-Smtp-Source: APiQypINmV7DUR/U9mubNJVbkNPvVVUxYRiCh/PXLqi7w8mRs8T1QgmxNVR3CeoWhP4rJGOyl7CpXg== X-Received: by 2002:a5d:4b90:: with SMTP id b16mr27723224wrt.16.1587505773171; Tue, 21 Apr 2020 14:49:33 -0700 (PDT) From: Anthoine Bourgeois To: "Michael S . Tsirkin" , Gerd Hoffmann Subject: [PATCH] virtio-vga: fix virtio-vga bar ordering Date: Tue, 21 Apr 2020 23:48:53 +0200 Message-Id: <20200421214853.14412-1-anthoine.bourgeois@gmail.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: pass client-ip=2a00:1450:4864:20::442; envelope-from=anthoine.bourgeois@gmail.com; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::442 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: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) Content-Type: text/plain; charset="utf-8" With virtio-vga, pci bar are reordered. Bar #2 is used for compatibility with stdvga. By default, bar #2 is used by virtio modern io bar. This bar is the last one introduce in the virtio pci bar layout and it's crushed by the virtio-vga reordering. So virtio-vga and modern-pio-notify are incompatible because virtio-vga failed to initialize with this option. This fix exchange the modern io bar with the modern memory bar, replacing the msix bar that is never impacted anyway. Signed-off-by: Anthoine Bourgeois --- hw/display/virtio-vga.c | 2 +- hw/virtio/virtio-pci.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 2b4c2aa126..f5f8737c60 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -113,7 +113,7 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpc= i_dev, Error **errp) * the stdvga mmio registers at the start of bar #2. */ vpci_dev->modern_mem_bar_idx =3D 2; - vpci_dev->msix_bar_idx =3D 4; + vpci_dev->modern_io_bar_idx =3D 4; =20 if (!(vpci_dev->flags & VIRTIO_PCI_FLAG_PAGE_PER_VQ)) { /* diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 4cb784389c..9c5efaa06e 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1705,6 +1705,7 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Er= ror **errp) * * region 0 -- virtio legacy io bar * region 1 -- msi-x bar + * region 2 -- virtio modern io bar * region 4+5 -- virtio modern memory (64bit) bar * */ --=20 2.20.1