qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Sunil V L <sunilvl@ventanamicro.com>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	qemu-riscv@nongnu.org, "Michael S . Tsirkin" <mst@redhat.com>,
	Ani Sinha <anisinha@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Shannon Zhao <shannon.zhaosl@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	Bin Meng <bin.meng@windriver.com>,
	Weiwei Li <liweiwei@iscas.ac.cn>,
	Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
	Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
	Andrew Jones <ajones@ventanamicro.com>,
	Anup Patel <apatel@ventanamicro.com>
Subject: Re: [PATCH 04/10] hw/riscv: virt: Add PCIe HIGHMEM in memmap
Date: Thu, 27 Jul 2023 14:04:46 +0200	[thread overview]
Message-ID: <20230727140446.14f4c9f0@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <ZMJOB7qZGqzbvACZ@sunil-laptop>

On Thu, 27 Jul 2023 16:29:19 +0530
Sunil V L <sunilvl@ventanamicro.com> wrote:

> On Mon, Jul 24, 2023 at 05:32:54PM +0200, Igor Mammedov wrote:
> > On Wed, 12 Jul 2023 22:09:37 +0530
> > Sunil V L <sunilvl@ventanamicro.com> wrote:
> >   
> > > PCIe High MMIO base is actually dynamic and fixed at
> > > run time based on the RAM configured. Currently, this is
> > > not part of the memmap and kept in separate static variable
> > > in virt.c. However, ACPI code also needs this information
> > > to populate DSDT. So, once the base is discovered, merge
> > > this into the final memmap which can be used to create
> > > ACPI tables later.  
> > 
> > can ACPI code fetch virt_high_pcie_memmap at runtime from
> > host bridge (like we do in pc/q35)?
> >   
> Hi Igor,
> 
> Looking at the current design of virt machines (arm/loongarch/riscv),
> getting this directly from the memmap looks simpler. ARM ACPI also uses
> the memmap to get the pcie_high space. It appears to me we need some
> more infrastructure code if ACPI needs to fetch from host bridge. I am
> not sure why that would be beneficial.

Sure it's possible to directly hardcode access, but it becomes machine
specific and hard to generalize/reuse (defaults might belong to machine,
but ACPI shall pickup these from actual owner - hostbridge).

And no extra infrastructure is need, x86 manages to do that by
using properties on host bridge (one can pre-program values on host bridge
during it's creation, firmware can also change them later when initializing PCI).
Then DSDT generator picks up uptodate values from hostbridge
(which is actual owner of these values) via properties.
(basically copy pc/q35 approach). 

> 
> Thanks,
> Sunil
> 



  reply	other threads:[~2023-07-27 12:22 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 16:39 [PATCH 00/10] RISC-V: ACPI: Enable AIA and update RHC Sunil V L
2023-07-12 16:39 ` [PATCH 01/10] hw/arm/virt-acpi-build.c: Move fw_cfg and virtio to common location Sunil V L
2023-07-12 19:06   ` Daniel Henrique Barboza
2023-07-23 23:40   ` Alistair Francis
2023-07-24 15:18   ` Igor Mammedov
2023-07-25 16:50     ` Sunil V L
2023-07-26  8:25       ` Igor Mammedov
2023-08-16 18:51         ` Daniel Henrique Barboza
2023-08-17  3:30           ` Sunil V L
2023-07-12 16:39 ` [PATCH 02/10] hw/riscv: virt: Add PCI bus reference in RISCVVirtState Sunil V L
2023-07-12 20:18   ` Daniel Henrique Barboza
2023-07-23 23:45   ` Alistair Francis
2023-07-12 16:39 ` [PATCH 03/10] hw/riscv: virt: Make few IMSIC macros and functions public Sunil V L
2023-07-12 20:21   ` Daniel Henrique Barboza
2023-07-24  1:53   ` Alistair Francis
2023-07-12 16:39 ` [PATCH 04/10] hw/riscv: virt: Add PCIe HIGHMEM in memmap Sunil V L
2023-07-18 20:05   ` Daniel Henrique Barboza
2023-07-19  3:37     ` Sunil V L
2023-07-24 15:32   ` Igor Mammedov
2023-07-27 10:59     ` Sunil V L
2023-07-27 12:04       ` Igor Mammedov [this message]
2023-07-27 12:32         ` Sunil V L
2023-07-12 16:39 ` [PATCH 05/10] hw/riscv/virt-acpi-build.c: Add AIA support in RINTC Sunil V L
2023-07-18 20:06   ` Daniel Henrique Barboza
2023-07-12 16:39 ` [PATCH 06/10] hw/riscv/virt-acpi-build.c: Add IMSIC in the MADT Sunil V L
2023-07-18 20:06   ` Daniel Henrique Barboza
2023-07-12 16:39 ` [PATCH 07/10] hw/riscv/virt-acpi-build.c: Add APLIC " Sunil V L
2023-07-18 20:10   ` Daniel Henrique Barboza
2023-07-12 16:39 ` [PATCH 08/10] hw/riscv/virt-acpi-build.c: Add CMO information in RHCT Sunil V L
2023-07-18 20:10   ` Daniel Henrique Barboza
2023-07-12 16:39 ` [PATCH 09/10] hw/riscv/virt-acpi-build.c: Add MMU node " Sunil V L
2023-07-18 20:12   ` Daniel Henrique Barboza
2023-07-12 16:39 ` [PATCH 10/10] hw/riscv/virt-acpi-build.c: Add IO controllers and devices Sunil V L
2023-07-18 20:13   ` Daniel Henrique Barboza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230727140446.14f4c9f0@imammedo.users.ipa.redhat.com \
    --to=imammedo@redhat.com \
    --cc=ajones@ventanamicro.com \
    --cc=alistair.francis@wdc.com \
    --cc=anisinha@redhat.com \
    --cc=apatel@ventanamicro.com \
    --cc=bin.meng@windriver.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=liweiwei@iscas.ac.cn \
    --cc=mst@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=shannon.zhaosl@gmail.com \
    --cc=sunilvl@ventanamicro.com \
    --cc=zhiwei_liu@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).