diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-08-19 13:02:31 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-08-19 13:02:31 +0100 |
commit | c88b1e06d5ad6d24b5cb0cb6f80ae35d94002ef5 (patch) | |
tree | a3e3c997f1f342b00d1e890b5627554e5cdf1e85 /tools/tests | |
parent | b2c296e1c5dcbcca103b5fcc3862de8a3faa99c3 (diff) | |
download | xen-c88b1e06d5ad6d24b5cb0cb6f80ae35d94002ef5.tar.gz xen-c88b1e06d5ad6d24b5cb0cb6f80ae35d94002ef5.tar.bz2 xen-c88b1e06d5ad6d24b5cb0cb6f80ae35d94002ef5.zip |
x86: miscellaneous emulator adjustments
Defer fail_if()-s as much as possible (in favor of possibly generating
exceptions), and avoid generating exceptions when not strictly
necessary.
Avoid fail_if()-s for simple return code checks (making the code that
used them consistent with other, longer existing code).
Eliminate redundant generate_exception_if()-s checking lock_prefix
(which is already covered by the general check prior to decoding
operands).
Also fix the testing code to add PROT_EXEC for the mapping that is
intended to have instruction executed from.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'tools/tests')
-rw-r--r-- | tools/tests/test_x86_emulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tests/test_x86_emulator.c b/tools/tests/test_x86_emulator.c index 4215686888..dca401f93d 100644 --- a/tools/tests/test_x86_emulator.c +++ b/tools/tests/test_x86_emulator.c @@ -76,7 +76,7 @@ int main(int argc, char **argv) ctxt.addr_size = 32; ctxt.sp_size = 32; - res = mmap((void *)0x100000, MMAP_SZ, PROT_READ|PROT_WRITE, + res = mmap((void *)0x100000, MMAP_SZ, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_FIXED|MAP_PRIVATE|MAP_ANONYMOUS, 0, 0); if ( res == MAP_FAILED ) { |