[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 15/26] Virtual hash page table handling on pSeri
From: |
David Gibson |
Subject: |
[Qemu-devel] Re: [PATCH 15/26] Virtual hash page table handling on pSeries machine' |
Date: |
Thu, 17 Mar 2011 12:03:20 +1100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, Mar 16, 2011 at 04:03:47PM +0100, Alexander Graf wrote:
> On 03/16/2011 05:56 AM, David Gibson wrote:
[snip]
> >@@ -248,6 +261,16 @@ static void ppc_spapr_init(ram_addr_t ram_size,
> > ram_offset = qemu_ram_alloc(NULL, "ppc_spapr.ram", ram_size);
> > cpu_register_physical_memory(0, ram_size, ram_offset);
> >
> >+ /* allocate hash page table */
> >+ htab_size = 1ULL<< (pteg_shift + 7);
>
> Linux makes the htab size depend on the provided amount of ram.
> Shouldn't we do the same?
Well... maybe. In fact the guidelines for hash allocation tend to be
rather larger than really necessary for a Linux guest, so generally
16mb for the hash will be fine. This does also correspond to the
allocation for the guest hash we use in our experimental kvm code
(making the hash exactly one hugepage makes the necessary contiguous
allocation easier).
[snip]
> >+ r&= ~(HPTE_R_PP0 | HPTE_R_PP | HPTE_R_N |
> >+ HPTE_R_KEY_HI | HPTE_R_KEY_LO);
> >+ r |= (flags<< 55)& HPTE_R_PP0;
> >+ r |= (flags<< 48)& HPTE_R_KEY_HI;
> >+ r |= flags& (HPTE_R_PP | HPTE_R_N | HPTE_R_KEY_LO);
> >+ rb = compute_tlbie_rb(v, r, pte_index);
> >+ stq_p(hpte, v& ~HPTE_V_VALID);
> >+ //ppc_tlb_invalidate_one(env, rb);
>
> Huh?
>
> >+ tlb_flush(env, 1);
>
> Wow, why do you need a full tlb flush here?
Ah, meant to revert that and forgot. Originally I wasn't sure if
compute_tlbie_rb was deducing enough of the full virtual address to
make a targetted tlb invalidate safe. I've since discovered it does,
but fixing this up to take advantage fell through the cracks.
Fixing that for the next version now.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
- [Qemu-devel] [PATCH 05/26] Implement missing parts of the logic for the POWER PURR, (continued)
- [Qemu-devel] [PATCH 05/26] Implement missing parts of the logic for the POWER PURR, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 07/26] Clean up slb_lookup() function, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 08/26] Parse SDR1 on mtspr instead of at translate time, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 09/26] Use "hash" more consistently in ppc mmu code, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 10/26] Better factor the ppc hash translation path, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 06/26] Correct ppc popcntb logic, implement popcntw and popcntd, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 11/26] Support 1T segments on ppc, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 12/26] Add POWER7 support for ppc, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 15/26] Virtual hash page table handling on pSeries machine, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 14/26] Implement the bus structure for PAPR virtual IO, David Gibson, 2011/03/16
- [Qemu-devel] [PATCH 13/26] Start implementing pSeries logical partition machine, David Gibson, 2011/03/16