The NVMe ZNS devices follow NVMe ZNS spec but the state of namespace
zones does not persist accross restarts of QEMU. This patch makes the
metadata of ZNS emulation persistent by using new block layer APIs. The
ZNS device calls zone report and zone mgmt APIs from the block layer
which will handle z
Zone descriptor data is host definied data that is associated with
each zone. Add zone descriptor extensions to zonedmeta and
blk_get_zone_extension to access zd_extensions.
Signed-off-by: Sam Li
---
block/block-backend.c | 15 ++
block/qcow2.c | 86 ++
The zone information is contained in the BlockLimits fileds. Add blk_get_*()
functions
to access the block layer and update zone info accessing in the NVMe device
emulation.
Signed-off-by: Sam Li
---
block/block-backend.c | 56
block/qcow2.c
ZNS emulation follows NVMe ZNS spec but the state of namespace
zones does not persist accross restarts of QEMU. This patch makes the
metadata of ZNS emulation persistent by using new block layer APIs and
the qcow2 img as backing file. It is the second part after the patches
- adding full zoned stor
16.08.2023 00:42, Helge Deller wrote:
On 8/15/23 23:09, Richard Henderson wrote:
...
Let's wait a bit and see if we're not just exchanging one set of bugs for
another.
Yes, and I think 8.0 isn't in that bad shape?
Well, I dunno. It all started with 8.0 bugs, after I uploaded 8.0 to debian
According to the new spec, when vsiselect has a reserved value, attempts
from M-mode or HS-mode to access vsireg, or from VS-mode to access
sireg, should preferably raise an illegal instruction exception.
Signed-off-by: Tommy Wu
Reviewed-by: Frank Chang
---
target/riscv/csr.c | 7 +--
1 fil
On 16/8/23 2:07 am, Richard Henderson wrote:
On 8/14/23 22:01, Jordan Niethe wrote:
Direct branch patching was disabled when using TCG_REG_TB in commit
736a1588c1 ("tcg/ppc: Fix race in goto_tb implementation"). Commit
7502f89c74 ("tcg/ppc: Use prefixed instructions for tcg_out_goto_tb")
used
On 2023/8/16 6:19, 【外部账号】 Peter Xu wrote:
On Tue, Aug 15, 2023 at 09:35:19AM -0300, Fabiano Rosas wrote:
Guoyi Tu writes:
When the migration process of a virtual machine using huge pages is
cancelled,
QEMU will continue to complete the processing of the current huge page
through the qemu f
On 2023/8/15 20:35, 【外部账号】 Fabiano Rosas wrote:
Guoyi Tu writes:
When the migration process of a virtual machine using huge pages is
cancelled,
QEMU will continue to complete the processing of the current huge page
through the qemu file object got an error set. These processing, such as
com
From: Antonio Caggiano
The feature can be enabled when a backend wants it.
Signed-off-by: Antonio Caggiano
Reviewed-by: Marc-André Lureau
Signed-off-by: Gurchetan Singh
Tested-by: Alyssa Ross
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Akihiko Odaki
---
hw/display/virtio-gpu-base.c
From: Antonio Caggiano
This adds preparatory functions needed to:
- decode blob cmds
- tracking iovecs
Signed-off-by: Antonio Caggiano
Signed-off-by: Dmitry Osipenko
Signed-off-by: Gurchetan Singh
Tested-by: Alyssa Ross
Tested-by: Emmanouil Pitsidianakis
Reviewed-by: Emmanouil Pi
This change enables rutabaga to receive virtio-gpu-3d hypercalls
when it is active.
Signed-off-by: Gurchetan Singh
Tested-by: Alyssa Ross
Tested-by: Emmanouil Pitsidianakis
Reviewed-by: Emmanouil Pitsidianakis
---
v3: Whitespace fix (Akihiko)
hw/display/virtio-gpu-base.c | 3 ++-
hw/display/
From: Gerd Hoffmann
Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu.
Signed-off-by: Antonio Caggiano
Tested-by: Alyssa Ross
Acked-by: Michael S. Tsirkin
---
hw/display/virtio-gpu-pci.c| 14 ++
hw/display/virtio-gpu.c| 1 +
hw/display/virtio-vga.c| 33
This adds initial support for gfxstream and cross-domain. Both
features rely on virtio-gpu blob resources and context types, which
are also implemented in this patch.
gfxstream has a long and illustrious history in Android graphics
paravirtualization. It has been powering graphics in the Android
- Add meson detection of rutabaga_gfx
- Build virtio-gpu-rutabaga.c + associated vga/pci files when
present
Signed-off-by: Gurchetan Singh
Tested-by: Alyssa Ross
Tested-by: Emmanouil Pitsidianakis
Reviewed-by: Emmanouil Pitsidianakis
---
v3: Fix alignment issues (Akihiko)
hw/display/meson.
This modifies the common virtio-gpu.h file have the fields and
defintions needed by gfxstream/rutabaga, by VirtioGpuRutabaga.
Signed-off-by: Gurchetan Singh
Tested-by: Alyssa Ross
Tested-by: Emmanouil Pitsidianakis
Reviewed-by: Emmanouil Pitsidianakis
---
v1: void *rutabaga --> struct rutabaga
This adds basic documentation for virtio-gpu.
Suggested-by: Akihiko Odaki
Signed-off-by: Gurchetan Singh
Tested-by: Alyssa Ross
Tested-by: Emmanouil Pitsidianakis
Reviewed-by: Emmanouil Pitsidianakis
---
v2: - Incorporated suggestions by Akihiko Odaki
- Listed the currently supported caps
From: "Dr. David Alan Gilbert"
Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' to allow
defining shared memory regions with sizes and offsets of 2^32 and more.
Multiple instances of the capability are allowed and distinguished
by a device-specific 'id'.
Signed-off-by: Dr. David A
From: Gurchetan Singh
Prior versions:
v5:
https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg02339.html
v4:
https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg01566.html
v3:
https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg00565.html
v2:
https://lists.gnu.org/archive/html/
On Mon, Aug 14, 2023 at 4:36 PM Andrew Melnichenko wrote:
>
> Hi, all.
>
> I've researched an issue a bit. And what can we do?
> In the case of an "old" kernel 5.4, we need to load RSS eBPF without
> BPF_F_MAPPABLE
> and use bpf syscall to update the maps. This requires additional capabilities,
>
Fabiano Rosas writes:
> It makes a bit more sense to have the zero page handling of xbzrle
> right where we save the zero page.
>
> This also makes save_zero_page() follow the same format as
> save_compress_page() at the top level of
> ram_save_target_page_legacy().
>
> Signed-off-by: Fabiano Ros
Peter Xu writes:
> On Tue, Aug 15, 2023 at 11:38:28AM -0300, Fabiano Rosas wrote:
>> We don't need to do this in two pieces. One single function makes it
>> easier to grasp, specially since it removes the indirection on the
>> return value handling.
>>
>> Signed-off-by: Fabiano Rosas
>> ---
>>
Based-on: 20230815223741.433763-1-dbarb...@ventanamicro.com
("[PATCH v8 00/12] riscv: add 'max' CPU, deprecate 'any'")
Hi,
This new version was rebased on top of the new version of its parent
series. Recent changes made there conflicted with the previous version
of this work.
No changes made asi
The RISC-V KVM driver uses a CPUCFG() macro that calculates the offset
of a certain field in the struct RISCVCPUConfig. We're going to use this
macro in target/riscv/cpu.c as well in the next patches. Make it public.
Rename it to CPU_CFG_OFFSET() for more clarity while we're at it.
Signed-off-by:
If we want to make better decisions when auto-enabling extensions during
realize() we need a way to tell if an user set an extension manually.
The RISC-V KVM driver has its own solution via a KVMCPUConfig struct
that has an 'user_set' flag that is set during the Property set()
callback. The set() c
During realize() time we're activating a lot of extensions based on some
criteria, e.g.:
if (cpu->cfg.ext_zk) {
cpu->cfg.ext_zkn = true;
cpu->cfg.ext_zkr = true;
cpu->cfg.ext_zkt = true;
}
This practice resulted in at least one case where we ended up enabling
somet
Before adding support to detect if an extension was user set we need to
handle how we're enabling extensions in riscv_init_max_cpu_extensions().
object_property_set_bool() calls the set() callback for the property,
and we're going to use this callback to set the 'multi_ext_user_opts'
hash.
This me
Let's change the other instances in realize() where we're enabling an
extension based on a certain criteria (e.g. it's a dependency of another
extension).
We're leaving icsr and ifencei being enabled during RVG for later -
we'll want to error out in that case. Every other extension enablement
duri
Add a new cpu_cfg_ext_is_user_set() helper to check if an extension was
set by the user in the command line. Use it inside
cpu_cfg_ext_auto_update() to verify if the user set a certain extension
and, if that's the case, do not change its value.
This will make us honor user choice instead of overwr
Enabling RVG will enable a set of extensions that we're not checking if
the user was okay enabling or not. And in this case we want to error
out, instead of ignoring, otherwise we will be inconsistent enabling RVG
without all its extensions.
After this patch, disabling ifencei or icsr while enabli
We'll have future usage for a function where, given an offset of the
struct RISCVCPUConfig, the flag is updated to a certain val.
Change all existing callers to use edata->ext_enable_offset instead of
'edata'.
Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Alistair Francis
---
target/risc
Peter Xu writes:
> On Tue, Aug 15, 2023 at 09:35:19AM -0300, Fabiano Rosas wrote:
>> Guoyi Tu writes:
>>
>> > When the migration process of a virtual machine using huge pages is
>> > cancelled,
>> > QEMU will continue to complete the processing of the current huge page
>> > through the qemu fi
The 'any' CPU type was introduced in commit dc5bd18fa5725 ("RISC-V CPU
Core Definition"), being around since the beginning. It's not an easy
CPU to use: it's undocumented and its name doesn't tell users much about
what the CPU is supposed to bring. 'git log' doesn't help us either in
knowing what w
Inside riscv_cpu_validate_v() we're always throwing a log message if the
user didn't set a vector version via 'vext_spec'.
We're going to include one case with the 'max' CPU where env->vext_ver
will be set in the cpu_init(). But that alone will not stop the "vector
version is not specified" messag
Create a new riscv_cpu_experimental_exts[] to store the non-ratified
extensions properties. Once they are ratified we'll move them back to
riscv_cpu_extensions[].
riscv_cpu_add_user_properties() and riscv_cpu_add_kvm_properties() are
changed to keep adding non-ratified properties to users.
Signed
Hi,
In this version we replaced the macros added in patch 7 and 8 with
regular functions instead.
Patches missing acks: 4,7,8
Changes from v7:
- patch 7:
- add riscv_cpu_add_qdev_prop_array() function instead of a macro
- patch 8:
- add riscv_cpu_add_kvm_unavail_prop_array() function instead
Future patches will split the existing Property arrays even further, and
the existing code in riscv_cpu_add_user_properties() will start to scale
bad with it because it's dealing with KVM constraints mixed in with TCG
constraints. We're going to pay a high price to share a couple of common
lines of
The code inside riscv_cpu_add_user_properties() became quite repetitive
after recent changes. Add a helper to hide the repetition away.
Signed-off-by: Daniel Henrique Barboza
---
target/riscv/cpu.c | 27 +++
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/
After the introduction of riscv_cpu_options[] all properties in
riscv_cpu_extensions[] are booleans. This check is now obsolete.
Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Alistair Francis
---
target/riscv/cpu.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
dif
Add smoke tests to ensure that we'll not break the 'max' CPU type when
adding new ratified extensions to be enabled.
Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Alistair Francis
---
tests/avocado/riscv_opensbi.py | 16
1 file changed, 16 insertions(+)
diff --git a/test
The 'max' CPU type is used by tooling to determine what's the most
capable CPU a current QEMU version implements. Other archs such as ARM
implements this type. Let's add it to RISC-V.
What we consider "most capable CPU" in this context are related to
ratified, non-vendor extensions. This means tha
Add DEFINE_PROP_END_OF_LIST() and eliminate the ARRAY_SIZE() usage when
iterating in the riscv_cpu_options[] array, making it similar to what
we already do when working with riscv_cpu_extensions[].
We also have a more sophisticated motivation behind this change. In the
future we might need to expo
Our goal is to make riscv_cpu_extensions[] hold only ratified,
non-vendor extensions.
Create a new riscv_cpu_vendor_exts[] array for them, changing
riscv_cpu_add_user_properties() and riscv_cpu_add_kvm_properties()
accordingly.
Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Alistair Francis
Use a helper in riscv_cpu_add_kvm_properties() to eliminate some of its
code repetition.
Signed-off-by: Daniel Henrique Barboza
---
target/riscv/cpu.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index a0c14d
We'll add a new CPU type that will enable a considerable amount of
extensions. To make it easier for us we'll do a few cleanups in our
existing riscv_cpu_extensions[] array.
Start by splitting all CPU non-boolean options from it. Create a new
riscv_cpu_options[] array for them. Add all these prope
On Tue, Aug 15, 2023 at 07:19:43PM -0300, Fabiano Rosas wrote:
> Peter Xu writes:
>
> > On Fri, Aug 11, 2023 at 12:08:35PM -0300, Fabiano Rosas wrote:
> >> When doing cleanup, we currently close() some of the shared migration
> >> files and shutdown() + close() others. Be consistent by always cal
On Tue, Aug 15, 2023 at 11:38:28AM -0300, Fabiano Rosas wrote:
> We don't need to do this in two pieces. One single function makes it
> easier to grasp, specially since it removes the indirection on the
> return value handling.
>
> Signed-off-by: Fabiano Rosas
> ---
> migration/ram.c | 41 ++
Peter Xu writes:
> On Fri, Aug 11, 2023 at 12:08:36PM -0300, Fabiano Rosas wrote:
>> We currently have a pattern for cleaning up a migration QEMUFile:
>>
>> qemu_mutex_lock(&s->qemu_file_lock);
>> file = s->file_name;
>> s->file_name = NULL;
>> qemu_mutex_unlock(&s->qemu_file_lock);
>>
On Tue, Aug 15, 2023 at 11:38:27AM -0300, Fabiano Rosas wrote:
> Invert the first conditional so we return early when len == 0. This is
> merely to make the next patch easier to read.
>
> Signed-off-by: Fabiano Rosas
> ---
> migration/ram.c | 29 +++--
> 1 file changed, 1
On Tue, Aug 15, 2023 at 11:38:26AM -0300, Fabiano Rosas wrote:
> It makes a bit more sense to have the zero page handling of xbzrle
> right where we save the zero page.
>
> This also makes save_zero_page() follow the same format as
> save_compress_page() at the top level of
> ram_save_target_page_
On Tue, Aug 15, 2023 at 11:38:25AM -0300, Fabiano Rosas wrote:
> We don't need the QEMUFile when we're already passing the
> PageSearchStatus.
>
> Signed-off-by: Fabiano Rosas
Reviewed-by: Peter Xu
--
Peter Xu
On Tue, Aug 15, 2023 at 11:38:24AM -0300, Fabiano Rosas wrote:
> 'rs' is not used in that function. It's a leftover from commit
> 9360447d34 ("ram: Use MigrationStats for statistics").
>
> Signed-off-by: Fabiano Rosas
Reviewed-by: Peter Xu
--
Peter Xu
On Tue, Aug 15, 2023 at 09:35:19AM -0300, Fabiano Rosas wrote:
> Guoyi Tu writes:
>
> > When the migration process of a virtual machine using huge pages is
> > cancelled,
> > QEMU will continue to complete the processing of the current huge page
> > through the qemu file object got an error set.
Peter Xu writes:
> On Fri, Aug 11, 2023 at 12:08:35PM -0300, Fabiano Rosas wrote:
>> When doing cleanup, we currently close() some of the shared migration
>> files and shutdown() + close() others. Be consistent by always calling
>> shutdown() before close().
>>
>> Do this only for the source fil
On Fri, Aug 11, 2023 at 12:08:36PM -0300, Fabiano Rosas wrote:
> We currently have a pattern for cleaning up a migration QEMUFile:
>
> qemu_mutex_lock(&s->qemu_file_lock);
> file = s->file_name;
> s->file_name = NULL;
> qemu_mutex_unlock(&s->qemu_file_lock);
>
> migration_ioc_unregister
On Fri, Aug 11, 2023 at 12:08:35PM -0300, Fabiano Rosas wrote:
> When doing cleanup, we currently close() some of the shared migration
> files and shutdown() + close() others. Be consistent by always calling
> shutdown() before close().
>
> Do this only for the source files for now because the sou
On Fri, Aug 11, 2023 at 12:08:34PM -0300, Fabiano Rosas wrote:
> Now that the return path thread is allowed to finish during a paused
> migration, we can move the cleanup of the QEMUFiles to the main
> migration thread.
>
> Signed-off-by: Fabiano Rosas
Reviewed-by: Peter Xu
--
Peter Xu
On 8/15/23 14:15, Daniel Henrique Barboza wrote:
I assume that you don't fancy this macro usage, and probably for a good reason,
I prefer to use macros only for things that cannot be done another way.
When debugging, one cannot step through macros in any reasonable way.
r~
On Fri, Aug 11, 2023 at 12:08:33PM -0300, Fabiano Rosas wrote:
> Replace the return path retry logic with finishing and restarting the
> thread. This fixes a race when resuming the migration that leads to a
> segfault.
>
> Currently when doing postcopy we consider that an IO error on the
> return
On Fri, Aug 11, 2023 at 12:08:32PM -0300, Fabiano Rosas wrote:
> We'll start calling the await_return_path_close_on_source() function
> from other parts of the code, so move all of the related checks and
> tracepoints into it.
>
> Signed-off-by: Fabiano Rosas
Reviewed-by: Peter Xu
--
Peter Xu
On Fri, Aug 11, 2023 at 12:08:31PM -0300, Fabiano Rosas wrote:
> This file is owned by the return path thread which is already doing
> cleanup.
>
> Signed-off-by: Fabiano Rosas
Reviewed-by: Peter Xu
--
Peter Xu
On Fri, Aug 11, 2023 at 12:08:30PM -0300, Fabiano Rosas wrote:
> It's not safe to call qemu_file_shutdown() on the to_dst_file without
> first checking for the file's presence under the lock. The cleanup of
> this file happens at postcopy_pause() and migrate_fd_cleanup() which
> are not necessarily
On Fri, Aug 11, 2023 at 12:08:27PM -0300, Fabiano Rosas wrote:
> We don't need to set the rp_state.error right after a shutdown because
> qemu_file_shutdown() always sets the QEMUFile error, so the return
> path thread would have seen it and set the rp error itself.
>
> Setting the error outside o
On Fri, Aug 11, 2023 at 12:08:29PM -0300, Fabiano Rosas wrote:
> diff --git a/migration/migration.c b/migration/migration.c
> index 0067c927fa..85c171f32c 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -2057,11 +2057,10 @@ static int
> await_return_path_close_on_source(Mig
On 8/15/23 23:09, Richard Henderson wrote:
On 8/15/23 06:51, Michael Tokarev wrote:
09.08.2023 00:08, Richard Henderson пишет:
The following changes since commit 0450cf08976f9036feaded438031b4cba94f6452:
Merge tag 'fixes-pull-request' of https://gitlab.com/marcandre.lureau/qemu
into stagin
On 8/15/23 17:44, Richard Henderson wrote:
On 8/15/23 13:15, Daniel Henrique Barboza wrote:
@@ -1883,6 +1883,13 @@ static void cpu_set_cfg_unavailable(Object *obj, Visitor
*v,
}
#endif
+#define ADD_CPU_QDEV_PROPERTIES_ARRAY(_dev, _array) \
+ do { \
+ for (Property *prop = _arra
On 8/15/23 06:51, Michael Tokarev wrote:
09.08.2023 00:08, Richard Henderson пишет:
The following changes since commit 0450cf08976f9036feaded438031b4cba94f6452:
Merge tag 'fixes-pull-request' of https://gitlab.com/marcandre.lureau/qemu into
staging (2023-08-07 13:55:00 -0700)
are availabl
On 8/15/23 13:15, Daniel Henrique Barboza wrote:
@@ -1883,6 +1883,13 @@ static void cpu_set_cfg_unavailable(Object *obj, Visitor
*v,
}
#endif
+#define ADD_CPU_QDEV_PROPERTIES_ARRAY(_dev, _array) \
+do { \
+for (Property *prop = _array; prop && prop->name; prop++) { \
+
Let's change the other instances in realize() where we're enabling an
extension based on a certain criteria (e.g. it's a dependency of another
extension).
We're leaving icsr and ifencei being enabled during RVG for later -
we'll want to error out in that case. Every other extension enablement
duri
During realize() time we're activating a lot of extensions based on some
criteria, e.g.:
if (cpu->cfg.ext_zk) {
cpu->cfg.ext_zkn = true;
cpu->cfg.ext_zkr = true;
cpu->cfg.ext_zkt = true;
}
This practice resulted in at least one case where we ended up enabling
somet
Add a new cpu_cfg_ext_is_user_set() helper to check if an extension was
set by the user in the command line. Use it inside
cpu_cfg_ext_auto_update() to verify if the user set a certain extension
and, if that's the case, do not change its value.
This will make us honor user choice instead of overwr
Before adding support to detect if an extension was user set we need to
handle how we're enabling extensions in riscv_init_max_cpu_extensions().
object_property_set_bool() calls the set() callback for the property,
and we're going to use this callback to set the 'multi_ext_user_opts'
hash.
This me
Hi,
This new version is a rebase on top of the new version of the 'max' CPU
series:
[PATCH v7 00/12] riscv: add 'max' CPU, deprecate 'any'
The changes made from v6 to v7 conflicted with the code from v1 of this
series.
No changes made aside from trivial conflicts.
All patches acked.
Changes f
Enabling RVG will enable a set of extensions that we're not checking if
the user was okay enabling or not. And in this case we want to error
out, instead of ignoring, otherwise we will be inconsistent enabling RVG
without all its extensions.
After this patch, disabling ifencei or icsr while enabli
If we want to make better decisions when auto-enabling extensions during
realize() we need a way to tell if an user set an extension manually.
The RISC-V KVM driver has its own solution via a KVMCPUConfig struct
that has an 'user_set' flag that is set during the Property set()
callback. The set() c
The RISC-V KVM driver uses a CPUCFG() macro that calculates the offset
of a certain field in the struct RISCVCPUConfig. We're going to use this
macro in target/riscv/cpu.c as well in the next patches. Make it public.
Rename it to CPU_CFG_OFFSET() for more clarity while we're at it.
Signed-off-by:
We'll have future usage for a function where, given an offset of the
struct RISCVCPUConfig, the flag is updated to a certain val.
Change all existing callers to use edata->ext_enable_offset instead of
'edata'.
Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Alistair Francis
---
target/risc
The 'max' CPU type is used by tooling to determine what's the most
capable CPU a current QEMU version implements. Other archs such as ARM
implements this type. Let's add it to RISC-V.
What we consider "most capable CPU" in this context are related to
ratified, non-vendor extensions. This means tha
Add smoke tests to ensure that we'll not break the 'max' CPU type when
adding new ratified extensions to be enabled.
Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Alistair Francis
---
tests/avocado/riscv_opensbi.py | 16
1 file changed, 16 insertions(+)
diff --git a/test
Use a macro in riscv_cpu_add_kvm_properties() to eliminate some of its
code repetition, similar to what we're already doing with
ADD_CPU_QDEV_PROPERTIES_ARRAY().
Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Weiwei Li
---
target/riscv/cpu.c | 21 ++---
1 file changed, 10 i
Future patches will split the existing Property arrays even further, and
the existing code in riscv_cpu_add_user_properties() will start to scale
bad with it because it's dealing with KVM constraints mixed in with TCG
constraints. We're going to pay a high price to share a couple of common
lines of
The 'any' CPU type was introduced in commit dc5bd18fa5725 ("RISC-V CPU
Core Definition"), being around since the beginning. It's not an easy
CPU to use: it's undocumented and its name doesn't tell users much about
what the CPU is supposed to bring. 'git log' doesn't help us either in
knowing what w
Inside riscv_cpu_validate_v() we're always throwing a log message if the
user didn't set a vector version via 'vext_spec'.
We're going to include one case with the 'max' CPU where env->vext_ver
will be set in the cpu_init(). But that alone will not stop the "vector
version is not specified" messag
Create a new riscv_cpu_experimental_exts[] to store the non-ratified
extensions properties. Once they are ratified we'll move them back to
riscv_cpu_extensions[].
riscv_cpu_add_user_properties() and riscv_cpu_add_kvm_properties() are
changed to keep adding non-ratified properties to users.
Signed
The code inside riscv_cpu_add_user_properties() became quite repetitive
after recent changes. Add a macro to hide the repetition away.
Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Weiwei Li
---
target/riscv/cpu.c | 27 +++
1 file changed, 11 insertions(+), 16 dele
Hi,
This new version contains a change in patch 4 where, instead of changing
every other Property array to use ARRAY_SIZE(), convert
riscv_cpu_options[] to use DEFINE_PROP_END_OF_LIST(). This change makes
no difference in the code deduplication that is done in the later
patches, and will spare us
Add DEFINE_PROP_END_OF_LIST() and eliminate the ARRAY_SIZE() usage when
iterating in the riscv_cpu_options[] array, making it similar to what
we already do when working with riscv_cpu_extensions[].
We also have a more sophisticated motivation behind this change. In the
future we might need to expo
After the introduction of riscv_cpu_options[] all properties in
riscv_cpu_extensions[] are booleans. This check is now obsolete.
Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Alistair Francis
---
target/riscv/cpu.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
dif
Our goal is to make riscv_cpu_extensions[] hold only ratified,
non-vendor extensions.
Create a new riscv_cpu_vendor_exts[] array for them, changing
riscv_cpu_add_user_properties() and riscv_cpu_add_kvm_properties()
accordingly.
Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Alistair Francis
We'll add a new CPU type that will enable a considerable amount of
extensions. To make it easier for us we'll do a few cleanups in our
existing riscv_cpu_extensions[] array.
Start by splitting all CPU non-boolean options from it. Create a new
riscv_cpu_options[] array for them. Add all these prope
When the offset is out of range of the non-prefixed insn, but
fits the 34-bit immediate of the prefixed insn, use that.
Reviewed-by: Jordan Niethe
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.c.inc | 66
1 file changed, 66 insertions(+)
diff
PADDI can load 34-bit immediates and 34-bit pc-relative addresses.
Reviewed-by: Jordan Niethe
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.c.inc | 51
1 file changed, 51 insertions(+)
diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target
The prefixed instruction has a pc-relative form to use here.
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.c.inc | 24
1 file changed, 24 insertions(+)
diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc
index 1aece2cbf7..670811b636 100644
--- a/t
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.c.inc | 13 +
1 file changed, 13 insertions(+)
diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc
index 36b4f61236..a302bfff2e 100644
--- a/tcg/ppc/tcg-target.c.inc
+++ b/tcg/ppc/tcg-target.c.inc
@@ -1050,6 +1050,1
This may or may not improve performance.
It appears to result in slightly larger code,
but perhaps not enough to matter.
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.c.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.c.inc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc
index 511e14b180..642d0fd128 100644
--- a/tcg/ppc/tcg-target.c.inc
+++ b/tcg/ppc/tcg-target.c.inc
@@ -221,7 +
This hook may emit code at the beginning of the TB.
Suggested-by: Jordan Niethe
Signed-off-by: Richard Henderson
---
tcg/tcg.c| 3 +++
tcg/aarch64/tcg-target.c.inc | 5 +
tcg/arm/tcg-target.c.inc | 5 +
tcg/i386/tcg-target.c.inc| 5 +
tcg/
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.c.inc | 12
1 file changed, 12 insertions(+)
diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc
index a302bfff2e..a5c1891eb6 100644
--- a/tcg/ppc/tcg-target.c.inc
+++ b/tcg/ppc/tcg-target.c.inc
@@ -1076,6 +1076,12
With ISA v3.0, we can use ADDPCIS instead of BCL+MFLR to load NIP.
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.c.inc | 25 ++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc
index 19004fa568..36
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.c.inc | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc
index a5c1891eb6..b7d1b4f1bb 100644
--- a/tcg/ppc/tcg-target.c.inc
+++ b/tcg/ppc/tcg-target.c.inc
@@ -2
1 - 100 of 180 matches
Mail list logo