[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 13/38] cputlb: add physical address to CPUTLBEntry
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC 13/38] cputlb: add physical address to CPUTLBEntry |
Date: |
Mon, 21 Sep 2015 07:01:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 24/08/2015 02:23, Emilio G. Cota wrote:
> Having the physical address in the TLB entry will allow us
> to portably obtain the physical address of a memory access,
> which will prove useful when implementing a scalable emulation
> of atomic instructions.
It came to my mind that addr_read and addr_code only differ in the
bottom TARGET_PAGE_BITS bits, and they are always zero in addr_phys.
So we could store addr_code as
addr_read ^ (addr_phys & (TARGET_PAGE_SIZE - 1))
and discard the bottom bits of addr_phys. This would make it possible
to include addr_phys without growing the size of the TLB entry.
Paolo