diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/kvm/kvm_main.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index b998bc68e9f2..05235e1751fb 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -1904,16 +1904,6 @@ static int kvm_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, | |||
1904 | 1904 | ||
1905 | vcpu_load(vcpu); | 1905 | vcpu_load(vcpu); |
1906 | 1906 | ||
1907 | set_segment(vcpu, &sregs->cs, VCPU_SREG_CS); | ||
1908 | set_segment(vcpu, &sregs->ds, VCPU_SREG_DS); | ||
1909 | set_segment(vcpu, &sregs->es, VCPU_SREG_ES); | ||
1910 | set_segment(vcpu, &sregs->fs, VCPU_SREG_FS); | ||
1911 | set_segment(vcpu, &sregs->gs, VCPU_SREG_GS); | ||
1912 | set_segment(vcpu, &sregs->ss, VCPU_SREG_SS); | ||
1913 | |||
1914 | set_segment(vcpu, &sregs->tr, VCPU_SREG_TR); | ||
1915 | set_segment(vcpu, &sregs->ldt, VCPU_SREG_LDTR); | ||
1916 | |||
1917 | dt.limit = sregs->idt.limit; | 1907 | dt.limit = sregs->idt.limit; |
1918 | dt.base = sregs->idt.base; | 1908 | dt.base = sregs->idt.base; |
1919 | kvm_arch_ops->set_idt(vcpu, &dt); | 1909 | kvm_arch_ops->set_idt(vcpu, &dt); |
@@ -1953,6 +1943,16 @@ static int kvm_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, | |||
1953 | if (vcpu->irq_pending[i]) | 1943 | if (vcpu->irq_pending[i]) |
1954 | __set_bit(i, &vcpu->irq_summary); | 1944 | __set_bit(i, &vcpu->irq_summary); |
1955 | 1945 | ||
1946 | set_segment(vcpu, &sregs->cs, VCPU_SREG_CS); | ||
1947 | set_segment(vcpu, &sregs->ds, VCPU_SREG_DS); | ||
1948 | set_segment(vcpu, &sregs->es, VCPU_SREG_ES); | ||
1949 | set_segment(vcpu, &sregs->fs, VCPU_SREG_FS); | ||
1950 | set_segment(vcpu, &sregs->gs, VCPU_SREG_GS); | ||
1951 | set_segment(vcpu, &sregs->ss, VCPU_SREG_SS); | ||
1952 | |||
1953 | set_segment(vcpu, &sregs->tr, VCPU_SREG_TR); | ||
1954 | set_segment(vcpu, &sregs->ldt, VCPU_SREG_LDTR); | ||
1955 | |||
1956 | vcpu_put(vcpu); | 1956 | vcpu_put(vcpu); |
1957 | 1957 | ||
1958 | return 0; | 1958 | return 0; |