Index of /~pdinda/palgem5
This directory contains a snapshot of code for doing migration of
virtual machines between Palacios and GEM5. This is an involved
process and our tools are a proof of concept, hence the release of
this as a snapshot. Minor changes to the Palacios codebase have also
been commit and pushed to the devel branch. No changes to GEM5 are
needed, but we include a copy of the GEM5 tree we use for testing just
in case. The migration tools rely on the relevant bugs/features in
this version of GEM5 and may not work with any other.
By "migration of virtual machines between Palacios and GEM5", we mean
the following:
1. Creation of a pair of VMs based on identical images, one
for GEM5, one for Palacios.
2. Transformation of a Palacios checkpoint into a GEM5 checkpoint.
This allows you to checkpoint a VM in Palacios and resume it
in GEM5.
3. Transformation of a GEM5 checkpoint into a Palacios checkpoint.
This allows you to checkpoint a VM in GEM5 and resume it in
Palacios.
The set of devices that can be transformed is limited (generally to a
subset of devices used in GEM5 (PIC, PIT, APIC, IOAPIC, SERIAL, ...).
Files
arch-snapshot.tgz
- This contains the migration tools and numerous working examples
("pairs" of Palacios VMs and GEM5 VMs)
- Migration tools are compact, the working examples are not
- This also includes a snapshot of Palacios configured and built
as appropriate
gem5-snapshot.tgz
- Snapshot of the version of GEM5 and its build that we are using
README
- This file
Authors:
Maciej Swiech, Northwestern University
Madhav Suresh, Northwestern University
John Rula, Northwestern University
George Tziantzioulis, Northwestern University
---------------------------------------------------------------------------
# Documentation for checkpointing translation process Palacios <--> Gem5
Requirements:
Palacios devel commit 76fea3b8a640b9b1a509b6ad20a2868ced5e5548
Gem5 changeset 8592:30a97c4198df
Gem5/Palacios kernel pair
- must have a serial stream console
0. Make Gem5 skeleton (create m5.p pickle file)
cd /path/to/gem5-base
source ENV
cd gem5
./build/X86_FS/m5.opt -d ./m5out/ configs/example/fs.py --kernel="pair1"
nc localhost 3456
m5 checkpoint
cp m5out/cpt.CURRENT/m5.cpt /path/to/xlation/dir
mv m5out/cpt.CURRENT m5out/cpt.1
cd /path/to/xlation/dir
./m5parse.py m5.cpt m5.p
1. Palacios Boot (create binary memory image and text checkpoint)
v3_init
export PATH=/path/to/palacios/linux_usr:$PATH
v3_create -b /path/to/your-kernel-pair-config.xml go
v3_launch /dev/v3-vmX
v3_stream /dev/v3-vmX streamY
(optional) make some fs changes
v3_pause /dev/v3-vmX
v3_guest_mem_access /dev/v3-vmX read 0 MEM_SIZE_BYTES > /path/to/mem_save
v3_save /dev/v3-vmX KEYED_STREAM textfile:/path/to/cpt 1
2. Pal -> Gem Translation (create p25out/m5.cpt file)
cp -r /path/to/cpt /path/to/xlation/tpair
./p2m.py -v > /path/to/p2m.output
3. Restore in Gem5 (create m5.cpt checkpoint and gemmem memory image)
cp p25out/m5.cpt /path/to/gem5/m5out/cpt.1/
cp /path/to/mem_save /path/to/gem5/m5out/cpt.1/system.physmem.physmem
cd /path/to/m5-base
source ENV
cd gem5
./build/X86_FS/m5.opt -d ./m5out/ configs/example/fs.py --kernel="pair1" -r 1
nc localhost 3456
m5 checkpoint
mv m5out/cpt.NEW /path/to/gem5_save
zcat /path/to/gem5_save/system.physmem.physmem > /path/to/xlation/dir/gemmem
4. Gem -> Pal Translation (make tmp/* palacios checkpoint files)
cp /path/to/gem5_save/m5.cpt /path/to/xlation/dir
mkdir tmp
./m2p.py -v > /path/to/m2p.output
5. Restore in Palacios
v3_create -b /path/to/your-kernel-pair-config.xml go
v3_guest_mem_access /dev/v3-vmZ write 0 MEM_SIZE_BYTES < /path/to/xlation/dir/gemmem
cp /path/to/xlation/dir/tmp/* /path/to/xlation/dir/tpair
v3_load /dev/v3-vmZ KEYED_STREAM textfile:/path/to/xlation/dir/tpair 1
v3_launch /dev/v3-vmZ
v3_stream /dev/v3-vmZ streamY