qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] kvm-all: PAGE_SIZE should be real host page siz


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] kvm-all: PAGE_SIZE should be real host page size
Date: Tue, 10 Nov 2015 17:02:35 +0000

On 10 November 2015 at 16:59, Andrew Jones <address@hidden> wrote:
> On Tue, Nov 10, 2015 at 04:29:31PM +0000, Peter Maydell wrote:
>> On 10 November 2015 at 00:23, Andrew Jones <address@hidden> wrote:
>> > -/* KVM uses PAGE_SIZE in its definition of COALESCED_MMIO_MAX */
>> > -#define PAGE_SIZE TARGET_PAGE_SIZE
>> > +/* KVM uses PAGE_SIZE in its definition of KVM_COALESCED_MMIO_MAX. We
>> > + * need to use the real host PAGE_SIZE, as that's what KVM will use.
>> > + */
>> > +#define PAGE_SIZE getpagesize()
>>
>> Rather than defining PAGE_SIZE here (a confusing macro given
>> we have several page sizes to deal with), why not just use
>> getpagesize() in the one and only location where we currently
>> use this macro?
>
> The macro is used by kernel headers that we import and include in
> kvm-all.c. It's ugly, I agree, but that's how the this cookie crumbled.

Oh, I see. That's pretty horrible.

thanks
-- PMM



reply via email to

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