qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [patch 2/2] add default pci subsystem id for all devices.
Date: Wed, 27 Aug 2008 16:19:17 +0200	[thread overview]
Message-ID: <48B56265.60408@redhat.com> (raw)
In-Reply-To: <200808271452.15987.paul@codesourcery.com>

Paul Brook wrote:
> On Wednesday 27 August 2008, Gerd Hoffmann wrote:
>> Paul Brook wrote:
>>> On Tuesday 26 August 2008, Gerd Hoffmann wrote:
>>>> This sets a default PCI subsystem ID for all emulated PCI devices.
>>>> PCI specs require this, so do it.  Individual devices can overwrite
>>>> it of course.  The defaults are global variables so they can easily
>>>> be changed (before device creation)
>>> This is just asking for trouble. Having devices set magic global
>>> variables before they create the device is a truly horrible API.
>> The global variables are just for the *default* value, i.e. what devices
>> get prefilled by pci_register_device().  If a pci device wants set
>> specific subsystem IDs it can just do so in the init function where the
>> other config space fields are filled.  There is no need for devices to
>> ever fiddle with the global variables.
> 
> That's not what your comment says. Why are they extern variables if other 
> modules aren't supposed to modify them?

The wording in the resent patch should be more clear.

The intention is to be able to change the default subsystem id based on
the machine type.  pci drivers can easily set that directly, they don't
need this.

cheers,
  Gerd

      reply	other threads:[~2008-08-27 14:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26 10:42 [Qemu-devel] [patch 2/2] add default pci subsystem id for all devices Gerd Hoffmann
2008-08-27 12:10 ` Paul Brook
2008-08-27 13:12   ` Gerd Hoffmann
2008-08-27 13:52     ` Paul Brook
2008-08-27 14:19       ` Gerd Hoffmann [this message]

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=48B56265.60408@redhat.com \
    --to=kraxel@redhat.com \
    --cc=paul@codesourcery.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).