From patchwork Wed Apr 22 21:54:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthoine Bourgeois X-Patchwork-Id: 11504679 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8921514B4 for ; Wed, 22 Apr 2020 21:55:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5BE3721D7A for ; Wed, 22 Apr 2020 21:55:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b6M3pXXc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BE3721D7A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:58572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRNLX-0005JT-Fd for patchwork-qemu-devel@patchwork.kernel.org; Wed, 22 Apr 2020 17:55:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55056) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRNKs-0004OY-BM for qemu-devel@nongnu.org; Wed, 22 Apr 2020 17:55:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRNKr-0004tT-Lh for qemu-devel@nongnu.org; Wed, 22 Apr 2020 17:55:14 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:43364) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jRNKr-0004o6-8y for qemu-devel@nongnu.org; Wed, 22 Apr 2020 17:55:13 -0400 Received: by mail-wr1-x442.google.com with SMTP id i10so4417562wrv.10 for ; Wed, 22 Apr 2020 14:55:12 -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=SUQYWuaID5Z+pwe1OLNego3sgvcBxY1As+bvkp8jKu4=; b=b6M3pXXckyp9gW3X/MO81cCEEmsxV5P8fgaE8vN27WwbxV23zL4hlXGqzhk5e/zr+P pAa3Nl5HAZzFyXfKrCqlTU1/JXkjcqN4kIP/3AG1YC8CQrqHSezZHZ8oAHVhQYp2C3Wt pMvOnvyUu0lXBoXj+TuCpuqflEYk05ZOKGeuH/IKQm0zEy8UlXSzLST/ZXO0qX44Hbss /GNPsV62nPs8YmhUGdzSiPUAyCnY2dmhI9phyLqMdPTkOMy0gIzC7rKdvi6dr5ZwulcU q1o03QefNoCLLDCLlCYFAjsxFixKN1/HazwgqgfWw/GsZH2vOEDgGJ16PhuX6z8e9QLo 5XmQ== 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=SUQYWuaID5Z+pwe1OLNego3sgvcBxY1As+bvkp8jKu4=; b=UK5WsjNzymfb4tw02lL9/zBkA2bLGoWLzfWMbEP3AzLwUVxyQl0xMwIBptCbZuh8wV sXcyBlddZyW19yfCev5zlgnMBvicst5HMHgepDieCy2w2jMhiWuBJGaR+HBOWepd02YR YePTkuUAJ7MbsVaDQXP5k+nGjvV+D5qfBPFyHlQuxNQ4e5HCHm0wmLOf/8LFbEMbr1cN pguOD1HPFHv55S7yvGAHQZ6niGUiCzAq4mxztqUcvetOHd7Ydx4twUcIA9bq4HDdb4ul bPDd2z0DrZJ/knfnxkOmaPpJ1Ak394yB0ZvxVPVP/6T62FCnue3xN2Xa7SSqJ5R/rErp L8JQ== X-Gm-Message-State: AGi0PuaIHj+E5nKN7SFgJJibOpHvlVL9gfrG86F/vMFZ5AUXHRxr5wb6 HelV/6g8J1yPQTXpi+2py0o= X-Google-Smtp-Source: APiQypKGShdLI5UMAN6sqJfp9gNqTzCcqo7oCd1KRL12v2oOFVCnn3Beyf7dygaEkX1dQ6+XxhknqA== X-Received: by 2002:a5d:5189:: with SMTP id k9mr1197255wrv.3.1587592510740; Wed, 22 Apr 2020 14:55:10 -0700 (PDT) Received: from hobbes.blade-group.net ([2a01:e35:2fb2:a0d0:6d28:3d72:693e:c474]) by smtp.gmail.com with ESMTPSA id c190sm874243wme.10.2020.04.22.14.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 14:55:10 -0700 (PDT) From: Anthoine Bourgeois To: "Michael S . Tsirkin" , Gerd Hoffmann Subject: [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering Date: Wed, 22 Apr 2020 23:54:54 +0200 Message-Id: <20200422215455.10244-1-anthoine.bourgeois@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 sets the modern io bar to the bar #5 to avoid conflict. Signed-off-by: Anthoine Bourgeois Reviewed-by: Gerd Hoffmann --- hw/display/virtio-vga.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 2b4c2aa126..95757a6619 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -114,6 +114,7 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp) */ vpci_dev->modern_mem_bar_idx = 2; vpci_dev->msix_bar_idx = 4; + vpci_dev->modern_io_bar_idx = 5; if (!(vpci_dev->flags & VIRTIO_PCI_FLAG_PAGE_PER_VQ)) { /* From patchwork Wed Apr 22 21:54:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthoine Bourgeois X-Patchwork-Id: 11504677 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 95B8D92C for ; Wed, 22 Apr 2020 21:55:55 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 26D6821D79 for ; Wed, 22 Apr 2020 21:55:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="e8FrvArZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26D6821D79 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:58571 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRNLW-0005Hy-0I for patchwork-qemu-devel@patchwork.kernel.org; Wed, 22 Apr 2020 17:55:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55062) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRNKs-0004Oa-Ec for qemu-devel@nongnu.org; Wed, 22 Apr 2020 17:55:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRNKr-0004tx-Tn for qemu-devel@nongnu.org; Wed, 22 Apr 2020 17:55:14 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:42255) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jRNKr-0004p8-GG for qemu-devel@nongnu.org; Wed, 22 Apr 2020 17:55:13 -0400 Received: by mail-wr1-x444.google.com with SMTP id j2so4416046wrs.9 for ; Wed, 22 Apr 2020 14:55:12 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=dZG0n0VaLA7h/AbQlU3LwFM0V8Gn36yk9h6GHXolsbM=; b=e8FrvArZrmR+VkQhvNf3+hxicTA/HgvIBTcSNG+dwQWDYXh6eAg9io3692b3zwubHL qYsFV8ErKJO3M3VcYFbA7pz7176okwVM6nsjddxqxHPlAqxF39b8aIgiHCwpYDdWAAZw aVRW0biuVzFRPeNkUMrWrdgV+0V4/uoOXX3qUBbakeir3iMGERc6ikFodNSge/RxD9ol mxuD5QCStaOXosyrhGYKI7JOSlg2zMISrVFa2NSCPhLV1zSRxc+FLlQMrKYy9NizHxM4 UVCs6GNh4xmUjLeF45meGcOq1ziG6NETiJgouI8ulayz9uiYpBtxD5c6Ug/pqbvgVw0j HOwA== 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:mime-version:content-transfer-encoding; bh=dZG0n0VaLA7h/AbQlU3LwFM0V8Gn36yk9h6GHXolsbM=; b=euAEb4qWBfzgt7iNCTDqzVC3z0lqAL4QzXM6WQzgMq0X6ljmr6f15BUZU+HKDba5Zp sKFcKnKqoOj3bNiHWtda97Y5wv+l1bQpps1IOwi6aGG6UAuT8dTL0gDcsGABkdt1Y536 eJFoeBCH2Dhjd4/ASiXyIsLKrOGE9nKKAj/EW6ZPfwcC2HHPaWGnzyiVxn2vU5c3dLOe J2sV0NacM0DXzAkemyi/Tw0AE3keKnZYrflyoQ5/ZTdKPIVKUa4FX/xC55uG6hhuyawD JeywRlvPsnjlZVuSeqEMcvyYfBFGhnyZu3JbGSzWv7zSJxiaDt+ui4yh1FP0cj5+4J8o IQ7g== X-Gm-Message-State: AGi0PubdovlEsRS2SNo7OOD/NdBE5ZYltj2JkJKUh9YGWuHKHdj7ZTbY HRllX5eNObr0W2Aw4WYQSKImpFElY4U= X-Google-Smtp-Source: APiQypIFLSc43SIGEMHD6Se+b2F6jt8CxvQXQzWUDWKCa2BNhlv8aZ2DikOmTd/BqAZBk3TpuxjYYQ== X-Received: by 2002:adf:e8c4:: with SMTP id k4mr1162715wrn.209.1587592511538; Wed, 22 Apr 2020 14:55:11 -0700 (PDT) Received: from hobbes.blade-group.net ([2a01:e35:2fb2:a0d0:6d28:3d72:693e:c474]) by smtp.gmail.com with ESMTPSA id c190sm874243wme.10.2020.04.22.14.55.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 14:55:11 -0700 (PDT) From: Anthoine Bourgeois To: "Michael S . Tsirkin" , Gerd Hoffmann Subject: [PATCH v2 2/2] virtio-pci: update virtio pci bar layout documentation Date: Wed, 22 Apr 2020 23:54:55 +0200 Message-Id: <20200422215455.10244-2-anthoine.bourgeois@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200422215455.10244-1-anthoine.bourgeois@gmail.com> References: <20200422215455.10244-1-anthoine.bourgeois@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=anthoine.bourgeois@gmail.com; helo=mail-wr1-x444.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::444 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The modern io bar was never documented. Signed-off-by: Anthoine Bourgeois Reviewed-by: Gerd Hoffmann --- hw/virtio/virtio-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 4cb784389c..d028c17c24 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, Error **errp) * * region 0 -- virtio legacy io bar * region 1 -- msi-x bar + * region 2 -- virtio modern io bar (off by default) * region 4+5 -- virtio modern memory (64bit) bar * */