From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D89B3C433E0 for ; Fri, 5 Feb 2021 14:09:28 +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 1456D64FD5 for ; Fri, 5 Feb 2021 14:09:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1456D64FD5 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l81nZ-0000Ak-Mi for qemu-devel@archiver.kernel.org; Fri, 05 Feb 2021 09:09:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l81mO-0007bG-Jv; Fri, 05 Feb 2021 09:08:12 -0500 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:45106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l81mN-00039F-65; Fri, 05 Feb 2021 09:08:12 -0500 Received: by mail-lf1-x12e.google.com with SMTP id q12so9984436lfo.12; Fri, 05 Feb 2021 06:08:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=mkljodUMFPRwb+m6aBJQT8Lo5+kaLRlqdFzwYBBCSgY=; b=AsGffv9hiGJ+KOsCwMzWjVQkU+7NxU6Kb4T3QWB6TL5e23Z1gzu8pXh70Ba3Jc8Ipz UhkU8Y7QV+fg4Q+9XBTqM+DRcGBvL+K4gOP4RS6YiDhzuk6/x+yhDSjTuCQQty4IYx+i ixqqYEt8ci101Z+Lfta/YnStC3uWuf7c2yVsc3q4eibnPoKHrWR0hOcgnOgFdShfDoa9 cwknkwN8bQlmIzoy7s+KQhqSKPHUVYiojgycDLblx1x9v5yP7a1/shr1OxBNYonqkWch kXIrZMGPIG6EQ6U7vhC6pBrthyyfk339aQV35Dm9yxZ0WlmoIRYgtCQhRJLwVq1hHGfO dUEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=mkljodUMFPRwb+m6aBJQT8Lo5+kaLRlqdFzwYBBCSgY=; b=rocCdURcXyTU1x+zRtavcUvBug20ZtMcdTY1poZnwbJDRfDvAwNQRRaS0p0tZU9Y20 JcsCpgW0jANil17tiHn05r8XKTUtJ5SWFIrwKiYMds6+gMJhw3NZtDTuqKbxPk8E23nV WVEUDAoY+eJcu7CdkckPpPf0ieHlaqWXzohKCQpRhp1jjN297GUm7JBdeplTghF4pBKD 163XahaBKD/W2VvrzvvHoe957qehaKLaE9UmpBkwDFORdJOg9ikpXaQv55DKCnbYLZ9R X0EBoRDSYqJrwJL83te9IKeUhpnCtaCIpdMtfAGjg0NNAmf9QLCVus3gr48CSYwKOun+ JZVw== X-Gm-Message-State: AOAM532D/hL7ecx3G2CtMNSkFJ7V1smlV9GAh/7wwVp8Rue6wELpN7+Y FrgBANEdAmaCxSa/HTZ4a4c= X-Google-Smtp-Source: ABdhPJzqMK6MWrJN6W9l4Qxzr71id6Lyinycj+AmKCqYhy9bKHnkvlbyBd+wGuYfq/pAwtzV3tKKiA== X-Received: by 2002:a05:6512:118e:: with SMTP id g14mr2515235lfr.205.1612534088708; Fri, 05 Feb 2021 06:08:08 -0800 (PST) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id b1sm1000038lff.77.2021.02.05.06.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 06:08:07 -0800 (PST) Date: Fri, 5 Feb 2021 15:08:07 +0100 From: "Edgar E. Iglesias" To: Peter Maydell Subject: Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment Message-ID: <20210205140807.GH477672@toto> References: <3362132240927a23ecca7b9d8cfd6e4130509eea.camel@gmail.com> <6f6a803af5941346050d84e77fcaa52e0175a8a7.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=edgar.iglesias@gmail.com; helo=mail-lf1-x12e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: , Cc: Eduardo Habkost , schspa , Kevin Zhao , Alistair Francis , QEMU Developers , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , qemu-arm , Markus Armbruster Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Fri, Feb 05, 2021 at 11:18:28AM +0000, Peter Maydell wrote: > On Fri, 5 Feb 2021 at 10:31, Philippe Mathieu-Daudé wrote: > > 1/ virtio-mmio must be sysbus-device, > > Yes. > > > 2/ we can not sysbus-map out of main memory so private container > > is incorrect, and Versal can not use "mr-ps-switch"? > > No. If you have a sysbus device, and you want to map it somewhere > other than into system-memory-map, you can do that: you use > sysbus_mmio_get_region() to get the MemoryRegion*, and then map > it into whatever container you need with memory_region_add_subregion(). > Thanks, that matches how I thought things should work. I wonder if virtio_mmio_bus_get_dev_path() really should be peeking into Sysbus internals mmio[].addr? Sysbus mmio[].addr looks like a candidate for removal if we ever get rid of the default system_memory... I don't have any good suggestions how to fix this. I guess we could wrap memory_region_add_subregion() with a sysbus version of it that sets mmio[].addr but that seems like a step backwards to me. Perhaps there's a way fix this in virtio_mmio_bus_get_dev_path()? Best regards, Edgar