When the interrupt is not single destination any more, we need
to change back IRTE to remapped mode explicitly.
Signed-off-by: Feng Wu
---
v4:
- Don't need to Set SN before changing back to remapped mode
arch/x86/kvm/vmx.c | 15 ++-
1 file changed, 14 insertions(+), 1 del
Use vector-hashing to deliver lowest-priority interrupts, As an
example, modern Intel CPUs in server platform use this method to
handle lowest-priority interrupts.
Signed-off-by: Feng Wu
---
v4:
- Stylistic changes
v3:
- Fix a bug for sparse topologies, in that case, vcpu_id is not equal
to the
Add host irq information in trace event, so we can better understand
which irq is in posted mode.
Signed-off-by: Feng Wu
Reviewed-by: Radim Krcmar
---
arch/x86/kvm/trace.h | 12
arch/x86/kvm/vmx.c | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/x86
/4]: Add some enhancement to the trace message for vt-d PI.
Detailed changelog is in each patch.
Feng Wu (4):
KVM: Recover IRTE to remapped mode if the interrupt is not
single-destination
KVM: x86: Use vector-hashing to deliver lowest-priority interrupts
KVM: x86: Add lowest-priority
Use vector-hashing to deliver lowest-priority interrupts for
VT-d posted-interrupts. This patch extends kvm_intr_is_single_vcpu()
to support lowest-priority handling.
Signed-off-by: Feng Wu
---
v4:
- Recover the function name to 'kvm_intr_is_single_vcpu'
- Stylistic changes
v3
Use vector-hashing to deliver lowest-priority interrupts, As an
example, modern Intel CPUs in server platform use this method to
handle lowest-priority interrupts.
Signed-off-by: Feng Wu
---
arch/x86/kvm/irq_comm.c | 27 ++-
arch/x86/kvm/lapic.c| 57
Use vector-hashing to deliver lowest-priority interrupts for
VT-d posted-interrupts.
Signed-off-by: Feng Wu
---
arch/x86/kvm/lapic.c | 67
arch/x86/kvm/lapic.h | 2 ++
arch/x86/kvm/vmx.c | 12 --
3 files changed, 79 insertions
module parameter to control the vector-hashing mechanism
Feng Wu (2):
KVM: x86: Use vector-hashing to deliver lowest-priority interrupts
KVM: x86: Add lowest-priority support for vt-d posted-interrupts
arch/x86/kvm/irq_comm.c | 27 +--
arch/x86/kvm/lapic.c| 124
Use vector-hashing to handle lowest-priority interrupts for
posted-interrupts. As an example, modern Intel CPUs use this
method to handle lowest-priority interrupts.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 2 ++
arch/x86/kvm/irq_comm.c | 52
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
Commit-ID: fcf1ae2f7a044cda9956ec7afb487296afff058e
Gitweb: http://git.kernel.org/tip/fcf1ae2f7a044cda9956ec7afb487296afff058e
Author: Feng Wu
AuthorDate: Sat, 3 Oct 2015 16:20:38 +0800
Committer: Thomas Gleixner
CommitDate: Fri, 9 Oct 2015 22:47:27 +0200
genirq: Make
irq_set_vcpu_affinity() is needed when CONFIG_SMP=n, so move the
definition out of "#ifdef CONFIG_SMP"
Suggested-by: Paolo Bonzini
Signed-off-by: Feng Wu
---
kernel/irq/manage.c | 62 ++---
1 file changed, 31 insertions(+), 31 deletion
We need to build files in virt/lib/, so add virt directory to
the top Makefile.
Signed-off-by: Feng Wu
---
v2:
- Remove the explicit 'virt' entry in the KBUILD_ALLDIRS assignment
- Remove './' in virt/Makefile
Makefile | 10 ++
arch/x86/kvm/Makefile |
We need to build files in virt/lib/, which are now used by
KVM and VFIO, so add virt directory to the top Makefile.
Signed-off-by: Feng Wu
---
Makefile | 8 +---
arch/x86/kvm/Makefile | 3 ---
virt/Makefile | 1 +
3 files changed, 6 insertions(+), 6 deletions(-)
create
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
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
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
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
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 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
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 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 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_
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
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
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
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
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
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
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'
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
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
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
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
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
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 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
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
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_
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 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_
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 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
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
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
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
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
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
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
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
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_
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 |
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
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
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
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
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_
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
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
,
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
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
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
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
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
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 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
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 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 |
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
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
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
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
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
irq bypass consumer management
Feng Wu (1):
KVM: x86: select IRQ_BYPASS_MANAGER
arch/arm/kvm/Kconfig | 1 +
arch/arm64/kvm/Kconfig| 1 +
arch/x86/kvm/Kconfig | 2 +
arch/x86/kvm/Makefile | 3 ++
include/linux/kvm_host.h | 33 +++
include/lin
From: Eric Auger
Select IRQ_BYPASS_MANAGER when CONFIG_KVM is set
v2 -> v3:
- Correct a typo in 'arch/arm64/kvm/Kconfig'
v1 -> v2:
- also set IRQ_BYPASS_MANAGER for arm64
Signed-off-by: Eric Auger
Signed-off-by: Feng Wu
---
arch/arm/kvm/Kconfig | 1 +
arch/arm64/kvm/
M_HAVE_IRQ_BYPASS instead CONFIG_IRQ_BYPASS_MANAGER
- rename all functions according to Paolo's proposal
- add kvm_arch_irq_bypass_update according to Feng's need
Signed-off-by: Eric Auger
Signed-off-by: Feng Wu
---
include/linux/kvm_host.h | 33 +
virt
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
rnel_irqfd', it is needed by posted interrupt.
- Remove 'irq_bypass_unregister_consumer' in kvm_irqfd_deassign()
v1 -> v2:
- populate of kvm and gsi removed
- unregister the consumer on irqfd_shutdown
Signed-off-by: Eric Auger
Signed-off-by: Feng Wu
---
include/linux/kvm
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
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 | 15 +++
virt/kvm/irqchip.c | 11 ---
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/include
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 765539e..1e815b6 100644
--- a/arch
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
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
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
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 | 2 ++
arch/x86/kvm/irq_comm.c | 24
2 files changed, 26 insertions(+)
diff
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
Add the following x86 specific routines for irqbypass manger:
- kvm_arch_irq_bypass_add_producer
- kvm_arch_irq_bypass_del_producer
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/x86.c | 40
include/linux
This patch adds the registration/unregistration of an
irq_bypass_producer for MSI/MSIx on vfio pci devices.
Signed-off-by: Feng Wu
---
drivers/vfio/pci/vfio_pci_intrs.c | 19 +++
drivers/vfio/pci/vfio_pci_private.h | 2 ++
2 files changed, 21 insertions(+)
diff --git a
Enable irq bypass manager for kvm-intel.
Signed-off-by: Feng Wu
---
arch/x86/kvm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index 921a8f9..be125bc 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -61,6 +61,7 @@ config
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 following new members in 'struct kvm_kernel_irqfd'
- struct irq_bypass_consumer consumer
- struct irq_bypass_producer *producer
Signed-off-by: Eric Auger
Signed-off-by: Feng Wu
---
include/linux/kvm_irqfd.h | 3 +++
1 file changed, 3
1 - 100 of 306 matches
Mail list logo