Skip to contentSkip to conversation

__vmptrst() broken...

DISCUSSION Mukesh Rathor 2 participants 2 messages Nov 22, 2011

lore
Share & tools
lore
#0 lore raw

Hi Keir,

__vmptrst() seems broken. It is:

static inline void __vmptrst(u64 addr)

{
    asm volatile ( VMPTRST_OPCODE
                   MODRM_EAX_07
                   :
                   : "a" (&addr)
                   : "memory");
}

should be:

static inline void __vmptrst(u64 *addr)

{           
    asm volatile ( VMPTRST_OPCODE
                   MODRM_EAX_07 
                   :
                   : "a" (addr)
                   : "memory");
}   

Do you think you can just fix it in one of your changes without official patch?

thanks much,
Mukesh

#1 lore raw
Quoted 27 lines · Mukesh Rathor

Hi Keir,

__vmptrst() seems broken. It is:

static inline void __vmptrst(u64 addr)

{
    asm volatile ( VMPTRST_OPCODE
                   MODRM_EAX_07
                   :
                   : "a" (&addr)
                   : "memory");
}

should be:

static inline void __vmptrst(u64 *addr)

{           
    asm volatile ( VMPTRST_OPCODE
                   MODRM_EAX_07
                   :
                   : "a" (addr)
                   : "memory");
}   
Quoted 2 lines

Do you think you can just fix it in one of your changes without official patch?

It's obviously not used. It's probably not even useful (we know what VMCS we last loaded). I'll just remove it.

-- Keir

Quoted 2 lines

thanks much,
Mukesh