]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
KVM: x86: Emulate push sreg as done in Core
authorNadav Amit <namit@cs.technion.ac.il>
Sun, 2 Nov 2014 09:54:51 +0000 (11:54 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 Nov 2014 14:44:06 +0000 (15:44 +0100)
commit0fcc207c66a7cff024b05367b86d70d742072d61
tree73714311883422e2306c204311255ae7463f2e7d
parent5aca3722362689a679419dc9b3e426921c70ef16
KVM: x86: Emulate push sreg as done in Core

According to Intel SDM push of segment selectors is done in the following
manner: "if the operand size is 32-bits, either a zero-extended value is pushed
on the stack or the segment selector is written on the stack using a 16-bit
move. For the last case, all recent Core and Atom processors perform a 16-bit
move, leaving the upper portion of the stack location unmodified."

This patch modifies the behavior to match the core behavior.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c