On Fri, 2015-09-18 at 16:58 +0200, Paolo Bonzini wrote:
>
> On 18/09/2015 16:29, Feng Wu wrote:
> > VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt.
> > With VT-d Posted-Interrupts enabled, external interrupts from
> > direct-assigned devices can be delivered to guests withou
On Fri, 2015-09-18 at 22:29 +0800, Feng Wu wrote:
> This patch adds the registration/unregistration of an
> irq_bypass_producer for MSI/MSIx on vfio pci devices.
>
> Signed-off-by: Feng Wu
On nit, Paolo could you please fix the spelling of "registration" in the
dev_info, otherwise:
Acked-by: Al
On 18/09/2015 18:16, Radim Krčmář wrote:
>>> >> Ok, I was wondering whether this was the correct interpretation. Thanks!
>> >
>> > Paolo, I don't think Radim clarify your concern, right? Since mda is
>> > 8-bit, it
>> > is wrong with mda >> 16, this is your concern, right?
> In case it was: m
2015-09-17 23:18+, Wu, Feng:
>> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
>> On 17/09/2015 17:58, Radim Krčmář wrote:
>>> xAPIC address are only 8 bit long so they always get delivered to x2APIC
>>> cluster 0, where first 16 bits work like xAPIC flat logical mode.
>>
>> Ok, I was wonder
On 18/09/2015 16:29, Feng Wu wrote:
> This patch updates the Posted-Interrupts Descriptor when vCPU
> is blocked.
>
> pre-block:
> - Add the vCPU to the blocked per-CPU list
> - Set 'NV' to POSTED_INTR_WAKEUP_VECTOR
>
> post-block:
> - Remove the vCPU from the per-CPU list
>
> Signed-off-by: F
> -Original Message-
> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
> Sent: Friday, September 18, 2015 11:21 PM
> To: Wu, Feng; alex.william...@redhat.com; j...@8bytes.org;
> mtosa...@redhat.com
> Cc: eric.au...@linaro.org; k...@vger.kernel.org;
> iommu@lists.linux-foundation.org; lin
Signed-off-by: Feng Wu
> -Original Message-
> From: iommu-boun...@lists.linux-foundation.org
> [mailto:iommu-boun...@lists.linux-foundation.org] On Behalf Of Feng Wu
> Sent: Friday, September 18, 2015 10:30 PM
> To: pbonz...@redhat.com; alex.william...@redhat.com; j...@8bytes.org;
> mtosa
Signed-off-by: Feng Wu
> -Original Message-
> From: iommu-boun...@lists.linux-foundation.org
> [mailto:iommu-boun...@lists.linux-foundation.org] On Behalf Of Feng Wu
> Sent: Friday, September 18, 2015 10:30 PM
> To: pbonz...@redhat.com; alex.william...@redhat.com; j...@8bytes.org;
> mtosa
On 18/09/2015 17:08, Wu, Feng wrote:
>
>
>> -Original Message-
>> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
>> Sent: Friday, September 18, 2015 10:59 PM
>> To: Wu, Feng; alex.william...@redhat.com; j...@8bytes.org;
>> mtosa...@redhat.com
>> Cc: eric.au...@linaro.org; k...@vger.ke
Stage-2 TLBI by IPA takes a 48-bit address field, as opposed to the
64-bit field used by the VA-based invalidation commands.
This patch re-jigs the SMMUv3 command construction code so that the
address field is correctly masked.
Signed-off-by: Will Deacon
---
drivers/iommu/arm-smmu-v3.c | 9
> -Original Message-
> From: Paolo Bonzini [mailto:pbonz...@redhat.com]
> Sent: Friday, September 18, 2015 10:59 PM
> To: Wu, Feng; alex.william...@redhat.com; j...@8bytes.org;
> mtosa...@redhat.com
> Cc: eric.au...@linaro.org; k...@vger.kernel.org;
> iommu@lists.linux-foundation.org; lin
On 18/09/2015 16:29, Feng Wu wrote:
> VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt.
> With VT-d Posted-Interrupts enabled, external interrupts from
> direct-assigned devices can be delivered to guests without VMM
> intervention when guest is running in non-root mode.
>
>
This patch defines a new interface kvm_intr_is_single_vcpu(),
which can returns whether the interrupt is for single-CPU or not.
It is used by VT-d PI, since now we only support single-CPU
interrupts, For lowest-priority interrupts, if user configures
it via /proc/irq or uses irqbalance to make it
This patch updates the Posted-Interrupts Descriptor when vCPU
is blocked.
pre-block:
- Add the vCPU to the blocked per-CPU list
- Set 'NV' to POSTED_INTR_WAKEUP_VECTOR
post-block:
- Remove the vCPU from the per-CPU list
Signed-off-by: Feng Wu
---
v9:
- Add description for blocked_vcpu_on_cpu_lo
This patch adds an arch specific hooks 'arch_update' in
'struct kvm_kernel_irqfd'. On Intel side, it is used to
update the IRTE when VT-d posted-interrupts is used.
Signed-off-by: Feng Wu
---
v9:
- Use 'if' instead of "? :" in kvm_arch_update_irqfd_routing()
- coding style
v8:
- Remove callback
This patch adds the registration/unregistration of an
irq_bypass_producer for MSI/MSIx on vfio pci devices.
Signed-off-by: Feng Wu
---
v8:
- Merge "[PATCH v7 08/17] vfio: Select IRQ_BYPASS_MANAGER for vfio PCI devices"
into this patch.
v6:
- Make the add_consumer and del_consumer callbacks sta
This patch adds the routine to update IRTE for posted-interrupts
when guest changes the interrupt configuration.
Signed-off-by: Feng Wu
---
v9:
- Check !kvm_arch_has_assigned_device(kvm) first then
!irq_remapping_cap(IRQ_POSTING_CAP)
v8:
- Move 'kvm_arch_update_pi_irte' to vmx.c as a callback
Implement the following callbacks for x86:
- kvm_arch_irq_bypass_add_producer
- kvm_arch_irq_bypass_del_producer
- kvm_arch_irq_bypass_stop: dummy callback
- kvm_arch_irq_bypass_resume: dummy callback
and set CONFIG_HAVE_KVM_IRQ_BYPASS for x86.
Signed-off-by: Feng Wu
---
v8:
- Move the weak irq
This patch updates the Posted-Interrupts Descriptor when vCPU
is preempted.
sched out:
- Set 'SN' to suppress furture non-urgent interrupts posted for
the vCPU.
sched in:
- Clear 'SN'
- Change NDST if vCPU is scheduled to a different CPU
- Set 'NV' to POSTED_INTR_VECTOR
Signed-off-by: Feng Wu
-
Enable VT-d Posted-Interrtups and add a command line
parameter for it.
Signed-off-by: Feng Wu
Reviewed-by: Paolo Bonzini
---
Documentation/kernel-parameters.txt | 1 +
drivers/iommu/irq_remapping.c | 12
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/Document
From: Eric Auger
Move _irqfd_resampler and _irqfd struct declarations in a new
public header: kvm_irqfd.h. They are respectively renamed into
kvm_kernel_irqfd_resampler and kvm_kernel_irqfd. Those datatypes
will be used by architecture specific code, in the context of
IRQ bypass manager integrati
From: Eric Auger
This patch adds the registration/unregistration of an
irq_bypass_consumer on irqfd assignment/deassignment.
Signed-off-by: Eric Auger
Signed-off-by: Feng Wu
---
v4 -> v5:
- due to removal of static inline stubs, add
#ifdef CONFIG_HAVE_KVM_IRQ_BYPASS
around consumer registr
Make kvm_set_msi_irq() public, we can use this function outside.
Signed-off-by: Feng Wu
Reviewed-by: Paolo Bonzini
---
v8:
- Export kvm_set_msi_irq() so we can use it in vmx code
arch/x86/include/asm/kvm_host.h | 4
arch/x86/kvm/irq_comm.c | 5 +++--
2 files changed, 7 insertions(
This patch adds some helper functions to manipulate the
Posted-Interrupts Descriptor.
Signed-off-by: Feng Wu
Reviewed-by: Paolo Bonzini
---
arch/x86/kvm/vmx.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 271dd70..3
Move struct kvm_irq_routing_table from irqchip.c to kvm_host.h,
so we can use it outside of irqchip.c.
Signed-off-by: Feng Wu
Reviewed-by: Paolo Bonzini
---
include/linux/kvm_host.h | 14 ++
virt/kvm/irqchip.c | 10 --
2 files changed, 14 insertions(+), 10 deletions(-)
From: Eric Auger
This patch introduces
- kvm_arch_irq_bypass_add_producer
- kvm_arch_irq_bypass_del_producer
- kvm_arch_irq_bypass_stop
- kvm_arch_irq_bypass_start
They make possible to specialize the KVM IRQ bypass consumer in
case CONFIG_KVM_HAVE_IRQ_BYPASS is set.
Signed-off-by: Eric Auger
Extend struct pi_desc for VT-d Posted-Interrupts.
Signed-off-by: Feng Wu
---
arch/x86/kvm/vmx.c | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 83b7b5c..271dd70 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt.
With VT-d Posted-Interrupts enabled, external interrupts from
direct-assigned devices can be delivered to guests without VMM
intervention when guest is running in non-root mode.
You can find the VT-d Posted-Interrtups Spec. in
From: Alex Williamson
When a physical I/O device is assigned to a virtual machine through
facilities like VFIO and KVM, the interrupt for the device generally
bounces through the host system before being injected into the VM.
However, hardware technologies exist that often allow the host to be
by
From: Eric Auger
Select IRQ_BYPASS_MANAGER when CONFIG_KVM is set
Also add compilation of virt/lib.
Signed-off-by: Eric Auger
Signed-off-by: Feng Wu
---
v3 -> v4:
- add compilation of virt/lib in arm/arm64 KVM
v2 -> v3:
- [Feng Wu] Correct a typo in 'arch/arm64/kvm/Kconfig'
v1 -> v2:
- also
Select IRQ_BYPASS_MANAGER for x86 when CONFIG_KVM is set
Signed-off-by: Feng Wu
---
arch/x86/kvm/Kconfig | 2 ++
arch/x86/kvm/Makefile | 3 +++
2 files changed, 5 insertions(+)
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index d8a1d56..c951d44 100644
--- a/arch/x86/kvm/Kconfig
+++
AArch32-capable SMMU implementations have a minimum IAS of 40 bits, so
ensure that is reflected in the stage-2 page table configuration.
Signed-off-by: Will Deacon
---
drivers/iommu/arm-smmu-v3.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/arm-s
On Fri, Sep 18, 2015 at 12:04:26PM +0100, Robin Murphy wrote:
> Specifically, the problem case for that is when phys_addr_t is 64-bit but
> dma_addr_t is 32-bit. The cast in __arm_lpae_dma_addr is necessary to avoid
> a truncation warning when we make the DMA API calls, but we actually need
> the o
On 18/09/15 09:55, Yong Wu wrote:
On Thu, 2015-09-17 at 17:42 +0100, Robin Murphy wrote:
[...]
the appropriate course of action. Further care (and ugliness) is also
necessary in the comparison to avoid truncation if phys_addr_t and
dma_addr_t differ in size.
[...]
/*
On Thu, 2015-09-17 at 17:42 +0100, Robin Murphy wrote:
> In checking whether DMA addresses differ from physical addresses, using
> dma_to_phys() is actually the wrong thing to do, since it may hide any
> DMA offset, which is precisely one of the things we are checking for.
> Simply casting between
35 matches
Mail list logo