Since qemu_set_vnet_hdr_len() is always called when
qemu_using_vnet_hdr() is called, we can merge them and save some code.
For consistency, express that the virtio-net header is not in use by
returning 0 with qemu_get_vnet_hdr_len() instead of having a dedicated
function, qemu_get_using_vnet_hdr()
While netmap implements virtio-net header, it does not implement
receive_raw(). Instead of implementing receive_raw for netmap, add
virtio-net headers in the common code and use receive_iov()/receive()
instead. This also fixes the buffer size for the virtio-net header.
Fixes: fbbdbddec0 ("tap: all
This series contains fixes and improvements for virtio-net RSS and hash
reporting feature.
V7 -> V8:
Reset author email addresses.
Rebased.
V6 -> V7:
Dropped patch "virtio-net: Do not clear VIRTIO_NET_F_HASH_REPORT".
Dropped the changes to remove packet flags.
Re-introduced tap_receive(
The virtio-net header length assertion should happen for any clients.
Signed-off-by: Akihiko Odaki
---
net/net.c | 5 +
net/tap.c | 3 ---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/net.c b/net/net.c
index bd51037ebfb0..db096765f4b2 100644
--- a/net/net.c
+++ b/net/ne
The copied header is only used for byte swapping.
Signed-off-by: Akihiko Odaki
---
hw/net/virtio-net.c | 26 --
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index e33bdbfd84a5..ca0fbf7b7654 100644
--- a/hw/net/v
This will save duplicate logic found in both of tap_receive_iov() and
tap_receive().
Suggested-by: "Zhang, Chen"
Signed-off-by: Akihiko Odaki
---
net/tap.c | 35 +--
1 file changed, 5 insertions(+), 30 deletions(-)
diff --git a/net/tap.c b/net/tap.c
index 99c59e
The member is not cleared during reset so may have a stale value.
Signed-off-by: Akihiko Odaki
---
hw/net/virtio-net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 61b49e335dea..527aac3a0465 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virt
Multiqueue usage is not negotiated yet when realizing. If more than
one queue is added and the guest never requests to enable multiqueue,
the extra queues will not be deleted when unrealizing and leak.
Fixes: f9d6dbf0bf6e ("virtio-net: remove virtio queues if the guest doesn't
support multiqueue"
This generalizes the rule to generate the skeleton and allows to add
another.
Signed-off-by: Akihiko Odaki
---
tools/ebpf/Makefile.ebpf | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/tools/ebpf/Makefile.ebpf b/tools/ebpf/Makefile.ebpf
index 3391e7ce0898..572c
It was necessary since an Linux older than 2.6.35 may implement the
virtio-net header but may not allow to change its length. Remove it
since such an old Linux is no longer supported.
Signed-off-by: Akihiko Odaki
Acked-by: Michael S. Tsirkin
---
net/tap_int.h | 1 -
net/tap-bsd.c | 5
calculate_rss_hash() was using hash value 0 to tell if it calculated
a hash, but the hash value may be 0 on a rare occasion. Have a
distinct bool value for correctness.
Fixes: f3fa412de2 ("ebpf: Added eBPF RSS program.")
Signed-off-by: Akihiko Odaki
---
ebpf/rss.bpf.skeleton.h | 1210 +++
The peer buffer is qualified with const and not meant to be modified.
Signed-off-by: Akihiko Odaki
---
hw/net/virtio-net.c | 36 +---
1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 527aac3a0465..c805
tap prepends a zeroed virtio-net header when writing a packet to a
tap with virtio-net header enabled but not in use. This only happens
when s->host_vnet_hdr_len == sizeof(struct virtio_net_hdr).
Signed-off-by: Akihiko Odaki
---
net/tap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
This saves branches and makes later BPF program changes easier.
Signed-off-by: Akihiko Odaki
---
tools/ebpf/rss.bpf.c | 26 +++---
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/tools/ebpf/rss.bpf.c b/tools/ebpf/rss.bpf.c
index 77434435ac15..c989cb3cd82c 1006
RSS is disabled by default.
Fixes: 590790297c ("virtio-net: implement RSS configuration command")
Signed-off-by: Akihiko Odaki
Reviewed-by: Michael Tokarev
---
hw/net/virtio-net.c | 70 +++--
1 file changed, 36 insertions(+), 34 deletions(-)
diff
The kernel interprets the returned value as an unsigned 32-bit so -1
will mean queue 4294967295, which is awkward. Return 0 instead.
Signed-off-by: Akihiko Odaki
---
ebpf/rss.bpf.skeleton.h | 1532 +++
tools/ebpf/rss.bpf.c|2 +-
2 files changed
Propagating ebpf-rss-fds errors has several problems.
First, it makes device realization fail and disables the fallback to the
conventional eBPF loading.
Second, it leaks memory by making device realization fail without
freeing memory already allocated.
Third, the convention is to set an error w
Byte swapping is only performed for the part of header shared with the
legacy standard and the buffer only needs to cover it.
Signed-off-by: Akihiko Odaki
---
hw/net/virtio-net.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/v
The code to attach or detach the eBPF program to RSS were duplicated so
unify them into one function to save some code.
Signed-off-by: Akihiko Odaki
---
hw/net/virtio-net.c | 90 +
1 file changed, 36 insertions(+), 54 deletions(-)
diff --git a
在 2024/4/28 上午9:15, maobibo 写道:
On 2024/4/26 下午5:15, Song Gao wrote:
Message text is missing here :(
Signed-off-by: Song Gao
Message-Id: <20240307164835.300412-4-gaos...@loongson.cn>
It is strange that there is "Message-Id:" string. Is it required here?
Message_ID helps to find the origi
在 2024/4/28 上午9:34, maobibo 写道:
On 2024/4/26 下午5:15, Song Gao wrote:
Message test is also missing there :(
Signed-off-by: Song Gao
Message-Id: <20240307164835.300412-7-gaos...@loongson.cn>
---
include/hw/loongarch/boot.h | 27 +
include/hw/loongarch/virt.h | 10 ++
Based-on: <20240428-rss-v10-0-73cbaa91a...@daynix.com>
("[PATCH v10 00/18] virtio-net RSS/hash report fixes and improvements")
Some features are not always available, and virtio-net used to disable
them when not available even if the corresponding properties were
explicitly set t
DEFINE_PROP_ON_OFF_AUTO_BIT64() corresponds to DEFINE_PROP_ON_OFF_AUTO()
as DEFINE_PROP_BIT64() corresponds to DEFINE_PROP_BOOL(). The difference
is that DEFINE_PROP_ON_OFF_AUTO_BIT64() exposes OnOffAuto instead of
bool.
Signed-off-by: Akihiko Odaki
---
include/hw/qdev-properties.h | 18
Some features are not always available, and virtio-net used to disable
them when not available even if the corresponding properties were
explicitly set to "on".
Convert feature properties to OnOffAuto so that the user can explicitly
tell QEMU to automatically select the value by setting them "auto
Warning about RSS fallback at device realization allows the user to
notice the configuration problem early.
Signed-off-by: Akihiko Odaki
---
hw/net/virtio-net.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 5b6c
pci_config_get_bar_addr() had a division by vf_stride. vf_stride needs
to be non-zero when there are multiple VFs, but the specification does
not prohibit to make it zero when there is only one VF.
Do not perform the division for the first VF to avoid division by zero.
Signed-off-by: Akihiko Odak
A user can create a SR-IOV device by specifying the PF with the
sriov-pf property of the VFs. The VFs must be added before the PF.
A user-creatable VF must have PCIDeviceClass::sriov_vf_user_creatable
set. Such a VF cannot refer to the PF because it is created before the
PF.
A PF that user-creata
Allow user to attach SR-IOV VF to a virtio-pci PF.
Signed-off-by: Akihiko Odaki
---
hw/virtio/virtio-pci.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index eaaf86402cfa..996bb2cbad20 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virt
SR-IOV requires PCI Express.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index ec8fc0757b92..3af0cc7d560a 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci/pcie_sriov.c
@@ -42,6 +42,11 @@ bool
Based-on: <20240315-reuse-v9-0-67aa69af4...@daynix.com>
("[PATCH for 9.1 v9 00/11] hw/pci: SR-IOV related fixes and improvements")
Introduction
This series is based on the RFC series submitted by Yui Washizu[1].
See also [2] for the context.
This series enables SR-IOV emulation for
A virtio-net device can be added as a SR-IOV VF to another virtio-pci
device that will be the PF.
Signed-off-by: Akihiko Odaki
---
hw/virtio/virtio-net-pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/virtio-net-pci.c b/hw/virtio/virtio-net-pci.c
index e03543a70a75..dba4987d6e
A device cannot be a SR-IOV PF and a VF at the same time.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index 56523ab4e833..ec8fc0757b92 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci/pcie_sr
A SR-IOV VF cannot have a ROM BAR.
Co-developed-by: Yui Washizu
Signed-off-by: Akihiko Odaki
---
hw/pci/pci.c | 8
1 file changed, 8 insertions(+)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index cb5ac46e9f27..201ff64e11cc 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2359,6 +2359,14
The efi_system_table adds a efi_boot_memmap configuration table.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-7-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 40 +
hw/loongarch/virt.c | 11 ++
incl
The following changes since commit fd87be1dada5672f877e03c2ca8504458292c479:
Merge tag 'accel-20240426' of https://github.com/philmd/qemu into staging
(2024-04-26 15:28:13 -0700)
are available in the Git repository at:
https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-202
Add init_cmline and set boot_info->a0, a1
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-5-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 30 ++
include/hw/loongarch/virt.h | 2 ++
target/loongarch/cpu.h | 2 ++
3 fil
we load initrd ramdisk after kernel_high address
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-3-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 29 -
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/hw/loongarch/boot.c
The efi_system_table adds a efi_initrd configuration table.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-8-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 23 +--
include/hw/loongarch/boot.h | 9 +
2 files changed, 30 inse
This patch removes the unused fdt irqchip node.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-16-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 31 +--
1 file changed, 1 insertion(+), 30 deletions(-)
diff --git a/hw/loongarch/virt
fdt adds cpu interrupt controller node,
we use 'loongson,cpu-interrupt-controller'.
See:
https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongarch-cpu.c
https://lore.kernel.org/r/20221114113824.1880-2-liupei...@loongson.cn
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id
This patch adds pcie irq_map node for FDT.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-15-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 73 ++---
1 file changed, 69 insertions(+), 4 deletions(-)
diff --git a/hw/loon
Move some boot functions to boot.c and struct
loongarch_boot_info into struct LoongArchMachineState.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20240426091551.2397867-2-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 128 ++
The efi_system_table adds a efi_fdt configuration table.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-9-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 11 +++
hw/loongarch/virt.c | 6 ++
include/hw/loongarch/boot.h | 4
inc
rtc node need interrupts and interrupt-parent cells.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-18-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loonga
Load the slave CPU boot code at pflash0 and set
the slave CPU elf_address to VIRT_FLASH0_BASE.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-4-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 62 -
1 file changed, 61
fdt adds pch msi controller, we use 'loongson,pch-msi-1.0'.
See:
https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-pch-msi.c
https://lore.kernel.org/r/20200528152757.1028711-6-jiaxun.y...@flygoat.com
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <2024042609155
The right fdt memory node like [1], not [2]
[1]
memory@0 {
device_type = "memory";
reg = <0x00 0x00 0x00 0x1000>;
};
[2]
memory@0 {
device_type = "memory";
reg = <0x02 0x00 0x02 0x1000>;
};
Add init_systab and set boot_info->a2
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-6-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 22 +
include/hw/loongarch/boot.h | 48 +
2 files changed, 70 inse
fdt adds Extend I/O Interrupt Controller,
we use 'loongson,ls2k2000-eiointc'.
See:
https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-eiointc.c
https://lore.kernel.org/r/764e02d924094580ac0f1d15535f4b98308705c6.1683279769.git.zhoubin...@loongson.cn
Signed-off-by: Song Gao
R
uart node need interrupts and interrupt-parent cells.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-17-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch
fdt adds pch pic controller, we use 'loongson,pch-pic-1.0'
See:
https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-pch-pic.c
https://lore.kernel.org/r/20200528152757.1028711-4-jiaxun.y...@flygoat.com
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551
This reverts commit 83ddb3dbba2ee0f1767442ae6ee665058aeb1093.
The added check is no longer necessary due to a change of
iov_from_buf().
Signed-off-by: Akihiko Odaki
---
hw/net/net_tx_pkt.c | 4
1 file changed, 4 deletions(-)
diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_pkt.c
index b7b
3 files changed, 3 insertions(+), 11 deletions(-)
---
base-commit: fd87be1dada5672f877e03c2ca8504458292c479
change-id: 20240428-iov-a317b02601dc
Best regards,
--
Akihiko Odaki
iov_from_buf(), iov_to_buf(), iov_memset(), and iov_copy() asserts
that the given offset fits in the iov while tolerating the specified
number of bytes to operate with to be greater than the size of iov.
This is inconsistent so remove the assertions.
Asserting the offset fits in the iov makes sens
On 2024/04/28 20:57, Tobias Markus wrote:
Hello,
to prefix this: I previously filed
https://gitlab.com/qemu-project/qemu/-/issues/2314 for this compilation
error and I'm quite aware that QEMU only supports the most recent two
versions of Mac OS X by default. However, given the small change
r
17.04.2024 05:56, Li Zhijian via wrote:
bdrv_activate_all() should not be called from the coroutine context, move
it to the QEMU thread colo_process_incoming_thread() with the bql_lock
protected.
The backtrace is as follows:
#4 0x561af7948362 in bdrv_graph_rdlock_main_loop () at
../block
17.04.2024 05:56, Li Zhijian via wrote:
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -835,6 +835,16 @@ static void *colo_process_incoming_thread(void *opaque)
return NULL;
}
+/* Make sure all file formats throw away their mutable metadata */
+bql_lock();
+bdrv_
On Sun, Apr 28, 2024 at 03:39:09PM +0300, Michael Tokarev wrote:
> 17.04.2024 05:56, Li Zhijian via wrote:
> > bdrv_activate_all() should not be called from the coroutine context, move
> > it to the QEMU thread colo_process_incoming_thread() with the bql_lock
> > protected.
> >
> > The backtrace i
Hello,
to prefix this: I previously filed
https://gitlab.com/qemu-project/qemu/-/issues/2314 for this compilation
error and I'm quite aware that QEMU only supports the most recent two
versions of Mac OS X by default. However, given the small change
required for this to work, I hope you can ma
Hello,
Thomas Weißschuh, le jeu. 22 févr. 2024 11:44:13 +0100, a ecrit:
> On Tue, Mar 22, 2022 at 06:58:36PM -0700, Nicholas Ngai wrote:
> > Pinging this. It’s a bit old, though the patch still applies cleanly to
> > master as far as I can tell.
> >
> > Link to patchew is
> > https://patchew.org/
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
The single call to get_memio_eip(), in cpu_report_tpr_access(),
is protected by a check on tcg_enabled(). Since the call only
exists when CONFIG_TCG is defined, we can slightly simplify.
Nack, that's not how things work.
By wrapping the whole fun
Add a type cast and use extract64() instead of extract32()
to avoid integer overflow on addition. Fix bit fields
extraction according to documentation.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: d3c6369a96 ("introduce xlnx-dpdma")
Signed-off-by: Alexandra Diupina
--
Add xlnx_dpdma_read_descriptor() and
xlnx_dpdma_write_descriptor() functions.
xlnx_dpdma_read_descriptor() combines reading a
descriptor from desc_addr by calling dma_memory_read()
and swapping the desc fields from guest memory order
to host memory order. xlnx_dpdma_write_descriptor()
performs simi
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
"plugin_mask" was renamed as "event_mask" in commit c006147122
("plugins: create CPUPluginState and migrate plugin_mask").
Signed-off-by: Philippe Mathieu-Daudé
---
plugins/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
"exec/ram_addr.h" shouldn't be used with user emulation.
Signed-off-by: Philippe Mathieu-Daudé
---
plugins/api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Richard Henderson
r~
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
Commit 1ad2134f91 ("Hardware convenience library") extracted
"cpu-common.h" from "cpu-all.h", which uses the LGPL-2.1+ license.
Signed-off-by: Philippe Mathieu-Daudé
---
include/exec/cpu-common.h | 9 +++--
1 file changed, 7 insertions(+), 2
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
The TARGET_PAGE_foo definitions are defined with multiple
level of #ifdef'ry. Indent it a bit for clarity.
Signed-off-by: Philippe Mathieu-Daudé
---
include/exec/cpu-all.h | 25 +
1 file changed, 13 insertions(+), 12 dele
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
We stopped using the PAGE_RESERVED definition in commit
50d25c8aec ("accel/tcg: Drop PAGE_RESERVED for CONFIG_BSD").
This completes commit 2e9a5713f0 ("Remove PAGE_RESERVED").
Signed-off-by: Philippe Mathieu-Daudé
---
include/exec/cpu-all.h | 4 -
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
Missed in commit 58771921af ("include/exec: Move PAGE_* macros
to common header"), PAGE_PASSTHROUGH ended being defined twice.
Signed-off-by: Philippe Mathieu-Daudé
---
include/exec/cpu-all.h | 6 --
1 file changed, 6 deletions(-)
Reviewed
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
Extract page-protection definitions from "exec/cpu-all.h"
to "exec/page-prot-common.h".
The list of files requiring the new header was generated
using:
$ git grep -wE \
'PAGE_(READ|WRITE|EXEC|BITS|VALID|ANON|RESERVED|TARGET_.|PASSTHROUGH)'
Sig
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
User-specific PAGE definitions shouldn't be used on system emulation.
Signed-off-by: Philippe Mathieu-Daudé
---
include/exec/page-prot-common.h | 8
1 file changed, 8 insertions(+)
Come to that, PAGE_WRITE_INV is system only.
Does t
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
System emulation shouldn't use "user/syscall-trace.h".
Signed-off-by: Philippe Mathieu-Daudé
---
include/user/syscall-trace.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/user/syscall-trace.h b/include/user/syscall-trace.h
in
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
Do not open-code cpu_loop_exit_requested().
Signed-off-by: Philippe Mathieu-Daudé
---
accel/tcg/cpu-exec.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 225e5fbd3e..
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
cflags_next_tb is always re-initialized in the CPU Reset()
handler in cpu_common_reset_hold(), no need to initialize
it in cpu_common_initfn().
Signed-off-by: Philippe Mathieu-Daudé
---
hw/core/cpu-common.c | 1 -
1 file changed, 1 deletion(-)
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
Rather than resetting TCG specific fields in the common
cpu_common_reset_hold(), do it in tcg_cpu_reset_hold().
Signed-off-by: Philippe Mathieu-Daudé
---
accel/tcg/tcg-accel-ops.c | 3 +++
hw/core/cpu-common.c | 2 --
2 files changed, 3 in
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
Access the CPUState::tcg_cflags via tcg_cflags_has() and
tcg_cflags_set() helpers.
Mechanical change using the following Coccinelle spatch script:
@@
expression cpu;
expression flags;
@@
- cpu->tcg_cflags & flags
+ tcg_cf
On 4/28/24 01:51, Song Gao wrote:
we load initrd ramdisk after kernel_high address
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-3-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 29 -
1 file changed, 28 insertions(+), 1 deletio
On 28/4/24 13:11, Akihiko Odaki wrote:
This reverts commit 83ddb3dbba2ee0f1767442ae6ee665058aeb1093.
The added check is no longer necessary due to a change of
iov_from_buf().
Signed-off-by: Akihiko Odaki
---
hw/net/net_tx_pkt.c | 4
1 file changed, 4 deletions(-)
Reviewed-by: Philipp
On 28/4/24 20:31, Richard Henderson wrote:
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
User-specific PAGE definitions shouldn't be used on system emulation.
Signed-off-by: Philippe Mathieu-Daudé
---
include/exec/page-prot-common.h | 8
1 file changed, 8 insertions(+)
Come to
On 28/4/24 20:32, Richard Henderson wrote:
On 4/27/24 08:57, Philippe Mathieu-Daudé wrote:
System emulation shouldn't use "user/syscall-trace.h".
Signed-off-by: Philippe Mathieu-Daudé
---
include/user/syscall-trace.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/user/sysca
Am 26.04.24 um 21:41 schrieb Philippe Mathieu-Daudé:
> WHPX has a specific use of the CPUState::vcpu_dirty field
> (CPUState::vcpu_dirty is not used by common code).
> To make this field accel-specific, add and use a new
> @dirty variable in the AccelCPUState structure.
>
> Signed-off-by: Philippe
We stopped using the PAGE_RESERVED definition in commit
50d25c8aec ("accel/tcg: Drop PAGE_RESERVED for CONFIG_BSD").
This completes commit 2e9a5713f0 ("Remove PAGE_RESERVED").
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Message-Id: <20240427155714.53669-7-phi...@linaro.o
Do not open-code cpu_loop_exit_requested().
Signed-off-by: Philippe Mathieu-Daudé
---
accel/tcg/cpu-exec.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 225e5fbd3e..c18a7e2b85 100644
--- a/accel/tcg/cpu-exec.c
+++ b/a
Missing review: 8 & 9 (new)
v2:
- Addressed Richard review comments
- Renamed page-prot-common.h -> page-protection.h
- Removed wrong/unuseful patches
- New patch moving cpu_loop_exit_requested()
Hi,
First batch of patches (I expect them to be non
controversial) related to extracting user specif
The TARGET_PAGE_foo definitions are defined with multiple
level of #ifdef'ry. Indent it a bit for clarity.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Message-Id: <20240427155714.53669-6-phi...@linaro.org>
---
include/exec/cpu-all.h | 25 +
1 fil
Access the CPUState::tcg_cflags via tcg_cflags_has() and
tcg_cflags_set() helpers.
Mechanical change using the following Coccinelle spatch script:
@@
expression cpu;
expression flags;
@@
- cpu->tcg_cflags & flags
+ tcg_cflags_has(cpu, flags)
@@
expression cpu;
expressio
cflags_next_tb is always re-initialized in the CPU Reset()
handler in cpu_common_reset_hold(), no need to initialize
it in cpu_common_initfn().
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Message-Id: <20240427155714.53669-13-phi...@linaro.org>
---
hw/core/cpu-common.c |
Extract page-protection definitions from "exec/cpu-all.h"
to "exec/page-protection.h".
The list of files requiring the new header was generated
using:
$ git grep -wE \
'PAGE_(READ|WRITE|EXEC|BITS|VALID|ANON|RESERVED|TARGET_.|PASSTHROUGH)'
Signed-off-by: Philippe Mathieu-Daudé
Acked-by: Nichol
Commit 1ad2134f91 ("Hardware convenience library") extracted
"cpu-common.h" from "cpu-all.h", which uses the LGPL-2.1+ license.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Message-Id: <20240427155714.53669-5-phi...@linaro.org>
---
include/exec/cpu-common.h | 9 +++--
Rather than resetting TCG specific fields in the common
cpu_common_reset_hold(), do it in tcg_cpu_reset_hold().
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Message-Id: <20240427155714.53669-14-phi...@linaro.org>
---
accel/tcg/tcg-accel-ops.c | 3 +++
hw/core/cpu-common.
cpu_loop_exit_requested() is specific to TCG, move it
to "exec/translate-all.h".
Signed-off-by: Philippe Mathieu-Daudé
---
include/exec/exec-all.h | 17 -
include/exec/translate-all.h | 20
target/arm/tcg/helper-a64.c | 1 +
target/s390x/tcg/mem_hel
"plugin_mask" was renamed as "event_mask" in commit c006147122
("plugins: create CPUPluginState and migrate plugin_mask").
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Message-Id: <20240427155714.53669-3-phi...@linaro.org>
---
plugins/core.c | 2 +-
1 file changed, 1 ins
"exec/ram_addr.h" shouldn't be used with user emulation.
Signed-off-by: Philippe Mathieu-Daudé
Acked-by: Richard Henderson
Message-Id: <20240427155714.53669-4-phi...@linaro.org>
---
plugins/api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/api.c b/plugins/api.c
i
Missed in commit 58771921af ("include/exec: Move PAGE_* macros
to common header"), PAGE_PASSTHROUGH ended being defined twice.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
Message-Id: <20240427155714.53669-8-phi...@linaro.org>
---
include/exec/cpu-all.h | 6 --
1 fil
On 4/28/24 14:49, Philippe Mathieu-Daudé wrote:
Do not open-code cpu_loop_exit_requested().
Signed-off-by: Philippe Mathieu-Daudé
---
accel/tcg/cpu-exec.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
Reviewed-by: Richard Henderson
r~
On 4/28/24 14:49, Philippe Mathieu-Daudé wrote:
cpu_loop_exit_requested() is specific to TCG, move it
to "exec/translate-all.h".
Signed-off-by: Philippe Mathieu-Daudé
---
include/exec/exec-all.h | 17 -
include/exec/translate-all.h | 20
target/arm
Finish extracting TCG fields from CPUState:
- Extract tcg_cpu_exit() from cpu_exit()
- Introduce AccelOpsClass::exit_vcpu_thread()
- cpu_exit() calls exit_vcpu_thread=tcg_cpu_exit for TCG
- Forward declare TaskState and more uses of get_task_state()
- Introduce TCG AccelCPUState
- Move TCG specific
Introduce a per-accelerator handler that can be call
when a vCPU exits.
Signed-off-by: Philippe Mathieu-Daudé
---
include/sysemu/accel-ops.h | 1 +
system/cpus.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/include/sysemu/accel-ops.h b/include/sysemu/accel-ops.h
index ef9
We will introduce a per-accelerator vCPU exit() handler
for system emulation. Duplicate cpu_exit() because the
handler won't be accessible from user emulation.
Signed-off-by: Philippe Mathieu-Daudé
---
accel/tcg/user-exec.c | 8
hw/core/cpu-common.c | 8
system/cpus.c
Extract tcg_cpu_exit() from the user cpu_exit() implementation.
In few commits we will re-use it in the system one (via a
per-accel handler).
Signed-off-by: Philippe Mathieu-Daudé
---
accel/tcg/internal-common.h | 2 ++
accel/tcg/translate-all.c | 7 +++
accel/tcg/user-exec.c | 4 +--
1 - 100 of 249 matches
Mail list logo