[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 <feng...@intel.com> --- v8: - Changes based on [6/7] v7: - Compare all the field in IRTE to justify whether

[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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- v6: - Comments changes - Define macro 'APIC_INVALID_DEST' for '0x' v5

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

2016-11-17 Thread Feng Wu
-by: Feng Wu <feng...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- 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 so

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

2016-11-17 Thread Feng Wu
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 <feng...@intel.com> Re

[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 <feng...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- v7: - Pass unsigned int to vmx_pi_desc_fixup() v6: - Carefully suppress '

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

2016-11-17 Thread Feng Wu
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 proper

[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 <feng...@intel.com> --- v8: - Newly added xen/drivers/passthrough/vtd/intremap.c | 162 ++--- 1 file changed, 66 insertions(+), 96 deletions(-) diff --git a/xen/drivers/passt

[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 <feng...@intel.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> --- v7: - Remove a useless cleanup v6: - More descripion about the patch xen/drivers/pas

[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 <feng...@intel.com> --- v8: - Changes based on [6/7] v7: - Compare all the field in IRTE to justify whether

[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 <feng...@intel.com> --- 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 <feng...@intel.com> --- 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
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 affinity

[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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- v6: - Comments changes - Define macro 'APIC_INVALID_DEST' for '0x' v5

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

2016-11-07 Thread Feng Wu
-by: Feng Wu <feng...@intel.com> --- 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_li

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

2016-11-07 Thread Feng Wu
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 <feng...@intel.com>

[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 <feng...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- v7: - Pass unsigned int to vmx_pi_desc_fixup() v6: - Carefully suppress '

[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 <feng...@intel.com> --- v7: - Remove a useless cleanup v6: - More descripion about the patch xen/drivers/passthrough/vtd/intremap.c | 14 +++--- 1 file changed, 7 insertions

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

2016-10-27 Thread Feng Wu
is present. Signed-off-by: Feng Wu <feng...@intel.com> --- 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/intr

[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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> --- v6: - Comments changes - Define macro 'APIC_INVALID_DEST' for '0x' v5: - Use 0x as the invalid value for NDST field. v4:

[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 <feng...@intel.com> --- v6: - Make pi_can_suppress_irte_update() a check-only function - Introduce another fu

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

2016-10-27 Thread Feng Wu
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 <feng...@intel.com>

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

2016-10-27 Thread Feng Wu
-by: Feng Wu <feng...@intel.com> --- 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_

[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 <feng...@intel.com> --- 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_c

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

2016-10-27 Thread Feng Wu
/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 devices

[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 <feng...@intel.com> --- v6: - Carefully suppress 'SN' to avoid missing notification event during moving the vcpu to the new list v5: - Add some co

[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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> --- v5: - Use 0x as the invalid value for NDST field. xen/arch/x86/hvm/vmx/vmcs.c | 13 + xen/arch/x86/hvm/vmx

[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 <feng...@intel.com> --- v5: - Only suppress affinity related IRTE updates for PI xen/drivers/passthrough/vtd/intr

[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 <feng...@intel.com> --- 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/x

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

2016-10-10 Thread Feng Wu
-by: Feng Wu <feng...@intel.com> --- 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/h

[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 <feng...@intel.com> --- xen/drivers/passthrough/vtd/intremap.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/xen/drivers/passthrough/vtd/intrema

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

2016-10-10 Thread Feng Wu
. 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 per-cpu

[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 <feng...@intel.com> --- v5: - Add some comments to explain why it doesn't cause deadlock for the ABBA deadlock scenario. xen/arch/x86/hvm/vmx/

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

2016-10-10 Thread Feng Wu
() 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. Signed-off-by: Feng Wu

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

2016-09-20 Thread Feng Wu
() 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. Signed-off-by: Feng Wu

[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 <feng...@intel.com> --- v4: - Rename some fun

[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 <feng...@intel.com> --- 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/h

[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 <feng...@intel.com> --- v4: - Keep the construction of new_ire and only modify the hardware IRTE when it is not in

[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 <feng...@intel.com> --- v4: - Remove the pointless check since we are in machine stop context and no other cpus go down in parallel. xen/arch/x86/h

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

2016-09-20 Thread Feng Wu
. 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 per-cpu

[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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> --- v4: - This patch is previously called "Pause/Unpause the domain before/after assigning PI hooks" - Remove the pause/unpause method -

[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 <feng...@intel.com> --- xen/arch/x86/hvm/vmx/vmcs.c | 1 + xen/arch/x86/hvm/vmx/vmx.c| 54 ++

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

2016-08-30 Thread Feng Wu
. 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 assign two

[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 <feng...@intel.com> --- xen/arch/x86/hvm/vmx/vmx.

[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 <feng...@intel.com> --- 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..3

[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 <feng...@intel.com> --- xen/arch/x86/hvm/vmx/vmx.c | 10 ++-

[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 <feng...@intel.com> --- xen/drivers/passthrough/vtd/intremap.c | 62 +++--- 1 file c

[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 <f

[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 <feng...@intel.com> --- 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

[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 <feng...@intel.com> --- xen/arch/x

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

2016-05-26 Thread Feng Wu
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 <feng...@intel.com> --- xen/arch/x86/hvm/vmx/vmx.c | 15

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

2016-05-26 Thread Feng Wu
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 value to 'NDST

[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 <feng...@intel.com> --- xen/arch/x86/hvm/vmx/vmx.c

[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 <feng...@intel.com> --- 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..b

[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 <feng...@intel.com> --- xen/arch/x86/hvm/vmx/vmx.c | 32 1 file changed, 32 insertions(+) diff --git a/xe

[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 <feng...@intel.com> --- xen/arch/x86/hvm/vmx/vmx.c | 4 ++-- 1 file changed, 2 insertions

[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 <feng...@intel.com> --- xen/arch/x86/hvm/vmx/vmx.c | 29 ++--- xen/include/asm-x86/hvm/vmx/vmcs.h | 1 + 2 files changed, 27 insertions(+), 3 del

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

2016-05-20 Thread Feng Wu
in 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
. in 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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Kevin Tian <kevin.t...@intel.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- docs/misc/xen-c

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

2016-02-28 Thread Feng Wu
: Yang Zhang <yang.z.zh...@intel.com> Suggested-by: Dario Faggioli <dario.faggi...@citrix.com> Suggested-by: George Dunlap <george.dun...@citrix.com> Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: George Dunlap <geo

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

2016-02-23 Thread Feng Wu
. in 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
: Yang Zhang <yang.z.zh...@intel.com> Suggested-by: Dario Faggioli <dario.faggi...@citrix.com> Suggested-by: George Dunlap <george.dun...@eu.citrix.com> Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> --- v13: - Define the blockin

[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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Kevin Tian <kevin.t...@intel.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- docs/misc/xen-c

[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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Kevin Tian <kevin.t...@intel.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- docs/misc/xen-c

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

2016-02-18 Thread Feng Wu
. in 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
: Yang Zhang <yang.z.zh...@intel.com> Suggested-by: Dario Faggioli <dario.faggi...@citrix.com> Suggested-by: George Dunlap <george.dun...@eu.citrix.com> Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> --- v12: - Move the ASSERT to

[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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Kevin Tian <kevin.t...@intel.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- docs/misc/xen-c

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

2016-01-27 Thread Feng Wu
. in 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
: Yang Zhang <yang.z.zh...@intel.com> Suggested-by: Dario Faggioli <dario.faggi...@citrix.com> Suggested-by: George Dunlap <george.dun...@eu.citrix.com> Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> --- v11: - Add ASSERT() in vmx

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

2015-12-03 Thread Feng Wu
. in 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 a Update

[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 <kevin.t...@intel.com> CC: Jan Beulich <jbeul...@suse.com> CC: Keir Fraser <k...@xen.org> CC: Andrew Cooper <andrew.coop...@citrix.com> CC: George Dunlap <george.dun...@eu.citrix.com> Signed-off-by: Feng Wu <feng...@i

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

2015-12-03 Thread Feng Wu
ooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> Acked-by: <kevin.t...@intel.com> --- v10: - Changed some comments to make them clear.

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

2015-12-03 Thread Feng Wu
<jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- 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 'deliv

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

2015-12-03 Thread Feng Wu
> CC: Jan Beulich <jbeul...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> Acked-by: Kevin Tian <kevin.t...@intel.com> --- v7: - Retain 'cli' in the comments to make it more understandable. - Register another not

[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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Kevin Tian <kevin.t...@intel.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v6: - Change the default

[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 <kevin.t...@intel.com> CC: Keir Fraser <k...@xen.org> CC: Jan Beulich <jbeul...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com>

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

2015-12-03 Thread Feng Wu
: Yang Zhang <yang.z.zh...@intel.com> Suggested-by: Dario Faggioli <dario.faggi...@citrix.com> Suggested-by: George Dunlap <george.dun...@eu.citrix.com> Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> --- v10: - Check iommu_int

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

2015-11-03 Thread Feng Wu
lt;dario.faggi...@citrix.com> Suggested-by: George Dunlap <george.dun...@eu.citrix.com> Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> --- v9: - Remove arch_vcpu_block_cancel() and arch_vcpu_wake_prepare() - Add vmx_pi_state_change

[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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Kevin Tian <kevin.t...@intel.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v6: - Change the default

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

2015-11-03 Thread Feng Wu
Remove pointless casts. CC: Yang Zhang <yang.z.zh...@intel.com> CC: Kevin Tian <kevin.t...@intel.com> Suggested-by: Jan Beulich <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> --- v7: - R

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

2015-11-03 Thread Feng Wu
' to control whether enable VT-d posted-interrupt or not in the generic IOMMU code. CC: Jan Beulich <jbeul...@suse.com> CC: Kevin Tian <kevin.t...@intel.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Kevin Tian <kevin.t...@intel.com> Reviewed-by: Konrad Rzeszutek Wilk

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

2015-11-03 Thread Feng Wu
gt; CC: Kevin Tian <kevin.t...@intel.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- v7: - Remove pointless "if non iommu_intremap then disable iommu_intpost" log

[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 <k...@xen.org> CC: Jan Beulich <jbeul...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> Acked-by: Jan Beulich &l

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

2015-11-03 Thread Feng Wu
<jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- 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 'deliv

[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 <k...@xen.org> CC: Jan Beulich <jbeul...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> --- v9: - Make t

[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 <kevin.t...@intel.com> CC: Yang Zhang <yang.z.zh...@intel.com> CC: Jan Beulich <jbeul...@suse.com> CC: Keir Fraser <k...@xen.org> CC: Andrew Cooper <andrew.coop...@citrix.com> CC: George Dunlap <george.dun...@eu.c

[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 <kevin.t...@intel.com> CC: Keir Fraser <k...@xen.org> CC: Jan Beulich <jbeul...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-

[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 <yang.z.zh...@intel.com> CC: Kevin Tian <kevin.t...@intel.com> Signed-off-by: Feng Wu <feng...@intel.com> Acked-by: Kevin Tian <kevin.t...@intel.com> --- v8: - Make use of the __ui

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

2015-11-03 Thread Feng Wu
> CC: Jan Beulich <jbeul...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> Acked-by: Kevin Tian <kevin.t...@intel.com> --- v7: - Retain 'cli' in the comments to make it more understandable. - Register another not

[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 <kevin.t...@intel.com> CC: Keir Fraser <k...@xen.org> CC: Jan Beulich <jbeul...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> Acked-by: Ke

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

2015-11-03 Thread Feng Wu
ooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- v8: - Parenthesize '1 << POSTED_INTR_ON' and '1 << POSTED_INTR_SN' v7: - Coding

[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
drew Cooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- v8: - Some minor adjustment v7: - Remove __uint128_t cast - Remove Kevin's Ack due to a bug fix for v6 - Reword some comments - Setup posted IRTE from z

[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 <yang.z.zh...@intel.com> CC: Kevin Tian <kevin.t...@intel.com> Signed-off-by: Feng Wu <feng...@intel.com> --- v8: - Coding style v7: - Remove the two stage loop v6: - Fix a typo v4: - Newly added xen/drive

[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 <kevin.t...@intel.com> CC: Keir Fraser <k...@xen.org> CC: Jan Beulich <jbeul...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <

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

2015-10-12 Thread Feng Wu
> CC: Jan Beulich <jbeul...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> Acked-by: Kevin Tian <kevin.t...@intel.com> --- v7: - Retain 'cli' in the comments to make it more understandable. - Register another not

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

2015-10-12 Thread Feng Wu
This patch initializes the VT-d Posted-interrupt Descriptor. CC: Kevin Tian <kevin.t...@intel.com> CC: Keir Fraser <k...@xen.org> CC: Jan Beulich <jbeul...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> Acked-by: Ke

[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
drew Cooper <andrew.coop...@citrix.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- v8: - Some minor adjustment v7: - Remove __uint128_t cast - Remove Kevin's Ack due to a bug fix for v6 - Reword some comments - Setup posted IRTE from z

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

2015-10-12 Thread Feng Wu
Add the design doc for VT-d PI. CC: Kevin Tian <kevin.t...@intel.com> CC: Yang Zhang <yang.z.zh...@intel.com> CC: Jan Beulich <jbeul...@suse.com> CC: Keir Fraser <k...@xen.org> CC: Andrew Cooper <andrew.coop...@citrix.com> CC: George Dunlap <george.dun...@eu.c

[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 <jbeul...@suse.com> Signed-off-by: Feng Wu <feng...@intel.com> Reviewed-by: Kevin Tian <kevin.t...@intel.com> Acked-by: Jan Beulich <jbeul...@suse.com> --- v6: - Change the default

  1   2   3   >