On Mon, Jun 3, 2024 at 1:55 PM Daniel P. Berrangé wrote:
> I really wish we didn't have to introduce this though - is there really
> no way to make it possible to use pflash for both CODE & VARS with SNP,
> as is done with traditional VMs, so we don't diverge in setup, needing
> yet more changes u
"standard-headers/linux/kvm_para.h" will not because it can be used in
architecture-independent files.
This could easily be extended to other architectures, but right now
they do not need any symbol in their specific kvm_para.h files.
Signed-off-by: Paolo Bonzini
---
include/st
E and XRSTOR of AVX registers",
2022-10-18)
Reported-by: Thomas Huth
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/fpu_helper.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c
index e322293371c..e1b850f3fc2 100644
-
Queued, thanks.
Paolo
On 6/2/24 12:05, lixinyu...@ict.ac.cn wrote:
From: Xinyu Li
This commit fixes an issue with MOV instructions (0x8C and 0x8E)
involving segment registers by explicitly setting the memory operand
size to 16 bits. It introduces a new flag X86_SPECIAL_MovSeg to handle
this specification correctly.
Queued, thanks.
Paolo
On 6/2/24 12:38, Will Gyda wrote:
i386: removes microvm from default build since microvm doesn't support Xen
accel.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2294
This is already done in (what will be) QEMU 9.1;
configs/devices/i386-softmmu.mak has:
# Boards are selected by d
On Fri, May 31, 2024 at 7:41 PM Gupta, Pankaj wrote:
> > please check if branch qemu-coco-queue of
> > https://gitlab.com/bonzini/qemu works for you!
>
> Getting compilation error here: Hope I am looking at correct branch.
Oops, sorry:
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
i
On Fri, May 31, 2024 at 1:20 PM Paolo Bonzini wrote:
>
> On Thu, May 30, 2024 at 1:16 PM Pankaj Gupta wrote:
> >
> > These patches implement SEV-SNP base support along with CPUID enforcement
> > support for QEMU, and are also available at:
> >
> > https:/
On Fri, May 31, 2024 at 5:20 PM Liam Merwick wrote:
> > +metadata = (OvmfSevMetadata *)(flash_ptr + flash_size - data->offset);
> > +if (memcmp(metadata->signature, "ASEV", 4) != 0) {
> > +return;
> > +}
> > +
> > +ovmf_sev_metadata_table = g_malloc(metadata->len);
>
> Ther
On Fri, May 31, 2024 at 4:38 PM Liam Merwick
wrote:
> > --- a/linux-headers/asm-x86/kvm.h
> > +++ b/linux-headers/asm-x86/kvm.h
> > @@ -870,5 +919,6 @@ struct kvm_hyperv_eventfd {
> > #define KVM_X86_SW_PROTECTED_VM 1
> > #define KVM_X86_SEV_VM 2
> > #define KVM_X86_SEV_ES_V
On Thu, May 30, 2024 at 1:17 PM Pankaj Gupta wrote:
> diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
> index def77a4429fb24e62748
> +static void pc_system_flash_map(PCMachineState *pcms,
> +MemoryRegion *rom_memory)
> +{
> +pc_system_flash_map_partial(pcms
On Thu, May 30, 2024 at 1:17 PM Pankaj Gupta wrote:
>
> From: Michael Roth
>
> Current SNP guest kernels will attempt to access these regions with
> with C-bit set, so guest_memfd is needed to handle that. Otherwise,
> kvm_convert_memory() will fail when the guest kernel tries to access it
> and
Ask the ConfidentialGuestSupport object whether to use guest_memfd
for KVM-backend private memory. This bool can be set in instance_init
(or user_complete) so that it is available when the machine is created.
Signed-off-by: Paolo Bonzini
---
include/exec/confidential-guest-support.h | 5
On Thu, May 30, 2024 at 1:17 PM Pankaj Gupta wrote:
> if (bios_size <= 0 ||
> (bios_size % 65536) != 0) {
> -goto bios_error;
> +if (!machine_require_guest_memfd(MACHINE(x86ms))) {
> +g_warning("%s: Unaligned BIOS size %d", __func__, bios_size);
> +
On Thu, May 30, 2024 at 1:16 PM Pankaj Gupta wrote:
>
> These patches implement SEV-SNP base support along with CPUID enforcement
> support for QEMU, and are also available at:
>
> https://github.com/pagupta/qemu/tree/snp_v4
>
> Latest version of kvm changes are posted here [2] and also queued in
On Thu, May 30, 2024 at 1:17 PM Pankaj Gupta wrote:
>
> From: Dov Murik
>
> In SNP, the hashes page designated with a specific metadata entry
> published in AmdSev OVMF.
>
> Therefore, if the user enabled kernel hashes (for measured direct boot),
> QEMU should prepare the content of hashes table,
On Thu, May 30, 2024 at 1:17 PM Pankaj Gupta wrote:
>
> From: Dov Murik
>
> Move the declaration of PaddedSevHashTable before SevSnpGuest so
> we can add a new such field to the latter.
> No functional change intended.
>
> Signed-off-by: Dov Murik
> Signed-off-by: Michael Roth
> Signed-off-by:
On Thu, May 30, 2024 at 1:17 PM Pankaj Gupta wrote:
>
> Add launch_update_data() in SevCommonStateClass and
> invoke as sev_launch_update_data() for SEV object.
>
> Signed-off-by: Pankaj Gupta
> ---
> target/i386/sev.c | 15 +++
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> d
On Thu, May 30, 2024 at 1:17 PM Pankaj Gupta wrote:
> +} else if (x86ms->smm == ON_OFF_AUTO_ON) {
> +error_setg(errp, "SEV-SNP does not support SMM.");
> +ram_block_discard_disable(false);
Unnecessary line, there is no matching ram_block_discard_disable(true).
Paolo
On Thu, May 30, 2024 at 1:17 PM Pankaj Gupta wrote:
> +/*
> + * SEV uses these notifiers to register/pin pages prior to guest use,
> + * but SNP relies on guest_memfd for private pages, which has it's
> + * own internal mechanisms for registering/pinning private memory.
> + */
On Thu, May 30, 2024 at 1:17 PM Pankaj Gupta wrote:
> +++ b/qapi/qom.json
> @@ -928,6 +928,61 @@
> '*policy': 'uint32',
> '*handle': 'uint32',
> '*legacy-vm-type': 'bool' } }
Nit, missing empty line here.
> +##
> +# @SevSnpGuestProperties:
> +#
[...]
> d
On Thu, May 30, 2024 at 1:17 PM Pankaj Gupta wrote:
>
> -#define TYPE_SEV_GUEST "sev-guest"
> -OBJECT_DECLARE_SIMPLE_TYPE(SevGuestState, SEV_GUEST)
>
> +OBJECT_DECLARE_TYPE(SevCommonState, SevCommonStateClass, SEV_COMMON)
> +OBJECT_DECLARE_TYPE(SevGuestState, SevGuestStateClass, SEV_GUEST)
A sepa
QEMU now requires an x86-64-v2 host, which has the POPCNT instruction.
Use it freely in TCG-generated code.
Signed-off-by: Paolo Bonzini
---
host/include/i386/host/cpuinfo.h | 1 -
tcg/i386/tcg-target.h| 5 ++---
util/cpuinfo-i386.c | 1 -
3 files changed, 2 insertions
QEMU now requires an x86-64-v2 host, which always has CMOV.
Use it freely in TCG generated code.
Signed-off-by: Paolo Bonzini
---
host/include/i386/host/cpuinfo.h | 1 -
util/cpuinfo-i386.c | 1 -
tcg/i386/tcg-target.c.inc| 15 +--
3 files changed, 1 insertion
x86-64-v2 processors were released in 2008, assume that we have one.
Unfortunately there is no GCC flag to enable all the features
without disabling what came after; so enable them one by one.
Signed-off-by: Paolo Bonzini
---
meson.build | 10 +++---
1 file changed, 7 insertions(+), 3
QEMU now requires an x86-64-v2 host, which has SSSE3 instructions
(notably, PSHUFB which is used by QEMU's AES implementation).
Do not bother checking it.
Signed-off-by: Paolo Bonzini
---
util/cpuinfo-i386.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/cp
x86-64-v2 processors were released in 2008, assume that we have one.
This provides CMOV on 32-bit processors, and also POPCNT and various
vector ISA extensions.
Paolo
Paolo Bonzini (6):
host/i386: nothing looks at CPUINFO_SSE4
meson: assume x86-64-v2 baseline ISA
host/i386: assume presence
The only user was the SSE4.1 variant of buffer_is_zero, which has
been removed; code to compute CPUINFO_SSE4 is dead.
Signed-off-by: Paolo Bonzini
---
host/include/i386/host/cpuinfo.h | 1 -
util/cpuinfo-i386.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/host/include/i386
QEMU now requires an x86-64-v2 host, which has SSE2.
Use it freely in buffer_is_zero.
Signed-off-by: Paolo Bonzini
---
host/include/i386/host/cpuinfo.h | 1 -
util/bufferiszero.c | 2 +-
util/cpuinfo-i386.c | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
diff
On Thu, May 30, 2024 at 9:22 AM Philippe Mathieu-Daudé
wrote:
>
> On 30/5/24 08:02, Paolo Bonzini wrote:
> > On Wed, May 29, 2024 at 5:56 PM Philippe Mathieu-Daudé
> > wrote:
> >> It is pointless to build semihosting when TCG is not available.
> >
> > W
On Fri, May 17, 2024 at 12:21 AM Pierrick Bouvier
wrote:
>
> From: Alex Bennée
>
> This generalises the qtest_clock_warp code to use the AccelOps
> handlers for updating its own sense of time. This will make the next
> patch which moves the warp code closer to pure code motion.
>
> From: Alex Ben
On Fri, May 17, 2024 at 12:21 AM Pierrick Bouvier
wrote:
> diff --git a/stubs/meson.build b/stubs/meson.build
> index 3b9d42023cb..672213b7482 100644
> --- a/stubs/meson.build
> +++ b/stubs/meson.build
> @@ -3,6 +3,11 @@
> # below, so that it is clear who needs the stubbed functionality.
>
> stu
On Wed, May 29, 2024 at 5:56 PM Philippe Mathieu-Daudé
wrote:
> It is pointless to build semihosting when TCG is not available.
Why? I would have naively assumed that a suitable semihosting API
could be implemented by KVM. The justification (and thus the commit
message) needs to be different for
On Wed, May 29, 2024 at 9:11 PM Alex Bennée wrote:
>
> Philippe Mathieu-Daudé writes:
>
> > It is pointless to build semihosting when TCG is not available.
> >
> > Philippe Mathieu-Daudé (3):
> > target/mips: Restrict semihosting to TCG
> > target/riscv: Restrict semihosting to TCG
> > semi
On 5/28/24 12:23, Will Gyda wrote:
Issue #2294: Machine microvm doesn't run under Xen accel for qemu-system-x86_64.
Solution: microvm is now not build if only Xen is available.
This does not fix the issue that microvm does not start with a Xen
accelerator. I think it would be better to try an
On Tue, May 28, 2024 at 12:35 PM Thomas Huth wrote:
> > diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
> > index 84bc7fbe36cd..c4a6ea5a687f 100644
> > --- a/hw/usb/Kconfig
> > +++ b/hw/usb/Kconfig
> > @@ -17,7 +17,6 @@ config USB_OHCI_SYSBUS
> >
> > config USB_OHCI_PCI
> > bool
> > -defa
dd the link_args and link_depends to the
executables directly; fortunately there is just four of them.
It is possible (and I will look into it) to add "link_depends"
to declare_dependency(), but it probably will be a while before
QEMU can use it.
Signed-off-by: Paolo Bonzini
---
meson.build
move
the .fa suffixes. This series can be evaluated independently from
that.
Paolo
Akihiko Odaki (2):
meson: Pass objects and dependencies to declare_dependency()
Revert "meson: Propagate gnutls dependency"
Paolo Bonzini (3):
meson: move shared_module() calls where module
pendencies can be
added as well so that they are propagated, because object files on the
linker command line are always deduplicated.
This requires Meson 1.1.0 or later.
Signed-off-by: Akihiko Odaki
Message-ID: <20240524-objects-v1-1-07cbbe961...@daynix.com>
Signed-off
Signed-off-by: Paolo Bonzini
---
meson.build | 34 +++---
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/meson.build b/meson.build
index 63866071445..92ddbd17c32 100644
--- a/meson.build
+++ b/meson.build
@@ -3562,21 +3562,28 @@ modinfo_files
.
Signed-off-by: Akihiko Odaki
Message-ID: <20240524-objects-v1-2-07cbbe961...@daynix.com>
Signed-off-by: Paolo Bonzini
---
meson.build| 4 ++--
block/meson.build | 2 +-
io/meson.build | 2 +-
storage-daemon/meson.build | 2 +-
ui/meson.build
ree-wide search with 'fa' and .fa (note the quotes and dot).
Signed-off-by: Akihiko Odaki
Message-ID: <20240524-xkb-v4-4-2de564e5c...@daynix.com>
Signed-off-by: Paolo Bonzini
---
docs/devel/build-system.rst | 5 -
meson.build | 17 ++---
zlib code is only used by the emulators, not by the tests.
Signed-off-by: Paolo Bonzini
---
meson.build | 2 +-
migration/dirtyrate.c | 1 -
migration/qemu-file.c | 1 -
migration/meson.build | 2 +-
4 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/meson.build b
Values other than OR_TMP0 were only ever used by MOV and MOVNTI
opcodes. Now that these have been converted to the new decoder,
remove the argument.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 33 -
1 file
No need to set it again at the end of the translation block, cc_op_dirty
can be set to false.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 37 -
target/i386/tcg/emit.c.inc | 2 +-
2 files changed, 25
The dbus_display1_dep is not really used since all occurrences also
request gio independently. Just list the generated sources and drop
dbus_display1_dep.
Signed-off-by: Paolo Bonzini
---
audio/meson.build | 4 ++--
tests/qtest/meson.build | 2 +-
ui/meson.build | 5 ++---
3
s non-dirty and gen_eob will not overwrite
the CC_OP_EFLAGS value that is placed there by the helper. But
let's clean it up.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/targe
sti only has one exit, so it does not need to generate the
end-of-translation code inline. It can be deferred to tb_stop.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 13 -
target/i386/tcg/emit.c.inc | 4 +---
2 files changed, 1
Generalize gen_stack_A0() to include an initial add and to use an arbitrary
destination. This is a common pattern and it is not a huge burden to
add the extra arguments to the only caller of gen_stack_A0().
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg
Do not bother generating inline wrappers for gen_repz and gen_repz2;
use s->prefix to separate REPZ from REPNZ in the case of SCAS and
CMPS.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 22 --
target/i386/tcg/emit.c.inc |
Use mo_stacksize for all stack accesses, including when
a 64-bit code segment is impossible and the code is
therefore checking only for SS32(s).
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 8
1 file changed, 4 insertions(+), 4
gned-off-by: Paolo Bonzini
---
configure | 7 ++-
meson.build | 7 +++
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/configure b/configure
index 38ee2577013..4d01a42ba65 100755
--- a/configure
+++ b/configure
@@ -512,10 +512,7 @@ case "$cpu" in
cpu="x86
The is_store argument of gen_ldst_modrm has only ever been passed
a constant. Just split the function in two.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 52 +
1 file changed, 29 insertions(+), 23 deletions
libm is linked into all targets via libqemuutil, no need to specify it
explicitly.
Signed-off-by: Paolo Bonzini
---
block/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/meson.build b/block/meson.build
index e1f03fd773e..8993055c75e 100644
--- a/block
This is already handled in gen_eob(). Before adding another DISAS_*
case, remove the double calls.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg
Signed-off-by: Paolo Bonzini
---
block/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/meson.build b/block/meson.build
index 8993055c75e..158dc3b89db 100644
--- a/block/meson.build
+++ b/block/meson.build
@@ -119,7 +119,7 @@ foreach m : [
module_ss
Intel SDM 18.3.1.4 "If an occurrence of the MOV or POP instruction
loads the SS register executes with EFLAGS.TF = 1, no single-step debug
exception occurs following the MOV or POP instruction."
Cc: qemu-sta...@nongnu.org
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c
Place DISAS_* constants that update cpu_eip first, and
the "jump" ones last. Add comments explaining the differences
and usage.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 25 ++---
1 file changed, 22 insert
This ensures that for example libffi can be reached even if it is not
in /usr/include.
Signed-off-by: Paolo Bonzini
---
tcg/meson.build | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tcg/meson.build b/tcg/meson.build
index 8251589fd4e..ffbe754d8b3 100644
--- a/tcg
This is an invariant now that there are no calls to gen_eob_inhibit_irq()
outside tb_stop.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
Make gen_eob take the DISAS_* constant as an argument, so that
it is not necessary to have wrappers around it.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 62 +
1 file changed, 15 insertions(+), 47 deletions
It is only used in MONITOR, where a direct call of gen_lea_v_seg
is simpler, and in XLAT. Inline it in the latter.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 9 +
target/i386/tcg/emit.c.inc | 2 +-
2 files changed, 2 insertions(+), 9
It is always s->aflag.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 20 ++--
target/i386/tcg/emit.c.inc | 6 +++---
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/target/i386/tcg/translate.c b/target/i386/
which case cc_op would not be overwritten
* anyway the cost is probably dwarfed by that of computing flags.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/ops_sse.h| 8
target/i386/tcg/fpu_helper.c | 2 ++
target/i386/tcg/int_helper.c | 13
syscall and sysret only have one exit, so they do not need to
generate the end-of-translation code inline. It can be
deferred to tb_stop.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 13 +++--
1 file changed, 11 insertions(+), 2
If EFLAGS.RF is 1, special processing in gen_eob_worker() is needed and
therefore goto_tb cannot be used.
Suggested-by: Richard Henderson
Reviewed-by: Richard Henderson
Cc: qemu-sta...@nongnu.org
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 2 +-
1 file changed, 1 insertion
c cleanups
Artyom Kunakovsky (1):
configure: move -mcx16 flag out of CPU_CFLAGS
Paolo Bonzini (23):
target/i386: disable jmp_opt if EFLAGS.RF is 1
target/i386: no single-step exception after MOV or POP SS
target/i386: cleanup eob handling of RSM
t
On Fri, May 24, 2024 at 6:51 PM Richard Henderson
wrote:
> > static void gen_set_hflag(DisasContext *s, uint32_t mask)
> > @@ -2354,7 +2354,7 @@ static void gen_jmp_rel(DisasContext *s, MemOp ot,
> > int diff, int tb_num)
> > tcg_gen_movi_tl(cpu_eip, new_eip);
> > }
> >
The dbus_display1_dep is not really used since all occurrences also
request gio independently. Just list the generated sources and drop
dbus_display1_dep.
Signed-off-by: Paolo Bonzini
---
audio/meson.build | 4 ++--
tests/qtest/meson.build | 2 +-
ui/meson.build | 5 ++---
3
libm is linked into all targets via libqemuutil, no need to specify it
explicitly.
Signed-off-by: Paolo Bonzini
---
block/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/meson.build b/block/meson.build
index e1f03fd773e..8993055c75e 100644
--- a/block
Signed-off-by: Paolo Bonzini
---
block/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/meson.build b/block/meson.build
index 8993055c75e..158dc3b89db 100644
--- a/block/meson.build
+++ b/block/meson.build
@@ -119,7 +119,7 @@ foreach m : [
module_ss
zlib code is only used by the emulators, not by the tests.
Signed-off-by: Paolo Bonzini
---
meson.build | 2 +-
migration/dirtyrate.c | 1 -
migration/qemu-file.c | 1 -
migration/meson.build | 2 +-
4 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/meson.build b
This ensures that for example libffi can be reached even if it is not
in /usr/include.
Signed-off-by: Paolo Bonzini
---
tcg/meson.build | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tcg/meson.build b/tcg/meson.build
index 8251589fd4e..ffbe754d8b3 100644
--- a/tcg
All found while looking at Akihiko's issues with declare_dependency(
objects: ...).
https://patchew.org/QEMU/20240524-objects-v1-0-07cbbe961...@daynix.com/
Paolo Bonzini (5):
meson: remove unnecessary reference to libm
meson: remove unnecessary dependency
tcg: include dependenci
On Tue, Apr 16, 2024 at 11:23 AM Daniel Henrique Barboza
wrote:
> > +int kvm_arch_insert_sw_breakpoint(CPUState *cs, struct kvm_sw_breakpoint
> > *bp,
> > + vaddr len)
> > +{
> > +if (len != 4 && len != 2) {
> > +return -EINVAL;
> > +}
>
> I wonder
Using DISAS_NORETURN does not process any of HF_INHIBIT_IRQ_MASK,
HF_RF_MASK or HF_TF_MASK. Never use it, instead there is
DISAS_EOB_ONLY.
Cc: qemu-sta...@nongnu.org
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 18 --
target/i386/tcg/emit.c.inc | 4 ++--
2
If EFLAGS.RF is 1, special processing in gen_eob_worker() is needed and
therefore goto_tb cannot be used.
Suggested-by: Richard Henderson
Cc: qemu-sta...@nongnu.org
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
On Fri, May 24, 2024 at 5:13 PM Richard Henderson
wrote:
>
> On 5/24/24 08:04, Paolo Bonzini wrote:
> > ... and nope, it's the other way round - DISAS_NORETURN is a bug
> > waiting to happen for x86 translation because it doesn't process any
> > of HF_INHIBIT_
On Fri, May 24, 2024 at 5:02 PM Paolo Bonzini wrote:
>
> On Fri, May 24, 2024 at 4:23 PM Richard Henderson
> wrote:
> >
> > On 5/24/24 01:10, Paolo Bonzini wrote:
> > > Place DISAS_* constants that update cpu_eip first, and
> > > the "jump" on
On Fri, May 24, 2024 at 4:23 PM Richard Henderson
wrote:
>
> On 5/24/24 01:10, Paolo Bonzini wrote:
> > Place DISAS_* constants that update cpu_eip first, and
> > the "jump" ones last. Add comments explaining the differences
> > and usage.
&g
On Fri, May 24, 2024 at 10:00 AM Akihiko Odaki wrote:
>
> Based-on: <20240524-xkb-v4-0-2de564e5c...@daynix.com>
> ("[PATCH v4 0/4] Fix sanitizer errors with clang 18.1.1")
>
> This is changes suggested by Paolo Bonzini at:
> https://lore.kernel.org/all/C
Do not bother generating inline wrappers for gen_repz and gen_repz2;
use s->prefix to separate REPZ from REPNZ in the case of SCAS and
CMPS.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 22 --
target/i386/tcg/emit.c.inc | 22 +-
2 fi
which case the spilling of cc_op would be
there anyway
* even in other cases, the cost is probably dwarfed by that of computing flags.
Signed-off-by: Paolo Bonzini
---
target/i386/ops_sse.h| 8
target/i386/tcg/fpu_helper.c | 2 ++
target/i386/tcg/int_helper.c | 13
Make gen_eob take the DISAS_* constant as an argument, so that
it is not necessary to have wrappers around it.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 60 +
1 file changed, 14 insertions(+), 46 deletions(-)
diff --git a/target/i386/tcg
It is only used in MONITOR, where a direct call of gen_lea_v_seg
is simpler, and in XLAT. Inline it in the latter.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 9 +
target/i386/tcg/emit.c.inc | 2 +-
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a
syscall and sysret only have one exit, so they do not need to
generate the end-of-translation code inline. It can be
deferred to tb_stop.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/target/i386
s non-dirty and gen_eob will not overwrite
the CC_OP_EFLAGS value that is placed there by the helper. But
let's clean it up.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/target/i386/tcg/translate.c b/targe
Values other than OR_TMP0 were only ever used by MOV and MOVNTI
opcodes. Now that these have been converted to the new decoder,
remove the argument.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 33 -
1 file changed, 12 insertions(+), 21
The is_store argument of gen_ldst_modrm has only ever been passed
a constant. Just split the function in two.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 52 +
1 file changed, 29 insertions(+), 23 deletions(-)
diff --git a/target/i386/tcg
Generalize gen_stack_A0() to include an initial add and to use an arbitrary
destination. This is a common pattern and it is not a huge burden to
add the extra arguments to the only caller of gen_stack_A0().
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 51
Use mo_stacksize for all stack accesses, including when
a 64-bit code segment is impossible and the code is
therefore checking only for SS32(s).
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target/i386
sti only has one exit, so it does not need to generate the
end-of-translation code inline. It can be deferred to tb_stop.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 13 -
target/i386/tcg/emit.c.inc | 4 +---
2 files changed, 1 insertion(+), 16 deletions
Place DISAS_* constants that update cpu_eip first, and
the "jump" ones last. Add comments explaining the differences
and usage.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 25 ++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --gi
It is always s->aflag.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 20 ++--
target/i386/tcg/emit.c.inc | 6 +++---
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 18d8c0de
No need to set it again at the end of the translation block, cc_op_dirty
can be set to false.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 37 -
target/i386/tcg/emit.c.inc | 2 +-
2 files changed, 25 insertions(+), 14 deletions(-)
diff
Some cleanups in translate.c, which I could make now that the
it's smaller and it's easier to understand how the various
utility functions are used.
1-7: cleanups for gen_eob
8-14: inlining and removing macros
15-16: cleanups for cc_op vs. helpers
Paolo
Paolo Bonzini (16):
t
This is an invariant, since these cases of tb_stop() should only
be reached through the "instruction decoding completed" path of
i386_tr_translate_insn().
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/targe
This is already handled in gen_eob(). Before adding another DISAS_*
case, remove the double calls.
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 76be7425800
mail.com>
[rewrite commit message, remove from configure. - Paolo]
Signed-off-by: Paolo Bonzini
diff --git a/configure b/configure
index 38ee2577013..4d01a42ba65 100755
--- a/configure
+++ b/configure
@@ -512,10 +512,7 @@ case "$cpu" in
cpu="x86_64"
host_arch=x86_64
601 - 700 of 24539 matches
Mail list logo