Commit Graph

149 Commits

Author SHA1 Message Date
mio
d87791329f
Add a cmake option 2024-09-21 22:16:02 +08:00
mio
80f0898740
Merge remote-tracking branch 'bits/revive-qemu-logs' into dev 2024-09-21 22:09:07 +08:00
Andrei Warkentin
d01035767e
notdirty_write: fix store-related performance problems
Every store would always cause the tb_invalidate_phys_page_fast path to be invoked,
amounting to a 40x slowdown of stores compared to loads.

Change this code to only worry about TB invalidation for regions marked as
executable (i.e. emulated executable).

Even without uc_set_native_thunks, this change fixes most of the performance
issues seen with thunking to native calls.

Signed-off-by: Andrei Warkentin <andrei.warkentin@intel.com>
2024-09-21 20:50:43 +08:00
BitMaskMixer
8e6499fb0b
gcc compiler warning fixes (#1977)
* fix for enum-int-mismatch

* fix for unused-variable
2024-07-19 11:09:57 +08:00
Christoph Hindermann
45a872108b revive qemu logging by implementing macros 2024-07-18 19:08:36 +02:00
lazymio
8a1c8daca3
Add a comment 2024-02-13 19:11:22 +08:00
lazymio
71c729a9d7
Define HAVE_SPRR 2024-02-13 19:09:35 +08:00
lazymio
a4ba7c9dd5
Add inline 2024-02-13 11:48:24 +08:00
lazymio
591b562721
Fix defined 2024-02-13 11:38:49 +08:00
lazymio
a6fb2a6870
Save jit state before/after callback 2024-02-13 11:13:01 +08:00
lazymio
822bb527f3
M1 W^X fully supported 2024-02-12 00:10:44 +08:00
mio
e0eeda2362
Add arm for bad assert implementation 2024-01-03 18:07:04 +08:00
StalkR
db63f2d9d7 qemu: fix UBSAN errors in tcg and arm translation 2023-11-14 10:23:50 +01:00
Takacs, Philipp
df18756234 implement uc_mem_unmap with snapshots
still has todos and need tests
2023-07-11 11:51:44 +02:00
Takacs, Philipp
80bd825420 implement simple memory snapshot mechanismus
Uses Copy on Write to make it posible to restore the memory state after a snapshot
was made. To restore all MemoryRegions created after the snapshot are removed.
2023-07-11 11:51:40 +02:00
Takacs, Philipp
cd85f589a2 add memory_region_add_subregion_overlap 2023-07-11 11:47:50 +02:00
mio
fa1f26138e
Fix missing stdint
Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2023-06-10 23:48:18 +02:00
mio
8dffbc159c
Add uc_ctl_get/set_tcg_buffer_size
We still need this API because the virtual memory address space of

32 bits os is only 4GB and we default need 1G per instance

Credits to @ZehMatt for original idea

Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2023-06-10 23:36:02 +02:00
mio
3d5b2643f0
Support demand paging via closures and seh
Reverts 12a79192ee which exploits normal tcg mechanism

This uses a trampoline to pass extra data to seh handlers
2023-06-10 14:04:56 +02:00
Takacs, Philipp
e25419bb2d add virtuall tlb
this virtuall tlb allows to use mmu indipendent of the architectur
2023-03-28 13:50:11 +02:00
Takacs, Philipp
4b327baaf7 make unicorn use the physical addresses
This allows to emulate code witch fully uses the MMU. This is necesary
to allow full system emulation.
2023-03-28 13:50:11 +02:00
mio
a25adf84f0
Rename flags to avoid confusion 2023-01-28 22:18:39 +01:00
mio
513e797d46
Update comments of the page count 2023-01-28 22:10:39 +01:00
mio
12a79192ee
Demand paging on Windows 2023-01-28 22:04:43 +01:00
Nguyen Anh Quynh
9dc001d686 remove unused code in PPC & dis-asm.h 2022-12-07 01:36:44 +08:00
relapids
5a54b3d7af Fix a segfault inside tb_remove_from_jmp_list by forcing clang-cl to use the same atomic routines as MSVC. 2022-08-15 15:50:46 -07:00
relapids
2ac7b55797 Allow building with clang-cl on Windows. 2022-08-15 15:50:46 -07:00
Eric Poole
cfee2139a0
TriCore Support (#1568)
* TriCore Support

python sample

* Update sample_tricore.py

Correct attribution

* Update sample_tricore.py

Fixed byte code to execute properly.

* Update sample_tricore.py

Removed testing artifact

* Added tricore msvc config-file.h

* Added STATIC to tricore config and added helper methods to symbol file generation.

* Update op_helper.c

Use built in crc32

* Fix tricore samples and small code blocks are now handled properly

* Add CPU types

* Generate bindings

* Format code

Co-authored-by: lazymio <mio@lazym.io>
2022-04-29 23:11:34 +02:00
lazymio
656dde9f60
Fix MSVC build 2022-04-16 23:37:52 +02:00
lazymio
3d3deac5e6
Fix crash when mapping a big memory and calling uc_close 2022-04-16 19:17:41 +02:00
lazymio
2f113b11d1
Fix symbol clash on bunlded static libs 2022-04-04 11:24:59 +02:00
rose
fc0d9a82a5 Fix clang-cl compile with CONFIG_INT128 in qemu 2022-04-03 16:30:26 -04:00
lazymio
7e6d21d27c
Fix memory leak in code_gen_buffer 2022-04-03 21:44:09 +02:00
lazymio
12fa73f2b6
Generate check_exit_request for the first tb
Consider this case:

   t:inc ecx,
     inc edx,
     jmp t

It would generate exactly one block and TB chain will generate an inline
jump. If we don't check exit at the entry of the block, we will never be
terminated.

This test case is recorded in the commit message since it's a bit
painful to write multithread related code that builds on all platforms.
2022-03-05 22:42:41 +01:00
Yurii Rashkovskii
f652340bec Problem: Could not allocate dynamic translator buffer
`Could not allocate dynamic translator buffer` error while
trying to perform any memory-related operation.

This happens on aarch64 (MacBook Pro M1)

Solution: ensure aarch64 architecture is properly checked against

Fixes #1556
2022-02-20 07:46:30 -08:00
lazymio
d0de673208
Fix the undefined lshift negative numbers 2022-02-12 17:47:57 +01:00
lazymio
55b4865945
Fix memory leak of custom helpers 2022-01-20 19:50:57 +01:00
mio
7095605607
Merge branch 'dev' into systemz 2022-01-18 21:10:55 +01:00
mio
218bddc0e0
Only use MAP_JIT on Apple Silicon
MAP_JIT causes performance regression for fork()

See https://github.com/desktop/desktop/issues/12978
2022-01-18 21:01:49 +01:00
lazymio
9ac796531a
Don't cache S390SkeyState and S390SkeysClass 2022-01-10 19:18:52 +01:00
Nguyen Anh Quynh
fa3fb82c9c s390x: fix warning on commented code 2021-12-30 17:17:49 +08:00
mio
dc402d78ec
Ignore QEMU_BUILD_BUG_MSG on MSVC 2021-12-30 00:28:24 +01:00
mio
ab4ef2e1de
Fix MSVC build and remove warning about unused functions 2021-12-30 00:26:25 +01:00
mio
298795a9f8
Fix build on MSVC 2021-12-29 23:18:49 +01:00
mio
a38151bf77
Make s390x skey work 2021-12-27 23:19:17 +01:00
mio
faa689c0f0
Merge systemz to the latest uc2 codebase 2021-12-26 22:58:32 +01:00
Nguyen Anh Quynh
09b0c66f11 move all static vars in translate.c to tcg.h 2021-12-07 04:53:32 +08:00
Nguyen Anh Quynh
b042a6a01d add missing files 2021-12-06 04:28:13 +08:00
Nguyen Anh Quynh
97b92d8861 initial systemz support 2021-12-06 04:19:37 +08:00
lazymio
87a391d549
Inline uc_tracecode when there is only exactly one hook 2021-11-21 16:44:39 +01:00