qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: jusual@redhat.com, qemu-devel@nongnu.org, laine@redhat.com,
	mst@redhat.com
Subject: Re: [PATCH 2/6] pci: introduce apci-index property for PCI device
Date: Tue, 6 Apr 2021 19:38:17 +0200	[thread overview]
Message-ID: <20210406193817.728bb52a@redhat.com> (raw)
In-Reply-To: <YGwuIF69gi4a0fbo@redhat.com>

On Tue, 6 Apr 2021 10:47:12 +0100
Daniel P. Berrangé <berrange@redhat.com> wrote:

> On Mon, Mar 15, 2021 at 02:00:58PM -0400, Igor Mammedov wrote:
> > In x86/ACPI world, linux distros are using predictable
> > network interface naming since systemd v197. Which on
> > QEMU based VMs results into path based naming scheme,
> > that names network interfaces based on PCI topology.
> > 
> > With itm on has to plug NIC in exactly the same bus/slot,
> > which was used when disk image was first provisioned/configured
> > or one risks to loose network configuration due to NIC being
> > renamed to actually used topology.
> > That also restricts freedom to reshape PCI configuration of
> > VM without need to reconfigure used guest image.
> > 
> > systemd also offers "onboard" naming scheme which is
> > preferred over PCI slot/topology one, provided that
> > firmware implements:
> >     "
> >     PCI Firmware Specification 3.1
> >     4.6.7.  DSM for Naming a PCI or PCI Express Device Under
> >             Operating Systems
> >     "
> > that allows to assign user defined index to PCI device,
> > which systemd will use to name NIC. For example, using
> >   -device e1000,acpi-index=100
> > guest will rename NIC to 'eno100', where 'eno' is default
> > prefix for "onboard" naming scheme. This doesn't require
> > any advance configuration on guest side to com in effect
> > at 'onboard' scheme takes priority over path based naming.
> > 
> > Hope is that 'acpi-index' it will be easier to consume by
> > management layer, compared to forcing specific PCI topology
> > and/or having several disk image templates for different
> > topologies and will help to simplify process of spawning
> > VM from the same template without need to reconfigure
> > guest NIC.
> > 
> > This patch adds, 'acpi-index'* property and wires up
> > a 32bit register on top of pci hotplug register block
> > to pass index value to AML code at runtime.
> > Following patch will add corresponding _DSM code and
> > wire it up to PCI devices described in ACPI.  
> 
> You've illustrated usage & benefits with NICs, but IIUC, this
> feature is wired up for any PCI device. Are you aware of any
> usage of this feature for non-NIC devices ?

I'm not aware of anything else that might currently use it.

It might be useful for virtio-win (HDDs/NICs) (as we saw recently
breakage due to PCI root bus UID change, where devices installed
on old QEMU enumerated as new instances breaking network config or
causing boot issues)

As Lane mentioned, it would be really useful if we could add acpi-index
as some meta data to qcow2 image so that new guest could import it
at creation time.

> Regards,
> Daniel



  reply	other threads:[~2021-04-06 17:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 18:00 [PATCH 0/6] pc: support user provided NIC naming/indexing Igor Mammedov
2021-03-15 18:00 ` [PATCH 1/6] tests: acpi: temporary whitelist DSDT changes Igor Mammedov
2021-03-15 18:00 ` [PATCH 2/6] pci: introduce apci-index property for PCI device Igor Mammedov
2021-04-06  9:47   ` Daniel P. Berrangé
2021-04-06 17:38     ` Igor Mammedov [this message]
2021-05-14 13:37   ` Michael S. Tsirkin
2021-03-15 18:00 ` [PATCH 3/6] pci: acpi: ensure that acpi-index is unique Igor Mammedov
2021-03-15 18:01 ` [PATCH 4/6] acpi: add aml_to_decimalstring() and aml_call6() helpers Igor Mammedov
2021-03-15 18:01 ` [PATCH 5/6] pci: acpi: add _DSM method to PCI devices Igor Mammedov
2021-03-15 18:01 ` [PATCH 6/6] tests: acpi: update expected blobs Igor Mammedov
2021-03-15 18:36 ` [PATCH 0/6] pc: support user provided NIC naming/indexing no-reply
2021-03-15 20:21   ` Igor Mammedov
2021-05-14 13:32 ` Michael S. Tsirkin

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=20210406193817.728bb52a@redhat.com \
    --to=imammedo@redhat.com \
    --cc=berrange@redhat.com \
    --cc=jusual@redhat.com \
    --cc=laine@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@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).