On Thu, 18 Apr 2013, Christian Menard wrote:

I went through the manual again and I think you are right. I'll run this
patch through our regression tests so as to make sure nothing break,
though it is surprising that no one experienced this problem before. This
might also mean that our regression tests do not actually make use of this
instruction. Can you provide more details about where you found this code
snippet?

--
Nilay

I think it was not noted before because this instruction is rarely used since
nobody uses segmentation any more. In this case its just used as a hack to
reload the CS register.

The code snippet is part of the Fiasco.OC kernel I'm trying to run on gem5
(http://os.inf.tu-dresden.de/fiasco/). If you want to have a closer look at the
code, it's located in src/boot/amd64/boot_cpu.cc.


So I ran the regression tests with the patch applied. The Linux kernel and another one of the tests (20.parser) apparently has this instruction. Surprisingly, all these tests run correctly both with and without the patch. By correctness, I mean the kernel boots as expected and output files for 20.parser are as expected. The statistics are slightly different. I am all for committing this patch since the x86 manual does say that the RIP and the CS values should be popped off the stack. Secondly, in at least one case, namely the Fiasco OS kernel, we know that the instruction originally performed incorrectly and the patch corrected the behavior.

--
Nilay
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to