qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] Memory API


From: Avi Kivity
Subject: Re: [Qemu-devel] [RFC] Memory API
Date: Thu, 19 May 2011 11:04:13 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.10

On 05/18/2011 11:13 PM, Richard Henderson wrote:
On 05/18/2011 09:47 AM, Avi Kivity wrote:
>  Yes.  We'd change pci_register_bar() to accept a MemoryRegion.

Surely this detail would be hidden on the pci_dev->bus?

Not sure what you mean.

The reason I want pci_register_bar() to accept a memory region is that some BARs are composed of multiple subregions, for example cirrus has a RAM framebuffer an an mmio region in one BAR. So the device describes the region relative to its start point and hands it off to the pci subsystem, which can then enable or disable the region, and place it anywhere in the bus address space it likes.

>>  However, we are yet in troubles if we want to change that because
>>  devices can only be on one bus - at least so far.
>
>  Nothing prohibits a device from calling pci_register_bar() for one region 
and some other API for another.

Sure, but the majority of PCI devices are plain pci, and
that sort of complexity should be hidden by default.

There is pci_register_bar_simple().

--
error compiling committee.c: too many arguments to function




reply via email to

[Prev in Thread] Current Thread [Next in Thread]