[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 2/3] applesmc: consolidate port i/o into sing
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v1 2/3] applesmc: consolidate port i/o into single contiguous region |
Date: |
Mon, 3 Apr 2017 12:27:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 03/04/2017 11:32, Alexander Graf wrote:
>
>> Newer AppleSMC revisions support an error status (read) port
>> in addition to the data and command ports currently supported.
>>
>> Register the full 32-bit region at once, and handle individual
>> ports at various offsets within the region from the top-level
>> applesmc_io_[write|read]() methods (ctual support for reading
>> the error status port to be added by a subsequent patch).
>>
>> Originally proposed by Eric Shelton <address@hidden>
>>
>> Signed-off-by: Gabriel Somlo <address@hidden>
>
> I would prefer if we could leave the multiplexing to the layer that
> knows how to do that the best: Memory Regions.
>
> Why don't you just define a big region that ecompasses all of the IO
> space (with fallback I/O handlers for warnings) and then just sprinkle
> the ones we handle on top with higher prio?
You don't need priority at all, "contained" regions always win over the
container (docs/memory.txt just before "Region names").
Both what you propose and what Gabriel did makes sense. In general QEMU
does things more like in this patch, but there are exceptions (e.g. ACPI).
Paolo