If IRTE is in posted format, the 'pda' field goes across the 64-bit
boundary, we need use cmpxchg16b to atomically update it. We only
expose posted-interrupt when X86_FEATURE_CX16 is supported and use
to update it atomically.
Signed-off-by: Feng Wu
---
drivers/iommu/intel_irq_remapp
single-CPU, we
can use PI to deliver the interrupts to it. Full functionality
of lowest-priority support will be added later.
Signed-off-by: Feng Wu
---
v9:
- Move kvm_intr_is_single_vcpu_fast() to lapic.c
- Remove incorrect WARN_ON_ONCE()
v8:
- Some optimizations in kvm_intr_is_single_vcpu
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 descr
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
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
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
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
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_
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
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 consu
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
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
Signed-off-by: Feng Wu
---
v4 -> v5:
- remove static inline stub functions
v2 -> v3 (Feng Wu):
- use 'kvm_arch_irq_bypass_start' instead of 'kvm_arch_irq_bypass_resume'
- Remove 'kvm_arch_irq_bypass_update', which is not needed to be
a irqbypass
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
on the new hierarchy irqdomain patches
provided
by Jiang Liu
*** BLURB HERE ***
Alex Williamson (1):
virt: IRQ bypass manager
Eric Auger (4):
KVM: arm/arm64: select IRQ_BYPASS_MANAGER
KVM: create kvm_irqfd.h
KVM: introduce kvm_arch functions for IRQ bypass
KVM: eventfd: add irq
automatically enabled.
Signed-off-by: Alex Williamson
Reviewed-by: Eric Auger
Tested-by: Eric Auger
Tested-by: Feng Wu
---
v4: All producer callbacks are optional, as with Intel PI, it's
possible for the producer to be blissfully unaware of the bypass.
MAINTAINERS | 7 ++
in
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'
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
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
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
---
v8:
- Rename 'pi_pre_block
is set.
Signed-off-by: Feng Wu
Reviewed-by: Paolo Bonzini
---
arch/x86/kvm/vmx.c | 16
1 file changed, 16 insertions(+)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 9888c43..58fbbc6 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4498,6 +4498,22 @
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
---
v8:
- Remove callback .arch_update()
- Remove kvm_arch_irqfd_init()
- Call kvm_arch_
This patch adds the routine to update IRTE for posted-interrupts
when guest changes the interrupt configuration.
Signed-off-by: Feng Wu
---
v8:
- Move 'kvm_arch_update_pi_irte' to vmx.c as a callback
- Only update the PI irte when VM has assigned devices
- Add a trace point for V
ol"
* Rebase this patchset on
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git,
then revise some irq logic based on the new hierarchy irqdomain patches
provided
by Jiang Liu
Feng Wu (13):
KVM: Extend struct pi_desc for VT-d Posted-Interrupts
KVM: Add some helper functions for Posted-I
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
single-CPU, we
can use PI to deliver the interrupts to it. Full functionality
of lowest-priority support will be added later.
Signed-off-by: Feng Wu
---
v8:
- Some optimizations in kvm_intr_is_single_vcpu().
- Expose kvm_intr_is_single_vcpu() so we can use it in vmx code.
- Add
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
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_
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
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
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
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
is set.
Signed-off-by: Feng Wu
---
arch/x86/kvm/vmx.c | 16
1 file changed, 16 insertions(+)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 64e35ea..eb640a1 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4494,6 +4494,22 @
Enable VT-d Posted-Interrtups and add a command line
parameter for it.
Signed-off-by: Feng Wu
---
Documentation/kernel-parameters.txt | 1 +
drivers/iommu/irq_remapping.c | 12
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/Documentation/kernel-parameters.txt
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
---
arch/x86/include/asm/kvm_host.h |
Make kvm_set_msi_irq() public, we can use this function outside.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 4
arch/x86/kvm/irq_comm.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm
Define two weak arch callbacks so that archs that don't need
them don't need define them.
Signed-off-by: Feng Wu
---
virt/kvm/eventfd.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index d7a230f..f3050b9 100644
--- a/virt/kvm
Enable irq bypass manager for vfio PCI devices.
Signed-off-by: Feng Wu
---
drivers/vfio/pci/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig
index 579d83b..02912f1 100644
--- a/drivers/vfio/pci/Kconfig
+++ b/drivers/vfio/pci/Kconfig
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_
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
---
arch/x86/include/asm
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
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
---
arch/x86/include/asm/kvm_host.h | 2 ++
arch/x86/kvm/x86.c | 5
ARN_ON() when irq_bypass_register_producer fails
- Remove optional dummy callbacks for irq producer
Signed-off-by: Feng Wu
---
drivers/vfio/pci/vfio_pci_intrs.c | 9 +
drivers/vfio/pci/vfio_pci_private.h | 2 ++
2 files changed, 11 insertions(+)
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c
b/dri
This patch adds the routine to update IRTE for posted-interrupts
when guest changes the interrupt configuration.
Signed-off-by: Feng Wu
---
arch/x86/kvm/x86.c | 73 ++
1 file changed, 73 insertions(+)
diff --git a/arch/x86/kvm/x86.c b/arch
Define an interface to get PI descriptor address from the vCPU structure.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 2 ++
arch/x86/kvm/vmx.c | 11 +++
2 files changed, 13 insertions(+)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm
rg/pub/scm/linux/kernel/git/tip/tip.git,
then revise some irq logic based on the new hierarchy irqdomain patches
provided
by Jiang Liu
Feng Wu (17):
KVM: Extend struct pi_desc for VT-d Posted-Interrupts
KVM: Add some helper functions for Posted-Interrupts
KVM: Define a new interface kvm_
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
---
include/linux/kvm_host.h | 14 ++
virt/kvm/irqchip.c | 10 --
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/include
This patch adds pi_clear_sn and pi_set_sn to struct kvm_x86_ops,
so we can set/clear SN outside vmx.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 3 +++
arch/x86/kvm/vmx.c | 13 +
2 files changed, 16 insertions(+)
diff --git a/arch/x86/include/asm
This patch adds some helper functions to manipulate the
Posted-Interrupts Descriptor.
Signed-off-by: Feng Wu
---
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..316f9bf 100644
--- a/arch
single-CPU, we
can use PI to deliver the interrupts to it. Full functionality
of lowest-priority support will be added later.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 3 +++
arch/x86/kvm/irq_comm.c | 24
2 files changed, 27 insertions
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
---
arch/x86/include/asm
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_
Enable VT-d Posted-Interrtups and add a command line
parameter for it.
Signed-off-by: Feng Wu
---
Documentation/kernel-parameters.txt | 1 +
drivers/iommu/irq_remapping.c | 12
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/Documentation/kernel-parameters.txt
This patch adds the routine to update IRTE for posted-interrupts
when guest changes the interrupt configuration.
Signed-off-by: Feng Wu
---
arch/x86/kvm/x86.c | 73 ++
1 file changed, 73 insertions(+)
diff --git a/arch/x86/kvm/x86.c b/arch
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
---
arch/x86/include/asm/kvm_host.h | 2 ++
arch/x86/kvm/x86.c | 5
is set.
Signed-off-by: Feng Wu
---
arch/x86/kvm/vmx.c | 16
1 file changed, 16 insertions(+)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6b50eba..b4f5600 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4477,6 +4477,22 @
Make kvm_set_msi_irq() public, we can use this function outside.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 4
arch/x86/kvm/irq_comm.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm
Enable irq bypass manager for vfio PCI devices.
Signed-off-by: Feng Wu
---
drivers/vfio/pci/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig
index 579d83b..02912f1 100644
--- a/drivers/vfio/pci/Kconfig
+++ b/drivers/vfio/pci/Kconfig
ARN_ON() when irq_bypass_register_producer fails
- Remove optional dummy callbacks for irq producer
Signed-off-by: Feng Wu
---
drivers/vfio/pci/vfio_pci_intrs.c | 9 +
drivers/vfio/pci/vfio_pci_private.h | 2 ++
2 files changed, 11 insertions(+)
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c
b/dri
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
---
arch/x86/include/asm/kvm_host.h |
Define an interface to get PI descriptor address from the vCPU structure.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 2 ++
arch/x86/kvm/vmx.c | 11 +++
2 files changed, 13 insertions(+)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm
This patch adds pi_clear_sn and pi_set_sn to struct kvm_x86_ops,
so we can set/clear SN outside vmx.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 3 +++
arch/x86/kvm/vmx.c | 13 +
2 files changed, 16 insertions(+)
diff --git a/arch/x86/include/asm
,
then revise some irq logic based on the new hierarchy irqdomain patches
provided
by Jiang Liu
Feng Wu (16):
KVM: Extend struct pi_desc for VT-d Posted-Interrupts
KVM: Add some helper functions for Posted-Interrupts
KVM: Define a new interface kvm_intr_is_single_vcpu()
KVM: Get Po
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
---
include/linux/kvm_host.h | 14 ++
virt/kvm/irqchip.c | 10 --
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/include
single-CPU, we
can use PI to deliver the interrupts to it. Full functionality
of lowest-priority support will be added later.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 3 +++
arch/x86/kvm/irq_comm.c | 24
2 files changed, 27 insertions
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
This patch adds some helper functions to manipulate the
Posted-Interrupts Descriptor.
Signed-off-by: Feng Wu
---
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..316f9bf 100644
--- a/arch
Set Posted-Interrupts capability for Intel iommu when Interrupt
Remapping is enabled, clear it when disabled.
Signed-off-by: Feng Wu
Reviewed-by: Thomas Gleixner
Acked-by: Joerg Roedel
---
drivers/iommu/intel_irq_remapping.c | 30 ++
drivers/iommu/irq_remapping.c
Add a new interface irq_remapping_cap() to detect whether irq
remapping supports new features, such as VT-d Posted-Interrupts.
Export the function, so that KVM code can check this and use this
mechanism properly.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
Reviewed-by: Thomas Gleixner
Acked
Return error when inserting a new IOMMU which doesn't support posted
interrupts if posted interrupts are already enabled.
Signed-off-by: Feng Wu
Reviewed-by: Thomas Gleixner
Acked-by: Joerg Roedel
---
drivers/iommu/intel_irq_remapping.c | 3 +++
1 file changed, 3 insertions(+)
diff --
writing the table entry.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
Acked-by: David Woodhouse
Reviewed-by: Thomas Gleixner
Acked-by: Joerg Roedel
---
drivers/iommu/intel_irq_remapping.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu
Add helper function to detect VT-d Posted-Interrupts capability.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
Acked-by: David Woodhouse
Reviewed-by: Thomas Gleixner
Acked-by: Joerg Roedel
---
include/linux/intel-iommu.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux
Joerg Roedel
Signed-off-by: Feng Wu
---
include/linux/dmar.h | 70 +---
1 file changed, 55 insertions(+), 15 deletions(-)
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index 8473756..0dbcabc 100644
--- a/include/linux/dmar.h
+++ b/include/
Interrupt chip callback to set the VCPU affinity for posted interrupts.
[ tglx: Use the helper function to copy from the remap irte instead of
open coding it. Massage the comment as well ]
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
Acked-by: David Woodhouse
Reviewed-by: Thomas
Add a new field to struct irq_2_iommu, which captures whether the
associated IRTE is in posted mode or remapped mode. We update this
field when the IRTE is written into the table.
Suggested-by: Thomas Gleixner
Signed-off-by: Feng Wu
Reviewed-by: Thomas Gleixner
Acked-by: Joerg Roedel
or VT-d Posted-Interrupts, combine remapped
and posted mode into one irte structure.
v4->v5:
* Abstract modify_irte() to accept two format of irte.
v3->v4:
* Change capability to a int variant flags instead of a function call.
* Add hotplug case for VT-d PI.
Feng Wu (8):
iommu:
Add a new member 'capability' to struct irq_remap_ops for storing
information about available capabilities such as VT-d
Posted-Interrupts.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
Reviewed-by: Thomas Gleixner
Acked-by: Joerg Roedel
---
arch/x86/include/asm/irq_remap
From: Thomas Gleixner
Instead of open coding, provide a helper function to copy the shared
irte fields.
Signed-off-by: Thomas Gleixner
---
include/linux/dmar.h | 12
1 file changed, 12 insertions(+)
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index 0dbcabc..e9bc929 1
Return error when inserting a new IOMMU which doesn't support PI
if PI is currently in use.
Signed-off-by: Feng Wu
---
drivers/iommu/intel_irq_remapping.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iommu/intel_irq_remapping.c
b/drivers/iommu/intel_irq_remapping.c
This patch adds a new interface irq_remapping_cap() to detect
whether irq remapping supports new features, such as VT-d
Posted-Interrupts. We export this function out, so that KVM
code can check this and use this mechanism properly.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
---
arch/x86
Set Posted-Interrupts capability for Intel iommu when IR is enabled,
clear it when IR is disabled.
Signed-off-by: Feng Wu
---
drivers/iommu/intel_irq_remapping.c | 30 ++
drivers/iommu/irq_remapping.c | 2 ++
drivers/iommu/irq_remapping.h | 3 +++
3
vCPU scheduling.
However, we still update the cached irte here, which can be used
when changing back to remapping mode.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
Acked-by: David Woodhouse
---
drivers/iommu/intel_irq_remapping.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff
ff-by: Feng Wu
---
include/linux/dmar.h | 70 +---
1 file changed, 55 insertions(+), 15 deletions(-)
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index 8473756..0dbcabc 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -1
Add helper function to detect VT-d Posted-Interrupts capability.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
Acked-by: David Woodhouse
---
include/linux/intel-iommu.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 0af9b03
Implement irq_set_vcpu_affinity for intel_ir_chip.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
Acked-by: David Woodhouse
---
arch/x86/include/asm/irq_remapping.h | 5 +
drivers/iommu/intel_irq_remapping.c | 43
2 files changed, 48 insertions
This patch adds a new field in struct irq_2_iommu, which can
capture whether the entry is in posted mode or remapped mode.
Signed-off-by: Feng Wu
Suggested-by: Thomas Gleixner
---
drivers/iommu/intel_irq_remapping.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/iommu
This patch adds a new member capability to struct irq_remap_ops,
this new function ops can be used to check whether some
features are supported, such as VT-d Posted-Interrupts.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
---
arch/x86/include/asm/irq_remapping.h | 4
drivers/iommu
te structure.
v4->v5:
* Abstract modify_irte() to accept two format of irte.
v3->v4:
* Change capability to a int variant flags instead of a function call.
* Add hotplug case for VT-d PI.
Feng Wu (8):
iommu: Add new member capability to struct irq_remap_ops
iommu, x86: Implement irq_set_vcp
This patch adds a new interface irq_remapping_cap() to detect
whether irq remapping supports new features, such as VT-d
Posted-Interrupts. We export this function out, so that KVM
code can check this and use this mechanism properly.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
---
arch/x86
Return error when inserting a new IOMMU which doesn't support PI
if PI is currently in use.
Signed-off-by: Feng Wu
---
drivers/iommu/intel_irq_remapping.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iommu/intel_irq_remapping.c
b/drivers/iommu/intel_irq_remapping.c
vCPU scheduling.
However, we still update the cached irte here, which can be used
when changing back to remapping mode.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
Acked-by: David Woodhouse
---
drivers/iommu/intel_irq_remapping.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff
Add helper function to detect VT-d Posted-Interrupts capability.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
Acked-by: David Woodhouse
---
include/linux/intel-iommu.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 0af9b03
This patch adds a new field in struct irq_2_iommu, which can
capture whether the entry is in posted mode or remapped mode.
Signed-off-by: Feng Wu
Suggested-by: Thomas Gleixner
---
drivers/iommu/intel_irq_remapping.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/iommu
Set Posted-Interrupts capability for Intel iommu when IR is enabled,
clear it when IR is disabled.
Signed-off-by: Feng Wu
---
drivers/iommu/intel_irq_remapping.c | 30 ++
drivers/iommu/irq_remapping.c | 2 ++
drivers/iommu/irq_remapping.h | 3 +++
3
Implement irq_set_vcpu_affinity for intel_ir_chip.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
Acked-by: David Woodhouse
---
arch/x86/include/asm/irq_remapping.h | 5
drivers/iommu/intel_irq_remapping.c | 46
2 files changed, 51 insertions
ff-by: Feng Wu
---
include/linux/dmar.h | 70 +---
1 file changed, 55 insertions(+), 15 deletions(-)
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index 8473756..0dbcabc 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -1
ty to a int variant flags instead of a function call.
* Add hotplug case for VT-d PI.
Feng Wu (8):
iommu: Add new member capability to struct irq_remap_ops
iommu, x86: Implement irq_set_vcpu_affinity for intel_ir_chip
iommu, x86: Save the mode (posted or remapped) of an IRTE
iommu, x86: No
This patch adds a new member capability to struct irq_remap_ops,
this new function ops can be used to check whether some
features are supported, such as VT-d Posted-Interrupts.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
---
arch/x86/include/asm/irq_remapping.h | 4
drivers/iommu
1 - 100 of 213 matches
Mail list logo