[Xen-devel] [PATCH v8 5/7] VT-d: No need to set irq affinity for posted format IRTE

2016-11-17 Thread Feng Wu
We don't set the affinity for posted format IRTE, since the destination of these interrupts is vCPU and the vCPU affinity is set during vCPU scheduling. Signed-off-by: Feng Wu --- v8: - Changes based on [6/7] v7: - Compare all the field in IRTE to justify whether we can suppress the updat

[Xen-devel] [PATCH v8 3/7] VMX: Make sure PI is in proper state before install the hooks

2016-11-17 Thread Feng Wu
. So the NDST is in a proper state in vmx_vcpu_block(). Suggested-by: Jan Beulich Signed-off-by: Feng Wu Reviewed-by: Jan Beulich --- v6: - Comments changes - Define macro 'APIC_INVALID_DEST' for '0x' v5: - Use 0x as the invalid value for NDST field.

[Xen-devel] [PATCH v8 2/7] VMX: Properly handle pi when all the assigned devices are removed

2016-11-17 Thread Feng Wu
: Feng Wu Reviewed-by: Jan Beulich --- v7: - Prevent the domain from pausing itself. v6: - Comments changes - Rename vmx_pi_list_remove() to vmx_pi_unblock_vcpu() v5: - Remove a no-op wrapper v4: - Rename some functions: vmx_pi_remove_vcpu_from_blocking_list() -> vmx_pi_list_rem

[Xen-devel] [PATCH v8 1/7] VMX: Permanently assign PI hook vmx_pi_switch_to()

2016-11-17 Thread Feng Wu
eliver the interrupt in posted way via software. The problem is if we deassign the hooks while the vCPU is runnable in the runqueue with 'SN' set, all the furture notificaton event will be suppressed. This patch makes the hook permanently assigned. Signed-off-by: Feng Wu Reviewed-by: K

[Xen-devel] [PATCH v8 7/7] VMX: Fixup PI descriptor when cpu is offline

2016-11-17 Thread Feng Wu
When cpu is offline, we need to move all the vcpus in its blocking list to another online cpu, this patch handles it. Signed-off-by: Feng Wu Reviewed-by: Jan Beulich --- v7: - Pass unsigned int to vmx_pi_desc_fixup() v6: - Carefully suppress 'SN' to avoid missing notification ev

[Xen-devel] [PATCH v8 0/7] VMX: Properly handle pi descriptor and per-cpu blocking list

2016-11-17 Thread Feng Wu
PU is unplugged, and there might be vCPUs on its list. Since the pCPU is offline, those vCPUs might not be woken up again. [7/7] addresses it. Feng Wu (7): VMX: Permanently assign PI hook vmx_pi_switch_to() VMX: Properly handle pi when all the assigned devices are removed VMX: Make sure PI is in p

[Xen-devel] [PATCH v8 4/7] VT-d: Use one function to update both remapped and posted IRTE

2016-11-17 Thread Feng Wu
Use one function to update both remapped IRTE and posted IRET. Signed-off-by: Feng Wu --- v8: - Newly added xen/drivers/passthrough/vtd/intremap.c | 162 ++--- 1 file changed, 66 insertions(+), 96 deletions(-) diff --git a/xen/drivers/passthrough/vtd/intremap.c b

[Xen-devel] [PATCH v8 6/7] VT-d: Some cleanups

2016-11-17 Thread Feng Wu
Use type-safe structure assignment instead of memcpy() Use sizeof(*iremap_entry). Signed-off-by: Feng Wu Reviewed-by: Konrad Rzeszutek Wilk --- v7: - Remove a useless cleanup v6: - More descripion about the patch xen/drivers/passthrough/vtd/intremap.c | 14 +++--- 1 file changed, 7

[Xen-devel] [PATCH v8 5/7] VT-d: No need to set irq affinity for posted format IRTE

2016-11-17 Thread Feng Wu
We don't set the affinity for posted format IRTE, since the destination of these interrupts is vCPU and the vCPU affinity is set during vCPU scheduling. Signed-off-by: Feng Wu --- v8: - Changes based on [6/7] v7: - Compare all the field in IRTE to justify whether we can suppress the updat

[Xen-devel] [PATCH v7 4/6] VT-d: No need to set irq affinity for posted format IRTE

2016-11-07 Thread Feng Wu
We don't set the affinity for posted format IRTE, since the destination of these interrupts is vCPU and the vCPU affinity is set during vCPU scheduling. Signed-off-by: Feng Wu --- v7: - Compare all the field in IRTE to justify whether we can suppress the update v6: -

[Xen-devel] [PATCH v7 4/6] VT-d: No need to set irq affinity for posted format IRTE

2016-11-07 Thread Feng Wu
We don't set the affinity for posted format IRTE, since the destination of these interrupts is vCPU and the vCPU affinity is set during vCPU scheduling. Signed-off-by: Feng Wu --- v7: - Compare all the field in IRTE to justify whether we can suppress the update v6: -

[Xen-devel] [PATCH v7 0/6] VMX: Properly handle pi descriptor and per-cpu blocking list

2016-11-07 Thread Feng Wu
those vCPUs might not be woken up again. [6/6] addresses it. Feng Wu (6): VMX: Permanently assign PI hook vmx_pi_switch_to() VMX: Properly handle pi when all the assigned devices are removed VMX: Make sure PI is in proper state before install the hooks VT-d: No need to set irq affinit

[Xen-devel] [PATCH v7 2/6] VMX: Properly handle pi when all the assigned devices are removed

2016-11-07 Thread Feng Wu
: Feng Wu --- v7: - Prevent the domain from pausing itself. v6: - Comments changes - Rename vmx_pi_list_remove() to vmx_pi_unblock_vcpu() v5: - Remove a no-op wrapper v4: - Rename some functions: vmx_pi_remove_vcpu_from_blocking_list() -> vmx_pi_list_remove() vmx_pi_blocking_clea

[Xen-devel] [PATCH v7 3/6] VMX: Make sure PI is in proper state before install the hooks

2016-11-07 Thread Feng Wu
. So the NDST is in a proper state in vmx_vcpu_block(). Suggested-by: Jan Beulich Signed-off-by: Feng Wu Reviewed-by: Jan Beulich --- v6: - Comments changes - Define macro 'APIC_INVALID_DEST' for '0x' v5: - Use 0x as the invalid value for NDST field.

[Xen-devel] [PATCH v7 1/6] VMX: Permanently assign PI hook vmx_pi_switch_to()

2016-11-07 Thread Feng Wu
eliver the interrupt in posted way via software. The problem is if we deassign the hooks while the vCPU is runnable in the runqueue with 'SN' set, all the furture notificaton event will be suppressed. This patch makes the hook permanently assigned. Signed-off-by: Feng Wu --- v7: - c

[Xen-devel] [PATCH v7 6/6] VMX: Fixup PI descriptor when cpu is offline

2016-11-07 Thread Feng Wu
When cpu is offline, we need to move all the vcpus in its blocking list to another online cpu, this patch handles it. Signed-off-by: Feng Wu Reviewed-by: Jan Beulich --- v7: - Pass unsigned int to vmx_pi_desc_fixup() v6: - Carefully suppress 'SN' to avoid missing notification ev

[Xen-devel] [PATCH v7 5/6] VT-d: Some cleanups

2016-11-07 Thread Feng Wu
Use type-safe structure assignment instead of memcpy() Use sizeof(*iremap_entry). Signed-off-by: Feng Wu --- v7: - Remove a useless cleanup v6: - More descripion about the patch xen/drivers/passthrough/vtd/intremap.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[Xen-devel] [PATCH v6 6/7] VT-d: Some cleanups

2016-10-27 Thread Feng Wu
ire' if the entry is present. Signed-off-by: Feng Wu --- v6: - More descripion about the patch xen/drivers/passthrough/vtd/intremap.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrough/vtd

[Xen-devel] [PATCH v6 4/7] VMX: Make sure PI is in proper state before install the hooks

2016-10-27 Thread Feng Wu
. So the NDST is in a proper state in vmx_vcpu_block(). Suggested-by: Jan Beulich Signed-off-by: Feng Wu --- v6: - Comments changes - Define macro 'APIC_INVALID_DEST' for '0x' v5: - Use 0x as the invalid value for NDST field. v4: - This patch is previously c

[Xen-devel] [PATCH v6 5/7] VT-d: No need to set irq affinity for posted format IRTE

2016-10-27 Thread Feng Wu
We don't set the affinity for posted format IRTE, since the destination of these interrupts is vCPU and the vCPU affinity is set during vCPU scheduling. Signed-off-by: Feng Wu --- v6: - Make pi_can_suppress_irte_update() a check-only function - Introduce another function pi_get_new_irte

[Xen-devel] [PATCH v6 1/7] VMX: Permanently assign PI hook vmx_pi_switch_to()

2016-10-27 Thread Feng Wu
eliver the interrupt in posted way via software. The problem is if we deassign the hooks while the vCPU is runnable in the runqueue with 'SN' set, all the furture notificaton event will be suppressed. This patch makes these two hooks statically assigned. Signed-off-by: Feng Wu --- v6: -

[Xen-devel] [PATCH v6 2/7] VMX: Properly handle pi when all the assigned devices are removed

2016-10-27 Thread Feng Wu
: Feng Wu --- v6: - Comments changes - Rename vmx_pi_list_remove() to vmx_pi_unblock_vcpu() v5: - Remove a no-op wrapper v4: - Rename some functions: vmx_pi_remove_vcpu_from_blocking_list() -> vmx_pi_list_remove() vmx_pi_blocking_cleanup() -> vmx_pi_list_cleanup() - Remove the

[Xen-devel] [PATCH v6 3/7] VMX: Cleanup PI per-cpu blocking list when vcpu is destroyed

2016-10-27 Thread Feng Wu
We should remove the vCPU from the per-cpu blocking list if it is going to be destroyed. Signed-off-by: Feng Wu --- v6: - Use vmx_pi_unblock_vcpu() instead of vmx_pi_list_remove() v5: - Use vmx_pi_list_remove() instead of vmx_pi_list_cleanup() v4: - Call vmx_pi_list_cleanup() before

[Xen-devel] [PATCH v6 0/7] VMX: Properly handle pi descriptor and per-cpu blocking list

2016-10-27 Thread Feng Wu
4. [6/7] is a cleanup patch 5. When a pCPU is unplugged, and there might be vCPUs on its list. Since the pCPU is offline, those vCPUs might not be woken up again. [7/7] addresses it. Feng Wu (7): VMX: Permanently assign PI hook vmx_pi_switch_to() VMX: Properly handle pi when all the assigned de

[Xen-devel] [PATCH v6 7/7] VMX: Fixup PI descriptor when cpu is offline

2016-10-27 Thread Feng Wu
When cpu is offline, we need to move all the vcpus in its blocking list to another online cpu, this patch handles it. Signed-off-by: Feng Wu --- v6: - Carefully suppress 'SN' to avoid missing notification event during moving the vcpu to the new list v5: - Add some comments to expl

[Xen-devel] [PATCH v5 4/7] VMX: Make sure PI is in proper state before install the hooks

2016-10-10 Thread Feng Wu
. So the NDST is in a proper state in vmx_vcpu_block(). Suggested-by: Jan Beulich Signed-off-by: Feng Wu --- v5: - Use 0x as the invalid value for NDST field. xen/arch/x86/hvm/vmx/vmcs.c | 13 + xen/arch/x86/hvm/vmx/vmx.c | 27 ++- 2 files changed, 31

[Xen-devel] [PATCH v5 5/7] VT-d: No need to set irq affinity for posted format IRTE

2016-10-10 Thread Feng Wu
We don't set the affinity for posted format IRTE, since the destination of these interrupts is vCPU and the vCPU affinity is set during vCPU scheduling. Signed-off-by: Feng Wu --- v5: - Only suppress affinity related IRTE updates for PI xen/drivers/passthrough/vtd/intremap.c

[Xen-devel] [PATCH v5 2/7] VMX: Properly handle pi when all the assigned devices are removed

2016-10-10 Thread Feng Wu
: Feng Wu --- v5: - Remove a no-op wrapper xen/arch/x86/hvm/vmx/vmx.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 623d5bc..d210516 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen

[Xen-devel] [PATCH v5 3/7] VMX: Cleanup PI per-cpu blocking list when vcpu is destroyed

2016-10-10 Thread Feng Wu
We should remove the vCPU from the per-cpu blocking list if it is going to be destroyed. Signed-off-by: Feng Wu --- v5: - Use vmx_pi_list_remove() instead of vmx_pi_list_cleanup() xen/arch/x86/hvm/vmx/vmx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen

[Xen-devel] [PATCH v5 6/7] VT-d: Some cleanups

2016-10-10 Thread Feng Wu
Use type-safe structure assignment instead of memcpy() Use sizeof(*iremap_entry) Signed-off-by: Feng Wu --- xen/drivers/passthrough/vtd/intremap.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers

[Xen-devel] [PATCH v5 0/7] VMX: Properly handle pi descriptor and per-cpu blocking list

2016-10-10 Thread Feng Wu
s. 4. When a pCPU is unplugged, and there might be vCPUs on its list. Since the pCPU is offline, those vCPUs might not be woken up again. [6/6] addresses it. Feng Wu (7): VMX: Statically assign two PI hooks VMX: Properly handle pi when all the assigned devices are removed VMX: Cleanup PI pe

[Xen-devel] [PATCH v5 7/7] VMX: Fixup PI descriptor when cpu is offline

2016-10-10 Thread Feng Wu
When cpu is offline, we need to move all the vcpus in its blocking list to another online cpu, this patch handles it. Signed-off-by: Feng Wu --- v5: - Add some comments to explain why it doesn't cause deadlock for the ABBA deadlock scenario. xen/arch/x86/hvm/vmx/vmcs.c | 1 + xen

[Xen-devel] [PATCH v5 1/7] VMX: Statically assign two PI hooks

2016-10-10 Thread Feng Wu
osted_intr() when trying to deliver the interrupt in posted way via software. The problem is if we deassign the hooks while the vCPU is runnable in the runqueue with 'SN' set, all the furture notificaton event will be suppressed. This patch makes these two hooks statically assigned. Si

[Xen-devel] [PATCH v4 1/6] VMX: Statically assign two PI hooks

2016-09-20 Thread Feng Wu
osted_intr() when trying to deliver the interrupt in posted way via software. The problem is if we deassign the hooks while the vCPU is runnable in the runqueue with 'SN' set, all the furture notificaton event will be suppressed. This patch makes these two hooks statically assigned. Si

[Xen-devel] [PATCH v4 2/6] VMX: Properly handle pi when all the assigned devices are removed

2016-09-20 Thread Feng Wu
. - No remaining vcpus of the domain in the per-cpu blocking list. Basically, we pause the domain before zapping the PI hooks and removing the vCPU from the blocking list, then unpause it after that. Signed-off-by: Feng Wu --- v4: - Rename some functions

[Xen-devel] [PATCH v4 3/6] VMX: Cleanup PI per-cpu blocking list when vcpu is destroyed

2016-09-20 Thread Feng Wu
We should remove the vCPU from the per-cpu blocking list if it is going to be destroyed. Signed-off-by: Feng Wu --- v4: - Call vmx_pi_list_cleanup() before vmx_destroy_vmcs() xen/arch/x86/hvm/vmx/vmx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch

[Xen-devel] [PATCH v4 5/6] VT-d: No need to set irq affinity for posted format IRTE

2016-09-20 Thread Feng Wu
We don't set the affinity for posted format IRTE, since the destination of these interrupts is vCPU and the vCPU affinity is set during vCPU scheduling. Signed-off-by: Feng Wu --- v4: - Keep the construction of new_ire and only modify the hardware IRTE when it is not in posted mode.

[Xen-devel] [PATCH v4 6/6] VMX: Fixup PI descritpor when cpu is offline

2016-09-20 Thread Feng Wu
When cpu is offline, we need to move all the vcpus in its blocking list to another online cpu, this patch handles it. Signed-off-by: Feng Wu --- v4: - Remove the pointless check since we are in machine stop context and no other cpus go down in parallel. xen/arch/x86/hvm/vmx/vmcs.c | 1

[Xen-devel] [PATCH v4 0/6] VMX: Properly handle pi descriptor and per-cpu blocking list

2016-09-20 Thread Feng Wu
s. 4. When a pCPU is unplugged, and there might be vCPUs on its list. Since the pCPU is offline, those vCPUs might not be woken up again. [6/6] addresses it. Feng Wu (6): VMX: Statically assign two PI hooks VMX: Properly handle pi when all the assigned devices are removed VMX: Cleanup PI pe

[Xen-devel] [PATCH v4 4/6] VMX: Make sure PI is in proper state before install the hooks

2016-09-20 Thread Feng Wu
the NDST is in a proper state in vmx_vcpu_block(). Suggested-by: Jan Beulich Signed-off-by: Feng Wu --- v4: - This patch is previously called "Pause/Unpause the domain before/after assigning PI hooks" - Remove the pause/unpause method - Use cmpxchg to update NDST xen/arch/x86/hvm/vmx/v

[Xen-devel] [PATCH v3 0/6] VMX: Properly handle pi descriptor and per-cpu blocking list

2016-08-30 Thread Feng Wu
s. 4. When a pCPU is unplugged, and there might be vCPUs on its list. Since the pCPU is offline, those vCPUs might not be woken up again. [6/6] addresses it. The previous version of this series is: https://lists.xen.org/archives/html/xen-devel/2016-05/msg02592.html Feng Wu (6): VMX: Statically assig

[Xen-devel] [PATCH v3 6/6] VMX: Fixup PI descritpor when cpu is offline

2016-08-30 Thread Feng Wu
When cpu is offline, we need to move all the vcpus in its blocking list to another online cpu, this patch handles it. Signed-off-by: Feng Wu --- xen/arch/x86/hvm/vmx/vmcs.c | 1 + xen/arch/x86/hvm/vmx/vmx.c| 54 +++ xen/include/asm-x86/hvm/vmx

[Xen-devel] [PATCH v3 2/6] VMX: Properly handle pi when all the assigned devices are removed

2016-08-30 Thread Feng Wu
. - No remaining vcpus of the domain in the per-cpu blocking list. Basically, we pause the domain before zapping the PI hooks and removing the vCPU from the blocking list, then unpause it after that. Signed-off-by: Feng Wu --- xen/arch/x86/hvm/vmx/vmx.c | 34 +++--- 1

[Xen-devel] [PATCH v3 3/6] VMX: Cleanup PI per-cpu blocking list when vcpu is destroyed

2016-08-30 Thread Feng Wu
We should remove the vCPU from the per-cpu blocking list if it is going to be destroyed. Signed-off-by: Feng Wu --- xen/arch/x86/hvm/vmx/vmx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index b869728..37fa2f1 100644 --- a/xen/arch

[Xen-devel] [PATCH v3 1/6] VMX: Statically assign two PI hooks

2016-08-30 Thread Feng Wu
. The problem is if we deassign the hooks while the vCPU is runnable in the runqueue with 'SN' set, all the furture notificaton event will be suppressed. This patch makes these two hooks statically assigned. Signed-off-by: Feng Wu --- xen/arch/x86/hvm/vmx/vmx.c | 10 ++ 1 file

[Xen-devel] [PATCH v3 5/6] VT-d: No need to set irq affinity for posted format IRTE

2016-08-30 Thread Feng Wu
We don't set the affinity for posted format IRTE, since the destination of these interrupts is vCPU and the vCPU affinity is set during vCPU scheduling. Signed-off-by: Feng Wu --- xen/drivers/passthrough/vtd/intremap.c | 62 +++--- 1 file changed, 34 inser

[Xen-devel] [PATCH v3 4/6] Pause/Unpause the domain before/after assigning PI hooks

2016-08-30 Thread Feng Wu
Pausing the domain can make sure the vCPU is not running and hence calling the hooks simultaneously when deassigning the PI hooks. This makes sure that all the appropriate state of PI descriptor is actually set up for all vCPus before leaving this function. Signed-off-by: Feng Wu --- xen/arch

[Xen-devel] [PATCH] Fix a BUG_ON issue

2016-08-29 Thread Feng Wu
The 'idx' can equal to the max number of vCPUs, fix it. Signed-off-by: Feng Wu --- xen/drivers/passthrough/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c index 9e6b46c..66577b6 100644 --- a/x

[Xen-devel] [PATCH v2 4/4] VMX: fixup PI descritpor when cpu is offline

2016-05-26 Thread Feng Wu
When cpu is offline, we need to move all the vcpus in its blocking list to another online cpu, this patch handles it. And we need to carefully handle the situation that calling to vmx_vcpu_block() and cpu offline occur concurrently. Signed-off-by: Feng Wu --- xen/arch/x86/hvm/vmx/vmcs.c

[Xen-devel] [PATCH v2 3/4] VMX: Assign the right value to 'NDST' field in a concern case

2016-05-26 Thread Feng Wu
s assigned in vmx_pi_hooks_assign(), but all other three PI hooks have not been assigned or not been excuted yet. And during this interval, we are running in vmx_vcpu_block(), then 'NDST' may have different value. This patch fix this concern case. Signed-off-by: Feng Wu --- xen/arc

[Xen-devel] [PATCH v2 0/4] VMX: Properly handle pi descriptor and per-cpu blocking list

2016-05-26 Thread Feng Wu
vCPUs to another blocking list of an online pCPU, as well as, set the new cpu to the 'NDST' field of PI descriptor. Feng Wu (4): VMX: Properly handle pi when all the assigned devices are removed VMX: Cleanup PI per-cpu blocking list when vcpu is destroyed VMX: Assign the right

[Xen-devel] [PATCH v2 1/4] VMX: Properly handle pi when all the assigned devices are removed

2016-05-26 Thread Feng Wu
. This is achrived by always making all the pi hooks available, so the pi descriptor is updated during scheduling, which make it always up-to-data. - No remaining vcpus of the domain in the per-cpu blocking list. Signed-off-by: Feng Wu --- xen/arch/x86/hvm/vmx/vmx.c | 75

[Xen-devel] [PATCH v2 2/4] VMX: Cleanup PI per-cpu blocking list when vcpu is destroyed

2016-05-26 Thread Feng Wu
We should remove the vCPU from the per-cpu blocking list if it is going to be destroyed. Signed-off-by: Feng Wu --- xen/arch/x86/hvm/vmx/vmx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 65f5288..b01128a 100644 --- a/xen/arch

[Xen-devel] [PATCH 3/3] VMX: Remove the vcpu from the per-cpu blocking list after domain termination

2016-05-20 Thread Feng Wu
We need to make sure the bocking vcpu is not in any per-cpu blocking list when the associated domain is going to be destroyed. Signed-off-by: Feng Wu --- xen/arch/x86/hvm/vmx/vmx.c | 32 1 file changed, 32 insertions(+) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b

[Xen-devel] [PATCH 2/3] VMX: Make hook pi_do_resume always available

2016-05-20 Thread Feng Wu
Make hook pi_do_resume always available, so when the last assigned device is dettached from a domain, the blocked vcpu can be removed from the per-cpu blocking list properly. Signed-off-by: Feng Wu --- xen/arch/x86/hvm/vmx/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[Xen-devel] [PATCH 1/3] VMX: Properly adjuest the status of pi descriptor

2016-05-20 Thread Feng Wu
avaliable again, the status of the pi descriptor is not true, we need to properly adjust it. Signed-off-by: Feng Wu --- xen/arch/x86/hvm/vmx/vmx.c | 29 ++--- xen/include/asm-x86/hvm/vmx/vmcs.h | 1 + 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/xen

[Xen-devel] [PATCH 0/3] VMX: Properly handle pi descriptor and per-cpu blocking list

2016-05-20 Thread Feng Wu
the per-cpu blocking. This series fix the above issue. I still have two opens, which needs comments/sugguestions from you guys. - What shoule we do for the per-cpu blocking list during vcpu hotplug? - What shoule we do for the per-cpu blocking list during pcpu hotplug? Feng Wu (3): VMX

[Xen-devel] [PATCH v14 0/2] Add VT-d Posted-Interrupts support

2016-02-28 Thread Feng Wu
the following URL: http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/vt-directed-io-spec.html Feng Wu (2): vmx: VT-d posted-interrupt core logic handling Add a command line parameter for VT-d posted-interrupts docs/misc/xen-command-line.markdown | 9 +- xen/arch

[Xen-devel] [PATCH v14 2/2] Add a command line parameter for VT-d posted-interrupts

2016-02-28 Thread Feng Wu
Enable VT-d Posted-Interrupts and add a command line parameter for it. CC: Jan Beulich Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Acked-by: Jan Beulich --- docs/misc/xen-command-line.markdown | 9 - xen/drivers/passthrough/iommu.c | 3 +++ 2 files changed, 11 insertions(+), 1

[Xen-devel] [PATCH v14 1/2] vmx: VT-d posted-interrupt core logic handling

2016-02-28 Thread Feng Wu
pts will be delivered to guest atht the next time we do a VMENTRY. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Kevin Tian CC: George Dunlap CC: Dario Faggioli Suggested-by: Yang Zhang Suggested-by: Dario Faggioli Suggested-by: George Dunlap Suggested-by: Jan Beulich Signed-of

[Xen-devel] [PATCH v13 0/2] Add VT-d Posted-Interrupts support

2016-02-23 Thread Feng Wu
the following URL: http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/vt-directed-io-spec.html Feng Wu (2): vmx: VT-d posted-interrupt core logic handling Add a command line parameter for VT-d posted-interrupts docs/misc/xen-command-line.markdown | 9 +- xen/arch

[Xen-devel] [PATCH v13 1/2] vmx: VT-d posted-interrupt core logic handling

2016-02-23 Thread Feng Wu
pts will be delivered to guest atht the next time we do a VMENTRY. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Kevin Tian CC: George Dunlap CC: Dario Faggioli Suggested-by: Yang Zhang Suggested-by: Dario Faggioli Suggested-by: George Dunlap Suggested-by: Jan Beulich Signed-off-by

[Xen-devel] [PATCH v13 2/2] Add a command line parameter for VT-d posted-interrupts

2016-02-23 Thread Feng Wu
Enable VT-d Posted-Interrupts and add a command line parameter for it. CC: Jan Beulich Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Acked-by: Jan Beulich --- docs/misc/xen-command-line.markdown | 9 - xen/drivers/passthrough/iommu.c | 3 +++ 2 files changed, 11 insertions(+), 1

[Xen-devel] [PATCH v12 2/2] Add a command line parameter for VT-d posted-interrupts

2016-02-18 Thread Feng Wu
Enable VT-d Posted-Interrupts and add a command line parameter for it. CC: Jan Beulich Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Acked-by: Jan Beulich --- docs/misc/xen-command-line.markdown | 9 - xen/drivers/passthrough/iommu.c | 3 +++ 2 files changed, 11 insertions(+), 1

[Xen-devel] [PATCH v12 0/2] Add VT-d Posted-Interrupts support

2016-02-18 Thread Feng Wu
the following URL: http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/vt-directed-io-spec.html Feng Wu (2): vmx: VT-d posted-interrupt core logic handling Add a command line parameter for VT-d posted-interrupts docs/misc/xen-command-line.markdown | 9 +- xen/arch

[Xen-devel] [PATCH v12 1/2] vmx: VT-d posted-interrupt core logic handling

2016-02-18 Thread Feng Wu
pts will be delivered to guest atht the next time we do a VMENTRY. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Kevin Tian CC: George Dunlap CC: Dario Faggioli Suggested-by: Yang Zhang Suggested-by: Dario Faggioli Suggested-by: George Dunlap Suggested-by: Jan Beulich Signed-of

[Xen-devel] [PATCH v11 2/2] Add a command line parameter for VT-d posted-interrupts

2016-01-27 Thread Feng Wu
Enable VT-d Posted-Interrupts and add a command line parameter for it. CC: Jan Beulich Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Acked-by: Jan Beulich --- docs/misc/xen-command-line.markdown | 9 - xen/drivers/passthrough/iommu.c | 3 +++ 2 files changed, 11 insertions(+), 1

[Xen-devel] [PATCH v11 0/2] Add VT-d Posted-Interrupts support

2016-01-27 Thread Feng Wu
the following URL: http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/vt-directed-io-spec.html Feng Wu (2): vmx: VT-d posted-interrupt core logic handling Add a command line parameter for VT-d posted-interrupts docs/misc/xen-command-line.markdown | 9 +- xen/arch

[Xen-devel] [PATCH v11 1/2] vmx: VT-d posted-interrupt core logic handling

2016-01-27 Thread Feng Wu
pts will be delivered to guest atht the next time we do a VMENTRY. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Kevin Tian CC: George Dunlap CC: Dario Faggioli Suggested-by: Yang Zhang Suggested-by: Dario Faggioli Suggested-by: George Dunlap Suggested-by: Jan Beulich Signed-off-by

[Xen-devel] [PATCH v10 7/7] Add a command line parameter for VT-d posted-interrupts

2015-12-03 Thread Feng Wu
Enable VT-d Posted-Interrupts and add a command line parameter for it. CC: Jan Beulich Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Acked-by: Jan Beulich --- v6: - Change the default value to 'false' in xen-command-line.markdown docs/misc/xen-command-line.markdown | 9

[Xen-devel] [PATCH v10 3/7] vt-d: Add API to update IRTE when VT-d PI is used

2015-12-03 Thread Feng Wu
This patch adds an API which is used to update the IRTE for posted-interrupt when guest changes MSI/MSI-X information. CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Reviewed-by: Jan Beulich --- v10: - Add some comments v8: - Some minor adjustment

[Xen-devel] [PATCH v10 6/7] vmx: VT-d posted-interrupt core logic handling

2015-12-03 Thread Feng Wu
pts will be delivered to guest atht the next time we do a VMENTRY. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Kevin Tian CC: George Dunlap CC: Dario Faggioli Suggested-by: Yang Zhang Suggested-by: Dario Faggioli Suggested-by: George Dunlap Suggested-by: Jan Beulich Sign

[Xen-devel] [PATCH v10 5/7] vmx: Properly handle notification event when vCPU is running

2015-12-03 Thread Feng Wu
-off-by: Feng Wu Acked-by: Kevin Tian --- v7: - Retain 'cli' in the comments to make it more understandable. - Register another notification event handler when VT-d PI is enabled v6: - Ack the interrupt in the beginning of pi_notification_interrupt() v4: - Coding style.

[Xen-devel] [PATCH v10 2/7] vmx: Suppress posting interrupts when 'SN' is set

2015-12-03 Thread Feng Wu
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. CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Reviewed-by: Konrad Rzeszutek Wi

[Xen-devel] [PATCH v10 4/7] Update IRTE according to guest interrupt config changes

2015-12-03 Thread Feng Wu
Signed-off-by: Feng Wu Acked-by: Jan Beulich --- v8: - Remove local variable 'bitmap_array_size' - Use switch to replace if-else v7: - Remove some pointless debug printk - Fix a logic error when assigning 'delivery_mode' - Adjust the definition of local variable 'idx'

[Xen-devel] [PATCH v10 0/7] Add VT-d Posted-Interrupts support

2015-12-03 Thread Feng Wu
the following URL: http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/vt-directed-io-spec.html Feng Wu (17): r VT-d Posted-intterrupt (PI) design ra vmx: Suppress posting interrupts when 'SN' is set r vt-d: Add API to update IRTE when VT-d PI is used

[Xen-devel] [PATCH v10 1/7] VT-d Posted-intterrupt (PI) design

2015-12-03 Thread Feng Wu
Add the design doc for VT-d PI. CC: Kevin Tian CC: Jan Beulich CC: Keir Fraser CC: Andrew Cooper CC: George Dunlap Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk --- v10: - Add some new definitions - Add more description in the vCPU block section - Use

[Xen-devel] [PATCH v9 15/17] vmx: VT-d posted-interrupt core logic handling

2015-11-03 Thread Feng Wu
g Zhang Suggested-by: Dario Faggioli Suggested-by: George Dunlap Suggested-by: Jan Beulich Signed-off-by: Feng Wu --- v9: - Remove arch_vcpu_block_cancel() and arch_vcpu_wake_prepare() - Add vmx_pi_state_change() and call it before VM Entry v8: - Remove the lazy context switch handling fo

[Xen-devel] [PATCH v9 17/17] Add a command line parameter for VT-d posted-interrupts

2015-11-03 Thread Feng Wu
Enable VT-d Posted-Interrupts and add a command line parameter for it. CC: Jan Beulich Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Acked-by: Jan Beulich --- v6: - Change the default value to 'false' in xen-command-line.markdown docs/misc/xen-command-line.markdown | 9

[Xen-devel] [PATCH v9 10/17] vt-d: Extend struct iremap_entry to support VT-d Posted-Interrupts

2015-11-03 Thread Feng Wu
Extend struct iremap_entry according to VT-d Posted-Interrupts Spec. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Feng Wu Acked-by: Kevin Tian --- v8: - Make use of the __uint128_t member in struct iremap_entry when needed v7: - Add a __uint128_t member to the union in struct iremap_entry

[Xen-devel] [PATCH v9 11/17] vt-d: Add API to update IRTE when VT-d PI is used

2015-11-03 Thread Feng Wu
This patch adds an API which is used to update the IRTE for posted-interrupt when guest changes MSI/MSI-X information. CC: Yang Zhang CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Reviewed-by: Jan Beulich --- v8: - Some minor adjustment v7

[Xen-devel] [PATCH v9 06/17] vmx: Add some helper functions for Posted-Interrupts

2015-11-03 Thread Feng Wu
This patch adds some helper functions to manipulate the Posted-Interrupts Descriptor. CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Reviewed-by: Konrad Rzeszutek Wilk --- v7: - Use bitfield in pi_test_on() and pi_test_sn() v4: - Newly added xen

[Xen-devel] [PATCH v9 07/17] vmx: Initialize VT-d Posted-Interrupts Descriptor

2015-11-03 Thread Feng Wu
This patch initializes the VT-d Posted-interrupt Descriptor. CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Acked-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk --- v7: - Add comments to function 'pi_desc_init' to clarify why we

[Xen-devel] [PATCH v9 08/17] vmx: Suppress posting interrupts when 'SN' is set

2015-11-03 Thread Feng Wu
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. CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Reviewed-by: Konrad Rzeszutek Wi

[Xen-devel] [PATCH v9 14/17] vmx: Properly handle notification event when vCPU is running

2015-11-03 Thread Feng Wu
-off-by: Feng Wu Acked-by: Kevin Tian --- v7: - Retain 'cli' in the comments to make it more understandable. - Register another notification event handler when VT-d PI is enabled v6: - Ack the interrupt in the beginning of pi_notification_interrupt() v4: - Coding style.

[Xen-devel] [PATCH v9 16/17] VT-d: Dump the posted format IRTE

2015-11-03 Thread Feng Wu
Add the utility to dump the posted format IRTE. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Feng Wu --- v8: - Coding style v7: - Remove the two stage loop v6: - Fix a typo v4: - Newly added xen/drivers/passthrough/vtd/utils.c | 28 +--- 1 file changed, 21

[Xen-devel] [PATCH v9 00/17] Add VT-d Posted-Interrupts support

2015-11-03 Thread Feng Wu
operand an input and output. - [PATCH v9 15/17] vmx: VT-d posted-interrupt core logic handling * Remove arch_vcpu_block_cancel() and arch_vcpu_wake_prepare(). * Add vmx_pi_state_change() and call it before VM Entry. Feng Wu (17): r VT-d Posted-intterrupt (PI) design Add cmpxchg16b

[Xen-devel] [PATCH v9 02/17] Add cmpxchg16b support for x86-64

2015-11-03 Thread Feng Wu
This patch adds cmpxchg16b support for x86-64, so software can perform 128-bit atomic write/read. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu --- v9: - Make the *ptr operand an input and output. v8: - Remove pointless cast when assigning 'new_low'

[Xen-devel] [PATCH v9 01/17] VT-d Posted-intterrupt (PI) design

2015-11-03 Thread Feng Wu
Add the design doc for VT-d PI. CC: Kevin Tian CC: Yang Zhang CC: Jan Beulich CC: Keir Fraser CC: Andrew Cooper CC: George Dunlap Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk --- docs/misc/vtd-pi.txt | 329

[Xen-devel] [PATCH v9 05/17] vmx: Extend struct pi_desc to support VT-d Posted-Interrupts

2015-11-03 Thread Feng Wu
Extend struct pi_desc according to VT-d Posted-Interrupts Spec. CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Reviewed-by: Andrew Cooper Acked-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk --- v8: - Coding style v7: - Coding style. v3: - Use

[Xen-devel] [PATCH v9 12/17] x86: move some APIC related macros to apicdef.h

2015-11-03 Thread Feng Wu
Move some APIC related macros to apicdef.h, so they can be used outside of vlapic.c. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Acked-by: Jan Beulich --- v8: - Minor changes v7: - Put the Macros to the right place inside the file. v6: - Newly introduced. xen

[Xen-devel] [PATCH v9 13/17] Update IRTE according to guest interrupt config changes

2015-11-03 Thread Feng Wu
Signed-off-by: Feng Wu Acked-by: Jan Beulich --- v8: - Remove local variable 'bitmap_array_size' - Use switch to replace if-else v7: - Remove some pointless debug printk - Fix a logic error when assigning 'delivery_mode' - Adjust the definition of local variable 'idx'

[Xen-devel] [PATCH v9 09/17] VT-d: Remove pointless casts

2015-11-03 Thread Feng Wu
Remove pointless casts. CC: Yang Zhang CC: Kevin Tian Suggested-by: Jan Beulich Signed-off-by: Feng Wu Reviewed-by: Konrad Rzeszutek Wilk --- v7: - Remove an 'u32' casting omitted in v5 v5: - Newly added. xen/drivers/passthrough/vtd/utils.c | 16 +++- 1 file

[Xen-devel] [PATCH v9 03/17] iommu: Add iommu_intpost to control VT-d Posted-Interrupts feature

2015-11-03 Thread Feng Wu
t' to control whether enable VT-d posted-interrupt or not in the generic IOMMU code. CC: Jan Beulich CC: Kevin Tian Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Jan Beulich --- v5: - Remove the "if no intremap then no intpost" logic

[Xen-devel] [PATCH v9 04/17] vt-d: VT-d Posted-Interrupts feature detection

2015-11-03 Thread Feng Wu
: Feng Wu Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Jan Beulich --- v7: - Remove pointless "if non iommu_intremap then disable iommu_intpost" logic - Don't need to check !iommu_intremap or !iommu_intpost when setting iommu_intpost to 0 v5: - Remove blank line v4: - Correc

[Xen-devel] [PATCH v8 10/17] vt-d: Extend struct iremap_entry to support VT-d Posted-Interrupts

2015-10-12 Thread Feng Wu
Extend struct iremap_entry according to VT-d Posted-Interrupts Spec. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Feng Wu Acked-by: Kevin Tian --- v8: - Make use of the __uint128_t member in struct iremap_entry when needed v7: - Add a __uint128_t member to the union in struct iremap_entry

[Xen-devel] [PATCH v8 17/17] Add a command line parameter for VT-d posted-interrupts

2015-10-12 Thread Feng Wu
Enable VT-d Posted-Interrupts and add a command line parameter for it. CC: Jan Beulich Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Acked-by: Jan Beulich --- v6: - Change the default value to 'false' in xen-command-line.markdown docs/misc/xen-command-line.markdown | 9

[Xen-devel] [PATCH v8 15/17] vmx: VT-d posted-interrupt core logic handling

2015-10-12 Thread Feng Wu
Fraser CC: Jan Beulich CC: Andrew Cooper CC: Kevin Tian CC: George Dunlap CC: Dario Faggioli Sugguested-by: Dario Faggioli Signed-off-by: Feng Wu --- v8: - Remove the lazy context switch handling for PI state transition - Change PI state in vcpu_block() and do_poll() when the vCPU is going to

[Xen-devel] [PATCH v8 00/17] Add VT-d Posted-Interrupts support

2015-10-12 Thread Feng Wu
the following URL: http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/vt-directed-io-spec.html Feng Wu (17): VT-d Posted-intterrupt (PI) design Add cmpxchg16b support for x86-64 iommu: Add iommu_intpost to control VT-d Posted-Interrupts feature vt-d: VT-d Posted

[Xen-devel] [PATCH v8 11/17] vt-d: Add API to update IRTE when VT-d PI is used

2015-10-12 Thread Feng Wu
This patch adds an API which is used to update the IRTE for posted-interrupt when guest changes MSI/MSI-X information. CC: Yang Zhang CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Reviewed-by: Jan Beulich --- v8: - Some minor adjustment v7

  1   2   3   >