[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] subpages with memory region aliases
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] subpages with memory region aliases |
Date: |
Thu, 09 Feb 2012 11:32:23 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 |
On 02/09/2012 10:35 AM, Jan Kiszka wrote:
> Avi,
>
> Before I forget:
>
> On 2012-02-05 13:39, Jan Kiszka wrote:
> > +static void vapic_map_rom_writable(VAPICROMState *s)
> > +{
> > + target_phys_addr_t rom_paddr = s->rom_state_paddr & ROM_BLOCK_MASK;
> > + MemoryRegionSection section;
> > + MemoryRegion *as;
> > + size_t rom_size;
> > + uint8_t *ram;
> > +
> > + as = sysbus_address_space(&s->busdev);
> > +
> > + if (s->rom_mapped_writable) {
> > + memory_region_del_subregion(as, &s->rom);
> > + memory_region_destroy(&s->rom);
> > + }
> > +
> > + /* grab RAM memory region (region @rom_paddr may still be pc.rom) */
> > + section = memory_region_find(as, 0, 1);
> > +
> > + /* read ROM size from RAM region */
> > + ram = memory_region_get_ram_ptr(section.mr);
> > + rom_size = ram[rom_paddr + 2] * ROM_BLOCK_SIZE;
> > + s->rom_size = rom_size;
> > +
> > + /* FIXME: round up as everything underneath would fall apart otherwise
> > + * (subpages are broken) */
> > + rom_size = TARGET_PAGE_ALIGN(rom_size);
>
> Removing this alignment triggers an interesting bug in the memory layer.
> Haven't understood the details yet. Is subpage support supposed to work?
>
>
There are plenty of restrictions wrt page size in the memory API. Some
will be removed, some are enforced by hardware (for example the low bits
of the guest address and host address must match).
Subpage of course works, but it can't be direct mapped.
--
error compiling committee.c: too many arguments to function
- [Qemu-devel] [PATCH 0/6] uq/master: TPR access optimization for Windows guests, Jan Kiszka, 2012/02/05
- [Qemu-devel] [PATCH 2/6] kvmvapic: Add option ROM, Jan Kiszka, 2012/02/05
- [Qemu-devel] [PATCH 6/6] kvmvapic: Use optionrom helpers, Jan Kiszka, 2012/02/05
- [Qemu-devel] [PATCH 1/6] target-i386: Add infrastructure for reporting TPR MMIO accesses, Jan Kiszka, 2012/02/05
- [Qemu-devel] [PATCH 5/6] optionsrom: Reserve space for checksum, Jan Kiszka, 2012/02/05
- [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests, Jan Kiszka, 2012/02/05
- Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests, Avi Kivity, 2012/02/09
- Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests, Jan Kiszka, 2012/02/09
- Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests, Avi Kivity, 2012/02/09
- Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests, Jan Kiszka, 2012/02/09
- Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests, Avi Kivity, 2012/02/09
- Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests, Jan Kiszka, 2012/02/09
- Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests, Paolo Bonzini, 2012/02/09
- Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests, Jan Kiszka, 2012/02/09