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: Wed, 18 May 2011 19:53:17 +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 07:51 PM, Richard Henderson wrote:
>
>  I prefer having size as an argument.

The one thing that makes having these function pointers split apart nice
is that it makes it easy to set policy for what different sized reads do.

E.g. for devices for which only 4 byte reads are defined, you only fill
in readl, and let the other sizes cause a machine-check.

Alternately, for devices for which the fundamental size is 1 byte, but
which does handle larger reads in a more-or-less memory-like fashion,
you can fill in a common readw_via_readb function that does the
composition for you, and without having to have code for that scattered
through every device.

I plan to centralize this logic in the memory API. You'll just declare how your device behaves.

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




reply via email to

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