[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] TARGET_PAGE_BITS
From: |
ali saeedi |
Subject: |
Re: [Qemu-devel] TARGET_PAGE_BITS |
Date: |
Fri, 23 Jun 2017 19:32:34 +0430 |
thank you for answer
So. why do we have right shift in qemu by "TARGET_PAGE_BITS" ? for exampe
in below code, what does it mean?
static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start,
ram_addr_t length)
{
unsigned long end, page;
end = TARGET_PAGE_ALIGN(start + length) >> TARGET_PAGE_BITS;
page = start >> TARGET_PAGE_BITS;
...
}
thanks a lot
On Fri, Jun 23, 2017 at 7:11 PM, Alex Bennée <address@hidden> wrote:
>
> ali saeedi <address@hidden> writes:
>
> > Hello
> > What does TARGET_PAGE_BITS mean in qemu code?
>
> It's the page size of the target. e.g.
>
> TARGET_PAGE_BITS 12
>
> 1 << 12 = 4096 = 4k pages
>
>
> > thanks a lot
>
>
> --
> Alex Bennée
>