Exemple #1
0
void __regparm__(2) __vmcs_force_flush(raw64_t *val, vmcs_field_enc_t enc)
{
   if(!enc.fake)
   {
      vmx_insn_err_t vmx_err;

      if(!vmx_vmwrite(&vmx_err, val->raw, enc.raw))
	 panic("vmwrite(0x%x, 0x%x) err %d\n", val->raw, enc.raw, vmx_err.raw);
      return;
   }

   if(val == (raw64_t*)&vm_state.cr2)
      set_cr2(vm_state.cr2.raw);
   else if(val == (raw64_t*)&vm_state.dr6)
      set_dr6(vm_state.dr6.raw);
}
Exemple #2
0
void __regparm__(2) __vmcs_force_flush(raw64_t *val, vmcs_field_enc_t enc)
{
   if(!enc.fake)
   {
      vmx_insn_err_t vmx_err;

      if(!vmx_vmwrite(&vmx_err, val->raw, enc.raw))
         panic("vmwrite(0x%x, 0x%x) err %d\n", val->raw, enc.raw, vmx_err.raw);

      /*
      ** don't use debug, since some fields might have not been read
      */
#ifdef CONFIG_VMX_ACC_DBG
      printf("vmwrite(0x%x) = 0x%X\n", enc.raw, val->raw);
#endif
      return;
   }

   if(val == (raw64_t*)&vm_state.cr2)
      set_cr2(vm_state.cr2.raw);
   else if(val == (raw64_t*)&vm_state.dr6)
      set_dr6(vm_state.dr6.raw);
}