[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v2 17/34] HACK: globalise TCG page size variables
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [RFC v2 17/34] HACK: globalise TCG page size variables |
Date: |
Mon, 1 Jun 2015 11:58:04 -0700 |
On Mon, Jun 1, 2015 at 11:52 AM, Richard Henderson <address@hidden> wrote:
> On 05/30/2015 11:11 PM, Peter Crosthwaite wrote:
>> This is almost certainly wrong but it should work for my test case
>> where TARGET_PAGE_SIZE is cross-arch consistent. This is needed to get
>> vfio/pci.c to compile due to it's use of HOST_PAGE_ALIGN.
>>
>> Cc: Alex Williamson <address@hidden>
>> Signed-off-by: Peter Crosthwaite <address@hidden>
>> ---
>> translate-all.c | 4 ----
>> translate-common.c | 4 ++++
>> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> Actually, this isn't a hack at all, since here we're talking about the HOST
> page size. Which is of course completely independent of the TARGET page
> sizes.
>
So the real_host_page_size is completely independent, but the
host_page_size (and mask) are clamped with TARGET_PAGE_SIZE. This is
why I am considering this target-arch specific:
312 if (qemu_host_page_size < TARGET_PAGE_SIZE) {
313 qemu_host_page_size = TARGET_PAGE_SIZE;
314 }
315 qemu_host_page_mask = ~(qemu_host_page_size - 1);
Regards,
Peter
>
> r~
>