From: Peter Maydell <peter.maydell@linaro.org>
To: Andrew Jones <drjones@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
kvm-devel <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] [PATCH] kvm-all: PAGE_SIZE should be real host page size
Date: Tue, 10 Nov 2015 17:02:35 +0000 [thread overview]
Message-ID: <CAFEAcA_-SARhJrN8Ge2BTL7_5Lnu-W84mKX7GgaJ7_ptpfyoew@mail.gmail.com> (raw)
In-Reply-To: <20151110165923.GE3452@hawk.localdomain>
On 10 November 2015 at 16:59, Andrew Jones <drjones@redhat.com> wrote:
> On Tue, Nov 10, 2015 at 04:29:31PM +0000, Peter Maydell wrote:
>> On 10 November 2015 at 00:23, Andrew Jones <drjones@redhat.com> 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
prev parent reply other threads:[~2015-11-10 17:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 0:23 [Qemu-devel] [PATCH] kvm-all: PAGE_SIZE should be real host page size Andrew Jones
2015-11-10 15:41 ` Paolo Bonzini
2015-11-10 15:57 ` Andrew Jones
2015-11-10 16:15 ` Paolo Bonzini
2015-11-10 16:29 ` Peter Maydell
2015-11-10 16:59 ` Andrew Jones
2015-11-10 17:02 ` Peter Maydell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFEAcA_-SARhJrN8Ge2BTL7_5Lnu-W84mKX7GgaJ7_ptpfyoew@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).