architecture over to using the safe read wrappers.
These patches apply on top of the latest kvmtool master branch.
So far I could test arm, arm64 and x86, with MIPS and PowerPC
being at least compile-tested.
Cheers,
Andre.
Andre Przywara (14):
Refactor kernel image loading
arm/powerpc: remove
Remove the need to rewind the kernel image file if loading it as a
flat binary by re-using the already read portion of the file passed
in as a buffer.
This allows the MIPS flat binary kernel image to be read from a pipe.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
mips/kvm.c | 14
amount of data.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/read-write.h | 2 ++
util/read-write.c| 40
2 files changed, 42 insertions(+)
diff --git a/include/kvm/read-write.h b/include/kvm/read-write.h
index 67571f9..87eb167
Replace the unsafe read-loops used in the MIPS kernel image loading
with our safe read_file() and read_in_full() wrappers.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
mips/kvm.c | 35
Use the newly introduced pseek() function when skipping to the start
offset in the ELF file.
The layout of an ELF file should satisfy the constraints of pseek, so
that we should be able to use a pipe file descriptor as well.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
mips/kvm.c | 4
more work.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/fdt.c | 3 ---
powerpc/kvm.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/arm/fdt.c b/arm/fdt.c
index ec7453f..cb4f00d 100644
--- a/arm/fdt.c
+++ b/arm/fdt.c
@@ -245,9 +245,6 @@ bool kvm__arch_load_kernel_image
to provide the only safe implementation, so take
that as an inspiration to provide a generic read_file() function
usable by every part of kvmtool.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/read-write.h | 2 ++
util/read-write.c| 21 +
2 files
Refactor MIPS' load_elf_binary() implementation by not reading the
ELF header itself, but using a pointer to a memory buffer instead.
This prepares for removing the need to rewind the image file later.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
mips/kvm.c | 52
string.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/fdt.c | 96 +--
arm/kvm.c | 89 ++
2 files changed, 90 insertions(+), 95 deletions(-)
diff --git a/arm/fdt.c b
for MIPS as special
cases for those architectures and rename the existing flat binary
loader functions for the other architectures to the new name.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/fdt.c | 4 ++--
include/kvm/kvm.h | 5 ++---
kvm.c | 42
string.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/fdt.c | 96 +--
arm/kvm.c | 89 ++
2 files changed, 90 insertions(+), 95 deletions(-)
diff --git a/arm/fdt.c b
Replace the unsafe read-loops in the x86 kernel image loading
functions with our safe read_file() and read_in_full() wrappers.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
x86/kvm.c | 40
Use the new read_file() wrapper in our arm/arm64 kernel image loading
function instead of the private implementation.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/kvm.c | 42 --
1 file changed, 20 insertions(+), 22 deletions(-)
diff --git
Replace the unsafe read-loops in the x86 kernel image loading
functions with our safe read_file() and read_in_full() wrappers.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
x86/kvm.c | 40
Replace the unsafe read-loops in the powerpc kernel image loading
function with our new and safe read_file() wrapper.
This should fix random fails in kernel image loading, especially
from pipes and sockets.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
powerpc/kvm.c | 36
more work.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/fdt.c | 3 ---
powerpc/kvm.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/arm/fdt.c b/arm/fdt.c
index ec7453f..cb4f00d 100644
--- a/arm/fdt.c
+++ b/arm/fdt.c
@@ -245,9 +245,6 @@ bool kvm__arch_load_kernel_image
to provide the only safe implementation, so take
that as an inspiration to provide a generic read_file() function
usable by every part of kvmtool.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/read-write.h | 2 ++
util/read-write.c| 21 +
2 files
Remove the need to rewind the kernel image file if loading it as a
flat binary by re-using the already read portion of the file passed
in as a buffer.
This allows the MIPS flat binary kernel image to be read from a pipe.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
mips/kvm.c | 14
Streamline the x86 kernel loading implementation by removing unneeded
seeks and thus allow an x86 bzImage to be loaded from a pipe.
Flat binaries are taken care of in a separate patch.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
x86/kvm.c | 11 ---
1 file changed, 4
without using a seek, so kvmtool will happily accept any file
descriptor (including pipes) for the image file.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
x86/kvm.c | 48 +---
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/x86
Refactor MIPS' load_elf_binary() implementation by not reading the
ELF header itself, but using a pointer to a memory buffer instead.
This prepares for removing the need to rewind the image file later.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
mips/kvm.c | 52
amount of data.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/read-write.h | 2 ++
util/read-write.c| 40
2 files changed, 42 insertions(+)
diff --git a/include/kvm/read-write.h b/include/kvm/read-write.h
index 67571f9..87eb167
Streamline the x86 kernel loading implementation by removing unneeded
seeks and thus allow an x86 bzImage to be loaded from a pipe.
Flat binaries are taken care of in a separate patch.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
x86/kvm.c | 11 ---
1 file changed, 4
.
Please check if that makes sense.
Cheers,
Andre.
Andre Przywara (2):
Makefile: avoid non-literal printf format string warnings
avoid redefining PAGE_SIZE
Makefile | 1 +
include/kvm/kvm.h | 3 +++
2 files changed, 4 insertions(+)
--
2.3.5
--
To unsubscribe from this list: send
PAGE_SIZE may have been defined by the C libary (musl-libc does that).
So avoid redefining it here unconditionally, instead only use our
definition if none has been provided by the libc.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/kvm.h | 3 +++
1 file changed, 3
just disable
the warning. Since GCC knows about this option as well (it just
doesn't have it enabled with -Wall), we can unconditionally add this
to the warning options.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b
Hi,
On 21/07/15 07:18, Fan Du wrote:
vhost kernel driver does not support mutiple queue yet,
Tweak queue number will fail with --net mode=tap,vhost=1,mq=2
as below when lkvm trying to set ring kick fd for queue 2:
VHOST_SET_VRING_KICK failed: No buffer space available
Error on this
Hi,
thanks for the rework, that looks good to me, some minor nits below.
Not sure if that requires a new version, maybe Will can fix that up when
he applies it.
On 21/07/15 07:18, Fan Du wrote:
To detach tap device automatically from bridge when exiting,
just like what the reverse of script
-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/gic.c| 2 ++
arm/include/arm-common/kvm-config-arch.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arm/gic.c b/arm/gic.c
index d1cffa5..187fe46 100644
--- a/arm/gic.c
+++ b/arm/gic.c
To refer to the GIC FDT node, we used to pass the GIC phandle to most
of the functions dealing with FDT nodes.
Since we now have a global phandle reference, use that to refer to the
GIC handle in various places and get rid of the now unneeded parameter
passing.
Signed-off-by: Andre Przywara
and reference code to properly
allocate unique phandles.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
Makefile | 1 +
arm/fdt.c | 2 +-
arm/gic.c | 2 +-
include/kvm/fdt.h | 10 +-
kvm-fdt.c | 26 ++
5 files changed, 34
table if needed.
For PCI devices we take the bus/device/function triplet and and that
to the routing setup call.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
hw/pci-shmem.c| 3 ++-
include/kvm/irq.h | 2 +-
irq.c | 24 ++--
virtio/pci.c | 6
This patch is preliminary and updates the headers from a kernel with
ITS emulation support. It should be replaced by a proper header
update once ITS support is upstream.
Contains a hack to support compiling on ARM, too.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/aarch64/include
The GICv3 ITS expects a separate 64K page to hold ITS registers.
Add a function to reserve such a page in the guest's I/O memory and
use that for the ITS vGIC type.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/gic.c| 36
not used for IRQs triggered by KVM_IRQ_LINE,
but it needs to be here anyway. We use a simple 1:1 mapping.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/gic.c | 32
1 file changed, 32 insertions(+)
diff --git a/arm/gic.c b/arm/gic.c
index 187fe46
This patch is preliminary and updates the headers from a kernel with
extended IRQ routing support (for ARM). It should be replaced by a
proper header update once IRQ routing support is upstream.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/linux/kvm.h | 5 -
1 file
before actually adding the device ID
to the kvm_msi struct.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
virtio/pci.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/virtio/pci.c b/virtio/pci.c
index 625fec0..e92a2df 100644
--- a/virtio/pci.c
+++ b
interrupt routing.
This also removes the dummy implementations for all other
architectures and only leaves the x86 specific code in x86/irq.c.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
Makefile | 4 +--
arm/irq.c | 9 --
hw/pci-shmem.c| 2 ++
include/kvm
KVM capabilities can be per-VM, in this case the ioctl should be
issued on the VM file descriptor, not on the system fd.
Since this feature is guarded by a (system) capability itself, wrap
the call into a function of its own.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm
vhost-net, where the queue's IRQFD was setup before the
MSI vectors.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/irq.h | 1 +
irq.c | 31 +++
virtio/pci.c | 36 +---
3 files changed, 65
://www.linux-arm.org/git?p=kvmtool.git;a=log;h=refs/heads/its/v2
Andre Przywara (14):
irq: move IRQ routing into irq.c
MSI-X: update GSI routing after changed MSI-X configuration
virtio: fix endianness check for vhost support
FDT: introduce global phandle allocation
arm: use new phandle
to the interrupt map to match that.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/gic.c | 25 -
arm/pci.c | 12 ++--
include/kvm/fdt.h | 2 +-
3 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/arm/gic.c b/arm/gic.c
index f9a20bd
this against
the guest endianness.
This enables vhost support on ARM and ARM64.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/virtio.h | 9 +++--
virtio/net.c | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/include/kvm/virtio.h b/include/kvm/virtio.h
Hi,
This changset provide some fix and small enhancement
for kvm tool when I play it with virtio part.
have you seen the new kvmtool repository Will created, which is a
stand-alone version outside of the Linux tree?
https://git.kernel.org/cgit/linux/kernel/git/will/kvmtool.git/
It seems
Hi,
On 20/07/15 10:28, Fan Du wrote:
To detach tap device automatically from bridge when exiting,
just like the reverse of script does.
Signed-off-by: Fan Du fan...@intel.com
---
tools/kvm/include/kvm/virtio-net.h | 1 +
tools/kvm/virtio/net.c | 28
Hi Claudio,
On 20/07/15 15:28, Claudio Fontana wrote:
On 17.07.2015 18:50, Will Deacon wrote:
On Fri, Jul 17, 2015 at 05:02:13PM +0100, Andre Przywara wrote:
clang by default doesn't seem to like printf calls with non-literal
format strings.
Add the proper pragma to disable this warning
-libc
gives you really small binaries (174K for ARM, for instance).
The last patch just follows a comment in the code to remove a kludge.
Cheers,
Andre.
Andre Przywara (12):
avoid casts when initializing structures
qcow: fix signedness bugs
kvm-ipc: use proper type for file descriptor
The musl-libc comes with a predefined PAGE_SIZE macro, which may be
wrong on systems which support multiple smallest page sizes.
Make sure we use our own (runtime evaluated) definition of PAGE_SIZE.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/kvm.h | 4
1 file
A socket (as any other file descriptor) is of type int to catch the
negative error cases. Fix the declaration to allow errors to be
detected.
Found and needed by clang.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
kvm-ipc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
default standard,
so lets fix this better sooner than later.
(Compiling without GNU extensions still breaks and I don't bother to
fix that without very good reasons.)
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
disk/qcow.c| 6 +++---
include/kvm/mutex.h| 2 +-
include/linux
Some functions in qcow.c return u64, but are checked against 0
because they want to check for the -1 error return value.
Do an explicit comparison against the casted -1 to express this
properly.
This was silently compiled out by gcc, but clang complained about it.
Signed-off-by: Andre Przywara
According to the manpage and the prototype the second argument to
connect(2) is a const struct sockaddr*, so cast our protocol
specific type back to the super type.
This fixes compilation on musl-libc.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
kvm-ipc.c | 2 +-
1 file changed, 1
The clang compiler by default dislikes non-literal format strings
in *printf functions, so it complains about kvm__set_dir() in kvm.c.
Instead of suppressing this warning, lets change the code to avoid
that unneeded var_args detour and use a literal format string.
Signed-off-by: Andre Przywara
Stripping has no effect on object files, so having -s -c on the
command line makes no sense.
In fact clang complains about it and aborts with an error, so lets
just remove the unneeded -s switch here.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
Makefile | 10 +-
1 file
clang does not like two const specifiers in one declaration, so
remove one to let clang compile kvmtool.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
ui/gtk3.c | 2 +-
ui/sdl.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/gtk3.c b/ui/gtk3.c
index b2335bc
The manpage of poll(2) states that the prototype of poll is defined
in poll.h. Use that header file instead of sys/poll.h to allow
compilation against musl-libc.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
disk/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
The musl-libc library provides implementations of strlcpy and strlcat,
so introduce a feature check for it and only use the kvmtool
implementation if there is no library support for it.
This avoids clashes with the public definition.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
clang by default doesn't seem to like printf calls with non-literal
format strings.
Add the proper pragma to disable this warning in the report function
to make kvmtool compile with clang. Despite its GCC name, clang also
accepts this.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
As we now have the header file in our repository, we can safely follow
the recommendation in kvm.c and remove the hack adding the
KVM_CAP_MAX_VCPUS macro.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
kvm.c | 8
1 file changed, 8 deletions(-)
diff --git a/kvm.c b/kvm.c
index
On 15/07/15 10:10, Pavel Fedin wrote:
-Original Message-
From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf
Of Andre Przywara
Sent: Friday, July 10, 2015 5:22 PM
To: marc.zyng...@arm.com; christoffer.d...@linaro.org;
kvm...@lists.cs.columbia.edu
Cc
Hi Paolo,
we (Pavel, Eric and me) need your quick advice on how to proceed with a
small API extension:
(tl;dr: skip to the numbered list at the end)
For using MSIs in a guest when running on an ARM(64) system using a
GICv3 interrupt controller we need to have a device ID available. On
real
Hi,
On 13/07/15 15:24, Eric Auger wrote:
On 07/13/2015 03:32 PM, Pavel Fedin wrote:
Hello!
I think I prefer the flag. Offhand it sounds easier to add support for
it to non-ARM architectures, compared to KVM_IRQ_ROUTING_EXTENDED_MSI.
Actually i also voted for flag, because it is already
emulation.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/arm_vgic.h | 8
virt/kvm/arm/vgic-v3-emul.c | 44
virt/kvm/arm/vgic.c | 35 +++
virt/kvm/arm/vgic.h | 4
4
-by: Andre Przywara andre.przyw...@arm.com
---
virt/kvm/arm/vgic-v2-emul.c | 3 +++
virt/kvm/arm/vgic-v3-emul.c | 3 +++
virt/kvm/arm/vgic.c | 3 ---
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/virt/kvm/arm/vgic-v2-emul.c b/virt/kvm/arm/vgic-v2-emul.c
index 1390797
are not yet ready for the show.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arch/arm64/kvm/Makefile| 1 +
include/kvm/arm_vgic.h | 6 ++
include/linux/irqchip/arm-gic-v3.h | 1 +
virt/kvm/arm/its-emul.c| 125
once every 100,000 exits.
This has been briefly tested on Midway, Juno and the model (the latter
both with GICv2 and GICv3 guests).
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/arm_vgic.h | 6 ---
virt/kvm/arm/vgic-v2.c | 1 +
virt/kvm/arm/vgic-v3.c | 1 +
virt/kvm/arm
KVM capabilities can be a per-VM property, though ARM/ARM64 currently
does not pass on the VM pointer to the architecture specific
capability handlers.
Add a struct kvm* parameter to those function to later allow proper
per-VM capability reporting.
Signed-off-by: Andre Przywara andre.przyw
we will
enable it when ITS emulation is used.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
Reviewed-by: Eric Auger eric.au...@linaro.org
---
Documentation/virtual/kvm/api.txt | 12 ++--
include/uapi/linux/kvm.h | 5 -
2 files changed, 14 insertions(+), 3 deletions
/com.arm.doc.ihi0069a/IHI0069A_gic_architecture_specification.pdf
Andre Przywara (15):
KVM: arm/arm64: VGIC: don't track used LRs in the distributor
KVM: extend struct kvm_msi to hold a 32-bit device ID
KVM: arm/arm64: add emulation model specific destroy function
KVM: arm/arm64: extend arch CAP
quite low. Should the number of LPIs exceed the number where iterating
through lists seems acceptable, we can later revisit this and use more
efficient data structures.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/arm_vgic.h | 3 +++
virt/kvm/arm/its-emul.c | 48
by that check.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
Documentation/virtual/kvm/devices/arm-vgic.txt | 9 +
arch/arm64/include/uapi/asm/kvm.h | 2 ++
include/kvm/arm_vgic.h | 3 +++
virt/kvm/arm/vgic-v3-emul.c| 2
exercised by hardware, so the sync points are
well known.
Provide functions that read the guest memory and store the
information from the configuration and pending tables in the kernel.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/arm_vgic.h | 2 +
virt/kvm/arm/its-emul.c
before the actual
command handler is called.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/arm_vgic.h | 3 +
include/linux/irqchip/arm-gic-v3.h | 8 ++
virt/kvm/arm/its-emul.c| 205 +
virt/kvm/arm/its-emul.h
.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
Reviewed-by: Eric Auger eric.au...@linaro.org
---
include/kvm/arm_vgic.h | 1 +
virt/kvm/arm/vgic-v3-emul.c | 9 +
virt/kvm/arm/vgic.c | 11 ++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git
basic at this point, as we don't have a good
way of communicating errors to the guest (usually a SError).
The INT command handler is missing at this point, as we gain the
capability of actually injecting MSIs into the guest only later on.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
. With LPIs being only edge-triggered, we
get away with a less complex IRQ handling.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/arm_vgic.h | 2 ++
virt/kvm/arm/its-emul.c | 71
virt/kvm/arm/its-emul.h | 3 ++
virt
provide the handler for the ITS INT command, which allows a
guest to trigger an MSI via the ITS command queue.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/arm_vgic.h | 1 +
virt/kvm/arm/its-emul.c | 65 +
virt/kvm/arm/its
we enable the KVM_SIGNAL_MSI feature to allow userland to inject
MSIs into the guest. Not having enabled the ITS emulation will lead
to a -ENODEV when trying to inject a MSI.
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
Documentation/virtual/kvm/api.txt | 2 +-
arch/arm64/kvm/Kconfig
is populated.
Signed-off-by: Eric Auger eric.au...@linaro.org
Reviewed-by: Andre Przywara andre.przyw...@arm.com
Just some forward looking statement: If this gets based on top of my ITS
emulation v2 series, the documentation should state that the new
KVM_CAP_MSI_DEVID capability tells userland
Hi Eric,
On 09/07/15 09:22, Eric Auger wrote:
This patch adds compilation and link against irqchip.
On ARM, irqchip routing is not really useful since there is
a single irqchip. However main motivation behind using irqchip
code is to enable MSI routing code. With the support of in-kernel
On 09/07/15 09:22, Eric Auger wrote:
on ARM, a devid field is populated in kvm_msi struct in case the
flag is set to KVM_MSI_VALID_DEVID. Let's populate the corresponding
kvm_kernel_irq_routing_entry devid field and set the msi type to
KVM_IRQ_ROUTING_EXTENDED_MSI.
Signed-off-by: Eric Auger
On 09/07/15 09:22, Eric Auger wrote:
Up to now, only irqchip routing entries could be set. This patch
adds the capability to insert MSI routing entries, with or without
device id. Although standard MSI entries can be set, their
injection still is not supported. For ARM64, let's also increase
On 09/07/15 09:22, Eric Auger wrote:
If the ITS modality is not available, let's simply support MSI
injection by transforming the MSI.data into an SPI ID.
This becomes possible to use KVM_SIGNAL_MSI ioctl for arm too.
Signed-off-by: Eric Auger eric.au...@linaro.org
---
v1 - v2:
-
Hi Pavel,
On 09/07/15 15:37, Pavel Fedin wrote:
Hello!
v1 - v2:
- user API changed:
x devid id passed in kvm_irq_routing_msi
x kept the new routing entry type: KVM_IRQ_ROUTING_EXTENDED_MSI
Andre, you never replied to my last comment to the previous series.
Oh dear, my draft
Good morning Pavel,
On 07/07/15 08:16, Pavel Fedin wrote:
Hello!
Wouldn't:
if (kvm_vm_check_extension(s, KVM_CAP_MSI_DEVID)) {
kroute.flags = KVM_MSI_VALID_DEVID;
kroute.u.msi.devid = (pci_bus_num(dev-bus) 8) | dev-devfn;
}
be saner (without a global variable)?
Hi Christoffer,
On 06/07/15 10:30, Christoffer Dall wrote:
On Mon, Jul 06, 2015 at 09:30:20AM +0100, Andre Przywara wrote:
Hi Pavel,
On 06/07/15 07:42, Pavel Fedin wrote:
Hello!
I like this approach, but it runs into problems:
As you read above the current documentation says
Hi Pavel,
On 06/07/15 07:42, Pavel Fedin wrote:
Hello!
I like this approach, but it runs into problems:
As you read above the current documentation says that the flags field
must be zero and the current KVM_SET_GSI_ROUTING handler bails out if it
isn't. So userland would need to know
Hi Paolo,
thanks for looking at this!
On 06/07/15 12:07, Paolo Bonzini wrote:
On 06/07/2015 12:37, Christoffer Dall wrote:
I don't view it as 'the kernel requires this' but as 'the kernel will
not complain with arbitrary error code if you set the devid flag'
capability, and it's up to
Hi Eric,
diff --git a/virt/kvm/arm/its-emul.c b/virt/kvm/arm/its-emul.c
index 574cf05..35e886c 100644
--- a/virt/kvm/arm/its-emul.c
+++ b/virt/kvm/arm/its-emul.c
@@ -340,6 +340,55 @@ static bool handle_mmio_gits_idregs(struct kvm_vcpu
*vcpu,
}
/*
+ * Translates an incoming
Hi Pavel,
On 06/07/15 14:32, Pavel Fedin wrote:
Hi!
Well, as we are about to implement this: yes. But the issue is that MSI
injection and GSI routing code is generic PCI code in userland (at least
in kvmtool, guess in QEMU, too), so I don't want to pull in any kind of
ARM specific code in
Salut Eric,
ITS code in qemu just does:
---cut ---
msi_supported = true;
kvm_msi_flags = KVM_MSI_VALID_DEVID;
kvm_msi_via_irqfd_allowed = kvm_has_gsi_routing();
kvm_gsi_routing_allowed = kvm_msi_via_irqfd_allowed;
--- cut ---
I set KVM_MSI_VALID_DEVID
On 06/07/15 16:54, Paolo Bonzini wrote:
On 06/07/2015 17:37, Andre Przywara wrote:
Wouldn't:
if (kvm_vm_check_extension(s, KVM_CAP_MSI_DEVID)) {
kroute.flags = KVM_MSI_VALID_DEVID;
kroute.u.msi.devid = (pci_bus_num(dev-bus) 8) | dev-devfn;
}
be saner (without
On 06/07/15 13:08, Christoffer Dall wrote:
On Mon, Jul 06, 2015 at 12:23:19PM +0100, Andre Przywara wrote:
Hi Paolo,
thanks for looking at this!
On 06/07/15 12:07, Paolo Bonzini wrote:
On 06/07/2015 12:37, Christoffer Dall wrote:
I don't view it as 'the kernel requires
Hi,
On 03/07/15 10:05, Andre Przywara wrote:
Hi Pavel,
On 02/07/15 08:26, Pavel Fedin wrote:
Hello!
-Original Message-
From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On
Behalf Of Eric Auger
Sent: Monday, June 29, 2015 6:37 PM
To: eric.au...@st.com; eric.au
Hi Christoffer,
+
+static struct its_collection *vits_new_collection(struct kvm *kvm, u32
coll_id)
+{
+struct its_collection *collection;
+
+collection = kmalloc(sizeof(struct its_collection), GFP_KERNEL);
If I manage to understand the structure here, you're calling all
Hi Pavel,
On 02/07/15 08:26, Pavel Fedin wrote:
Hello!
-Original Message-
From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf
Of Eric Auger
Sent: Monday, June 29, 2015 6:37 PM
To: eric.au...@st.com; eric.au...@linaro.org;
to differentiate between
creation and initialisation more clearly and fix error path.]
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/gic.c| 69 +++-
arm/include/arm-common
allocated so far.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
include/kvm/irq.h | 1 +
irq.c | 5 +
2 files changed, 6 insertions(+)
diff --git a/include/kvm/irq.h b/include/kvm/irq.h
index 4cec6f0..8a78e43 100644
/heads/gicv3/v5
Andre Przywara (6):
arm: finish VGIC initialisation explicitly
arm: simplify MMIO dispatching
limit number of VCPUs on demand
arm: prepare for instantiating different IRQ chip devices
arm: add support for supplying GICv3 redistributor addresses
arm: use new irqchip
Zyngier marc.zyng...@arm.com
Signed-off-by: Andre Przywara andre.przyw...@arm.com
---
arm/aarch64/include/kvm/kvm-arch.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arm/aarch64/include/kvm/kvm-arch.h
b/arm/aarch64/include/kvm/kvm-arch.h
index 2f08a26..4925736 100644
--- a/arm
101 - 200 of 673 matches
Mail list logo