qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Bolognani <abologna@redhat.com>
To: "Cédric Le Goater" <clg@kaod.org>,
	"David Gibson" <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge
Date: Thu, 28 Jun 2018 13:40:55 +0200	[thread overview]
Message-ID: <597423567e18da819be8174ff593a2cb4b08517d.camel@redhat.com> (raw)
In-Reply-To: <f1175077-6eab-036f-7aa2-d06f2f4dfa1e@kaod.org>

On Thu, 2018-06-28 at 12:04 +0200, Cédric Le Goater wrote:
> On 06/28/2018 10:00 AM, Andrea Bolognani wrote:
> > On Thu, 2018-06-28 at 13:59 +1000, David Gibson wrote:
> > > Well.. sure.. but it doesn't.  pSeries is a virtual platform, so we
> > > have a reasonable amount of flexibility to define it as we want.
> > > PowerNV is an emulation of existing hardware which has a specific
> > > behaviour which we need to match.
> > 
> > Sure, that's something to keep in mind.
> > 
> > But the thing is, you still need to have *some* flexibility in
> > the number of PHBs, since there is variation among real Power8
> > and Power9 chips; in the current incarnation, that flexibility
> > is provided by the num_phbs parameter, which is an entirely new
> > interface that's exclusive to PowerNV.
> > 
> > What I'm suggesting is that the same amount of flexibility is
> > offered through a standard interface, namely -device, instead.
> 
> Yes. I don't know to be honest. Adding support for -device is not 
> complex.
> 
> v2 proposes to initialize a fixed set of PHBs 2, 3, 4 depending on 
> the CPU. I think this is the best modeling option to fit the HW.

That approach would require even more hacks in libvirt if we ever
wanted to support PowerNV - basing the PCI address allocation on
the CPU model is not something that's really ever happened before.

To make it somewhat reasonable, information about the number of
PHBs created for each CPU model would have to be exposed through
QMP. And I wonder what a multi-chip guest would look like...

Plus, as soon as you try something like

  $ qemu-system-ppc64 \
    -nodefaults -display none \
    -machine powernv -cpu POWER8E \
    -device pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1 \
    -device megasas,id=scsi0,bus=pci.1,addr=0x1

very interesting things will start happening :)

-- 
Andrea Bolognani / Red Hat / Virtualization

  reply	other threads:[~2018-06-28 11:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26 13:59 [Qemu-devel] [PATCH] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge Cédric Le Goater
2018-06-26 15:57 ` Andrea Bolognani
2018-06-26 17:02   ` Cédric Le Goater
2018-06-27 10:22     ` Andrea Bolognani
2018-06-27 12:18       ` Cédric Le Goater
2018-06-27 19:48         ` Cédric Le Goater
2018-06-28  3:59       ` David Gibson
2018-06-28  8:00         ` Andrea Bolognani
2018-06-28 10:04           ` Cédric Le Goater
2018-06-28 11:40             ` Andrea Bolognani [this message]
2018-06-28 12:20               ` Cédric Le Goater
2018-06-28 13:05               ` Cédric Le Goater
2018-06-28 12:14           ` Benjamin Herrenschmidt
2018-07-02  6:23             ` David Gibson
2018-06-26 22:21   ` Benjamin Herrenschmidt
2018-06-27  0:35 ` Michael S. Tsirkin
2018-06-27  1:38   ` Benjamin Herrenschmidt
2018-06-27  2:39     ` Michael S. Tsirkin
2018-06-27  7:28     ` David Gibson
2018-06-27  7:46       ` Cédric Le Goater
2018-06-27  8:41         ` Benjamin Herrenschmidt
2018-06-27 10:40           ` Andrea Bolognani
2018-06-27 13:03             ` Cédric Le Goater
2018-06-27 11:51           ` Cédric Le Goater

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=597423567e18da819be8174ff593a2cb4b08517d.camel@redhat.com \
    --to=abologna@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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).