Avi Kivity 5ad105e569 KVM: x86 emulator: use stack size attribute to mask rsp in stack ops
The sub-register used to access the stack (sp, esp, or rsp) is not
determined by the address size attribute like other memory references,
but by the stack segment's B bit (if not in x86_64 mode).

Fix by using the existing stack_mask() to figure out the correct mask.

This long-existing bug was exposed by a combination of a27685c33acccce
(emulate invalid guest state by default), which causes many more
instructions to be emulated, and a seabios change (possibly a bug) which
causes the high 16 bits of esp to become polluted across calls to real
mode software interrupts.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-08-22 18:54:26 -03:00
..
2012-04-27 19:40:29 -03:00
2012-04-27 19:40:29 -03:00
2010-10-24 10:53:14 +02:00
2012-06-25 12:40:55 +03:00
2012-06-25 12:40:55 +03:00
2011-07-24 11:50:40 +03:00
2012-07-05 21:19:39 +02:00
2011-12-27 11:17:05 +02:00
2012-07-24 12:01:20 -07:00
2012-04-08 14:03:13 +03:00