#
77a2dba4 |
| 02-May-2025 |
Paolo Bonzini <pbonzini@redhat.com> |
target/i386/emulate: stop overloading decode->op[N].ptr
decode->op[N].ptr can contain either a host pointer (!) in CPUState or a guest virtual address. Pass the whole struct to read_val_ext and wri
target/i386/emulate: stop overloading decode->op[N].ptr
decode->op[N].ptr can contain either a host pointer (!) in CPUState or a guest virtual address. Pass the whole struct to read_val_ext and write_val_ext, so that it can decide the contents based on the operand type.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
7abf0d95 |
| 02-May-2025 |
Paolo Bonzini <pbonzini@redhat.com> |
target/i386/emulate: fix target_ulong format strings
Do not assume that TARGET_FMT_lx is %llx.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
7c93067f |
| 29-Apr-2025 |
Magnus Kulke <magnuskulke@linux.microsoft.com> |
target/i386/emulate: remove rflags leftovers
Fixes: c901905ea670 ("target/i386/emulate: remove flags_mask")
In c901905ea670 rflags have been removed from `x86_decode`, but there were some leftovers
target/i386/emulate: remove rflags leftovers
Fixes: c901905ea670 ("target/i386/emulate: remove flags_mask")
In c901905ea670 rflags have been removed from `x86_decode`, but there were some leftovers.
Signed-off-by: Magnus Kulke <magnuskulke@linux.microsoft.com> Link: https://lore.kernel.org/r/20250429093319.5010-1-magnuskulke@linux.microsoft.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
c901905e |
| 03-Apr-2025 |
Paolo Bonzini <pbonzini@redhat.com> |
target/i386/emulate: remove flags_mask
The field is written but never read.
Cc: Wei Liu <liuwe@linux.microsoft.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paol
target/i386/emulate: remove flags_mask
The field is written but never read.
Cc: Wei Liu <liuwe@linux.microsoft.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
27458df8 |
| 07-Mar-2025 |
Wei Liu <liuwe@linux.microsoft.com> |
target/i386: move x86 instruction emulator out of hvf
Move x86_decode, x86_emu, x86_flags and some headers to the new location. Fix up all the inclusion sites in hvf.
Signed-off-by: Wei Liu <liuwe@
target/i386: move x86 instruction emulator out of hvf
Move x86_decode, x86_emu, x86_flags and some headers to the new location. Fix up all the inclusion sites in hvf.
Signed-off-by: Wei Liu <liuwe@linux.microsoft.com> Link: https://lore.kernel.org/r/1741377325-28175-14-git-send-email-liuwe@linux.microsoft.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
3667f0bb |
| 07-Mar-2025 |
Wei Liu <liuwe@linux.microsoft.com> |
target/i386/hvf: drop unused headers
Signed-off-by: Wei Liu <liuwe@linux.microsoft.com> Link: https://lore.kernel.org/r/1741377325-28175-10-git-send-email-liuwe@linux.microsoft.com Signed-off-by: Pa
target/i386/hvf: drop unused headers
Signed-off-by: Wei Liu <liuwe@linux.microsoft.com> Link: https://lore.kernel.org/r/1741377325-28175-10-git-send-email-liuwe@linux.microsoft.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
0860abbe |
| 07-Mar-2025 |
Wei Liu <liuwe@linux.microsoft.com> |
target/i386/hvf: remove HVF specific calls from x86_decode.c
Use the newly defined emul_ops. This allows the module to be reused by other accelerator in the future.
No functional change intended.
target/i386/hvf: remove HVF specific calls from x86_decode.c
Use the newly defined emul_ops. This allows the module to be reused by other accelerator in the future.
No functional change intended.
Signed-off-by: Wei Liu <liuwe@linux.microsoft.com> Link: https://lore.kernel.org/r/1741377325-28175-3-git-send-email-liuwe@linux.microsoft.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
40b839cb |
| 09-Dec-2024 |
Phil Dennis-Jordan <phil@philjordan.eu> |
target/i386/hvf: Variable type fixup in decoder
decode_bytes reads 1, 2, 4, or 8 bytes at a time. The destination variable should therefore be a uint64_t, not a target_ulong.
Signed-off-by: Phil De
target/i386/hvf: Variable type fixup in decoder
decode_bytes reads 1, 2, 4, or 8 bytes at a time. The destination variable should therefore be a uint64_t, not a target_ulong.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> Fixes: ff2de1668c9 ("i386: hvf: remove addr_t") Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20241209203629.74436-9-phil@philjordan.eu> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
#
d54d3346 |
| 21-Feb-2025 |
Wei Liu <liuwe@linux.microsoft.com> |
target/i386/hvf: use x86_segment in x86_decode.c
Make the code to rely on the segment definition for checking cs.db. This allows removing HVF specific VMX related definition from the decoder.
Intro
target/i386/hvf: use x86_segment in x86_decode.c
Make the code to rely on the segment definition for checking cs.db. This allows removing HVF specific VMX related definition from the decoder.
Introduce a function for retrieving the CS descriptor.
No functional change intended.
Signed-off-by: Wei Liu <liuwe@linux.microsoft.com> Link: https://lore.kernel.org/r/1740126987-8483-4-git-send-email-liuwe@linux.microsoft.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
0e4e622e |
| 05-Jun-2024 |
Phil Dennis-Jordan <phil@philjordan.eu> |
i386/hvf: Fixes some compilation warnings
A bunch of function definitions used empty parentheses instead of (void) syntax, yielding the following warning when building with clang on macOS:
warning:
i386/hvf: Fixes some compilation warnings
A bunch of function definitions used empty parentheses instead of (void) syntax, yielding the following warning when building with clang on macOS:
warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
In addition to fixing these function headers, it also fixes what appears to be a typo causing a variable to be unused after initialisation.
warning: variable 'entry_ctls' set but not used [-Wunused-but-set-variable]
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> Reviewed-by: Roman Bolshakov <roman@roolebo.dev> Tested-by: Roman Bolshakov <roman@roolebo.dev> Message-ID: <20240605112556.43193-3-phil@philjordan.eu> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
0f9668e0 |
| 23-Mar-2022 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
Remove qemu-common.h include from most units
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-33-marcandre.lureau@redhat.com> Signed-off-by: Paolo B
Remove qemu-common.h include from most units
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-33-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
8af82b8e |
| 23-Oct-2020 |
Chetan Pant <chetan4windows@gmail.com> |
x86 hvf cpus: Fix Lesser GPL version number
There is no "version 2" of the "Lesser" General Public License. It is either "GPL version 2.0" or "Lesser GPL version 2.1". This patch replaces all occurr
x86 hvf cpus: Fix Lesser GPL version number
There is no "version 2" of the "Lesser" General Public License. It is either "GPL version 2.0" or "Lesser GPL version 2.1". This patch replaces all occurrences of "Lesser GPL version 2" with "Lesser GPL version 2.1" in comment section.
Signed-off-by: Chetan Pant <chetan4windows@gmail.com> Message-Id: <20201023124012.20035-1-chetan4windows@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
#
ea48ae91 |
| 28-May-2020 |
Roman Bolshakov <r.bolshakov@yadro.com> |
i386: hvf: Drop copy of RFLAGS defines
Use the ones provided in target/i386/cpu.h instead.
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200528193758.51454-10-r.bolshakov@ya
i386: hvf: Drop copy of RFLAGS defines
Use the ones provided in target/i386/cpu.h instead.
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200528193758.51454-10-r.bolshakov@yadro.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
2d5f696c |
| 28-May-2020 |
Roman Bolshakov <r.bolshakov@yadro.com> |
i386: hvf: Drop fetch_rip from HVFX86EmulatorState
The field is used to print address of instructions that have no parser in decode_invalid(). RIP from VMCS is saved into fetch_rip before decoding s
i386: hvf: Drop fetch_rip from HVFX86EmulatorState
The field is used to print address of instructions that have no parser in decode_invalid(). RIP from VMCS is saved into fetch_rip before decoding starts but it's also saved into env->eip in load_regs(). Therefore env->eip can be used instead of fetch_rip.
While at it, correct address printed in decode_invalid(). It prints an address before the unknown instruction.
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200528193758.51454-8-r.bolshakov@yadro.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
5d32173f |
| 28-May-2020 |
Roman Bolshakov <r.bolshakov@yadro.com> |
i386: hvf: Use IP from CPUX86State
Drop and replace rip field from HVFX86EmulatorState in favor of eip from common CPUX86State.
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <2
i386: hvf: Use IP from CPUX86State
Drop and replace rip field from HVFX86EmulatorState in favor of eip from common CPUX86State.
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200528193758.51454-7-r.bolshakov@yadro.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
show more ...
|
#
8c3b0e9e |
| 24-Nov-2019 |
Cameron Esfahani <dirty@apple.com> |
hvf: correctly handle REX prefix in relation to legacy prefixes
In real x86 processors, the REX prefix must come after legacy prefixes. REX before legacy is ignored. Update the HVF emulation code t
hvf: correctly handle REX prefix in relation to legacy prefixes
In real x86 processors, the REX prefix must come after legacy prefixes. REX before legacy is ignored. Update the HVF emulation code to properly handle this. Fix some spelling errors in constants. Fix some decoder table initialization issues found by Coverity.
Signed-off-by: Cameron Esfahani <dirty@apple.com> Message-Id: <eff30ded8307471936bec5d84c3b6efbc95e3211.1574625592.git.dirty@apple.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
29a0af61 |
| 22-Mar-2019 |
Richard Henderson <richard.henderson@linaro.org> |
cpu: Replace ENV_GET_CPU with env_cpu
Now that we have both ArchCPU and CPUArchState, we can define this generically instead of via macro in each target's cpu.h.
Reviewed-by: Peter Maydell <peter.m
cpu: Replace ENV_GET_CPU with env_cpu
Now that we have both ArchCPU and CPUArchState, we can define this generically instead of via macro in each target's cpu.h.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
1edead0f |
| 25-Jan-2019 |
Roman Bolshakov <r.bolshakov@yadro.com> |
i386: hvf: Don't miss 16-bit displacement
In 16-bit addressing mode, when Mod = 0 and R/M = 6, decoded displacement doesn't reach decode_linear_addr and gets lost. Instructions that involve the comb
i386: hvf: Don't miss 16-bit displacement
In 16-bit addressing mode, when Mod = 0 and R/M = 6, decoded displacement doesn't reach decode_linear_addr and gets lost. Instructions that involve the combination of ModRM always get a pointer with zero offset from the beginning of DS segment.
The change fixes drawing in F-BIRD from day 1 of '18 advent calendar.
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20190125154743.14498-1-r.bolshakov@yadro.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
bcdc5081 |
| 03-Dec-2018 |
Roman Bolshakov <r.bolshakov@yadro.com> |
i386: hvf: drop debug printf in decode_sldtgroup
It's going to clutter QEMU logs if 0x0f00 is trapped.
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20181203100415.53027-2-r.b
i386: hvf: drop debug printf in decode_sldtgroup
It's going to clutter QEMU logs if 0x0f00 is trapped.
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20181203100415.53027-2-r.bolshakov@yadro.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
show more ...
|
#
83ea23cd |
| 03-Dec-2018 |
Roman Bolshakov <r.bolshakov@yadro.com> |
i386: hvf: Fix overrun of _decode_tbl1
Single opcode instructions in ff group were incorrectly processed because an overrun of _decode_tbl1[0xff] resulted in access of _decode_tbl2[0x0]. Thus, decod
i386: hvf: Fix overrun of _decode_tbl1
Single opcode instructions in ff group were incorrectly processed because an overrun of _decode_tbl1[0xff] resulted in access of _decode_tbl2[0x0]. Thus, decode_sldtgroup was called instead of decode_ffgroup: 7d71: decode_sldtgroup: 1 Unimplemented handler (7d71) for 108 (ff 0)
While at it correct maximum length for _decode_tbl2 and _decode_tbl3.
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
b4e1af89 |
| 18-Oct-2018 |
Roman Bolshakov <r.bolshakov@yadro.com> |
i386: hvf: Fix register refs if REX is present
According to Intel(R)64 and IA-32 Architectures Software Developer's Manual, the following one-byte registers should be fetched when REX prefix is pres
i386: hvf: Fix register refs if REX is present
According to Intel(R)64 and IA-32 Architectures Software Developer's Manual, the following one-byte registers should be fetched when REX prefix is present (sorted by reg encoding index): AL, CL, DL, BL, SPL, BPL, SIL, DIL, R8L - R15L
The first 8 are fetched if REX.R is zero, the last 8 if non-zero.
The following registers should be fetched for instructions without REX prefix (also sorted by reg encoding index): AL, CL, DL, BL, AH, CH, DH, BH
Current emulation code doesn't handle accesses to SPL, BPL, SIL, DIL when REX is present, thefore an instruction 40883e "mov %dil,(%rsi)" is decoded as "mov %bh,(%rsi)".
That caused an infinite loop in vp_reset: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg03293.html
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20181018134401.44471-1-r.bolshakov@yadro.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
d8e39b70 |
| 01-Feb-2018 |
Markus Armbruster <armbru@redhat.com> |
Use #include "..." for our own headers, <...> for others
System headers should be included with <...>, our own headers with "...". Offenders tracked down with an ugly, brittle and probably buggy Pe
Use #include "..." for our own headers, <...> for others
System headers should be included with <...>, our own headers with "...". Offenders tracked down with an ugly, brittle and probably buggy Perl script. Previous iteration was commit a9c94277f0.
Delete inclusions of "string.h" and "strings.h" instead of fixing them to <string.h> and <strings.h>, because we always include these via osdep.h.
Put the cleaned up system header includes first.
While there, separate #include from file comment with exactly one blank line.
Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-2-armbru@redhat.com>
show more ...
|
#
895f9fdf |
| 03-Oct-2017 |
Paolo Bonzini <pbonzini@redhat.com> |
i386: hvf: cleanup x86_gen.h
This only includes VM_PANIC now. No need to include it from headers.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
ff2de166 |
| 03-Oct-2017 |
Paolo Bonzini <pbonzini@redhat.com> |
i386: hvf: remove addr_t
Use target_ulong for virtual addresses and uint64_t for physical addresses.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
715f396d |
| 03-Oct-2017 |
Paolo Bonzini <pbonzini@redhat.com> |
i386: hvf: remove ZERO_INIT macro
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|