qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: comments on: get page size in device init


From: Blue Swirl
Subject: [Qemu-devel] Re: comments on: get page size in device init
Date: Wed, 23 Sep 2009 22:03:26 +0300

On Wed, Sep 23, 2009 at 9:40 PM, Michael S. Tsirkin <address@hidden> wrote:
> On Wed, Sep 23, 2009 at 01:02:56PM -0500, Anthony Liguori wrote:
>> Blue Swirl wrote:
>>> On Wed, Sep 23, 2009 at 3:58 PM, Michael S. Tsirkin <address@hidden> wrote:
>>>
>>>>>     Compile msix only once
>>>>>
>>>>>     Get page size in device init.
>>>>>
>>>>>     Signed-off-by: Blue Swirl <address@hidden>
>>>>>
>>>> What was the motivation for the page size change?
>>>>
>>>
>>> "Compile msix only once"
>>>
>>>
>>>> It seems the only user passes TARGET_PAGE_SIZE anyway,
>>>> using a constant seems clearer and probably generates
>>>> less code. No?
>>>>
>>>
>>> Yes, but then the code would depend on TARGET_PAGE_SIZE, making it
>>> impossible to compile the code only once.
>>>
>>
>> We could probably get away with doing
>>
>> #define TARGET_PAGE_SIZE target_get_page_size()
>>
>> And take care of a big chunk of this without passing page size
>> parameters around.
>
>
> Sounds good.

That would work and target_get_page_size() together with
get_ram_size() would also handle the virtio case nicely, except for
the if (!kvm_enabled() || kvm_has_sync_mmu()) part.




reply via email to

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