Skip to content
Stefan edited this page Jun 10, 2013 · 13 revisions

These are bugs we have introduced, but did not affected our project so far

  • lg_cpu.regs became a pointer (as in x86_32 version)
    • We have made an allocation without dealocating memory
    • In arch/x86_64/kernel/asm_offsets_64.c we need to reconsider a few symbols like LG_CPU_regs or LG_CPU_regs_rax
  • lg->cpus[] is no longer an array of pointers.
    • We don't allocate memory any more, but we have to eliminate the part where the memory was released because we'll get a free error
  • Regs variable is moved to lg_cpu
    • When RedHat wrote the switcher, regs variable was declared in lg_cpu_data structure. Afterwards it was moved to lg_cpu. This means we need to take care in switcher ASM code of a few variables:
Defined symbol How it was defined by RedHat team Where was that variable declared in RedHat's implementation Where it is now How it should be declared now
LG_CPU_regs offsetof(struct lg_cpu_data, regs) struct lguest_regs regs in lg_cpu_data struct lguest_regs* regs in lg_cpu TDB
LG_CPU_regs_rsp/rax/rdx/rcx offsetof(struct lg_cpu_data, regs.rsp) Components of lguest_regs structure The same TDB
LG_CPU_trapnum offsetof(struct lg_cpu_data, regs.trapnum) m m TDB
LG_CPU_errcode offsetof(struct lg_cpu_data, regs.trapnum) m m TDB
Clone this wiki locally