Introduce a new configuration option 'host-mem-type=' in the
'-object memory-backend-ram', allowing users to specify
from which type of memory to allocate.
Users can specify 'cxlram' as an argument, and QEMU will then
automatically locate CXL RAM NUMA nodes and use them as the backend memory.
For
On 12/25/23 07:49, Michael Tokarev wrote:
12.12.2023 20:25, Richard Henderson:
In 32-bit mode, pc = eip + cs_base is also 32-bit, and must wrap.
Failure to do so results in incorrect memory exceptions to the guest.
Before 732d548732ed, this was implicitly done via truncation to
target_ulong but
On 12/28/23 23:05, Paolo Bonzini wrote:
In the case where OR or XOR has an 8-bit immediate between 128 and 255, we can
operate on a low-byte register and shorten the output by two or three bytes
(two if a prefix byte is needed for REX.B).
Signed-off-by: Paolo Bonzini
---
tcg/i386/tcg-target.c
On 12/28/23 23:05, Paolo Bonzini wrote:
Extend the existing conditional that generates INC/DEC, to also swap an
ADD for a SUB and vice versa when the immediate is 128. This facilitates
using OPC_ARITH_EvIb instead of OPC_ARITH_EvIz.
Best reviewed with "git diff -b".
Signed-off-by: Paolo Bonzin
Uses QAT to offload deflate compression in the 'qatzip' compression
method for multifd migration.
Signed-off-by: Bryan Zhang
Signed-off-by: Hao Xiang
---
migration/multifd-qatzip.c | 314 +++--
1 file changed, 301 insertions(+), 13 deletions(-)
diff --git a/migr
Adds support for a parameter to specify QATzip compression level. This
is a preparatory commit for a subsequent commit that will actually use
QATzip compression.
Signed-off-by: Bryan Zhang
Signed-off-by: Hao Xiang
---
migration/migration-hmp-cmds.c | 4
migration/options.c| 27
Adds an integration test for 'qatzip'.
Signed-off-by: Bryan Zhang
Signed-off-by: Hao Xiang
---
tests/qtest/meson.build | 4
tests/qtest/migration-test.c | 37
2 files changed, 41 insertions(+)
diff --git a/tests/qtest/meson.build b/tests/qtest/me
Adds support for 'qatzip' as an option for the multifd compression
method parameter, but copy-pastes the no-op logic to leave the actual
methods effectively unimplemented. This is in preparation of a
subsequent commit that will implement actually using QAT for compression
and decompression.
Signed
Add a 'qatzip' feature, which is automatically disabled, and which
depends on the QATzip library if enabled.
Signed-off-by: Bryan Zhang
Signed-off-by: Hao Xiang
---
meson.build | 10 ++
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh | 3 +++
3 fi
On Sun, 31 Dec 2023, Paolo Bonzini wrote:
Do not go through the panning buffer unless the address wraps in the middle
of the line.
Signed-off-by: Paolo Bonzini
---
hw/display/vga-helpers.h | 12
1 file changed, 12 insertions(+)
diff --git a/hw/display/vga-helpers.h b/hw/display/vga
On Sun, 31 Dec 2023, Paolo Bonzini wrote:
This allows setting the start address to a high value, and reading the
bottom of the screen from the beginning of VRAM. Commander Keen 4
("Goodbye, Galaxy!") relies on this behavior.
Signed-off-by: Paolo Bonzini
---
hw/display/vga-helpers.h | 9 +--
On Sun, 31 Dec 2023, Paolo Bonzini wrote:
Signed-off-by: Paolo Bonzini
---
hw/display/vga.c | 14 --
1 file changed, 14 deletions(-)
diff --git a/hw/display/vga.c b/hw/display/vga.c
index 37557c3442a..18d966ecd3e 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -103,12 +103,6
On 8/14/22 17:32, Heinrich Schuchardt wrote:
Provide a descriptions of the options that control the emulation of option
ROMS for PCIe devices.
Signed-off-by: Heinrich Schuchardt
---
v2:
correct description of rombar property
use romfile= to suppress option ROM loading
---
docs
There are several places where failure in setting the device state leads
to a device reset, which is done by setting ERROR as the recover state.
Add a helper function that sets the device state and resets the device
in case of failure. This will make the code cleaner and remove duplicate
comments.
This implements horizontal pel panning, which is used by games such as
the Commander Keen series, and also reimplements word and odd/even modes
so that they work in graphics modes; this mostly fixes Jazz Jackrabbit's
graphics.
There are still some issues with Cirrus VGA, and also Keen expects the
The next patch will reuse latched memory access in text modes. Start with
a patch that moves the latched access code out of the "if".
Best reviewed with "git diff -b".
Signed-off-by: Paolo Bonzini
---
hw/display/vga.c | 211 ---
1 file changed, 110 i
This implements smooth scrolling, as used for example by Commander Keen
and Second Reality.
Unfortunately, this is not enough to avoid tearing in Commander Keen,
because sometimes the wrong start address is used for a frame.
On real EGA, the panning register is sampled on every line, while
the dis
Signed-off-by: Paolo Bonzini
---
hw/display/vga.c | 14 --
1 file changed, 14 deletions(-)
diff --git a/hw/display/vga.c b/hw/display/vga.c
index 37557c3442a..18d966ecd3e 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -103,12 +103,6 @@ const uint8_t gr_mask[16] = {
#define
Jazz Jackrabbit uses odd/even mode with 256-color graphics. This is
probably so that it can do very fast blitting with a decent resolution
(two pixels, compared to four pixels for "regular" mode X).
Accesses still use all planes (reads go to the latches and the game uses
read mode 1 so that the C
The next patches will introduce more parameters that cause a full
refresh. Instead of adding arguments to get_offsets and lines to
update_basic_params, do everything through a struct.
Signed-off-by: Paolo Bonzini
---
hw/display/cirrus_vga.c | 24 +---
hw/display/vga.c| 82 ++
Do not go through the panning buffer unless the address wraps in the middle
of the line.
Signed-off-by: Paolo Bonzini
---
hw/display/vga-helpers.h | 12
1 file changed, 12 insertions(+)
diff --git a/hw/display/vga-helpers.h b/hw/display/vga-helpers.h
index 29933562c45..60ddb27d946
Jazz Jackrabbit has a very unusual VGA setup, where it uses odd/even mode
with 256-color graphics. Probably, it wants to use fast VRAM-to-VRAM
copies without having to store 4 copies of the sprites as needed in mode
X, one for each mod-4 alignment; odd/even mode simplifies the code a
lot if it's o
This allows setting the start address to a high value, and reading the
bottom of the screen from the beginning of VRAM. Commander Keen 4
("Goodbye, Galaxy!") relies on this behavior.
Signed-off-by: Paolo Bonzini
---
hw/display/vga-helpers.h | 9 +
hw/display/vga.c | 3 +++
2 fil
Hi,
This series contains misc cleanups and fixes in migration code that I
noticed while going over the code.
Thanks.
Avihai Horon (11):
migration: Remove migrate_max_downtime() declaration
migration: Remove nulling of hostname in migrate_init()
migration: Refactor migration_incoming_setup(
Commit 6720c2b32725 ("migration: check magic value for deciding the
mapping of channels") extracted the only code that could fail in
migration_incoming_setup().
Now migration_incoming_setup() can't fail, so refactor it to return void
and remove errp parameter.
Signed-off-by: Avihai Horon
---
mi
migrate_max_downtime() has been removed long ago, but its declaration
was mistakenly left. Remove it.
Signed-off-by: Avihai Horon
---
migration/migration.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/migration/migration.h b/migration/migration.h
index cf2c9c88e0..b3c9288c38 100644
--- a
migration_channel_read_peek() calls qio_channel_readv_full() and handles
both cases of return value == 0 and return value < 0 the same way, by
calling error_setg() with errp. However, if return value < 0, errp is
already set, so calling error_setg() with errp will lead to an assert.
Fix it by hand
MigrationState->hostname is set to NULL in migrate_init(). This is
redundant because it is already freed and set to NULL in
migrade_fd_cleanup(). Remove it.
Signed-off-by: Avihai Horon
---
migration/migration.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/migration/migration.c b/migration/
If there is an error in multifd TLS handshake task,
multifd_tls_outgoing_handshake() retrieves the error with
qio_task_propagate_error() but never frees it.
Fix it by freeing the obtained Error.
In addition, the error is not reported at all, so report it with
migrate_set_error().
Fixes: 29647140
In multifd_recv_initial_packet(), if MultiFDInit_t->id is greater than
the configured number of multifd channels, an irrelevant error message
about multifd version is printed.
Change the error message to a relevant one about the channel id.
Signed-off-by: Avihai Horon
---
migration/multifd.c |
According to Error API, usage of ERRP_GUARD() or a local Error instead
of errp is needed if errp is passed to void functions, where it is later
dereferenced to see if an error occurred.
There are several places in multifd.c that use local Error although it
is not needed. Change these places to use
If multifd_load_setup() fails in migration_ioc_process_incoming(),
error_setg() is called with errp. This will lead to an assert because in
that case errp already contains an error.
Fix it by removing the redundant error_setg().
Fixes: 6720c2b32725 ("migration: check magic value for deciding the
Errp parameter in migration_fd_process_incoming() is unused.
Remove it.
Signed-off-by: Avihai Horon
---
migration/migration.h | 2 +-
migration/migration.c | 2 +-
migration/rdma.c | 6 +-
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/migration/migration.h b/migration/m
According to Error API, usage of ERRP_GUARD() or a local Error instead
of errp is needed if errp is passed to void functions, where it is later
dereferenced to see if an error occurred.
There are several places in migration.c that use local Error although it
is not needed. Change these places to u
The else branch in multifd_channel_connect() is redundant because when
the if branch is taken the function returns.
Simplify the code by removing the else branch.
Signed-off-by: Avihai Horon
---
migration/multifd.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Paolo Bonzini
---
meson.build | 107 +++-
1 file changed, 56 insertions(+), 51 deletions(-)
diff --git a/meson.build b/meson.build
index c437e9f55e6..3a1f4cbb90f 100644
--- a/meson.build
+++ b/mes
The main difficulty here is that a page fault when writing to the destination
must not overwrite the flags. Therefore, the flags computation must be
inlined instead of using gen_jcc1*.
For simplicity, I am using an unconditional cmpxchg operation, that becomes
a NOP if the comparison fails.
Revi
CONFIG_DARWIN, CONFIG_LINUX and CONFIG_BSD are used in some rules, but
only CONFIG_LINUX has substantial use. Convert them all to if...endif.
Signed-off-by: Paolo Bonzini
---
accel/tcg/meson.build | 4 +++-
backends/meson.build | 4 +++-
block/meson.build | 4 +++-
fsdev/meson.build
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Paolo Bonzini
---
meson.build | 66 ++---
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/meson.build b/meson.build
index 151db21c038..21335055ef8 100644
--- a/meson.build
+++ b/mes
Check options before compiler flags, because some compiler flags are
incompatible with modules.
Signed-off-by: Paolo Bonzini
---
meson.build | 137 ++--
1 file changed, 68 insertions(+), 69 deletions(-)
diff --git a/meson.build b/meson.build
index
Signed-off-by: Paolo Bonzini
---
meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 21335055ef8..7344e363826 100644
--- a/meson.build
+++ b/meson.build
@@ -1828,12 +1828,12 @@ if not get_option('smartcard').auto() or have_system
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Paolo Bonzini
---
meson.build | 24 ++--
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/meson.build b/meson.build
index 6c77d9687de..c437e9f55e6 100644
--- a/meson.build
+++ b/meson.build
@@ -9,6 +9,10 @@ add_
ALU instructions can write to both memory and flags. If the CC_SRC*
and CC_DST locations have been written already when a memory access
causes a fault, the value in CC_SRC* and CC_DST might be interpreted
with the wrong CC_OP (the one that is in effect before the instruction.
Besides just using t
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Paolo Bonzini
---
tests/bench/meson.build | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/bench/meson.build b/tests/bench/meson.build
index 3c799dbd983..7e76338a52d 100644
--- a/tests/bench/meson.build
+++ b/tests
CONFIG_ALL is tricky to use and was ported over to Meson from the
recursive processing of Makefile variables. Meson sourcesets
however have all_sources() and all_dependencies() methods that
remove the need for it.
Signed-off-by: Paolo Bonzini
---
docs/devel/build-system.rst | 15 ---
Similar to gen_setcc1, make gen_cmovcc1 receive TCGv. This is more friendly
to simultaneous implementation in the old and the new decoder.
A small wart is that s->T0 of CMOV is currently the *second* argument (which
would ordinarily be in T1). Therefore, the condition has to be inverted in
order
config_all now lists only accelerators, rename it to indicate its actual
content.
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Paolo Bonzini
---
hw/mips/meson.build | 2 +-
meson.build | 16
target/arm/meson.build | 2 +-
target/mips/meson.build | 2 +-
And move away dependencies that are not subprojects anymore.
Signed-off-by: Paolo Bonzini
---
meson.build | 72 ++---
1 file changed, 36 insertions(+), 36 deletions(-)
diff --git a/meson.build b/meson.build
index 1867e0428b1..efb36c762e9 100644
--
Signed-off-by: Paolo Bonzini
---
meson.build | 27 ++-
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/meson.build b/meson.build
index 5c54441a3cd..151db21c038 100644
--- a/meson.build
+++ b/meson.build
@@ -40,7 +40,6 @@ qemu_moddir = get_option('libdir') /
cpu_cc_compute_all() has an argument that is always equal to CC_OP for
historical
reasons (dating back to commit a7812ae4123, "TCG variable type checking.",
2008-11-17,
which added the argument to helper_cc_compute_all). It does not make sense for
the
argument to have any other value, so remove
Signed-off-by: Paolo Bonzini
---
Makefile | 1 +
configure | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 676a4a54f48..8f369903356 100644
--- a/Makefile
+++ b/Makefile
@@ -202,6 +202,7 @@ clean: recurse-clean
! -path ./roms/edk2/Ar
Keep it together with the other compiler modes, and before dependencies.
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Paolo Bonzini
---
meson.build | 80 ++---
1 file changed, 40 insertions(+), 40 deletions(-)
diff --git a/meson.build b/mes
From: Alex Bennée
To enable accelerated VirtIO GPUs for the guest we need the rendering
support on the host, which currently it's reported in the configuration
summary under the "dependencies" section. Add a graphics backend section
and report the status of the VirGL and Rutabaga support librarie
The sgx_epc_get_section stub is reachable from cpu_x86_cpuid. It
should not assert, instead it should just return true just like
the "real" sgx_epc_get_section does when SGX is disabled.
Reported-by: Vladimír Beneš
Cc: qemu-sta...@nongnu.org
Signed-off-by: Paolo Bonzini
Message-ID: <20220201190
Remove assignments that match the default, and group the
targets for debian-legacy-test-cross and debian-all-test-cross
into a single arm.
Signed-off-by: Paolo Bonzini
---
configure | 87 ++-
1 file changed, 28 insertions(+), 59 deletions(-)
d
For consistency with other OSes, use if...endif for rules that are
target-independent.
Signed-off-by: Paolo Bonzini
---
backends/meson.build | 6 --
block/meson.build| 7 +--
chardev/meson.build | 26 ++
hw/usb/meson.build | 4 +++-
meson.build
Do not use a subshell to hide the shadowing of $config_host_mak.
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Paolo Bonzini
---
configure | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/configure b/configure
index 9885cfed792..ed2d220040d 100755
--- a/configure
Commit c2118e9e1ab ("configure: don't try a "native" cross for linux-user",
2023-11-23) sought to avoid issues with using the native compiler with a
cross-endian or cross-bitness setup. However, in doing so it ended up
requiring a cross compiler setup (and most likely a slow compiler setup)
even w
Just create a temporary for the occasion.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index b79c312465b..afe0fa6c65f 1006
From: Alexandra Diupina
Add a 'current_lun' check for a null value
to avoid null pointer dereferencing and
recover host if NULL return
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 4eb8606560 (esp: store lun coming from the MESSAGE OUT phase)
Signed-off-by: Alexandra
While a simple lexicographic comparison usually works, it is less
robust than a more specific algorithm designed to compare versions.
Signed-off-by: Paolo Bonzini
---
qga/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qga/meson.build b/qga/meson.build
index ff7a8
OF is equal to the carry flag, so use the same CCPrepare.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 8fb80011a22..a16eb8d4008 1
config_targetos is now empty and can be removed; its use in sourcesets
that do not involve target-specific files can be replaced with an empty
dictionary.
In fact, at this point *all* sourcesets that do not involve
target-specific files are just glorified mutable arrays. Enforce that
they never t
This variable is about the host OS, not the target. It is used a lot
more since the Meson conversion, but the original sin dates back to 2003.
Time to fix it.
Signed-off-by: Paolo Bonzini
---
accel/tcg/meson.build| 2 +-
backends/meson.build | 4 +-
block/mes
Since the option is of boolean type, the default value should be a boolean
rather than a string.
Signed-off-by: Paolo Bonzini
---
meson_options.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson_options.txt b/meson_options.txt
index c9baeda6395..0a99a059ec8 100644
---
decode->mem is only used if one operand has has_ea == true. String
operations will not use decode->mem and will load A0 on their own, because
they are the only case of two memory operands in a single instruction.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/d
Create a new temporary, to ease the register allocator's work.
Creation of the temporary is pushed into gen_ext_tl, which
also allows NULL as the first parameter now.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 9 ++---
1 file changed, 6 in
Signed-off-by: Paolo Bonzini
---
meson.build | 175 +++-
1 file changed, 91 insertions(+), 84 deletions(-)
diff --git a/meson.build b/meson.build
index 2c6f09352c9..1867e0428b1 100644
--- a/meson.build
+++ b/meson.build
@@ -602,7 +602,10 @@ if spar
is_int is always 1, and error_code is always zero.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/excp_helper.c | 7 +++
target/i386/tcg/helper-tcg.h | 3 +--
target/i386/tcg/misc_helper.c | 2 +-
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git
The new decoder would rather have the operand in T0 when expanding SCAS, rather
than use R_EAX directly as gen_scas currently does. This makes SCAS more
similar
to CMP and SUB, in that CC_DST = T0 - T1.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.
gen_jcc() has been changed to accept a relative offset since the
new decoder was written. Adjust the J operand, which is meant
to be used with jump instructions such as gen_jcc(), to not
include the program counter and to not truncate the result, as
both operations are now performed by common code
Usually the registers are just moved into s->T0 without much care for
their operand size. However, in some cases we can get more efficient
code if the operand fetching logic syncs with the emission function
on what is nicer.
All the current uses are mostly demonstrative and only reduce the code
i
Do not use gen_op, and pull the load from the accumulator into
disas_insn.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/translate.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/trans
Take advantage of the fact that there can be no 1 bits between SF and OF.
If they were adjacent, you could sum SF and get a carry only if SF was
already set. Then the value of OF in the sum is the XOR of OF itself,
the carry (which is SF) and 0 (the value of the OF bit in the addend):
this is OF^S
X86_SPECIAL_ZExtOp0 and X86_SPECIAL_ZExtOp2 are poorly named; they are a hack
that is needed by scalar insertion and extraction instructions, and not really
related to zero extension: for PEXTR the zero extension is done by the
generation
functions, for PINSR the high bits are not used at all and
The new x86 decoder wants the gen_* functions to compute EFLAGS before
writeback, which can be an issue for instructions with a memory
destination such as ARPL or shifts.
Extract code to compute the EFLAGS without clobbering CC_SRC, in case
the memory write causes a fault. The flags writeback mec
The new decoder likes to compute the address in A0 very early, so the
gen_lea_v_seg in gen_pop_T0 would clobber the address of the memory
operand. Instead use T0 since it is already available and will be
overwritten immediately after.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
The following changes since commit 191710c221f65b1542f6ea7fa4d30dde6e134fd7:
Merge tag 'pull-request-2023-12-20' of https://gitlab.com/thuth/qemu into
staging (2023-12-20 09:40:16 -0500)
are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
for you t
Use _tl operations for 32-bit operands on 32-bit targets, and only go
through trunc and extu ops for 64-bit targets. While the trunc/ext
ops should be pretty much free after optimization, the optimizer also
does not like having the same temporary used in multiple EBBs.
Therefore it is nicer to not
The previous check erroneously allowed CMP to be modified with LOCK.
Instead, tag explicitly the instructions that do support LOCK.
Acked-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/decode-new.c.inc | 17 ++---
target/i386/tcg/decode-new.h | 3 +++
ta
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/decode-new.c.inc | 12
1 file changed, 12 insertions(+)
diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
index 2bdbb1bba0f..232c6a45c96 100644
--- a/target/i386/tcg/decod
gen_lea_v_seg (called by gen_add_A0_ds_seg) already zeroes any
bits of s->A0 beyond s->aflag. It does so before summing the
segment base and, if not in 64-bit mode, also after summing it.
Reviewed-by: Richard Henderson
Signed-off-by: Paolo Bonzini
---
target/i386/tcg/emit.c.inc | 4 +---
targ
82 matches
Mail list logo