[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary |
Date: |
Thu, 24 Oct 2013 22:55:54 +0100 |
On 24 October 2013 22:12, Marcelo Tosatti <address@hidden> wrote:
> Align guest physical address and host physical address
> beyond guest 4GB on a 1GB boundary, in case hugetlbfs is used.
>
> Otherwise 1GB TLBs cannot be cached for the range.
> + if (hpagesize == (1<<30)) {
> + unsigned long holesize = 0x100000000ULL - below_4g_mem_size;
> +
> + memory_region_init_alias(ram_above_4g, NULL, "ram-above-4g", ram,
> + 0x100000000ULL,
> + above_4g_mem_size - holesize);
> + memory_region_add_subregion(system_memory, 0x100000000ULL,
> + ram_above_4g);
> +
> + ram_above_4g_piecetwo = g_malloc(sizeof(*ram_above_4g_piecetwo));
> + memory_region_init_alias(ram_above_4g_piecetwo, NULL,
> + "ram-above-4g-piecetwo", ram,
> + 0x100000000ULL - holesize, holesize);
> + memory_region_add_subregion(system_memory,
> + 0x100000000ULL +
> + above_4g_mem_size - holesize,
> + ram_above_4g_piecetwo);
> + } else {
> + memory_region_init_alias(ram_above_4g, NULL, "ram-above-4g", ram,
> + below_4g_mem_size, above_4g_mem_size);
> + memory_region_add_subregion(system_memory, 0x100000000ULL,
> ram_above_4g);
This looks pretty weird. Presence or absence of host OS features
shouldn't affect how we model the guest hardware and RAM.
Conversely, if hugetlbs have performance related requirements
then a patch which only touches the x86 pc model seems rather
limited.
-- PMM
- [Qemu-devel] [patch 0/2] align >4GB guest RAM to a 1GB boundary, in case of 1GB-sized hugetlbfs, Marcelo Tosatti, 2013/10/24
- [Qemu-devel] [patch 1/2] exec: add qemu_get_ram_hpagesize, Marcelo Tosatti, 2013/10/24
- [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary, Marcelo Tosatti, 2013/10/24
- Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary,
Peter Maydell <=
- Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary, Paolo Bonzini, 2013/10/24
- Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary, Marcelo Tosatti, 2013/10/25
- Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary, Paolo Bonzini, 2013/10/25
- Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary, Marcelo Tosatti, 2013/10/25
- Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary, Paolo Bonzini, 2013/10/25
- Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary, Gerd Hoffmann, 2013/10/30
- Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary, Paolo Bonzini, 2013/10/30
- Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary, igor Mammedov, 2013/10/25
- Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary, Marcelo Tosatti, 2013/10/25