From: Izik Eidus <izike@qumranet.com>
To: l_indien@magic.fr, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] allow setting static devfn values for pci devices from the command line
Date: Tue, 20 Nov 2007 10:23:54 +0200 [thread overview]
Message-ID: <4742999A.4010706@qumranet.com> (raw)
In-Reply-To: <1195497388.31632.31.camel@jma4.dev.netgem.com>
Jocelyn Mayer wrote:
> On Mon, 2007-11-19 at 18:53 +0200, Izik Eidus wrote:
>
>> Izik Eidus wrote:
>>
>>> hi,
>>> this patch make it possible to define from the command line a static
>>> devfn value for each pci
>>> device.
>>> it was wrote for addressing a problem that right now qemu devices get
>>> their devfn in random way
>>> (almost random)
>>> the problem with this is that with adding and removing devices some
>>> devfn values can be changed
>>> for each device.
>>> this make (at least) windows unable to understand what happned to your
>>> device and mark it
>>> in yellow color. (and will want you to reinstall it)
>>>
>>> in this patch i simply use the device name that was registred with the
>>> pci device registration
>>> function.
>>> in case you have few devices from the same type (same name), it will
>>> simply increase each by one
>>> so in this case all you have to do is give long enough offset for the
>>> devfns from each other.
>>>
>>> thanks
>>>
>> ok here is a fix to two issues that i noticed:
>> 1.in one place i declared static_devfns[MAX_PCI_DEVICS][64] and in other
>> place: static_devfns[MAX_PCI_DEVICS][128]
>>
>> 2.in one place i did a calculation on a pointer line before i checked if
>> it is vaild pointer...
>>
>> anyway here it is again and fixed.
>>
>
> It seems that you cannot impose the PCI device numbers mapping, which is
> likely to be architecture dependant. What you could however change is
> the PCI bus & slot the device is inserted into, the same way you can
> choose the PCI slot you put a PCI card into on a real machine. The
> architecture could then determine what is the corresponding PCI device
> number, given this PCI bus & slot numbers.
i will check this.
> For other PCI devices, like PCI bridges or other internal devices, the
> PCI slots / devfn are fixed by the architecture. You cannot change them
> in any way, then it seems pointless to have an option that would change
> the behavior for any of those devices.
> The last problem I see is that it seems very ugly to hardcode the device
> names the way you did in vl.c. This is even false in most cases, as most
> of those devices are only available for a few machines and are not
> tunable at all (for example macio or uninorth are only available in some
> Apple Mac machines, not even all).
>
so how will i inform the user with the devices name?
prev parent reply other threads:[~2007-11-20 8:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-19 15:51 [Qemu-devel] [PATCH] allow setting static devfn values for pci devices from the command line Izik Eidus
2007-11-19 16:53 ` Izik Eidus
2007-11-19 18:36 ` Jocelyn Mayer
2007-11-20 8:23 ` Izik Eidus [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=4742999A.4010706@qumranet.com \
--to=izike@qumranet.com \
--cc=l_indien@magic.fr \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.