qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] How to memory map L2 memory in system mode


From: qi Lee
Subject: [Qemu-devel] How to memory map L2 memory in system mode
Date: Wed, 21 Aug 2013 22:33:33 +0800

Hi all 

There are two vcpus in the system mode.  L2 memory  comes between L1 and RAM.  Each vcpu has a L2 memory, its memory-map like this:
vcpu1's L2 memory:  0x08000000~0x0807FFFF (512K)
vcpu2's L2 memory:  0x08000000~0x0807FFFF (512K) 

So, the two vcpus have two sections of the same private address.

I see qemu how to allocate the RAM:
    memory_region_init_ram(sram, "sram", sram_size);
    vmstate_register_ram_global(sram);
    memory_region_add_subregion(sysmem,0, sram);

If I memory-map the L2 memory like above, vcup1 and vcpu2 will access the same memory address. This will cause memory access errors.

How can I assign a private memory space for each vcpu? So each vcpu can access private memory region ( 0x08000000~0x0807FFFF ) respective .

best  wish!


Lee


reply via email to

[Prev in Thread] Current Thread [Next in Thread]