Re: [PATCH]: Fix MSR_K7_EVNTSEL{0,3} for SVM

Chris Lalancette
2008-04-24T22:13:15Z

Avi Kivity wrote:
> Now it uses %rsi instead of %esi, and any junk in the upper bits will
> cause the ja to be taken.
>
> We need to get a reduced testcase to the gcc folks, this is a serious
> bug. Any changes in the code to work around this would be fragile.
>

Avi,
I've now filed a bug in the upstream gcc database:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36040

And I came up with a reduced test case, available here:

http://people.redhat.com/clalance/rsi-test-case.tar.bz2

If I compile the code in the above and look at the disassembly, it shows the
problem; however, I can't reproduce the bug by actually running the code. I
suspect the %rsi register is always 0 when we start in this userland code, so I
never run into the bogus ja, but I just thought I'd mention it.

Chris Lalancette