Use char-fe to handle console sbi call, which implement early
console io while apply 'earlycon=sbi' into kernel parameters.
Signed-off-by: Yifei Jiang
Signed-off-by: Yipeng Yin
---
target/riscv/kvm.c | 42 -
target/riscv/sbi_ecall_interface.h | 72 +++
We hope that virtual time adjusts with vm state changing. When a vm
is stopped, guest virtual time should stop counting and kvm_timer
should be stopped. When the vm is resumed, guest virtual time should
continue to count and kvm_timer should be restored.
Signed-off-by: Yifei Jiang
Signed-off-by:
This series adds both riscv32 and riscv64 kvm support, and implements
migration based on riscv. It is based on temporarily unaccepted kvm:
https://github.com/kvm-riscv/linux (lastest version v17).
This series depends on above pending changes which haven't yet been
accepted, so this QEMU patch seri
Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl.
Signed-off-by: Yifei Jiang
Signed-off-by: Yipeng Yin
---
target/riscv/kvm.c | 150 -
1 file changed, 149 insertions(+), 1 deletion(-)
diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c
Only support supervisor external interrupt currently.
Signed-off-by: Yifei Jiang
Signed-off-by: Yipeng Yin
---
hw/intc/sifive_plic.c| 29 -
target/riscv/kvm-stub.c | 5 +
target/riscv/kvm.c | 20
target/riscv/kvm_riscv.h | 1 +
4
Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl
Signed-off-by: Yifei Jiang
Signed-off-by: Yipeng Yin
---
target/riscv/kvm.c | 142 -
1 file changed, 141 insertions(+), 1 deletion(-)
diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c
in
Get kernel and fdt start address in virt.c, and pass them to KVM
when cpu reset. In addition, add kvm_riscv.h to place riscv specific
interface.
Signed-off-by: Yifei Jiang
Signed-off-by: Yipeng Yin
---
hw/riscv/boot.c | 11 +++
hw/riscv/virt.c | 7 +++
include/hw/
'host' type cpu is set isa to RVXLEN simply, more isa info
will obtain from KVM in kvm_arch_init_vcpu()
Signed-off-by: Yifei Jiang
Signed-off-by: Yipeng Yin
---
target/riscv/cpu.c | 9 +
target/riscv/cpu.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/target/riscv/cpu.c b/targe
Update linux-headers/linux/kvm.h from
https://github.com/avpatel/linux/tree/riscv_kvm_v17.
Only use this header file, so here do not update all linux headers by
update-linux-headers.sh until above KVM series is accepted.
Signed-off-by: Yifei Jiang
Signed-off-by: Yipeng Yin
---
linux-headers/lin
Add target/riscv/kvm.c to place kvm_arch_* function needed by
kvm/kvm-all.c. Meanwhile, add kvm support in meson.build file.
Signed-off-by: Yifei Jiang
Signed-off-by: Yipeng Yin
Reviewed-by: Alistair Francis
---
meson.build | 2 +
target/riscv/kvm.c | 133 +
Get isa info from kvm while kvm init.
Signed-off-by: Yifei Jiang
Signed-off-by: Yipeng Yin
---
target/riscv/kvm.c | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c
index 687dd4b621..0d924be33f 100644
--- a/tar
For future reference, please CC me explicitly on things you'd like me
to review. I do scan the qemu-...@nongnu.org list, but it makes it
easier for me to find (and less likely that I'll accidentally overlook
it) if I'm also CCed directly.
On Fri, Apr 09, 2021 at 12:19:12PM -0300, Bruno Larsen (bi
On Fri, Apr 09, 2021 at 12:19:14PM -0300, Bruno Larsen (billionai) wrote:
> this commit presents 2 possible solutions for substituting TCG emulation
> with KVM calls. One - used in machine.c and arch_dump.c - explicitly
> adds the KVM function and has the possibility of adding the TCG one
> for mor
On Fri, Apr 09, 2021 at 08:57:48AM -0700, no-re...@patchew.org wrote:
> Patchew URL:
> https://patchew.org/QEMU/20210409151916.97326-1-bruno.lar...@eldorado.org.br/
>
>
>
> Hi,
>
> This series seems to have some coding style problems. See output below for
> more information:
>
> Type: series
On Fri, Apr 09, 2021 at 04:48:41PM -0300, Fabiano Rosas wrote:
> "Bruno Larsen (billionai)" writes:
>
> A general advice for this whole series is: make sure you add in some
> words explaining why you decided to make a particular change. It will be
> much easier to review if we know what were the
Signed-off-by: Cleber Rosa
Reviewed-by: Marc-André Lureau
Reviewed-by: Willian Rampazzo
Reviewed-by: Eric Auger
Reviewed-by: Wainer dos Santos Moschetta
---
docs/devel/testing.rst | 26 ++
1 file changed, 26 insertions(+)
diff --git a/docs/devel/testing.rst b/docs/dev
On 11/04/2021 15.50, Chetan wrote:
Hello All,
This mail is in reference to one of the tasks mentioned in
'/Contribute/BiteSizedTasks/' in QEMU wiki, under '/API conversion/' which
states to introduce a better alternative to strncpy function.
Looks like this task has been added by Paolo, so I
The LinuxTest specifically targets users that need to interact with Linux
guests. So, it makes sense to give a connection by default, and avoid
requiring it as boiler-plate code.
Signed-off-by: Cleber Rosa
Reviewed-by: Marc-André Lureau
Reviewed-by: Willian Rampazzo
---
tests/acceptance/avoca
Both the virtiofs submounts and the linux ssh mips malta tests
contains useful methods related to ssh that deserve to be made
available to other tests. Let's move them to an auxiliary, mix-in
class that will be used on the base LinuxTest class.
The method that helps with setting up an ssh connect
The public key argument should be a path to a file, and not the
public key data.
Reported-by: Wainer dos Santos Moschetta
Signed-off-by: Cleber Rosa
---
tests/acceptance/virtiofs_submounts.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/acceptance/virtiofs_submounts
Even though there are qtest based tests for hotplugging CPUs (from
which this test took some inspiration from), this one adds checks
from a Linux guest point of view.
It should also serve as an example for tests that follow a similar
pattern and need to interact with QEMU (via qmp) and with the Li
This makes the username/password used for authentication configurable,
because some guest operating systems may have restrictions on accounts
to be used for logins, and it just makes it better documented.
Signed-off-by: Cleber Rosa
Reviewed-by: Marc-André Lureau
Reviewed-by: Eric Auger
Reviewed
If the vmlinuz variable is set to anything that evaluates to True,
then the respective arguments should be set. If the variable contains
an empty string, than it will evaluate to False, and the extra
arguments will not be set.
This keeps the same logic, but improves readability a bit.
Signed-off
The LinuxTest class' launch_and_wait() method now behaves the same way
as this test's custom launch_vm(), so let's just use the upper layer
(common) method.
Signed-off-by: Cleber Rosa
Reviewed-by: Marc-André Lureau
Reviewed-by: Eric Auger
Reviewed-by: Willian Rampazzo
---
tests/acceptance/vir
For users of the LinuxTest class, let's set up the VM with the port
redirection for SSH, instead of requiring each test to set the same
arguments.
It also sets the network device, by default, to virtio-net.
Signed-off-by: Cleber Rosa
Reviewed-by: Marc-André Lureau
Reviewed-by: Eric Auger
Revie
Slightly different versions for the same utility code are currently
present on different locations. This unifies them all, giving
preference to the version from virtiofs_submounts.py, because of the
last tweaks added to it.
While at it, this adds a "qemu.utils" module to host the utility
function
This introduces a base class for tests that need to interact with a
Linux guest. It generalizes the "boot_linux.py" code, already been
used by the "virtiofs_submounts.py" and also SSH related code being
used by that and "linux_ssh_mips_malta.py".
While at it, a number of fixes on hopeful improvem
The tag is useful to select tests that depend/use a particular
feature.
Signed-off-by: Cleber Rosa
Reviewed-by: Wainer dos Santos Moschetta
Reviewed-by: Willian Rampazzo
Reviewed-by: Eric Auger
---
tests/acceptance/virtiofs_submounts.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/test
On Thu, Mar 25, 2021 at 04:45:51PM -0300, Wainer dos Santos Moschetta wrote:
> Hi,
>
> On 3/23/21 7:15 PM, Cleber Rosa wrote:
> > This introduces a base class for tests that need to interact with a
> > Linux guest. It generalizes the "boot_linux.py" code, already been
> > used by the "virtiofs_su
On Thu, Mar 25, 2021 at 03:14:58PM -0300, Wainer dos Santos Moschetta wrote:
> Hi,
>
> On 3/23/21 7:15 PM, Cleber Rosa wrote:
> > Signed-off-by: Cleber Rosa
> > Reviewed-by: Marc-André Lureau
> > Reviewed-by: Willian Rampazzo
> > ---
> > docs/devel/testing.rst | 25 +
>
On Thu, Mar 25, 2021 at 02:57:48PM -0300, Wainer dos Santos Moschetta wrote:
> Hi,
>
> On 3/24/21 6:10 AM, Auger Eric wrote:
> > Hi Cleber,
> >
> > On 3/23/21 11:15 PM, Cleber Rosa wrote:
> > > For users of the LinuxTest class, let's set up the VM with the port
> > > redirection for SSH, instead
On Wed, Mar 24, 2021 at 10:07:31AM +0100, Auger Eric wrote:
> Hi Cleber,
>
> On 3/23/21 11:15 PM, Cleber Rosa wrote:
> > Both the virtiofs submounts and the linux ssh mips malta tests
> > contains useful methods related to ssh that deserve to be made
> > available to other tests. Let's move them
Hi Peter,
On 4/7/21 5:38 PM, Peter Maydell wrote:
On Wed, 7 Apr 2021 at 03:01, Gavin Shan wrote:
If the scratch vCPU is initialized without PMU feature, we receive
error on reading PMCR_EL0 as it's invisible in this case. It leads
to host probing failure.
This fixes the issue by initializing
On Thu, Mar 25, 2021 at 02:10:19PM -0400, John Snow wrote:
> On 3/23/21 6:15 PM, Cleber Rosa wrote:
> > Slightly different versions for the same utility code are currently
> > present on different locations. This unifies them all, giving
> > preference to the version from virtiofs_submounts.py, be
On Fri, Apr 9, 2021 at 2:24 PM Bin Meng wrote:
>
> On Fri, Apr 2, 2021 at 8:50 PM Alistair Francis
> wrote:
> >
> > From: Hou Weiying
> >
> > This commit adds support for ePMP v0.9.1.
> >
> > The ePMP spec can be found in:
> > https://docs.google.com/document/d/1Mh_aiHYxemL0umN3GTTw8vsbmzHZ_nxZX
On 4/10/21 10:24 AM, Michael Rolnik wrote:
Please review.
The first 256b is i/o, the next 768b are ram. But having changed the page
size, it should mean that the first 1k are now treated as i/o.
We do have a path by which instructions in i/o pages can be executed. This
happens on some AR
Hello All,
This mail is in reference to one of the tasks mentioned in '
*Contribute/BiteSizedTasks*' in QEMU wiki, under '*API conversion*' which
states to introduce a better alternative to strncpy function. I've drafted
and tested below implementation for the same. Before proceeding with any
chan
Add a new PCI operation that allows to return page responses
to registered VFIO devices
Signed-off-by: Eric Auger
---
include/hw/iommu/iommu.h | 8
include/hw/pci/pci.h | 4
hw/pci/pci.c | 16
3 files changed, 28 insertions(+)
diff --git a/includ
In case PASID PciOps are set for the device we call
the set_pasid_table() callback on each STE update.
This allows to pass the guest stage 1 configuration
to the host and apply it at physical level.
Signed-off-by: Eric Auger
---
v4 -> v5:
- Use PciOps instead of config notifiers
v3 -> v4:
- f
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
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
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 7166008ab0..1ee81a25e9 100644
--- a/hw/arm
We convert iommu_fault structs received from the kernel
into the data struct used by the emulation code and record
the evnts into the virtual event queue.
Signed-off-by: Eric Auger
---
v3 -> v4:
- fix compil issue on mingw
Exhaustive mapping remains to be done
---
hw/arm/smmuv3.c | 71 +++
We now have all bricks to support nested paging. This
uses MAP notifiers to map the MSIs. So let's allow MAP
notifiers to be registered.
Signed-off-by: Eric Auger
---
hw/arm/smmuv3.c | 8
1 file changed, 8 deletions(-)
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index 53b71c895c..ca
Set up the fault region which is composed of the actual fault
queue (mmappable) and a header used to handle it. The fault
queue is mmapped.
Signed-off-by: Eric Auger
---
v4 -> v5:
- use a single DMA FAULT region. No version selection anymore
---
hw/vfio/pci.h | 1 +
hw/vfio/pci.c | 64 +++
As done for vfio regions, add helpers to retrieve irq info
including their optional capabilities.
Signed-off-by: Eric Auger
---
include/hw/vfio/vfio-common.h | 7 +++
hw/vfio/common.c | 97 +++
hw/vfio/trace-events | 1 +
3 files changed, 1
When the guest invalidates one S1 entry, it passes the asid.
When propagating this invalidation downto the host, the asid
information also must be passed. So let's fill the arch_id field
introduced for that purpose and accordingly set the flags to
indicate its presence.
Signed-off-by: Eric Auger
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
In case we detect the address space is translated by
a virtual IOMMU which requires HW nested paging to
integrate with VFIO, let's set up the container with
the VFIO_TYPE1_NESTING_IOMMU iommu_type.
Signed-off-by: Eric Auger
---
v7 -> v8
- remove as != &address_space_memory as
memory_region_is
In nested mode, legacy vfio_iommu_map_notify cannot be used as
there is no "caching" mode and we do not trap on map.
On Intel, vfio_iommu_map_notify was used to DMA map the RAM
through the host single stage.
With nested mode, we need to setup the stage 2 and the stage 1
separately. This patch int
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
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
---
v8 -> v9
- rebase on top of
1eb7f642750c ("vfio: Sup
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 +---
We introduce a new IOMMU Memory Region attribute, IOMMU_ATTR_MSI_TRANSLATE
which tells whether the virtual IOMMU translates MSIs. ARM SMMU
will expose this attribute since, as opposed to Intel DMAR, MSIs
are translated as any other DMA requests.
Signed-off-by: Eric Auger
---
include/exec/memory.
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.h | 1 +
hw/vfio/pci.c | 50 ++
2 files changed, 51 insertions(+)
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
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
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
At the moment ASID invalidation command (CMD_TLBI_NH_ASID) is
propagated as a domain invalidation (the whole notifier range
is invalidated independently on any ASID information).
The new granularity field now allows to be more precise and
restrict the invalidation to a peculiar ASID. Set the corre
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
From: Liu Yi L
This patch introduces PCIPASIDOps for IOMMU related operations.
https://lists.gnu.org/archive/html/qemu-devel/2018-03/msg00078.html
https://lists.gnu.org/archive/html/qemu-devel/2018-03/msg00940.html
So far, to setup virt-SVA for assigned SVA capable device, needs to
configure ho
NH_ALL/NSNH_ALL corresponds to a domain granularity invalidation,
ie. all the notifier range gets invalidation, whatever the ASID.
So let's set the granularity to IOMMU_INV_GRAN_DOMAIN to allow
the consumer to benefit from the info if it can.
Signed-off-by: Eric Auger
Suggested-by: chenxiang (M)
Signed-off-by: Eric Auger
---
include/standard-headers/drm/drm_fourcc.h | 23 ++-
include/standard-headers/linux/ethtool.h | 54 +++---
include/standard-headers/linux/fuse.h | 3 +-
include/standard-headers/linux/input.h| 2 +-
.../standard-headers/rdma/vmw_pvrdma-a
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.
TLB entries are us
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
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 1050e36169..b1abafac3c 100755
--- a/s
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
On Fri, 9 Apr 2021 at 21:22, Eduardo Habkost wrote:
>
> The following changes since commit 471387aa1446e2583f372f79327cc0a8c802b4b4:
>
> Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210409'
> into staging (2021-04-09 17:21:18 +0100)
>
> are available in the Git repository at
On Fri, 2021-04-09 at 09:27 -0400, Mike Ladouceur wrote:
> Hi, I'm wondering where I can find binaries of virtio-gpu-wddm-dod to
> test? I tried to build but I guess I'm running too new a version of
> Windows or VS/SDK/WDK? I've seen mention of prewhql ISO's with
> binaries but there's never any li
69 matches
Mail list logo