Thanks for quick reply Scott !
We have a user space application to emulate all the illegal instructions from our end (user space) by creating a virtual environment. We have noticed that this instruction or register
access is no more illegal in new kernel (2.6.34.10).
The problem with this behavior is a system which is under emulation still things that it is running on old hardware by referring to this PVR register,
but now the behavior is changed because our emulation app is able to retrieve the current running CPU PVR (not matching with virtual one) and not referring the virtual register.
Also, I can see these changes was not present in Linux 2.6.10 (PPC64) and added later on by patch..True??
What sort of check are you talking about? Why would the decision to emulate PVR be based on whether the user has a SIGILL handler?
[S] Like, mentioned above if we have our own emulation path why Kernel is taking extra effort to perform the same.In the other way around, if the interrupted process (process executed the illegal instruction) has the facility to handle
illegal instruction action then it impacts the user level virtual environment ?? (I'm not sure whether same applicable for KVM??)
If you want the kernel to not emulate this, you can change the code in emulate_instruction() in arch/powerpc/kernel/traps.c. Trying to eliminate all "extra jobs" from Linux might be an exercise in futility, though.
[S] Yea.. We're in the progress of making these code changes, but thought some generic check (which will help open source too) to avoid the above situation.
Why is your userspace accessing PVR?
[S] Operating system which we are emulating from user space level is accessing the PVR and expectation here is to invoke the illegal handler bound for this action.
What is the harm in the emulation?
[S] Because of this emulation (@Kernel level), the user level process is able to get a new PVR instead of Virtual/hardocoded value which has broken the illusion between the operating system and emulator/hardware.