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: Jan Kiszka
Subject: Re: [Qemu-devel] [RFC] Memory API
Date: Thu, 19 May 2011 14:20:39 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2011-05-19 13:57, Avi Kivity wrote:
> On 05/19/2011 02:54 PM, Gleb Natapov wrote:
>>>
>>>  In this case the device would call a chipset function, passing the
>>>  memory region as a parameter, and the chipset would call
>>>  m_r_add_subregion().
>> But then chipset can resolve all overlapping by itself and register only
>> regions that are actually accessible by a guest software.
> 
> Sure it can (and it does now), but it's hard.  This API centralizes the 
> logic, leaving the devices/chipsets to specify what they want.
> 
> For a PC, we have at least two such cases, the ISA bus and the PCI bus.
> 
>>   Also there are
>> devices that on some architectures are accessed through a chipset and on
>> other they resides directly on a system bus. If they will need to call
>> different memory registration api depending on how they are instantiated
>> the code can become messy.
> 
> An example is ne2000-isa and ne2000-pci.  There's no getting around some 
> glue logic, but I think this API minimizes it (you can declare 
> everything about your memory region in common code, the only thing that 
> is different is registration).

If devices register against the corresponding qbus (I expect we'll have
multiple ones in the future), not even that need to be different.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux



reply via email to

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