Re: [PATCH v1 15/40] i386/tdx: Add property sept-ve-disable for tdx-guest object

2022-08-25 Thread Xiaoyao Li
On 8/25/2022 7:36 PM, Gerd Hoffmann wrote: On Tue, Aug 02, 2022 at 03:47:25PM +0800, Xiaoyao Li wrote: Bit 28, named SEPT_VE_DISABLE, disables EPT violation conversion to #VE on guest TD access of PENDING pages when set to 1. Some guest OS (e.g., Linux TD guest) may require this bit set as 1. Ot

[PATCH v6 03/10] parallels: Fix data_end after out-of-image check

2022-08-25 Thread Alexander Ivanov
Set data_end to the end of the last cluster inside the image. In such a way we can be shure that corrupted offsets in the BAT can't affect on the image size. Signed-off-by: Alexander Ivanov --- block/parallels.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/parallels.c b/block/para

[PATCH v6 04/10] parallels: create parallels_set_bat_entry_helper() to assign BAT value

2022-08-25 Thread Alexander Ivanov
This helper will be reused in next patches during parallels_co_check rework to simplify its code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff

[PATCH v6 10/10] parallels: Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD

2022-08-25 Thread Alexander Ivanov
Replace the way we use mutex in parallels_co_check() for simplier and less error prone code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/block/parallels.

Re: EBUSY when using NVMe Block Driver with multiple devices in the same IOMMU group

2022-08-25 Thread Chaitanya Kulkarni
> First, multiple QEMU instances cannot access nvme:// devices sharing the > same IOMMU group. I don't think this will ever be possible because it > opens a backdoor around process memory isolation. > > However, a single QEMU (or qemu-storage-daemon) instance should be able > to access multiple n

[PATCH 1/7] configure: Remove unused python_version variable

2022-08-25 Thread Peter Maydell
Shellcheck correctly reports that we set python_version and never use it. This is a leftover from commit f9332757898a7: we used to use python_version purely to as part of the summary information printed at the end of a configure run, and that commit changed to printing the information from meson (

[PATCH 6/7] configure: Check mkdir result directly, not via $?

2022-08-25 Thread Peter Maydell
Shellcheck warns that we have one place where we run a command and then check if it failed using $?; this is better written to simply check the command in the 'if' statement directly. Signed-off-by: Peter Maydell --- configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH 0/7] configure: fix misc shellcheck warnings

2022-08-25 Thread Peter Maydell
Currently if you run shellcheck on our configure script it generates a ton of warnings. This patchset fixes some of the easier ones. I wasn't aiming for completeness or consistency; I just wanted to zap some of the ones where the fix is clear and didn't take long to write and is hopefully easy to r

[PATCH 4/7] configure: Add './' on front of glob of */config-devices.mak.d

2022-08-25 Thread Peter Maydell
Shellcheck warns that in rm -f */config-devices.mak.d the glob might expand to something with a '-' in it, which would then be misinterpreted as an option to rm. Fix this by adding './'. Signed-off-by: Peter Maydell --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 7/7] configure: Avoid use of 'local' as it is non-POSIX

2022-08-25 Thread Peter Maydell
We use the non-POSIX 'local' keyword in just two places in configure; rewrite to avoid it. In do_compiler(), just drop the 'local' keyword. The variable 'compiler' is only used elsewhere in the do_compiler_werror() function, which already uses the variable as a normal non-local one. In probe_tar

[PATCH 2/7] configure: Remove unused meson_args variable

2022-08-25 Thread Peter Maydell
The meson_args variable was added in commit 3b4da13293482134b, but was not used in that commit and isn't used today. Delete the unnecessary assignment. Signed-off-by: Peter Maydell --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index efe28050234..b1acaca6

[PATCH 3/7] configure: Add missing quoting for some easy cases

2022-08-25 Thread Peter Maydell
This commit adds quotes in some places which: * are spotted by shellcheck * are obviously incorrect * are easy to fix just by adding the quotes It doesn't attempt fix all of the places shellcheck finds errors, or even all the ones which are easy to fix. It's just a random sampling which is hope

[PATCH 5/7] configure: Remove use of backtick `...` syntax

2022-08-25 Thread Peter Maydell
There's only one place in configure where we use `...` to execute a command and capture the result. Switch to $() to match the rest of the script. This silences a shellcheck warning. Signed-off-by: Peter Maydell --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c

Re: [PULL for-7.1 0/1] aspeed queue

2022-08-25 Thread Richard Henderson
/legoater/qemu/ tags/pull-aspeed-20220825 for you to fetch changes up to 7ccff968f65cfad573bc0015cb0ab800d4337a6e: hw/i2c/aspeed: Fix old reg slave receive (2022-08-25 10:46:42 +0200) Aspeed queue: * hw/i2c/aspeed: Fix old reg

Re: [PATCH v1 06/40] i386/tdx: Get tdx_capabilities via KVM_TDX_CAPABILITIES

2022-08-25 Thread Xiaoyao Li
On 8/25/2022 6:12 PM, Gerd Hoffmann wrote: Hi, +r = tdx_platform_ioctl(KVM_TDX_CAPABILITIES, 0, caps); +if (r == -E2BIG) { +g_free(caps); +nr_cpuid_configs *= 2; +if (nr_cpuid_configs > KVM_MAX_CPUID_ENTRIES) { +error_report

Re: [PATCH 04/17] target/i386: add ALU load/writeback core

2022-08-25 Thread Richard Henderson
On 8/24/22 23:48, Paolo Bonzini wrote: On 8/25/22 02:23, Richard Henderson wrote: +    op->v = v; +} Surely this assignment... +static void gen_writeback(DisasContext *s, X86DecodedOp *op) +{ ... +    case X86_ALU_GPR: +    gen_op_mov_reg_v(s, op->ot, op->n, s->T0); ... can be used h

Re: [PATCH] tests/tcg: i386: extend BMI test

2022-08-25 Thread Richard Henderson
On 8/25/22 05:34, Paolo Bonzini wrote: Cover all BMI1 and BMI2 instructions, both 32- and 64-bit. Due to the use of inlines, the test now has to be compiled with -O2. Signed-off-by: Paolo Bonzini --- tests/tcg/i386/Makefile.target | 1 + tests/tcg/i386/test-i386-bmi2.c | 169

Re: [PATCH] tests/tcg: x86_64: improve consistency with i386

2022-08-25 Thread Richard Henderson
On 8/25/22 05:34, Paolo Bonzini wrote: Include test-i386-bmi2, and specify manually the tests (only one for now) that need -cpu max. Signed-off-by: Paolo Bonzini --- tests/tcg/i386/Makefile.target | 2 +- tests/tcg/x86_64/Makefile.target | 4 +++- 2 files changed, 4 insertions(+), 2 delet

[PATCH] target/i386: fix PHSUB* instructions with dest=src

2022-08-25 Thread Paolo Bonzini
The computation must not overwrite neither the destination nor the source before the last element has been computed. Signed-off-by: Paolo Bonzini --- target/i386/ops_sse.h | 49 +-- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/target/i38

Re: [PATCH] target/i386: fix PHSUB* instructions with dest=src

2022-08-25 Thread Richard Henderson
On 8/25/22 08:48, Paolo Bonzini wrote: The computation must not overwrite neither the destination nor the source before the last element has been computed. Too many negatives. Clearer to use use either/or. Reviewed-by: Richard Henderson r~

[PATCH v2 1/1] virtio-gpu: CONTEXT_INIT feature

2022-08-25 Thread Antonio Caggiano
Create virgl renderer context with flags using context_id when valid. v2: - The feature can be enabled via the context_init config option. - A warning message will be emitted and the feature will not be used when linking with virglrenderer versions without context_init support. Signed-off-by: A

[PATCH v2 0/1] virtio-gpu: CONTEXT_INIT feature

2022-08-25 Thread Antonio Caggiano
This is a different attempt at upstreaming the work I have been doing to enable support for the Venus Virtio-GPU Vulkan driver. I believe the previous one [0] was a bit too much stuff in one place, therefore with this I would like to try a more fine-grained approach. I will just start by the CONT

[PATCH] fw_cfg: Don't set callback_opaque NULL in fw_cfg_modify_bytes_read()

2022-08-25 Thread Shameer Kolothum via
Hi On arm/virt platform, Chen Xiang reported a Guest crash while attempting the below steps, 1. Launch the Guest with nvdimm=on 2. Hot-add a NVDIMM dev 3. Reboot 4. Guest boots fine. 5. Reboot again. 6. Guest boot fails. QEMU_EFI reports the below error: ProcessCmdAddPointer: invalid pointer val

Re: [RFC PATCH] tests/vm: Remove obsolete Fedora VM test

2022-08-25 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 24/8/22 19:29, Alex Bennée wrote: >> Thomas Huth writes: >> >>> It's still based on Fedora 30 - which is not supported anymore by QEMU >>> since years. Seems like nobody is using (and refreshing) this, and it's >>> easier to test this via a container anyway

Re: [PATCH 43/51] tests/qtest: npcm7xx_emc-test: Skip running test_{tx, rx} on win32

2022-08-25 Thread Hao Wu
On Wed, Aug 24, 2022 at 3:35 AM Bin Meng wrote: > From: Bin Meng > > The test cases 'test_{tx,rx}' call socketpair() which does not exist > on win32. Exclude them. > > Signed-off-by: Bin Meng > Reviewed-by: Hao Wu > --- > > tests/qtest/npcm7xx_emc-test.c | 8 > 1 file changed, 8 ins

[PATCH] i386: DPPS rounding fix

2022-08-25 Thread Paolo Bonzini
The DPPS (Dot Product) instruction is defined to first sum pairs of intermediate results, then sum those values to get the final result. i.e. (A+B)+(C+D) We incrementally sum the results, i.e. ((A+B)+C)+D, which can result in incorrect rouding. For consistency, also change the variable names to t

[PATCH] i386: DPPS rounding fix

2022-08-25 Thread Paolo Bonzini
The DPPS (Dot Product) instruction is defined to first sum pairs of intermediate results, then sum those values to get the final result. i.e. (A+B)+(C+D) We incrementally sum the results, i.e. ((A+B)+C)+D, which can result in incorrect rouding. For consistency, also change the variable names to t

[PATCH] chardev: fix segfault in finalize

2022-08-25 Thread Maksim Davydov
If finalize chardev-msmouse or chardev-wctable is called immediately after init it cases QEMU to crash with segfault. This happens because of QTAILQ_REMOVE in qemu_input_handler_unregister tries to dereference NULL pointer. For instance, this error can be reproduced via `qom-list-properties` comman

Re: [PATCH] i386: DPPS rounding fix

2022-08-25 Thread Richard Henderson
On 8/25/22 09:48, Paolo Bonzini wrote: The DPPS (Dot Product) instruction is defined to first sum pairs of intermediate results, then sum those values to get the final result. i.e. (A+B)+(C+D) We incrementally sum the results, i.e. ((A+B)+C)+D, which can result in incorrect rouding. For consist

Re: [RFC PATCH] tests/vm: Remove obsolete Fedora VM test

2022-08-25 Thread Thomas Huth
On 25/08/2022 16.02, Philippe Mathieu-Daudé wrote: On 24/8/22 19:29, Alex Bennée wrote: Thomas Huth writes: It's still based on Fedora 30 - which is not supported anymore by QEMU since years. Seems like nobody is using (and refreshing) this, and it's easier to test this via a container anywa

[PATCH v3 1/6] vdpa: Make VhostVDPAState cvq_cmd_in_buffer control ack type

2022-08-25 Thread Eugenio Pérez
This allows to simplify the code. Rename to status while we're at it. Signed-off-by: Eugenio Pérez --- v3: Rename it to status. --- net/vhost-vdpa.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 6ce68fcd3f.

[PATCH v3 6/6] vdpa: Allow MQ feature in SVQ

2022-08-25 Thread Eugenio Pérez
Finally enable SVQ with MQ feature. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index c6cbe2fb5c..4bc3fd01a8 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -94,6 +94,7 @@ static const uint64_t

[PATCH v3 4/6] vdpa: validate MQ CVQ commands

2022-08-25 Thread Eugenio Pérez
So we are sure we can update the device model properly before sending to the device. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 9 + 1 file changed, 9 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 3950e4f25d..c6cbe2fb5c 100644 --- a/net/vhost-vdpa.c +++ b

[PATCH v3 3/6] vdpa: Add vhost_vdpa_net_load_mq

2022-08-25 Thread Eugenio Pérez
Same way as with the MAC, restore the expected number of queues at device's start. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index e799e744cd..3950e4f25d 100644 --- a/net/v

[PATCH v3 0/6] Vhost-vdpa Shadow Virtqueue multiqueue support.

2022-08-25 Thread Eugenio Pérez
This series enables shadowed CVQ to intercept multiqueue commands through shadowed CVQ, update the virtio NIC device model so qemu send it in a migration, and the restore of that MQ state in the destination. It needs to be applied on top of [1]. [1] https://lists.gnu.org/archive/html/qemu-devel/2

[PATCH v3 5/6] virtio-net: Update virtio-net curr_queue_pairs in vdpa backends

2022-08-25 Thread Eugenio Pérez
It was returned as error before. Instead of it, simply update the corresponding field so qemu can send it in the migration data. Signed-off-by: Eugenio Pérez --- hw/net/virtio-net.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/ne

[PATCH v3 2/6] vdpa: extract vhost_vdpa_net_load_mac from vhost_vdpa_net_load

2022-08-25 Thread Eugenio Pérez
Since there may be many commands we need to issue to load the NIC state, let's split them in individual functions Signed-off-by: Eugenio Pérez -- v2: Add vhost_vdpa_net_load_cmd helper v3: Move ctrl header definition to vhost_vdpa_net_load_cmd --- net/vhost-vdpa.c | 62 ++

[PATCH] gitlab-ci: Only use one process in Windows jobs for compilation

2022-08-25 Thread Thomas Huth
The Windows jobs are currently aborting at weird places - and there's the suspicion that it's due to memory constraints in the Windows containers. Let's switch to single-threaded compilation to decrease the pressure on the memory load, and to make the jobs more deterministic for further investigati

libvfio-user test-client-server test hanging in the CI

2022-08-25 Thread Thomas Huth
Hi Elena, Jagannathan & John! I noticed that the libvfio-user test-client-server test is recently hanging in the check-system-centos jobs in QEMU's gitlab-CI. Normally the test finishes within 20 minutes, see e.g. here: https://gitlab.com/qemu-project/qemu/-/jobs/2928561403 (notice that

Re: libvfio-user test-client-server test hanging in the CI

2022-08-25 Thread Jag Raman
On Aug 25, 2022, at 3:54 PM, Thomas Huth mailto:th...@redhat.com>> wrote: Hi Elena, Jagannathan & John! I noticed that the libvfio-user test-client-server test is recently hanging in the check-system-centos jobs in QEMU's gitlab-CI. Normally the test finishes within 20 minutes, see e.g. her

[PATCH v3 0/2] hw/nvme: add irqfd support

2022-08-25 Thread Klaus Jensen
From: Klaus Jensen This is a re-spin of Jinhao's irqfd support series that fixes msix vector masking/unmasking to work correctly. I kept being bugged out about that msi route not getting updated, so I hit the code into submission with a hammer. I finally noticed the core issue: 1. The vector

[PATCH v3 1/2] hw/nvme: support irq(de)assertion with eventfd

2022-08-25 Thread Klaus Jensen
From: Jinhao Fan When the new option 'irq-eventfd' is turned on, the IO emulation code signals an eventfd when it want to (de)assert an irq. The main loop eventfd handler does the actual irq (de)assertion. This paves the way for iothread support since QEMU's interrupt emulation is not thread saf

[PATCH v3 2/2] hw/nvme: use KVM irqfd when available

2022-08-25 Thread Klaus Jensen
From: Jinhao Fan Use KVM's irqfd to send interrupts when possible. This approach is thread safe. Moreover, it does not have the inter-thread communication overhead of plain event notifiers since handler callback are called in the same system call as irqfd write. Signed-off-by: Jinhao Fan Signed

Re: [PULL for-7.1 0/1] aspeed queue

2022-08-25 Thread Cédric Le Goater
. Thanks, C. r~ are available in the Git repository at:    https://github.com/legoater/qemu/ tags/pull-aspeed-20220825 for you to fetch changes up to 7ccff968f65cfad573bc0015cb0ab800d4337a6e:    hw/i2c/aspeed: Fix old reg slave receive (2022-08-25 10:46:42 +0200

[PATCH 02/18] i386: Rework sse_op_table6/7

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Add a flags field each row in sse_op_table6 and sse_op_table7. Initially this is only used as a replacement for the magic SSE41_SPECIAL pointer. The other flags will become relevant as the rest of the avx implementation is built out. Signed-off-by: Paul Brook Message-Id: <202

[PATCH 01/18] i386: Rework sse_op_table1

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Add a flags field each row in sse_op_table1. Initially this is only used as a replacement for the magic SSE_SPECIAL and SSE_DUMMY pointers, the other flags will become relevant as the rest of the AVX implementation is built out. Signed-off-by: Paul Brook Message-Id: <202204242

[PATCH 00/18] target/i386: make most SSE helpers generic in the vector size

2022-08-25 Thread Paolo Bonzini
This is the first half of Paul's series from last April, reorganized to have no occurrence of YMM_ONLY or SHIFT == 2---meaning it can be committed without much fuss, even without a plan for the implementation of AVX decoding. In most cases this is done by using loops that apply the same code for a

[PATCH 10/18] i386: Add size suffix to vector FP helpers

2022-08-25 Thread Paolo Bonzini
From: Paul Brook For AVX we're going to need both 128 bit (xmm) and 256 bit (ymm) variants of floating point helpers. Add the register type suffix to the existing *PS and *PD helpers (SS and SD variants are only valid on 128 bit vectors) No functional changes. Signed-off-by: Paul Brook Message

[PATCH 07/18] i386: Rewrite simple integer vector helpers

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Rewrite the "simple" vector integer helpers in preperation for AVX support. While the current code is able to use the same prototype for unary (a = F(b)) and binary (a = F(b, c)) operations, future changes will cause them to diverge. No functional changes to existing helpers S

[PATCH 08/18] i386: Misc integer AVX helper prep

2022-08-25 Thread Paolo Bonzini
From: Paul Brook More perparatory work for AVX support in various integer vector helpers No functional changes to existing helpers. Signed-off-by: Paul Brook Message-Id: <20220424220204.2493824-13-p...@nowt.org> Signed-off-by: Paolo Bonzini --- target/i386/ops_sse.h | 164 +++

[PATCH 04/18] i386: Move 3DNOW decoder

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Handle 3DNOW instructions early to avoid complicating the AVX logic. Signed-off-by: Paul Brook Message-Id: <20220424220204.2493824-25-p...@nowt.org> Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 30 +- 1 file changed, 17 insertions

[PATCH 14/18] i386: Destructive FP helpers for AVX

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Perpare the horizontal atithmetic vector helpers for AVX These currently use a dummy Reg typed variable to store the result then assign the whole register. This will cause 128 bit operations to corrupt the upper half of the register, so replace it with explicit temporaries and e

[PATCH 11/18] i386: Floating point arithmetic helper AVX prep

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Prepare the "easy" floating point vector helpers for AVX No functional changes to existing helpers. Signed-off-by: Paul Brook Message-Id: <20220424220204.2493824-16-p...@nowt.org> Signed-off-by: Paolo Bonzini --- target/i386/ops_sse.h | 138 --

[PATCH 03/18] i386: Add CHECK_NO_VEX

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Reject invalid VEX encodings on MMX instructions. Signed-off-by: Paul Brook Reviewed-by: Richard Henderson Message-Id: <20220424220204.2493824-7-p...@nowt.org> Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 26 ++ 1 file changed, 26 in

[PATCH 17/18] i386: AVX pclmulqdq prep

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Make the pclmulqdq helper AVX ready Signed-off-by: Paul Brook Message-Id: <20220424220204.2493824-21-p...@nowt.org> Signed-off-by: Paolo Bonzini --- target/i386/ops_sse.h | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/target

[PATCH 13/18] i386: Dot product AVX helper prep

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Make the dpps and dppd helpers AVX-ready I can't see any obvious reason why dppd shouldn't work on 256 bit ymm registers, but both AMD and Intel agree that it's xmm only. Signed-off-by: Paul Brook Message-Id: <20220424220204.2493824-17-p...@nowt.org> Signed-off-by: Paolo Bonzi

[PATCH 06/18] i386: Rewrite vector shift helper

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Rewrite the vector shift helpers in preperation for AVX support (3 operand form and 256 bit vectors). For now keep the existing two operand interface. No functional changes to existing helpers. Signed-off-by: Paul Brook Message-Id: <20220424220204.2493824-11-p...@nowt.org> Si

[PATCH 00/20] Cross compilation changes for 7.2

2022-08-25 Thread Paolo Bonzini
This is a bunch of related changes leading up to building ROMs with container-based cross compilers: - detect pc-bios/ CC options just once instead of using make's $(shell) function - move CC option detection to tests/tcg Makefiles from QEMU's root configure - put all configuration of tests/

[PATCH 03/20] pc-bios/s390-ccw: detect CC options just once

2022-08-25 Thread Paolo Bonzini
In preparation for adding Docker container support, detect compiler options just once rather than once per Make run; container startup overhead is substantial and doing the detection just once makes things faster. Signed-off-by: Paolo Bonzini --- pc-bios/s390-ccw/Makefile| 33 +++

[PATCH 16/18] i386: Rewrite blendv helpers

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Rewrite the blendv helpers so that they can easily be extended to support the AVX encodings, which make all 4 arguments explicit. No functional changes to the existing helpers Signed-off-by: Paul Brook Message-Id: <20220424220204.2493824-20-p...@nowt.org> Signed-off-by: Paolo

[PATCH 05/18] i386: Add ZMM_OFFSET macro

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Add a convenience macro to get the address of an xmm_regs element within CPUX86State. This was originally going to be the basis of an implementation that broke operations into 128 bit chunks. I scrapped that idea, so this is now a purely cosmetic change. But I think a worthwhile

[PATCH 01/20] configure: do not invoke as/ld directly for pc-bios/optionrom

2022-08-25 Thread Paolo Bonzini
Just use using the compiler binary, with -nostdlib in the case of the linker; the compiler driver (whether i686-*-gcc, or x86_64-*-gcc with the -m32 option) will then pick the right magic option to as and ld. Signed-off-by: Paolo Bonzini --- configure | 22 +-

[PATCH 06/20] configure: return status code from probe_target_compiler

2022-08-25 Thread Paolo Bonzini
For now, return 1 for container-based compilers. This will change as soon as ROMs will be buildable with them. Signed-off-by: Paolo Bonzini --- configure | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/configure b/configure index c533eaada0..6f15f3c687 100755

[PATCH 18/18] i386: AVX+AES helpers prep

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Make the AES vector helpers AVX ready No functional changes to existing helpers Signed-off-by: Paul Brook Message-Id: <20220424220204.2493824-22-p...@nowt.org> Signed-off-by: Paolo Bonzini --- target/i386/ops_sse.h | 49 +++ 1 file cha

[PATCH 09/18] i386: Destructive vector helpers for AVX

2022-08-25 Thread Paolo Bonzini
From: Paul Brook These helpers need to take special care to avoid overwriting source values before the wole result has been calculated. Currently they use a dummy Reg typed variable to store the result then assign the whole register. This will cause 128 bit operations to corrupt the upper half o

[PATCH 07/20] configure: store container engine in config-host.mak

2022-08-25 Thread Paolo Bonzini
In preparation for removing $(DOCKER_SCRIPT) from the tests/tcg configuration files, have Make use the same container engine that had been probed at configure time. Signed-off-by: Paolo Bonzini --- configure | 11 --- tests/docker/Makefile.include | 2 +- 2 files cha

[PATCH 02/20] pc-bios/optionrom: detect CC options just once

2022-08-25 Thread Paolo Bonzini
In preparation for adding Docker container support, detect compiler options just once rather than once per Make run; container startup overhead is substantial and doing the detection just once makes things faster. Signed-off-by: Paolo Bonzini --- pc-bios/optionrom/Makefile | 37 +

[PATCH 04/20] vof: add distclean target

2022-08-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- pc-bios/vof/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pc-bios/vof/Makefile b/pc-bios/vof/Makefile index 8809c82768..990f26af31 100644 --- a/pc-bios/vof/Makefile +++ b/pc-bios/vof/Makefile @@ -19,4 +19,6 @@ vof.elf: entry.o mai

[PATCH 12/18] i386: reimplement AVX comparison helpers

2022-08-25 Thread Paolo Bonzini
From: Paul Brook AVX includes additional a more extensive set of comparison predicates, some of some of which our softfloat implementation does not expose directly. Rewrite the helpers in terms of floatN_compare for future extensibility. Signed-off-by: Paul Brook Signed-off-by: Paolo Bonzini -

[PATCH 09/20] tests/tcg: remove -f from Makefile invocation

2022-08-25 Thread Paolo Bonzini
Instead of linking tests/tcg/Makefile.target into the build tree, name the symbolic link "Makefile" and create it in every target subdirectory. This makes it possible to just invoke "make" in tests/tcg subdirectories. Signed-off-by: Paolo Bonzini --- configure | 3 ++- tests/Makefil

[PATCH 11/20] tests/tcg: unify ppc64 and ppc64le Makefiles

2022-08-25 Thread Paolo Bonzini
Make tests/tcg/ppc64le include tests/tcg/ppc64 instead of duplicating the rules. Because the ppc64le vpath includes tests/tcg/ppc64 but not vice versa, the tests have to be moved from tests/tcg/ppc64le/ to tests/tcg/ppc64. Signed-off-by: Paolo Bonzini --- tests/tcg/ppc64/Makefile.target

[PATCH 05/20] build: add recursive distclean rules

2022-08-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 13234f2aa4..ef0fbb4dee 100644 --- a/Makefile +++ b/Makefile @@ -186,7 +186,7 @@ include $(SRC_PATH)/tests/Makefile.include all: recurse-all -ROMS_RULES

[PATCH 15/18] i386: Misc AVX helper prep

2022-08-25 Thread Paolo Bonzini
From: Paul Brook Fixup various vector helpers that either trivially exten to 256 bit, or don't have 256 bit variants. No functional changes to existing helpers Signed-off-by: Paul Brook Message-Id: <20220424220204.2493824-19-p...@nowt.org> Signed-off-by: Paolo Bonzini --- target/i386/ops_sse

[PATCH 08/20] tests: simplify Makefile invocation for tests/tcg

2022-08-25 Thread Paolo Bonzini
Remove the DOCKER_SCRIPT and TARGET variable from the Makefile invocation for tests/tcg. For DOCKER_SCRIPT, resolve the path to docker.py in configure; for TARGET, move it to config-$(TARGET).mak and use a symbolic link to break the cycle. The symbolic link is still needed because tests/tcg inclu

[PATCH 14/20] configure: move tests/tcg/Makefile.prereqs to root build directory

2022-08-25 Thread Paolo Bonzini
It will not be specific to tests/tcg anymore, since it will be possible to build firmware using container-based cross compilers too. Signed-off-by: Paolo Bonzini --- Makefile | 5 - configure | 15 +++ tests/Makefile.include | 3 --- 3 files changed,

[PATCH 15/20] configure: unify creation of cross-compilation Makefiles

2022-08-25 Thread Paolo Bonzini
Let write_target_makefile handle both host and container cross compilers. Signed-off-by: Paolo Bonzini --- configure | 94 +-- 1 file changed, 43 insertions(+), 51 deletions(-) diff --git a/configure b/configure index 6dc6a5a48b..37ddd90bb1 10

[PATCH 10/20] tests/tcg: add distclean rule

2022-08-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- tests/Makefile.include| 11 +++ tests/tcg/Makefile.target | 3 +++ 2 files changed, 14 insertions(+) diff --git a/tests/Makefile.include b/tests/Makefile.include index caef287957..9ed67721e2 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.in

[PATCH 16/20] configure: cleanup creation of tests/tcg target config

2022-08-25 Thread Paolo Bonzini
Remove the symlink to tests/tcg/config-*.mak, which is possible now that unused target config files are not created anymore. Signed-off-by: Paolo Bonzini --- Makefile| 2 +- configure | 12 +--- meson.build | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Ma

[PATCH 12/20] tests/tcg: clean up calls to run-test

2022-08-25 Thread Paolo Bonzini
Almost all invocations of run-test have either "$* on $(TARGET_NAME)" or "$< on $(TARGET_NAME)" as the last argument. So provide a default test name, while allowing an escape hatch for custom names. As an additional simplification, remove the need to do shell quoting. Signed-off-by: Paolo Bonzin

[PATCH 17/20] configure: build ROMs with container-based cross compilers

2022-08-25 Thread Paolo Bonzini
s390-ccw remains a bit more complex, because the -march=z900 test is done only for the native cross compiler. Otherwise, all that is needed is to pass the (now mandatory) target argument to write_target_makefile. Signed-off-by: Paolo Bonzini --- configure | 30 ++ 1

[PATCH 13/20] tests/tcg: move compiler tests to Makefiles

2022-08-25 Thread Paolo Bonzini
Further decoupling of tests/tcg from the main QEMU Makefile, and making the build more similar between the cross compiler case and the vetted container images. Signed-off-by: Paolo Bonzini --- configure | 65 +-- tests/tcg/Makefile.target

[PATCH 18/20] pc-bios/optionrom: Adopt meson style Make output

2022-08-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- pc-bios/optionrom/Makefile | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index f514e4f84b..b1fff0ba6c 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makef

[PATCH 19/20] pc-bios/s390-ccw: Adopt meson style Make output

2022-08-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- pc-bios/s390-ccw/Makefile| 12 ++-- pc-bios/s390-ccw/netboot.mak | 20 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 965e633f43..10e8f5cb63 100644 --- a

[PATCH 20/20] pc-bios/vof: Adopt meson style Make output

2022-08-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- pc-bios/vof/Makefile | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pc-bios/vof/Makefile b/pc-bios/vof/Makefile index 990f26af31..be8bd96294 100644 --- a/pc-bios/vof/Makefile +++ b/pc-bios/vof/Makefile @@ -2,19 +2,26 @@ includ

Re: slirp: Can I get IPv6-only DHCP working?

2022-08-25 Thread Samuel Thibault
Hello, Peter Delevoryas, le jeu. 25 août 2022 15:38:53 -0700, a ecrit: > It seems like there's support for an IPv6 dns proxy, and there's literally a > file called "dhcpv6.c" in slirp, but it has a comment saying it only supports > whatever is necessary for TFTP network boot I guess. For which DN

slirp: Can I get IPv6-only DHCP working?

2022-08-25 Thread Peter Delevoryas
I'm having a hard time figuring this out from looking at the code and the user-level help options. It seems like there's support for an IPv6 dns proxy, and there's literally a file called "dhcpv6.c" in slirp, but it has a comment saying it only supports whatever is necessary for TFTP network boot

Re: slirp: Can I get IPv6-only DHCP working?

2022-08-25 Thread Peter Delevoryas
On Fri, Aug 26, 2022 at 12:56:10AM +0200, Samuel Thibault wrote: > Hello, > > Peter Delevoryas, le jeu. 25 août 2022 15:38:53 -0700, a ecrit: > > It seems like there's support for an IPv6 dns proxy, and there's literally a > > file called "dhcpv6.c" in slirp, but it has a comment saying it only >

Re: slirp: Can I get IPv6-only DHCP working?

2022-08-25 Thread Samuel Thibault
Peter Delevoryas, le jeu. 25 août 2022 16:15:26 -0700, a ecrit: > On Fri, Aug 26, 2022 at 12:56:10AM +0200, Samuel Thibault wrote: > > Peter Delevoryas, le jeu. 25 août 2022 15:38:53 -0700, a ecrit: > > > It seems like there's support for an IPv6 dns proxy, and there's > > > literally a > > > file

Re: [PATCH 00/18] target/i386: make most SSE helpers generic in the vector size

2022-08-25 Thread Richard Henderson
On 8/25/22 15:13, Paolo Bonzini wrote: This is the first half of Paul's series from last April, reorganized to have no occurrence of YMM_ONLY or SHIFT == 2---meaning it can be committed without much fuss, even without a plan for the implementation of AVX decoding. In most cases this is done by u

Re: [PATCH 01/18] i386: Rework sse_op_table1

2022-08-25 Thread Richard Henderson
On 8/25/22 15:13, Paolo Bonzini wrote: @@ -3112,6 +3165,7 @@ static void gen_sse(CPUX86State *env, DisasContext *s, int b, { int b1, op1_offset, op2_offset, is_xmm, val; int modrm, mod, rm, reg; +struct SSEOpHelper_table1 sse_op; SSEFunc_0_epp sse_fn_epp; SSEFunc_0_

Re: [PATCH v6 6/8] KVM: Handle page fault for private memory

2022-08-25 Thread Sean Christopherson
On Fri, Aug 19, 2022, Kirill A. Shutemov wrote: > On Fri, Jun 17, 2022 at 09:30:53PM +, Sean Christopherson wrote: > > > @@ -4088,7 +4144,12 @@ static int direct_page_fault(struct kvm_vcpu > > > *vcpu, struct kvm_page_fault *fault > > > read_unlock(&vcpu->kvm->mmu_lock); > > > else

Re: [PATCH 02/18] i386: Rework sse_op_table6/7

2022-08-25 Thread Richard Henderson
On 8/25/22 15:13, Paolo Bonzini wrote: static void gen_sse(CPUX86State *env, DisasContext *s, int b, target_ulong pc_start) { int b1, op1_offset, op2_offset, is_xmm, val; int modrm, mod, rm, reg; struct SSEOpHelper_table1 sse_op; +struct SSEOpHelper

Re: [PATCH 04/18] i386: Move 3DNOW decoder

2022-08-25 Thread Richard Henderson
On 8/25/22 15:13, Paolo Bonzini wrote: From: Paul Brook Handle 3DNOW instructions early to avoid complicating the AVX logic. Signed-off-by: Paul Brook Message-Id: <20220424220204.2493824-25-p...@nowt.org> Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 30 +--

Re: [PATCH 06/18] i386: Rewrite vector shift helper

2022-08-25 Thread Richard Henderson
On 8/25/22 15:13, Paolo Bonzini wrote: From: Paul Brook Rewrite the vector shift helpers in preperation for AVX support (3 operand form and 256 bit vectors). For now keep the existing two operand interface. No functional changes to existing helpers. Signed-off-by: Paul Brook Message-Id:<20220

Re: [PATCH v10 0/3] Implement Sstc extension

2022-08-25 Thread Alistair Francis
On Thu, Aug 25, 2022 at 8:14 AM Atish Patra wrote: > > This series implements Sstc extension[1] which was ratified recently. > > The first patch is a prepartory patches while PATCH 2 adds stimecmp > support while PATCH 3 adds vstimecmp support. This series is based on > on top of upstream commit (

Re: [PATCH 07/18] i386: Rewrite simple integer vector helpers

2022-08-25 Thread Richard Henderson
On 8/25/22 15:14, Paolo Bonzini wrote: +#define SSE_HELPER_2(name, elem, num, F)\ +void glue(name, SUFFIX)(CPUX86State *env, Reg *d, Reg *s) \ +{ \ + Reg *v = d;

Re: [PATCH 08/18] i386: Misc integer AVX helper prep

2022-08-25 Thread Richard Henderson
On 8/25/22 15:14, Paolo Bonzini wrote: From: Paul Brook More perparatory work for AVX support in various integer vector helpers No functional changes to existing helpers. Signed-off-by: Paul Brook Message-Id:<20220424220204.2493824-13-p...@nowt.org> Signed-off-by: Paolo Bonzini --- target/i3

Re: [PATCH 09/18] i386: Destructive vector helpers for AVX

2022-08-25 Thread Richard Henderson
On 8/25/22 15:14, Paolo Bonzini wrote: void glue(helper_pshufd, SUFFIX)(Reg *d, Reg *s, int order) { -Reg r; +uint32_t r0, r1, r2, r3; -r.L(0) = s->L(order & 3); -r.L(1) = s->L((order >> 2) & 3); -r.L(2) = s->L((order >> 4) & 3); -r.L(3) = s->L((order >> 6) & 3); -

Re: [PATCH 10/18] i386: Add size suffix to vector FP helpers

2022-08-25 Thread Richard Henderson
On 8/25/22 15:14, Paolo Bonzini wrote: From: Paul Brook For AVX we're going to need both 128 bit (xmm) and 256 bit (ymm) variants of floating point helpers. Add the register type suffix to the existing *PS and *PD helpers (SS and SD variants are only valid on 128 bit vectors) No functional chan

Re: [PATCH 11/18] i386: Floating point arithmetic helper AVX prep

2022-08-25 Thread Richard Henderson
On 8/25/22 15:14, Paolo Bonzini wrote: From: Paul Brook Prepare the "easy" floating point vector helpers for AVX No functional changes to existing helpers. Signed-off-by: Paul Brook Message-Id:<20220424220204.2493824-16-p...@nowt.org> Signed-off-by: Paolo Bonzini --- target/i386/ops_sse.h |

<    1   2   3   >