func: static hvm_emulate_cmpxchg(enum x86_segment unsigned long void void unsigned int struct x86_emulate_ctxt *ctxt) struct sh_emulate_ctxt * sh_ctxt container_of ( ctxt , struct sh_emulate_ctxt , ctxt ) int rc ; if ( ! is_x86_user_segment ( seg ) || bytes > sizeof ( long ) )  rc = hvm_translate_linear_addr ( seg , offset , bytes , hvm_access_write , sh_ctxt , & addr ); static int enum x86_segment unsigned long unsigned int enum hvm_access_type struct sh_emulate_ctxt unsigned long *paddr) struct segment_register * reg = hvm_get_seg_reg ( seg , sh_ctxt ) ; struct segment_register enum x86_segment seg, struct sh_emulate_ctxt *sh_ctxt) struct segment_register * seg_reg = & sh_ctxt -> seg_reg [ seg ] ; return seg_reg ; int okay ; okay = hvm_virtual_to_linear_addr ( seg , reg , offset , bytes , access_type , sh_ctxt -> ctxt . addr_size , paddr ); if ( ! okay )  return X86EMUL_EXCEPTION ; return 0 ; if ( rc )  old = new = 0 memcpy ( & old , p_old , bytes ); return v -> arch . paging . mode -> shadow . x86_emulate_cmpxchg v , addr , old , new , bytes , sh_ctxt ) 