at all. It would rely only on
drivers' ability to communicate with each other (i guess it should be possible
in Windows, isn't it?)
c) does not need to steal resources (BARs, IRQs, etc) from the actual devices.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
IMHO safe to just
know that SynIC MSRs have some extra handling in
kernel. And i believe this has no direct impact on userland's behavior.
But, you better know the details.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: se
gested an extra exit_reason,
> and I think .handled field can be used to pass that information instead.
[skip]
> But the proposed use of .handled costs basically nothing, and it may
> prove useful in general (as a conisistency proof, if anything).
Well... May be... So, i'm OK with
se?
> but could we replace Hyper-V VMBus hypercall and it's parameters
> by KVM_EXIT_REG_IO/MSR_IO too?
It depends. Can i read about these hypercalls somewhere? Is there any
documentation?
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To
define KVM_EXIT_MSR_UNHANDLED 0
> +#define KVM_EXIT_MSR_HANDLED 1
> + __u8 handled; /* in */
> + } msr;
> /* Fix the size of the union. */
> char padding[256];
> };
> @@ -849,6 +864,9 @@ struct kvm_ppc_smmu_info {
> #define KVM_CAP_SPLIT_IRQCHIP 121
> #define KVM_CAP_IOEVENTFD_ANY_LENGTH 122
> #define KVM_CAP_HYPERV_SYNIC 123
> +#define KVM_CAP_MSR_EXITS 124
> +#define KVM_CAP_DISABLE_MSR_EXITS 125
> +#define KVM_CAP_ENABLE_MSR_EXITS 126
>
> #ifdef KVM_CAP_IRQ_ROUTING
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ation.
I guess your hypercalls to be introduced using KVM_EXIT_HYPERV are also not
used inside qemu so require implementation :)
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a
xit(synic, msr);
break;
So, every time one of these thee MSRs is written, we get a vmexit with values
of all three registers, and that's all. We could
easily have 'synic_exit(synic, msr, data)' in all three cases, and i think the
userspace could easily deal with proposed
KVM_EXIT_R
Either drop it or just say "The
> architectured timers are not supported without the in-kernel vGIC."
Ok, i'll repost with changed message. But, just to let you know, with this
(http://www.spinics.net/lists/kvm/msg124539.html) the
notice about architected timer loses its relevan
CP15
timer. And it would require exactly the same capability - process some trapped
system register accesses in userspace.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" i
t; need to add it as a regression test, unless others disagree and would
> like to see it added.
Considering how difficult it was to find this problem, and how tricky and
unobvious it is, i would ask to add this test. Especially
considering you've already written it. At least it will serve as a reminder
cts/kvm-unit-tests/arm/xzr-test.c:13: undefined reference to
`mmu_disable'
--- cut ---
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.ker
quot;memory");
Then check for res == some_nonzero_val. If they are equal, you've got the bug
:)
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
, and i just don't want to bother for a single small fix. :) Will do as
a "Reported-by:".
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord
of endianness conversion and
masking. Masking is not used here (the mask is set to ~0), so we just
move out the remaining endianness conversion.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
virt/kvm/arm/vgic-v2-emul.c | 20
1 file changed, 8 insertions(+), 12 deletions(-)
In order to implement vGICv3 CPU interface access, we will need to
perform table lookup of system registers. We would need both
index_to_params() and find_reg() exported for that purpose, but instead
we export a single function which combines them both.
Signed-off-by: Pavel Fedin <p
differently. Also, vcpu pointer has backpointer to kvm, so 'dev' was
replaced with 'vcpu'.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
virt/kvm/arm/vgic-v2-emul.c | 120 +++-
virt/kvm/arm/vgic.c | 57 +
virt/kvm/arm/
eter.mayd...@linaro.org>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
Signed-off-by: Christoffer Dall <christoffer.d...@linaro.org>
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 116 ++
Documentation/vi
Access size is always 64 bits. Since CPU interface state actually affects
only a single vCPU, no vGIC locking is done in order to avoid code
duplication. Just made sure that the vCPU is not running.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm64/include/uapi/asm/kvm.h
ould normally
be 0), for read operations this would cause duplication of the same word
in both halves.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm64/include/uapi/asm/kvm.h | 1 +
include/linux/irqchip/arm-gic-v3.h | 1 +
virt/kvm/arm/vgic-v3-emul.c
e extraction.
- Added forgotten documentation
Christoffer Dall (1):
KVM: arm/arm64: Add VGICv3 save/restore API documentation
Pavel Fedin (5):
KVM: arm/arm64: Move endianness conversion out of
vgic_attr_regs_access()
KVM: arm/arm64: Refactor vGIC attributes handling code
KVM: arm64: Impleme
are also added to ARM32 code.
This patch fixes setting MMIO register to a random value (actually SP)
instead of zero by something like:
*((volatile int *)reg) = 0;
compilers tend to generate "str wzr, [xx]" here
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
Reviewed-
context structure, we introduce a dedicated storage for it in
struct sys_reg_params.
This refactor also gets rid of "massive hack" in kvm_handle_cp_64().
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm64/kvm/sys_regs.c| 88 ++--
Further rework is going to introduce a dedicated storage for transfer
register value in struct sys_reg_params. Before doing this we have to
remove 'const' modifiers from it in all accessor functions and their
callers.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm64/kvm/sys_
Using oldstyle vcpu_reg() accessor is proven to be inappropriate and
unsafe on ARM64. This patch converts the rest of use cases to new
accessors and completely removes vcpu_reg() on ARM64.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm/kvm/psci.c
tore it directly in
struct sys_reg_params instead of a pointer
- Use lower_32_bits()/upper_32_bits() where appropriate
- Fixed wrong usage of 'Rt' instead of 'Rt2' in kvm_handle_cp_64(),
overlooked in v1
- Do not write value back when reading
Pavel Fedin (4):
KVM: arm64: Correctly handle zero regi
Hello!
> Thanks a lot for respining this quickly. I just had a few minor
> comments, so this is almost ready to go. If you can fix that
Damn, the rest of reviews got stuck somewhere and arrived later, so i've just
sent v3 without wrap fix. Will correct it.
Kind regards,
Pavel Fedin
v2:
- Changed type of transfer value to u64 and store it directly in
struct sys_reg_params instead of a pointer
- Use lower_32_bits()/upper_32_bits() where appropriate
- Fixed wrong usage of 'Rt' instead of 'Rt2' in kvm_handle_cp_64(),
overlooked in v1
- Do not write value back when reading
Pav
Further rework is going to introduce a dedicated storage for transfer
register value in struct sys_reg_params. Before doing this we have to
remove 'const' modifiers from it in all accessor functions and their
callers.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm64/kvm/sys_
are also added to ARM32 code.
This patch fixes setting MMIO register to a random value (actually SP)
instead of zero by something like:
*((volatile int *)reg) = 0;
compilers tend to generate "str wzr, [xx]" here
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
Reviewed-
Using oldstyle vcpu_reg() accessor is proven to be inappropriate and
unsafe on ARM64. This patch converts the rest of use cases to new
accessors and completely removes vcpu_reg() on ARM64.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com&g
context structure, we introduce a dedicated storage for it in
struct sys_reg_params.
This refactor also gets rid of "massive hack" in kvm_handle_cp_64().
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/kvm/sys_
Using oldstyle vcpu_reg() accessor is proven to be inappropriate and
unsafe on ARM64. This patch converts the rest of use cases to new
accessors and completely removes vcpu_reg() on ARM64.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm/kvm/psci.c
lower_32_bits()/upper_32_bits() where appropriate
- Fixed wrong usage of 'Rt' instead of 'Rt2' in kvm_handle_cp_64(),
overlooked in v1
- Do not write value back when reading
Pavel Fedin (4):
KVM: arm64: Correctly handle zero register during MMIO
KVM: arm64: Remove const from struct sys_reg_params
context structure, we introduce a dedicated storage for it in
struct sys_reg_params.
This refactor also gets rid of "massive hack" in kvm_handle_cp_64().
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm64/kvm/sys_regs.c| 88 ++--
are also added to ARM32 code.
This patch fixes setting MMIO register to a random value (actually SP)
instead of zero by something like:
*((volatile int *)reg) = 0;
compilers tend to generate "str wzr, [xx]" here
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
Reviewed-
Further rework is going to introduce a dedicated storage for transfer
register value in struct sys_reg_params. Before doing this we have to
remove all 'const' modifiers from it.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm64/kvm/sys_regs.c
Hello!
> I think you are being a bit overzealous here, and a few const can
> legitimately be kept, see below.
:) Yes, i've just commanded "search and replace" to the editor. Fixing...
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To
it is cc'd to stable, so unless it is going to be nacked at review
> stage, any subsequent fixes should also be cc'd.
Sorry guys for messing things up a bit, but the affected commit actually is in
stable branch (4.4-rc3), so i decided to Cc: stable, just in case, because the
breakage is quite bi
inter for exchange with userspace, see
vgic_v3_cpu_regs_access() and callers. I wouldn't
like to refactor the code again. What's your opinion on this?
And of course i'll fix up the rest.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this li
_params' declaration, and
callers, and their callers... This 'const' is all around the code, and it would
take a separate huge patch to un-const'ify all this.
Does it worth that?
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this lis
st in case. I was about to finish the
testing and send the patch in maybe one or two hours.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
discovered by performing an operation
*((volatile int *)reg) = 0;
which compiles as "str xzr, [xx]", and resulted in strange values being
written.
Pavel Fedin (3):
KVM: arm64: Correctly handle zero register during MMIO
KVM: arm64: Correctly handle zero register in system registe
are also added to ARM32 code.
This patch fixes setting MMIO register to a random value (actually SP)
instead of zero by something like:
*((volatile int *)reg) = 0;
compilers tend to generate "str wzr, [xx]" here
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch
System register accesses also use zero register for Rt == 31, and
therefore using it will also result in getting SP value instead. This
patch makes them also using new accessors, introduced by the previous
patch.
Additionally, got rid of "massive hack" in kvm_handle_cp_64().
Signed-off
Using oldstyle vcpu_reg() accessor is proven to be inapproptiate and
unsafe on ARM64. This patch fixes the rest of use cases and completely
removes vcpu_reg() on ARM64.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm/kvm/psci.c | 20 ++--
arch
n our vgic-v3-switch.S:
msr_s ICH_HCR_EL2, xzr
It's only because it is KVM code we have never discovered this problem yet.
Somebody could write such a thing in some other place,
with some other register, which would be executed by KVM, and... boo...
Kind regards,
Pavel
] http://www.spinics.net/lists/kvm/msg121669.html,
> http://www.spinics.net/lists/kvm/msg121662.html
> [2] http://www.spinics.net/lists/kvm/msg119236.html
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line
. I have found the problem, and
it's just good luck that it works on some machines.
Unreliably, BTW. The problem is that it verifies guest's physical addresses
(IPA) against host memory map; and the fix is here:
http://www.spinics.net/lists/kvm/msg124561.html
Kind regards,
Pavel Fedin
Expert En
c timer), and it still works fine there.
> And instead of reverting, could we fix this properly instead?
Of course, i'm not against alternate approaches, feel free to. I've just
suggested what i could, to fix things quickly. I'm indeed no expert in KVM
memory management yet. After all, this is what m
only on some particular
HW. I'll try to figure this out.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at
nd testing, and i
was involved too. Perhaps it's board's code fault,
however.
Cc'ed to others involved.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to
Remove dependency on vgic_initialized() and use the newly introduced
infrastructure to send interrupts via the userspace if vGIC is not being
used.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm/kvm/arm.c| 8 +---
virt/kvm/arm/arch_timer.
Add documentation for the new exit code.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
Documentation/virtual/kvm/api.txt | 14 ++
1 file changed, 14 insertions(+)
diff --git a/Documentation/virtual/kvm/api.txt
b/Documentation/virtual/kvm/api.txt
index 092ee9f..d8aae4c
code. This can
be extended in the future if necessary.
The interface is designed to be as much arch-agnostic as possible.
Therefore, it has IRQ number and level as parameters (encoded in
struct kvm_irq_level).
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm/kvm/arm.c
.
The API is designed to be as much architecture-agnostic is possible.
Currently it actually supports only a single IRQ, but it can be easily
extended to accomodate more.
Pavel Fedin (3):
KVM: Introduce KVM_EXIT_IRQ
KVM: Documentation: Document KVM_EXIT_IRQ
KVM: arm/arm64: Decouple virtual timer from
The guest is currently suggested to use some memory-mapped
timer which can be emulated in userspace.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
v5 => v6:
- KVM_CAP_IRQFD patch also dropped, causing many problems on PowerPC and
S390
- Rebased on top of 4.3-rc3
v4 => v5:
- T
on Samsung proprietary hardware.
Cc: sta...@vger.kernel.org
Fixes: e6fab5442345 ("ARM/arm64: KVM: test properly for a PTE's uncachedness")
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm/kvm/mmu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ar
03:16.135724Z qemu-system-arm: Error binding guest notifier: 11
2015-12-01T11:03:16.135849Z qemu-system-arm: unable to start vhost net: 11:
falling back on userspace virtio
--- cut ---
So, the resume is: we just drop this patch and only N1 remains.
Kind regards,
Pavel Fedin
Expert Engineer
Samsun
Hello!
> -Original Message-
> From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf
> Of Pavel Fedin
> Sent: Tuesday, December 01, 2015 1:03 PM
> To: 'Marc Zyngier'; kvm...@lists.cs.columbia.edu; kvm@vger.kernel.org
> Cc: 'Ard Biesheuv
time to investigate this quickly, but i'll post some
new information as soon as i get it
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.
at perhaps we have some real need to
distinguish between different irqchip types, but
shouldn't the kernel also publish KVM_CAP_IRQCHIP, which stands just for "we
support some irqchip virtualization"?
May be we should just add this for PowerPC and S390, to make things less
ambiguous?
t conditions in
callers instead
- Added ARM64-specific code, without which attempt to run a VM ends in a
HYP crash because of unset vGIC save/restore function pointers
Pavel Fedin (2):
arm/arm64: KVM: Detect vGIC presence at runtime
KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP
The guest is currently suggested to use some memory-mapped
timer which can be emulated in userspace.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm/kvm/arm.c | 22 --
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/arch/arm/kvm/arm.c b/arch/arm
Now at least ARM is able to determine whether the machine has
virtualization support for irqchip or not at runtime. Obviously,
irqfd requires irqchip.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
virt/kvm/kvm_main.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff
ere's simply no use for them. But, well, perhaps there would be an
exception in vhost, i don't remember testing it.
So what shall we do?
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
mber testing it.
>
> Wouldn't an irqfd emulation cover vhost?
Of course it would. At least it should, but perhaps will need some minor
tweaks.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "
ts_inject_msi(struct kvm *kvm, struct kvm_msi *msi);
> +
> bool vits_queue_lpis(struct kvm_vcpu *vcpu);
> void vits_unqueue_lpi(struct kvm_vcpu *vcpu, int irq);
>
> diff --git a/virt/kvm/arm/vgic-v3-emul.c b/virt/kvm/arm/vgic-v3-emul.c
> index f482e34..90f3628 100644
> --- a/virt
of endianness conversion and
masking. Masking is not used here (the mask is set to ~0), so we just
move out the remaining endianness conversion.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
virt/kvm/arm/vgic-v2-emul.c | 20
1 file changed, 8 insertions(+), 12 deletions(-)
Access size is always 64 bits. Since CPU interface state actually affects
only a single vCPU, no vGIC locking is done in order to avoid code
duplication. Just made sure that the vCPU is not running.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm64/include/uapi/asm/kvm.h
In order to implement vGICv3 CPU interface access, we will need to
perform table lookup of system registers. We would need both
index_to_params() and find_reg() exported for that purpose, but instead
we export a single function which combines them both.
Signed-off-by: Pavel Fedin <p
ould normally
be 0), for read operations this would cause duplication of the same word
in both halves.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
arch/arm64/include/uapi/asm/kvm.h | 1 +
include/linux/irqchip/arm-gic-v3.h | 1 +
virt/kvm/arm/vgic-v3-emul.c
GICv3 save/restore API documentation
Pavel Fedin (6):
KVM: arm/arm64: Move endianness conversion out of
vgic_attr_regs_access()
KVM: arm/arm64: Refactor vGIC attributes handling code
KVM: arm64: Implement vGICv3 distributor and redistributor access from
userspace
KVM: arm64: Refact
eter.mayd...@linaro.org>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
Signed-off-by: Christoffer Dall <christoffer.d...@linaro.org>
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 116 ++
Documentation/vi
Replace Rt with data pointer in struct sys_reg_params. This will allow to
reuse system register handling code in implementation of vGICv3 CPU
interface access API. Additionally, got rid of "massive hack"
in kvm_handle_cp_64().
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
differently. Also, vcpu pointer has backpointer to kvm, so 'dev' was
replaced with 'vcpu'.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
virt/kvm/arm/vgic-v2-emul.c | 120 +++-
virt/kvm/arm/vgic.c | 57 +
virt/kvm/arm/
These new functions allow direct mapping and unmapping of addresses on the
given IOMMU. They will be used for mapping MSI hardware.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
drivers/vfio/vfio_iommu_type1.c | 29 +
include/linux/vfio.h
=> v2:
- Adde dependency on CONFIG_GENERIC_MSI_IRQ_DOMAIN in some parts of the
code, should fix build without this option
Pavel Fedin (3):
vfio: Introduce map and unmap operations
gicv3, its: Introduce VFIO map and unmap operations
vfio: Introduce generic MSI mapping operations
driv
These new functions use the supplied IOMMU in order to map and unmap MSI
translation register(s).
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
drivers/irqchip/irq-gic-v3-its.c | 31 +++
include/linux/irqchip/arm-gic-v3.h | 2 ++
include/linux
at least one
device referring to it using MSI.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
drivers/vfio/pci/vfio_pci_intrs.c | 11
drivers/vfio/vfio.c | 116 ++
include/linux/vfio.h | 13 +
3 files change
These new functions use the supplied IOMMU in order to map and unmap MSI
translation register(s).
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
drivers/irqchip/irq-gic-v3-its.c | 31 +++
include/linux/irqchip/arm-gic-v3.h | 2 ++
include/linux
These new functions allow direct mapping and unmapping of addresses on the
given IOMMU. They will be used for mapping MSI hardware.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
drivers/vfio/vfio_iommu_type1.c | 29 +
include/linux/vfio.h
On some architectures (e.g. ARM64) if the device is behind an IOMMU, and
is being mapped by VFIO, it is necessary to also add mappings for MSI
translation register for interrupts to work. This series implements the
necessary API to do this, and makes use of this API for GICv3 ITS on
ARM64.
Pavel
Hello!
Tested-by: Pavel Fedin <p.fe...@samsung.com>
Personally i have a small concern about this way of testing. I know many ports
of the kernel to proprietary systems, and they tend to have drivers which just
deal with hardcoded physical memory regions on their own, withou
Hello!
I have tested this patch, it also fixes the crash on Exynos5410, and is indeed
a better approach.
Tested-by: Pavel Fedin <p.fe...@samsung.com>
CC'ed general KVM mailing list too.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
>
e_pte(old_pte);
> +
> + put_page(virt_to_page(pte));
> } while (pte++, addr += PAGE_SIZE, addr != end);
>
> if (kvm_pte_table_empty(kvm, start_pte))
> --
I see you inverted pte_none() check, and now kbuild bot complains about
"mixed declarations and code".
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
unmapping logic to
carry
over a flag, telling whether we are removing normal or HYP mappings. But
wouldn't
this be much more complicated?
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm&quo
ill test it on monday. Indeed, this is better than my approach,
and
this is what i actually wanted to do but didn't study the thing deeply enough to
implement.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line &
CP15-timer-less boards like Exynos:
http://www.spinics.net/lists/kvm/msg122746.html. Just to make sure that you
don't
miss it.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the b
n
elrsr '1' means 'free').
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
include/kvm/arm_vgic.h | 3 ---
virt/kvm/arm/vgic-v2.c | 1 +
virt/kvm/arm/vgic-v3.c | 1 +
virt/kvm/arm/vgic.c| 37 +
4 files changed, 15 insertions(+), 27 deletion
it in order to get prepared for LPI support
introduction. After this number of IRQs will grow up to at least 16384,
while numbers from 1024 to 8192 are never going to be used. This would be
a huge memory waste.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
include/kvm/arm_vgic.
e care about vgic_retire_lr(), which has deserved own patch.
Pavel Fedin (4):
KVM: arm/arm64: Remove vgic_irq_lr_map
KVM: arm/arm64: Replace lr_used with elrsr
KVM: arm/arm64: Clean up vgic_retire_lr() and surroundings
KVM: arm/arm64: Merge vgic_set_lr() and vgic_sync_lr_elrsr()
include/kvm/arm_
Now we see that vgic_set_lr() and vgic_sync_lr_elrsr() are always used
together. Merge them into one function, saving from second vgic_ops
dereferencing every time.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
include/kvm/arm_vgic.h | 1 -
virt/kvm/arm/vgic-v2.c | 5 -
virt/k
ear_queued() inside of it.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
virt/kvm/arm/vgic.c | 37 ++---
1 file changed, 10 insertions(+), 27 deletions(-)
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index 265a410..96e45f3 100644
--- a/vir
stop
at any point, and actually you should be able to
easily throw away 0003 and apply just 1, 2, 4. The minimum needed thing for
LPIs introduction is 0001.
You can also stick to v4 if the problem does not get triggered by its first
patch, if you prefer reduced commit log.
Kind regards,
Pa
hat version then, which will provide
the necessary changes to plug in LPIs, yet with
minimal changes (it will only remove vgic_irq_lr_map).
I guess i should have done it before. Or, i could even respin v5, with current
0001 split up. This should make it easier to bisect
the problem.
Kind regards,
--- cut ---
-EBUSY: One or more VCPUs are running
--- cut ---
While my version says "VCPU is running". Since this is CPU interface, it does
not affect other CPUs, so for simplicity i check only current vCPU in my code.
That's all. Just i'm maybe too careful about fundamentals...
Kind rega
h it in.
> which breaks bisectability and makes it impossible to understand the logic by
> looking
> at this commit in isolation.
Will this be understood better if i make this particular refactor a separate
commit, with better explanations?
Kind regards,
Pavel Fedin
Expert Engineer
Samsung E
elrsr/aisr
in sync with software model"), because together with lr_used we also update
elrsr. This allows to easily replace lr_used with elrsr, inverting all
conditions (because in elrsr '1' means 'free').
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
include/kvm/arm_vgic.h | 6
ear_queued() inside of it.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
virt/kvm/arm/vgic.c | 37 ++---
1 file changed, 10 insertions(+), 27 deletions(-)
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index 265a410..96e45f3 100644
--- a/virt/kvm/arm/v
Now we see that vgic_set_lr() and vgic_sync_lr_elrsr() are always used
together. Merge them into one function, saving from second vgic_ops
dereferencing every time.
Signed-off-by: Pavel Fedin <p.fe...@samsung.com>
---
include/kvm/arm_vgic.h | 1 -
virt/kvm/arm/vgic-v2.c | 5 -
virt/k
1 - 100 of 303 matches
Mail list logo