Add the design doc for VT-d PI.
Signed-off-by: Feng Wu
---
docs/misc/vtd-pi.txt | 333 +++
1 file changed, 333 insertions(+)
create mode 100644 docs/misc/vtd-pi.txt
diff --git a/docs/misc/vtd-pi.txt b/docs/misc/vtd-pi.txt
new file mode 100644
some magic numbers.
Feng Wu (15):
Vt-d Posted-intterrupt (PI) design
Add helper macro for X86_FEATURE_CX16 feature detection
Add cmpxchg16b support for x86-64
iommu: Add iommu_intpost to control VT-d Posted-Interrupts feature
vt-d: VT-d Posted-Interrupts feature detection
vmx: Extend stru
This patch initializes the VT-d Posted-interrupt Descriptor.
Signed-off-by: Feng Wu
---
v3:
- Move pi_desc_init() to xen/arch/x86/hvm/vmx/vmcs.c
- Remove the 'inline' flag of pi_desc_init()
xen/arch/x86/hvm/vmx/vmcs.c | 18 ++
xen/include/asm-x86/hvm/vmx/vmx.h
Enable VT-d Posted-Interrupts and add a command line
parameter for it.
Signed-off-by: Feng Wu
---
docs/misc/xen-command-line.markdown | 9 -
xen/drivers/passthrough/iommu.c | 8 +++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/docs/misc/xen-command
This patch adds an API which is used to update the IRTE
for posted-interrupt when guest changes MSI/MSI-X information.
Signed-off-by: Feng Wu
---
xen/drivers/passthrough/vtd/intremap.c | 98 ++
xen/drivers/passthrough/vtd/iommu.h| 4 ++
xen/include/asm-x86
This patch defines two per-cpu variables:
blocked_vcpu:
A list storing the vCPUs which were blocked on this pCPU.
blocked_vcpu_lock:
The spinlock to protect blocked_vcpu.
Signed-off-by: Feng Wu
---
xen/arch/x86/hvm/vmx/vmcs.c | 3 +++
xen/arch/x86/hvm/vmx/vmx.c| 7 +++
xen
Extend struct iremap_entry according to VT-d Posted-Interrupts Spec.
Signed-off-by: Feng Wu
---
xen/drivers/passthrough/vtd/intremap.c | 90 +-
xen/drivers/passthrough/vtd/iommu.h| 26 +++---
xen/drivers/passthrough/vtd/utils.c| 10 ++--
3 files
Extend struct pi_desc according to VT-d Posted-Interrupts Spec.
Signed-off-by: Feng Wu
---
xen/include/asm-x86/hvm/vmx/vmcs.h | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h
b/xen/include/asm-x86/hvm/vmx/vmcs.h
index
t' to control whether enable VT-d
posted-interrupt or not in the generic IOMMU code.
Signed-off-by: Feng Wu
---
xen/drivers/passthrough/iommu.c | 11 ++-
xen/include/xen/iommu.h | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/passthrough/iom
terrupts.
(Current, we only support non-urgent interrupts)
- Set 'NV' back to 'Notification Vector' if needed.
Signed-off-by: Feng Wu
---
xen/arch/x86/hvm/vmx/vmx.c | 130 +
xen/common/schedule.c | 5 ++
xen/include/xen
Add the design doc for VT-d PI.
Signed-off-by: Feng Wu
---
docs/misc/vtd-pi.txt | 332 +++
1 file changed, 332 insertions(+)
create mode 100644 docs/misc/vtd-pi.txt
diff --git a/docs/misc/vtd-pi.txt b/docs/misc/vtd-pi.txt
new file mode 100644
This patch adds a new per-vCPU tasklet to wakeup the blocked
vCPU. It can be used in the case vcpu_unblock cannot be called
directly. This tasklet will be used in later patch in this
series.
Signed-off-by: Feng Wu
---
xen/common/domain.c | 11 +++
xen/include/xen/sched.h | 3 +++
2
This patch adds a global vector which is used to wake up
the blocked vCPU when an interrupt is being posted to it.
Signed-off-by: Feng Wu
Suggested-by: Yang Zhang
---
xen/arch/x86/hvm/vmx/vmx.c| 31 +++
xen/include/asm-x86/hvm/hvm.h | 1 +
xen/include
When a vCPU is running in Root mode and a notification event
has been injected to it. we need to set VCPU_KICK_SOFTIRQ for
the current cpu, so the pending interrupt in PIRR will be
synced to vIRR before VM-Exit in time.
Signed-off-by: Feng Wu
---
xen/arch/x86/hvm/vmx/vmx.c| 55
vector-hashing mechamisn to find
the destination vCPU. This follows the hardware behavior, since modern
Intel CPUs use vector hashing to handle the lowest-priority interrupt.
For multicast/broadcast vCPU, we cannot handle it via interrupt posting,
still use interrupt remapping.
Signed-off-by: Feng
Currently, we don't support urgent interrupt, all interrupts
are recognized as non-urgent interrupt, so we cannot send
posted-interrupt when 'SN' is set.
Signed-off-by: Feng Wu
---
xen/arch/x86/hvm/vmx/vmx.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
d
This patch initializes the VT-d Posted-interrupt Descriptor.
Signed-off-by: Feng Wu
---
xen/arch/x86/hvm/vmx/vmcs.c | 3 +++
xen/include/asm-x86/hvm/vmx/vmx.h | 20 +++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch
posted-interrupt.
Signed-off-by: Feng Wu
---
xen/drivers/passthrough/vtd/iommu.c | 15 +--
xen/drivers/passthrough/vtd/iommu.h | 1 +
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/passthrough/vtd/iommu.c
b/xen/drivers/passthrough/vtd/iommu.c
index
RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used"
How to update the IRTE for PI dynamically (in an atomic way)? I am trying
to use cmpxchg16b and it is in progress, I will add this in the next version.
Feng Wu (15):
Vt-d Posted-intterrupt (PI) design
iommu: Add iommu_intpost
the following URL:
http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/vt-directed-io-spec.html
This patch set follow the following design:
http://article.gmane.org/gmane.comp.emulators.xen.devel/236476
Feng Wu (15):
iommu: Add iommu_intpost to control VT-d Posted
This patch adds an API which is used to update the IRTE
for posted-interrupt when guest changes MSI/MSI-X information.
Signed-off-by: Feng Wu
---
xen/drivers/passthrough/vtd/intremap.c | 83 ++
xen/drivers/passthrough/vtd/iommu.h| 3 ++
xen/include/asm-x86
posted-interrupt.
Signed-off-by: Feng Wu
---
xen/drivers/passthrough/vtd/iommu.c | 15 +--
xen/drivers/passthrough/vtd/iommu.h | 1 +
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/passthrough/vtd/iommu.c
b/xen/drivers/passthrough/vtd/iommu.c
index
When a vCPU is running in Root mode and a notification event
has been injected to it. we need to set VCPU_KICK_SOFTIRQ for
the current cpu, so the pending interrupt in PIRR will be
synced to vIRR before VM-Exit in time.
Signed-off-by: Feng Wu
---
xen/arch/x86/hvm/vmx/vmx.c| 24
This patch adds some helper functions to manipulate the
Posted-Interrupts Descriptor.
Signed-off-by: Feng Wu
---
xen/include/asm-x86/hvm/vmx/vmx.h | 21 +
1 file changed, 21 insertions(+)
diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h
b/xen/include/asm-x86/hvm/vmx/vmx.h
This patch adds a new per-vCPU tasklet to wakeup the blocked
vCPU. It can be used in the case vcpu_unblock cannot be called
directly.
Signed-off-by: Feng Wu
---
xen/common/domain.c | 11 +++
xen/include/xen/sched.h | 3 +++
2 files changed, 14 insertions(+)
diff --git a/xen/common
This patch adds a global vector which is used to wake up
the blocked vCPU when an interrupt is being posted to it.
Signed-off-by: Feng Wu
Suggested-by: Yang Zhang
---
xen/arch/x86/hvm/vmx/vmx.c| 33 +
xen/include/asm-x86/hvm/hvm.h | 1 +
xen/include
Extend struct iremap_entry according to VT-d Posted-Interrupts Spec.
Signed-off-by: Feng Wu
---
xen/drivers/passthrough/vtd/iommu.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/xen/drivers/passthrough/vtd/iommu.h
b/xen/drivers/passthrough/vtd/iommu.h
index 42047e0
t' to control whether enable VT-d
posted-interrupt or not in the generic IOMMU code.
Signed-off-by: Feng Wu
---
xen/drivers/passthrough/iommu.c | 11 ++-
xen/include/xen/iommu.h | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/passthrough/iom
Extend struct pi_desc according to VT-d Posted-Interrupts Spec.
Signed-off-by: Feng Wu
---
xen/include/asm-x86/hvm/vmx/vmcs.h | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h
b/xen/include/asm-x86/hvm/vmx/vmcs.h
index
terrupts.
(Current, we only support non-urgent interrupts)
- Set 'NV' back to 'Notification Vector' if needed.
Signed-off-by: Feng Wu
---
xen/arch/x86/hvm/vmx/vmx.c | 108 +
xen/common/schedule.c | 3 ++
2 files chan
Enable VT-d Posted-Interrupts and add a command line
parameter for it.
Signed-off-by: Feng Wu
---
xen/drivers/passthrough/iommu.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 302e3e4..1bda7e9
Currently, we don't support urgent interrupt, all interrupts
are recognized as non-urgent interrupt, so we cannot send
posted-interrupt when 'SN' is set.
Signed-off-by: Feng Wu
---
xen/arch/x86/hvm/vmx/vmx.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
d
This patch initializes the VT-d Posted-interrupt Descriptor.
Signed-off-by: Feng Wu
---
xen/arch/x86/hvm/vmx/vmcs.c | 3 +++
xen/include/asm-x86/hvm/vmx/vmx.h | 21 -
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch
vector-hashing mechamisn to find
the destination vCPU. This follows the hardware behavior, since modern
Intel CPUs use vector hashing to handle the lowest-priority interrupt.
For multicase/broadcast vCPU, we cannot handle it via interrupt posting,
still use interrupt remapping.
Signed-off-by: Feng
This patch defines two per-cpu variants:
blocked_vcpu_on_cpu:
A list storing the vCPUs which were blocked on this pCPU.
blocked_vcpu_on_cpu_lock:
The spinlock to protect blocked_vcpu_on_cpu.
Signed-off-by: Feng Wu
---
xen/arch/x86/hvm/vmx/vmcs.c | 3 +++
xen/arch/x86/hvm/vmx/vmx.c
201 - 235 of 235 matches
Mail list logo