On Tue, Jun 12, 2012 at 2:05 AM, Ian Campbell
<Ian.Campbell@xxxxxxxxxx> wrote:
On Fri, 2012-06-08 at 19:15 +0100, Zeinab Alebouyeh wrote:
> Because currently I'm not in lab I don't know my hypervisor is 32b or
> 64 bit.
> I'm working in a security project. for improve security of
> applications running in virtualized environment. I want to use the
> security instruction of AMD SVM named SKINIT.
> because this instruction must run in ring0, I add a hypercall in xen
> and write my codes in my hypercall function.
> The skinit instruction takes the physical address of a block as an
> input operand( in the eax register) and establish a secure execution
> environment for a software component(block)
> I have a label in my hypercall function that is the start of my block.
> In order to use skinit I want grab the physical address of my label to
> save in eax register.
Rather than use a label in the current function for this magic block you
should use a separate function, either in a .S or a .c file. Then you
can simply use &function_name to get the address and you don't run the
risk of accidentally falling through into the special code from the
non-skinit context etc.
Ian.
Thanks for your guidance,