On Wed, Feb 24, 2021 at 01:08:22PM +, Peter Maydell wrote:
> On Wed, 24 Feb 2021 at 11:23, Gerd Hoffmann wrote:
> >
> > On Mon, Feb 22, 2021 at 11:40:12PM +0900, Akihiko Odaki wrote:
> > > A display can receive an image which its stride is greater than its
> > > width. In fact, when a guest re
Hi,
> a programming error. So I'm absolutely against shoving this logic
> down into object.c. But I find the variant I posted nicer to document
> and nicer to read: looking at virtio_ccw_gpu_register() one sees
> immediately that if built as a module, it is OK if the registration
> fails, and if
On 2021/2/25 6:53, David Edmondson wrote:
On Tuesday, 2021-02-23 at 10:16:43 +08, Kunkun Jiang wrote:
The ram_save_host_page() has been modified several times
since its birth. But the comment hasn't been modified as it should
be. It'd better to modify the comment to explain ram_save_host_page()
On 24/02/2021 11:59, Emanuele Giuseppe Esposito wrote:
On 24/02/2021 11:49, Paolo Bonzini wrote:
On 24/02/21 11:18, Emanuele Giuseppe Esposito wrote:
qtest
+ qgraph
It may make sense to add instead a "toctree" directive in qtest.rst.
I haven't checked what the result looks like,
Richard Henderson writes:
> Always perform one call instead of two for 16-byte operands.
> Use byte loads/stores directly into the vector register file
> instead of extractions and deposits to a 64-bit local variable.
>
> In order to easily receive pointers into the vector register file,
> conv
On Thu, 25 Feb 2021 at 00:38, Geoffrey McRae wrote:
> While I get where you're coming from, those using QEMU with Jack are
> already advanced users that are used to reading technical documentation.
> Having our one client do something that is unexpected/different would
> not only confuse existing
On Thu, Feb 25, 2021 at 09:12:39AM +0900, Akihiko Odaki wrote:
Report the configured granularity for discard operation to the
guest. If this is not set use the block size.
Since until now we have ignored the configured discard granularity
and always reported the block size, let's add
'report-dis
2021年2月25日(木) 17:02 Gerd Hoffmann :
>
> On Wed, Feb 24, 2021 at 01:08:22PM +, Peter Maydell wrote:
> > On Wed, 24 Feb 2021 at 11:23, Gerd Hoffmann wrote:
> > >
> > > On Mon, Feb 22, 2021 at 11:40:12PM +0900, Akihiko Odaki wrote:
> > > > A display can receive an image which its stride is greate
Signed-off-by: Akihiko Odaki
---
ui/cocoa.m | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 0ef5fdf3b7a..9e9a2f88dde 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -80,7 +80,7 @@ static void cocoa_switch(DisplayChangeListener *dcl,
On Wed, Feb 24, 2021 at 11:33:14PM +0100, Christian Schoenebeck wrote:
> On Mittwoch, 24. Februar 2021 23:04:47 CET Geoffrey McRae wrote:
> > This goes against how all standard jack clients work, a new jack client
> > should not auto-connect at all unless explicitly configured to as if
> > there is
On 2/25/21 5:19 AM, Richard Henderson wrote:
> On 2/24/21 5:34 AM, Claudio Fontana wrote:
>> Signed-off-by: Claudio Fontana
>> Cc: Paolo Bonzini
>> ---
>> target/i386/gdbstub.c | 16
>> 1 file changed, 16 insertions(+)
>>
>> diff --git a/target/i386/gdbstub.c b/target/i386/gdbst
An accurate cpu topology may help improve the cpu scheduler's decision
making when dealing with multi-core system. So cpu topology description
is helpful to provide guest with the right view. Dario Faggioli's talk
in [0] also shows the virtual topology may has impact on sched performace.
Thus this
Add the Processor Properties Topology Table (PPTT) to present
CPU topology information to the guest. A three-level cpu
topology is built in accord with the linux kernel currently does.
Tested-by: Jiajie Li
Signed-off-by: Ying Fang
---
hw/arm/virt-acpi-build.c | 50 ++
Add the processor hierarchy node structures to build ACPI information
for CPU topology. Since the private resources may be used to describe
cache hierarchy and it is variable among different topology level,
three helpers are introduced to describe the hierarchy.
(1) build_socket_hierarchy for sock
qemu_fdt_add_path() works like qemu_fdt_add_subnode(), except
it also adds any missing parent nodes. We also tweak an error
message of qemu_fdt_add_subnode().
Signed-off-by: Andrew Jones
Signed-off-by: Ying Fang
---
include/sysemu/device_tree.h | 1 +
softmmu/device_tree.c| 45
When building ACPI tables regarding CPUs we should always build
them for the number of possible CPUs, not the number of present
CPUs. We then ensure only the present CPUs are enabled in madt.
Furthermore, it is also needed if we are going to support CPU
hotplug in the future.
This patch is a rewor
Support device tree CPU topology descriptions.
Signed-off-by: Ying Fang
---
hw/arm/virt.c | 38 +-
include/hw/arm/virt.h | 1 +
2 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 371147f3ae..c133b342b8 1
> -DisplaySurface *qemu_create_message_surface(int w, int h,
> -const char *msg)
> +DisplaySurface *qemu_create_placeholder_surface(int w, int h,
> +const char *msg)
> {
> DisplaySurface *surface = qem
On 2/25/21 5:28 AM, Richard Henderson wrote:
> On 2/24/21 5:34 AM, Claudio Fontana wrote:
>> cpu_load_efer is now used only for sysemu code.
>>
>> Therefore, make this inline function not visible anymore
>> in CONFIG_USER_ONLY builds.
>>
>> Signed-off-by: Claudio Fontana
>> ---
>> target/i386/cpu
> +static void dpy_gfx_switch(DisplayChangeListener *dcl, DisplaySurface
> *surface)
int width, int height;
> +static DisplaySurface *placeholder;
> +static const char placeholder_msg[] = "Display output is not active.";
> +DisplaySurface *broadcast;
> +
> +if (!dcl->ops->dpy_gfx
Chen Qun writes:
> There are 23 files that include the "sysemu/qtest.h",
> but they do not use any qtest functions.
>
> Signed-off-by: Chen Qun
The subject sounds as if you were deleting file include/sysemu/qtest.h,
which would be wrong. You're actually deleting inclusions. Suggest to
say
> -if (m->scanout_id == 0 && m->width == 0) {
> +if (m->width == 0) {
> s->ds = qemu_create_placeholder_surface(640, 480,
> "Guest disabled
> display.");
> dpy_gfx_replace_surface(con, s->ds);
Just call
With -Werror=maybe-uninitialized configuration we get
../hw/i386/intel_iommu.c: In function ‘vtd_context_device_invalidate’:
../hw/i386/intel_iommu.c:1888:10: error: ‘mask’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
1888 | mask = ~mask;
| ~^~~
A
Hi,
Here is a set of vIOMMU fixes:
SMMUv3:
- top SID computation overflow when handling SMMU_CMD_CFGI_ALL
- internal IOTLB handling (changes related to range invalidation)
- smmu_iotlb_inv_iova with asid = -1
- non power of 2 invalidation range handling.
VIRTIO-IOMMU:
- non power of 2 inva
If the whole SID range (32b) is invalidated (SMMU_CMD_CFGI_ALL),
@end overflows and we fail to handle the command properly.
Once this gets fixed, the current code really is awkward in the
sense it loops over the whole range instead of removing the
currently cached configs through a hash table look
As of today, the driver can invalide a number of pages that is
not a power of 2. However IOTLB unmap notifications and internal
IOTLB invalidations work with masks leading to erroneous
invalidations.
In case the range is not a power of 2, split invalidations into
power of 2 invalidations.
When lo
Currently get_naturally_aligned_size() is used by the intel iommu
to compute the maximum invalidation range based on @size which is
a power of 2 while being aligned with the @start address and less
than the maximum range defined by @gaw.
This helper is also useful for other iommu devices (virtio-i
Unmap notifiers work with an address mask assuming an
invalidation range of a power of 2. Nothing mandates this
in the VIRTIO-IOMMU spec.
So in case the range is not a power of 2, split it into
several invalidations.
Signed-off-by: Eric Auger
---
hw/virtio/virtio-iommu.c | 19 --
Convert all sid printouts to sid=0x%x.
Signed-off-by: Eric Auger
---
hw/arm/trace-events | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/hw/arm/trace-events b/hw/arm/trace-events
index a335ee891d..b79a91af5f 100644
--- a/hw/arm/trace-events
+++ b/hw
If the asid is not set, do not attempt to locate the key directly
as all inserted keys have a valid asid.
Use g_hash_table_foreach_remove instead.
Signed-off-by: Eric Auger
---
hw/arm/smmu-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/arm/smmu-common.c b/hw/arm
On 23/02/2021 18:49, Philippe Mathieu-Daudé wrote:
On 2/9/21 8:30 PM, Mark Cave-Ayland wrote:
Rename TI_BUFSZ to ESP_FIFO_SZ since this constant is really describing the size
of the FIFO and is not directly related to the TI size.
Signed-off-by: Mark Cave-Ayland
---
hw/scsi/esp.c |
At present when building qemu-ppce500 the following warnings are seen:
= WARNING ==
This board does not use CONFIG_DM. CONFIG_DM will be
compulsory starting with the v2020.01 release.
Failure to update may result in board removal.
UPD include/generated
Sorry for the late reply due to CNY.
Auto-converge ensure that live migration can be completed smoothly when there
are too many dirty pages.
COLO may encounter the same situation when rebuild a new secondary VM.
So, I think it is necessary to enable COLO and auto-converge at the same time.
Thank
If user executes the shutdown normally and QEMU crashes, I think this is
unacceptable.
Since we can avoid this situation, why not do it?
Thanks,
Lei.
-Original Message-
From: Lukas Straub
Sent: Sunday, February 14, 2021 7:46 PM
To: Rao, Lei
Cc: Zhang, Chen ; lizhij...@cn.fujitsu.com;
Paolo Bonzini writes:
> On 24/02/21 18:16, Philippe Mathieu-Daudé wrote:
>> We removed the QMP loop in user-mode builds in commit 1935e0e4e09
>> ("qapi/meson: Remove QMP from user-mode emulation"), now commands
>> and events code is unreachable.
>> Signed-off-by: Philippe Mathieu-Daudé
>> ---
>>
2021年2月25日(木) 18:11 Gerd Hoffmann :
>
> > -if (m->scanout_id == 0 && m->width == 0) {
> > +if (m->width == 0) {
> > s->ds = qemu_create_placeholder_surface(640, 480,
> > "Guest disabled
> > display.");
> >
On Wed, Feb 24, 2021 at 09:02:51PM +0100, Niek Linnenbank wrote:
> Hi Philippe, Cleber,
>
> On Wed, Feb 24, 2021 at 8:14 PM Cleber Rosa wrote:
>
> > On Wed, Feb 24, 2021 at 10:12:10AM +0100, Philippe Mathieu-Daudé wrote:
> > > Hi Niek,
> > >
> > > On 2/23/21 11:53 PM, Niek Linnenbank wrote:
> >
Richard Henderson writes:
> Precompute the initial tb->cflags value for a cpu from its cluster
> and the number of cpus live in the system. This avoids having to
> compute this constant data every time we look up a TB.
>
> Signed-off-by: Richard Henderson
Reviewed-by: Alex Bennée
Tested-by:
Richard Henderson writes:
> Always perform one call instead of two for 16-byte operands.
> Use byte loads/stores directly into the vector register file
> instead of extractions and deposits to a 64-bit local variable.
>
> In order to easily receive pointers into the vector register file,
> conv
On 23/02/2021 21:32, Philippe Mathieu-Daudé wrote:
Hi Mark,
On 2/9/21 8:29 PM, Mark Cave-Ayland wrote:
This patch series comes from an experimental branch that I've been working on
to try and boot a MacOS toolbox ROM under the QEMU q800 machine. The effort is
far from complete, but it seems wo
On 25/02/21 09:22, Emanuele Giuseppe Esposito wrote:
diff --git a/docs/devel/index.rst b/docs/devel/index.rst
index 1dcce3bbed..f0038f8722 100644
--- a/docs/devel/index.rst
+++ b/docs/devel/index.rst
@@ -12,6 +12,7 @@ Contents:
.. toctree::
:maxdepth: 2
+ :includehidden:
build-sys
On 25/02/21 06:47, Zheng Zhan Liang wrote:
Signed-off-by: Zheng Zhan Liang
---
target/i386/tcg/misc_helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c
index f02e4fd400..90b87fdef0 100644
--- a/target/i38
On 2/25/21 10:14 AM, Eric Auger wrote:
> With -Werror=maybe-uninitialized configuration we get
> ../hw/i386/intel_iommu.c: In function ‘vtd_context_device_invalidate’:
> ../hw/i386/intel_iommu.c:1888:10: error: ‘mask’ may be used
> uninitialized in this function [-Werror=maybe-uninitialized]
> 188
On 22/02/21 15:15, Philippe Mathieu-Daudé wrote:
Missing review: 1 (license)
Since v3:
- Include full MIT license text (Peter)
Since v2:
- Added missing TC58128/SH_PCI Kconfig entries (Peter)
Since v1:
- Addressed Peter Maydell review comments from
https://www.mail-archive.com/qemu-block@nongn
On 09/02/21 06:49, Pavel Dovgalyuk wrote:
This patch checks that ioc is not null before
using it in tcp socket tcp_chr_add_watch function.
The failure occurs in replay mode of the execution,
when monitor and serial port are tcp servers,
and there are no clients connected to them:
-monitor tcp:1
There is a bug in qcow2: host cluster can be discarded (refcount
becomes 0) and reused during data write. In this case data write may
pollute another cluster (recently allocated) or even metadata.
To fix the issue let's track inflight writes to host cluster in the
hash table and consider new count
Simple test:
- start writing to allocated cluster A
- discard this cluster
- write to another unallocated cluster B (it's allocated in same place
where A was allocated)
- continue writing to A
For now last action pollutes cluster B which is a bug fixed by the
following commit.
For now, add
Hi all! It occurs that nothing prevents discarding and reallocating host
cluster during data writing. This way data writing will pollute another
flash allocated cluster of data or metadata.
Here is my suggestion to fix it basing on improved refcounts model. Look
at 02 for details.
I don't insist
Hi Paolo,
On 2/25/21 11:07 AM, Paolo Bonzini wrote:
> On 25/02/21 06:47, Zheng Zhan Liang wrote:
>> Signed-off-by: Zheng Zhan Liang
>> ---
>> target/i386/tcg/misc_helper.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/target/i386/tcg/misc_helper.c
>> b/target/i3
The surfaces created with former qemu_create_message_surface
did not display the content from the guest and always contained
simple messages describing the reason.
A display backend may want to hide the window showing such a
surface. This change renames the function to
qemu_create_placeholder_surf
On 2/25/21 10:14 AM, Eric Auger wrote:
> Convert all sid printouts to sid=0x%x.
>
> Signed-off-by: Eric Auger
> ---
> hw/arm/trace-events | 24
> 1 file changed, 12 insertions(+), 12 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé
Provides a minimal fw_cfg for the virt machine on riscv. I've
arbitrarily selected an MMIO base for it. This is very rudimentary, so
no DMA interface is exposed. Tested as working!
(First patch to qemu, so whatever patience you can afford would be
appreciated.)
Signed-off-by: Asherah Connor
-
In the past, virtio-gpu set NULL as the surface for the secondary
consoles to hide its window. The distinction is now handled in
ui/console and the display backends and virtio-gpu does no longer
have to do that.
Signed-off-by: Akihiko Odaki
---
hw/display/vhost-user-gpu.c | 6 ++
hw/displa
ui/console used to accept NULL as graphic console surface, but its
semantics was inconsistent among displays:
- cocoa and gtk-egl perform NULL dereference.
- egl-headless, spice and spice-egl do nothing.
- gtk releases underlying resources.
- sdl2-2d and sdl2-gl destroys the window.
- vnc shows a m
On 25/02/2021 11:05, Paolo Bonzini wrote:
On 25/02/21 09:22, Emanuele Giuseppe Esposito wrote:
diff --git a/docs/devel/index.rst b/docs/devel/index.rst
index 1dcce3bbed..f0038f8722 100644
--- a/docs/devel/index.rst
+++ b/docs/devel/index.rst
@@ -12,6 +12,7 @@ Contents:
.. toctree::
:m
Richard Henderson writes:
> On 2/24/21 8:58 AM, Alex Bennée wrote:
>> Hi Richard,
>>
>> Well I spun up some of the ideas we talked about to see if there was
>> anything to be squeezed out of the function. In the end the results
>> seem to be a washout with my pigz benchmark:
>>
>> qemu-syste
* Stefan Hajnoczi (stefa...@redhat.com) wrote:
> On Tue, Feb 09, 2021 at 07:02:18PM +, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert"
> >
> > For some read/writes the virtio queue elements are unmappable by
> > the daemon; these are cases where the data is to be read/w
When a block job fails, we report strerror(-job->job.ret) error
message, also if the job set an error object.
Let's report a better error message using error_get_pretty(job->job.err).
If an error object was not set, strerror(-job->ret) is used as fallback,
as explained in include/qemu/job.h:
type
On 2/24/21 1:23 PM, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini
> ---
> configure | 12
> meson.build | 9 +++--
> meson_options.txt | 2 ++
> 3 files changed, 13 insertions(+), 10 deletions(-)
...
> @@ -2535,6 +2540,7 @@ endif
> summary_info += {'target
John Snow writes:
> On 2/24/21 4:30 AM, Markus Armbruster wrote:
>> John Snow writes:
>>
>>> OrderedDict is a subtype of dict, so we can check for a more general
>>> form. These functions do not themselves depend on it being any
>>> particular type.
>>
>> True. The actual arguments can only b
On 2/11/21 8:42 PM, Nathan Chancellor wrote:
> fw_cfg_showrev() is called by an indirect call in kobj_attr_show(),
> which violates clang's CFI checking because fw_cfg_showrev()'s second
> parameter is 'struct attribute', whereas the ->show() member of 'struct
> kobj_structure' expects the second p
On Feb 23 06:00, Keith Busch wrote:
> These look good.
>
> Reviewed-by: Keith Busch
Thanks, applied to nvme-next.
signature.asc
Description: PGP signature
v22 -> v23:
* i386: move TCG btp_helper into sysemu/
- extended the #ifndef CONFIG_USER_ONLY to entire else of
if (cpl != 0).
* i386: split misc helper into user and sysemu parts
- added g_assert_not_reached() and changed user file name to -stubs.
* i386: separate fpu_helper into user and s
i386 is the first user of AccelCPUClass, allowing to split
cpu.c into:
cpu.ccpuid and common x86 cpu functionality
host-cpu.c host x86 cpu functions and "host" cpu type
kvm/kvm-cpu.cKVM x86 AccelCPUClass
hvf/hvf-cpu.cHVF x86 AccelCPUClass
tcg/tcg-cpu.cTCG x86 AccelCPU
Signed-off-by: Claudio Fontana
Reviewed-by: Richard Henderson
---
target/i386/tcg/tcg-cpu.h | 24 +
target/i386/tcg/sysemu/tcg-cpu.c | 83 ++
target/i386/tcg/tcg-cpu.c | 75 ++-
target/i386/tcg/meson.build|
On 2/25/21 10:54 AM, Mark Cave-Ayland wrote:
> On 23/02/2021 21:32, Philippe Mathieu-Daudé wrote:
>
>> Hi Mark,
>>
>> On 2/9/21 8:29 PM, Mark Cave-Ayland wrote:
>>> This patch series comes from an experimental branch that I've been
>>> working on
>>> to try and boot a MacOS toolbox ROM under the Q
avoid open coding the accesses to cpu->accel_cpu interfaces,
and instead introduce:
accel_cpu_instance_init,
accel_cpu_realizefn
to be used by the targets/ initfn code,
and by cpu_exec_realizefn respectively.
Signed-off-by: Claudio Fontana
Reviewed-by: Alex Bennée
Reviewed-by: Richard Henderso
overall, all devices' realize functions take an Error **errp, but return void.
hw/core/qdev.c code, which realizes devices, therefore does:
local_err = NULL;
dc->realize(dev, &local_err);
if (local_err != NULL) {
goto fail;
}
However, we can improve at least accel_cpu to return a meaningful
move the call to accel_cpu->cpu_realizefn to the general
cpu_exec_realizefn from target/i386, so it does not need to be
called for every target explicitly as we enable more targets.
Signed-off-by: Claudio Fontana
Reviewed-by: Alex Bennée
Reviewed-by: Richard Henderson
---
cpu.c |
Up to now vSMMUv3 has not been integrated with VFIO. VFIO
integration requires to program the physical IOMMU consistently
with the guest mappings. However, as opposed to VTD, SMMUv3 has
no "Caching Mode" which allows easy trapping of guest mappings.
This means the vSMMUV3 cannot use the same VFIO i
move the check for phys_bits outside of host_cpu_adjust_phys_bits,
because otherwise it is impossible to return an error condition
explicitly.
Signed-off-by: Claudio Fontana
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Alex Bennée
Reviewed-by: Richard Henderson
---
target/i386/host-cpu.c
For now we just copy over the previous user stubs, but really,
everything that requires s->cpl == 0 should be impossible
to trigger from user-mode emulation.
Later on we should add a check that asserts this easily f.e.:
static bool check_cpl0(DisasContext *s)
{
int cpl = s->cpl;
#ifdef CON
the lack of target_user_arch makes it hard to fully leverage the
build system in order to separate user code from sysemu code.
Provide it, so that we can avoid the proliferation of #ifdef
in target code.
Signed-off-by: Claudio Fontana
Reviewed-by: Alex Bennée
[claudio: added changes for new ta
for user-mode, assert that the hidden IOBPT flags are not set
while attempting to generate io_bpt helpers.
Signed-off-by: Claudio Fontana
Cc: Paolo Bonzini
Reviewed-by: Richard Henderson
---
target/i386/helper.h| 7 +
target/i386/tcg/helper-tcg.h| 3 +
target/i386/t
At the moment ASID invalidation command (CMD_TLBI_NH_ASID) is
propagated as a domain invalidation, ie. all ASIDs get invalidated,
failing to restrict the invalidation to the accurate asid.
Fix that by populating the new fields laterly introduced in the
IOTLEntry struct, namely setting the granular
smm is only really useful for sysemu, split in two modules
around the CONFIG_USER_ONLY, in order to remove the ifdef
and use the build system instead.
add cpu_abort() when detecting attempts to enter SMM mode via
SMI interrupt in user-mode, and assert that the cpu is not
in SMM mode while translat
Signed-off-by: Claudio Fontana
---
target/i386/tcg/misc_helper.c| 463 ---
target/i386/tcg/sysemu/misc_helper.c | 438 +
target/i386/tcg/user/misc_stubs.c| 75 +
target/i386/tcg/sysemu/meson.build | 1 +
target/i386/tcg/user/mes
Signed-off-by: Claudio Fontana
Reviewed-by: Alex Bennée
[claudio: removed unused return value]
Signed-off-by: Claudio Fontana
---
target/i386/cpu.h | 3 ++
target/i386/tcg/fpu_helper.c| 65 +
target/i386/tcg/sysemu/fpu_helper.c | 57 ++
We currently trace vfio_disconnect_container() but we do not trace
the container <-> group creation, which can be useful to understand
the VFIO topology.
Signed-off-by: Eric Auger
---
hw/vfio/common.c | 3 +++
hw/vfio/trace-events | 2 ++
2 files changed, 5 insertions(+)
diff --git a/hw/vfi
This header is meant to exposes data types used by
several IOMMU devices such as struct for SVA and
nested stage configuration.
Signed-off-by: Eric Auger
---
include/hw/iommu/iommu.h | 28
1 file changed, 28 insertions(+)
create mode 100644 include/hw/iommu/iommu.h
Signed-off-by: Claudio Fontana
Reviewed-by: Richard Henderson
---
target/i386/tcg/excp_helper.c| 572 --
target/i386/tcg/sysemu/excp_helper.c | 581 +++
target/i386/tcg/user/excp_helper.c | 39 ++
target/i386/tcg/sysemu/meson.build |
Signed-off-by: Claudio Fontana
Reviewed-by: Richard Henderson
---
target/i386/tcg/helper-tcg.h| 5 +
target/i386/tcg/seg_helper.h| 66
target/i386/tcg/seg_helper.c| 233 +---
target/i386/tcg/sysemu/seg_helper.c | 125 +++
ta
We introduce a new IOMMU Memory Region attribute,
IOMMU_ATTR_VFIO_NESTED that tells whether the virtual IOMMU
requires HW nested paging for VFIO integration.
Current Intel virtual IOMMU device supports "Caching
Mode" and does not require 2 stages at physical level to be
integrated with VFIO. Howev
Let's introduce a hostwin_from_range() helper that returns the
hostwin encapsulating an IOVA range or NULL if none is found.
This improves the readibility of callers and removes the usage
of hostwin_found.
Signed-off-by: Eric Auger
---
hw/vfio/common.c | 36 +---
define some aux functions to avoid repeating the same code
all over.
Signed-off-by: Claudio Fontana
Cc: Paolo Bonzini
---
target/i386/gdbstub.c | 167 --
1 file changed, 63 insertions(+), 104 deletions(-)
diff --git a/target/i386/gdbstub.c b/target/i386/
We register the stage1 MSI bindings when enabling the vectors
and we unregister them on msi disable.
Signed-off-by: Eric Auger
---
v7 -> v8:
- add unregistration on msix_diable
- remove vfio_container_unbind_msis()
v4 -> v5:
- use VFIO_IOMMU_SET_MSI_BINDING
v2 -> v3:
- only register the notif
The current IOTLBEntry becomes too simple to interact with
some physical IOMMUs. IOTLBs can be invalidated with different
granularities: domain, pasid, addr. Current IOTLB entry only offers
page selective invalidation. Let's add a granularity field
that conveys this information.
Also TLB entries a
As done for vfio regions, add helpers to retrieve irq info
including their optional capabilities.
Signed-off-by: Eric Auger
---
hw/vfio/common.c | 97 +++
hw/vfio/trace-events | 1 +
include/hw/vfio/vfio-common.h | 7 +++
3 files changed, 1
Signed-off-by: Claudio Fontana
Reviewed-by: Richard Henderson
---
target/i386/cpu-internal.h | 70 +++
target/i386/cpu-sysemu.c | 352 +
target/i386/cpu.c | 385 +
target/i386/meson.build| 1 +
4 files chan
cpu_load_efer is now used only for sysemu code.
Therefore, move this function implementation to
sysemu-only section of helper.c
Signed-off-by: Claudio Fontana
---
target/i386/cpu.h| 20 +---
target/i386/helper.c | 13 +
2 files changed, 18 insertions(+), 15 delet
The SMMUv3 has the peculiarity to translate MSI
transactionss. let's advertise the corresponding
attribute.
Signed-off-by: Eric Auger
---
---
hw/arm/smmuv3.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index 6172a62b8e..a998e237f0 100644
--- a/hw/arm
This new API allows to inject @count iommu_faults into
the IOMMU memory region.
Signed-off-by: Eric Auger
---
include/exec/memory.h | 24
softmmu/memory.c | 10 ++
2 files changed, 34 insertions(+)
diff --git a/include/exec/memory.h b/include/exec/memory.h
Whenever the eventfd is triggered, we retrieve the DMA fault(s)
from the mmapped fault region and inject them in the iommu
memory region.
Signed-off-by: Eric Auger
---
hw/vfio/pci.c | 50 ++
hw/vfio/pci.h | 1 +
2 files changed, 51 insertions(+)
Excerpts from Greg Kurz's message of February 23, 2021 1:01 am:
> On Mon, 22 Feb 2021 22:48:51 +1100
> Alexey Kardashevskiy wrote:
>
>> Ping?
>>
>> I need community support here :) I am hearing that having this mode
>> helps heaps with development in fully emulated environments as this
>> skip
Let's introduce two helpers that allow to DMA map/unmap a RAM
section. Those helpers will be called for nested stage setup in
another call site. Also the vfio_listener_region_add/del()
structure may be clearer.
Signed-off-by: Eric Auger
---
v5 -> v6:
- add Error **
---
hw/vfio/common.c | 1
For VFIO integration we will need to pass the Context Descriptor (CD)
table GPA to the host. The CD table is also referred to as the PASID
table. Its GPA corresponds to the s1ctrptr field of the Stream Table
Entry. So let's decode and store it in the configuration structure.
Signed-off-by: Eric Au
This patch implements the page response path. The
response is written into the page response ring buffer and then
update header's head index is updated. This path is not used
by this series. It is introduced here as a POC for vSVA/ARM
integration.
Signed-off-by: Eric Auger
---
v11 -> v12:
- use
Update the script to import the new iommu.h uapi header.
Signed-off-by: Eric Auger
---
scripts/update-linux-headers.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index fa6f2b6272..f588678837 100755
--- a/s
We use the new extended IRQ VFIO_IRQ_TYPE_NESTED type and
VFIO_IRQ_SUBTYPE_DMA_FAULT subtype to set/unset
a notifier for physical DMA faults. The associated eventfd is
triggered, in nested mode, whenever a fault is detected at IOMMU
physical level.
The actual handler will be implemented in subsequ
Let's propagate the leaf attribute throughout the invalidation path.
This hint is used to reduce the scope of the invalidations to the
last level of translation. Not enforcing it induces large performance
penalties in nested mode.
Signed-off-by: Eric Auger
---
hw/arm/smmuv3.c | 9 +
1 fi
1 - 100 of 393 matches
Mail list logo