qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] Type-safe ioport callbacks


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 1/2] Type-safe ioport callbacks
Date: Tue, 26 Oct 2010 19:35:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.4

 On 10/26/2010 07:27 PM, Anthony Liguori wrote:
Sorry, I don't follow your meaning.

When I said "size is implied" I meant that the IOPort object has a separate function pointer for sizes 1, 2, and 4, so it ioport_register() doesn't need a size parameter. But I don't see how that relates to your comment.


Yeah, I don't think it makes sense to combine "this is how to dispatch I/O" with "this is a region of I/O address space".

Oh, so Blue meant the size of the region in ports, not the size of the individual ports. I think that putting the range length (but not base address) in the IOPort structure may make sense.


I think an IORegion should contain an IOPort structure though. I think the name needs rethinking.

Maybe:

struct PortIOHandler;
struct MemoryIOHandler;

Why two types? I think some devices use PIO on a PC and MMIO on other architectures. Sharing the type would allow sharing code.

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




reply via email to

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