Thanks for your quick replies. Actually I was reading a paper that uses hypervisors for security and there they have modified the exception frame to store additional information. Here is the text from the paper with SID and ecrypted registers being the additional information stored with the exception frame. It did not make complete sense to me, so I thought of verifying on the forum. Thanks once again and any additional comments will be great.
"We can realize the transition of current domain by intercepting
every interrupt and exception generated by hardware. Hypervisors
are, by definition, capable of intercepting all interrupts and exceptions.
When the hypervisor forwards an interrupt to a guest
operating system, the hypervisor can change the current domain by
setting current sid variable to 0.
The secure domain context, which is to contain register contexts
and SID of the outgoing domain, is realized by extending the
exception frame structure. As briefed in Section 2.2, the processor
generates an exception frame into the kernel mode stack upon
an interrupt, and the hypervisor already simulates this behavior to
virtualize interrupts. We extend this exception frame to contain a
secure domain context. Thus, this extended exception frame has a
new field for general-purpose registers (GPRs) and SID value of
the outgoing domain. These fields are encrypted and hashed. When
the hypervisor forwards an interrupt to a guest operating system, it
generates this extended exception frame instead of the original one.
The GPRs are cleared when the hypervisor raises a virtual
interrupt by generating a secure exception frame. Upon receipt of
this interrupt, the guest operating system will find the GPRs to be
zeroed out. This is to prevent information leakage upon domain
switch, because the operating system is untrusted.
After handling the virtual interrupt, the guest operating system
requests the hypervisor to perform a ‘return-from-interrupt’ operation
using the extended exception frame that have been saved from
a previous interrupt. Upon receipt of this request, the hypervisor
processes the extended exception frame to restore GPRs and SID
value.