|
From: | Anthony Liguori |
Subject: | [Qemu-devel] Re: [RFC] API change for pci_set_word and related functions |
Date: | Mon, 11 Jan 2010 17:12:25 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0 |
On 01/11/2010 04:10 PM, Stefan Weil wrote:
I haven't read this whole thread, but I really prefer things like pci_set_vendor_id(pci_dev, XXXX); A close alternative, would be some refactoring to allow PCI config space to be represented as a C structure. Gerd had some patches at one point for this. Regards, Anthony LiguoriThis is a good solution for the standard configuration entries, so most code could use such calls if they were complete. For entries above offset 0x40, I'm afraid that it won't work (neither with individual functions nor with a C structure).
Which is fine. Device specific entries in the config space are uncommon compared to the standard entries. The same model could apply (devices write their own wrapper functions).
The problem with the set_word interface is that quite a lot of important config space fields are stored in a byte or less.
Regards, Anthony Liguori
Regards, Stefan Weil
[Prev in Thread] | Current Thread | [Next in Thread] |