target-i386: Enable control registers for MPX

Enable and disable at CPL changes, MSR changes, and XRSTOR changes.

Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
Richard Henderson 2015-07-02 15:57:14 +01:00
parent c9cfe8f9fb
commit f4f1110e4b
10 changed files with 189 additions and 26 deletions

View file

@ -2588,41 +2588,44 @@ int kvm_arch_get_registers(CPUState *cs)
ret = kvm_getput_regs(cpu, 0);
if (ret < 0) {
return ret;
goto out;
}
ret = kvm_get_xsave(cpu);
if (ret < 0) {
return ret;
goto out;
}
ret = kvm_get_xcrs(cpu);
if (ret < 0) {
return ret;
goto out;
}
ret = kvm_get_sregs(cpu);
if (ret < 0) {
return ret;
goto out;
}
ret = kvm_get_msrs(cpu);
if (ret < 0) {
return ret;
goto out;
}
ret = kvm_get_mp_state(cpu);
if (ret < 0) {
return ret;
goto out;
}
ret = kvm_get_apic(cpu);
if (ret < 0) {
return ret;
goto out;
}
ret = kvm_get_vcpu_events(cpu);
if (ret < 0) {
return ret;
goto out;
}
ret = kvm_get_debugregs(cpu);
if (ret < 0) {
return ret;
goto out;
}
return 0;
ret = 0;
out:
cpu_sync_bndcs_hflags(&cpu->env);
return ret;
}
void kvm_arch_pre_run(CPUState *cpu, struct kvm_run *run)