aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-04-28 12:15:40 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 03:35:35 -0400
commitef050dc0390176ec6888f373edb776587c88be3d (patch)
tree1e205bbfa3d64385889e976181b086bf3618837e /arch/x86/kvm/x86.c
parent95c5588652f7742a21c33d9dcce0e043e057d04f (diff)
KVM: x86 emulator: set RFLAGS outside x86 emulator code
Removes the need for set_flags() callback. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8f45cc712dda..04ca343ee512 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3806,11 +3806,6 @@ static void emulator_set_segment_selector(u16 sel, int seg,
3806 kvm_set_segment(vcpu, &kvm_seg, seg); 3806 kvm_set_segment(vcpu, &kvm_seg, seg);
3807} 3807}
3808 3808
3809static void emulator_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags)
3810{
3811 kvm_x86_ops->set_rflags(vcpu, rflags);
3812}
3813
3814static struct x86_emulate_ops emulate_ops = { 3809static struct x86_emulate_ops emulate_ops = {
3815 .read_std = kvm_read_guest_virt_system, 3810 .read_std = kvm_read_guest_virt_system,
3816 .write_std = kvm_write_guest_virt_system, 3811 .write_std = kvm_write_guest_virt_system,
@@ -3829,7 +3824,6 @@ static struct x86_emulate_ops emulate_ops = {
3829 .get_cr = emulator_get_cr, 3824 .get_cr = emulator_get_cr,
3830 .set_cr = emulator_set_cr, 3825 .set_cr = emulator_set_cr,
3831 .cpl = emulator_get_cpl, 3826 .cpl = emulator_get_cpl,
3832 .set_rflags = emulator_set_rflags,
3833 .get_dr = emulator_get_dr, 3827 .get_dr = emulator_get_dr,
3834 .set_dr = emulator_set_dr, 3828 .set_dr = emulator_set_dr,
3835 .set_msr = kvm_set_msr, 3829 .set_msr = kvm_set_msr,
@@ -3941,6 +3935,7 @@ restart:
3941 3935
3942 shadow_mask = vcpu->arch.emulate_ctxt.interruptibility; 3936 shadow_mask = vcpu->arch.emulate_ctxt.interruptibility;
3943 kvm_x86_ops->set_interrupt_shadow(vcpu, shadow_mask); 3937 kvm_x86_ops->set_interrupt_shadow(vcpu, shadow_mask);
3938 kvm_x86_ops->set_rflags(vcpu, vcpu->arch.emulate_ctxt.eflags);
3944 kvm_rip_write(vcpu, vcpu->arch.emulate_ctxt.eip); 3939 kvm_rip_write(vcpu, vcpu->arch.emulate_ctxt.eip);
3945 3940
3946 if (vcpu->arch.pio.count) { 3941 if (vcpu->arch.pio.count) {