[Xen-devel] [v4][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-09-18 Thread Tiejun Chen
at table to need to pass that option to qemu. But if gfx_passthru_kind = "igd" we always force to pass that. And "-gfx_passthru" is just introduced to work for qemu-xen-traditional so we should get this away from libxl__build_device_model_args_new() in the case of qemu u

[Xen-devel] [v4][PATCH 0/2] libxl: try to support IGD passthrough for qemu upstream

2015-09-18 Thread Tiejun Chen
and build_info.u.gfx_passthru_kind to IGD And note actually that option "-gfx_passthru" is just introduced to work for qemu-xen-traditional so we should get this away from libxl__build_device_model_args_new() in the case of qemu upstream.

[Xen-devel] [v4][PATCH 1/2] libxl: introduce libxl__is_igd_vga_passthru

2015-09-18 Thread Tiejun Chen
. Signed-off-by: Tiejun Chen Acked-by: Ian Campbell --- tools/libxl/libxl_internal.h | 2 + tools/libxl/libxl_pci.c | 124 +++ 2 files changed, 126 insertions(+) diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 5fa55a7

[Xen-devel] [PATCH] hw/pci-host/piix: fix one file descriptor leak

2015-09-17 Thread Tiejun Chen
Commit 595a4f07d6bd (piix: create host bridge to passthrough) introduced to leak of one file descriptor, "config_fd", now just fix that. CC: Michael S. Tsirkin CC: Stefano Stabellini CC: Paolo Bonzini Acked-by: Stefano Stabellini Signed-off-by: Tiejun Chen --- hw/pci-host/piix.c

[Xen-devel] [v2][PATCH] vtd/iommu: correct loglevel when check group divices

2015-09-16 Thread Tiejun Chen
: Jan Beulich CC: Wei Liu Signed-off-by: Tiejun Chen --- v2: * Correct wrong place to loglevel. xen/drivers/passthrough/vtd/iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 7b45bff

[Xen-devel] [PATCH] vtd/iommu: correct loglevel when check group divices

2015-09-15 Thread Tiejun Chen
: Jan Beulich CC: Wei Liu Signed-off-by: Tiejun Chen --- xen/drivers/passthrough/vtd/iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 7b45bff..53aac18 100644 --- a/xen/drivers/passthrough

[Xen-devel] [PATCH] xen/domctl: lower loglevel of XEN_DOMCTL_memory_mapping

2015-09-08 Thread Tiejun Chen
We should lower loglevel to XENLOG_G_DEBUG while mapping or unmapping memory via XEN_DOMCTL_memory_mapping since its fair enough to check this info just while debugging. CC: Ian Campbell CC: Ian Jackson CC: Jan Beulich CC: Keir Fraser CC: Tim Deegan Signed-off-by: Tiejun Chen --- xen

[Xen-devel] [v2][PATCH] xen/vtd/iommu: permit group devices to passthrough in relaxed mode

2015-09-08 Thread Tiejun Chen
this permission dependent on our RMRR policy. So, now it would be allowed in the relaxed mode. CC: Yang Zhang CC: Kevin Tian CC: Jan Beulich CC: Wei Liu Signed-off-by: Tiejun Chen --- v2: * Sync code comments * refactor vaiable "relaxed" as bool_t * s/XENLOG_G_ERR VTDPREFIX/X

[Xen-devel] [PATCH] xen/vtd/iommu: permit group devices to passthrough in relaxed mode

2015-09-07 Thread Tiejun Chen
this permission dependent on our RMRR policy. So, now it would be allowed in the relaxed mode. CC: Yang Zhang CC: Kevin Tian CC: Jan Beulich Signed-off-by: Tiejun Chen --- xen/drivers/passthrough/vtd/iommu.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xen/dr

[Xen-devel] [PATCH] tools/hvmloader: sync memory map[]

2015-07-28 Thread Tiejun Chen
Beulich CC: Andrew Cooper CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu CC: George Dunlap Signed-off-by: Tiejun Chen --- tools/firmware/hvmloader/e820.c | 105 ++-- tools/firmware/hvmloader/pci.c | 3 ++ tools/firmware/hvmloader/util.c

[Xen-devel] [v11][PATCH 13/16] libxl: construct e820 map with RDM information for HVM guest

2015-07-21 Thread Tiejun Chen
: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Acked-by: Ian Jackson Signed-off-by: Tiejun Chen --- v8 ~ v11: * Nothing is changed. v7: * Just sync with the fallout of renaming parameters from patch #10. v6: * Nothing is changed. v5: * Make this var

[Xen-devel] [v11][PATCH 14/16] xen/vtd: enable USB device assignment

2015-07-21 Thread Tiejun Chen
USB RMRR may conflict with guest BIOS region. In such case, identity mapping setup is simply skipped in previous implementation. Now we can handle this scenario cleanly with new policy mechanism so previous hack code can be removed now. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen

[Xen-devel] [v11][PATCH 03/16] xen/passthrough: extend hypercall to support rdm reservation policy

2015-07-21 Thread Tiejun Chen
ng CC: Kevin Tian Signed-off-by: Tiejun Chen Reviewed-by: George Dunlap Acked-by: Jan Beulich --- v10 ~ v11: * Nothing is changed. v9: * Correct one check condition of XEN_DOMCTL_DEV_RDM_RELAXED v8: * Force to pass "0"(strict) when add or move a device in hardware domain, and im

[Xen-devel] [v11][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM

2015-07-21 Thread Tiejun Chen
CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen Reviewed-by: Kevin Tian --- v11: * Use GCNEW_ARRAY to replace libxl__malloc() * #define pfn_to_paddrk is missing safety () around x, and move this into libxl_internal.h * Rename set_rdm_entries() to add_rdm_entry() a

[Xen-devel] [v11][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-21 Thread Tiejun Chen
egion if necessary) * Sort all the ranges so that they appear in memory order. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Reviewed-by: George Dunlap Reviewed-by: Jan Beulich Signed-off-by: Tiejun Chen --- v11:

[Xen-devel] [v11][PATCH 09/16] tools: extend xc_assign_device() to support rdm reservation policy

2015-07-21 Thread Tiejun Chen
Liu Signed-off-by: Tiejun Chen --- v6 ~ v11: * Nothing is changed. v5: * Fix the flag field as "0" to DT device v4: * In the patch head description, I add to explain why we need to sync the xc.c file tools/libxc/include/xenctrl.h | 3 ++- tools/libxc/xc_domain.c

[Xen-devel] [v11][PATCH 01/16] xen: introduce XENMEM_reserved_device_memory_map

2015-07-21 Thread Tiejun Chen
From: Jan Beulich This is a prerequisite for punching holes into HVM and PVH guests' P2M to allow passing through devices that are associated with (on VT-d) RMRRs. CC: Jan Beulich CC: Yang Zhang CC: Kevin Tian Signed-off-by: Jan Beulich Signed-off-by: Tiejun Chen Acked-by: Kevin

[Xen-devel] [v11][PATCH 06/16] hvmloader/pci: Try to avoid placing BARs in RMRRs

2015-07-21 Thread Tiejun Chen
er in the guest config. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Reviewed-by: Jan Beulich Signed-off-by: George Dunlap Signed-off-by: Tiejun Chen --- v11: * To find the lowest RMRR the _end_ of which is higher

[Xen-devel] [v11][PATCH 05/16] hvmloader: get guest memory map into memory_map[]

2015-07-21 Thread Tiejun Chen
: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen Reviewed-by: Kevin Tian Reviewed-by: George Dunlap Acked-by: Jan Beulich --- v10 ~ v11: * Nothing is changed. v9: * Correct [RESERVED_MEMORY_DYNAMIC_START, RESERVED_MEMORY_DYNAMIC_END

[Xen-devel] [v11][PATCH 16/16] tools: parse to enable new rdm policy parameters

2015-07-21 Thread Tiejun Chen
Default per-device RDM policy is same as default global RDM policy as being 'relaxed'. And the per-device policy would override the global policy like others. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v

[Xen-devel] [v11][PATCH 15/16] xen/vtd: prevent from assign the device with shared rmrr

2015-07-21 Thread Tiejun Chen
. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen Acked-by: Kevin Tian --- v10 ~ v11: * Noting is changed. v9: * Correct one indentation issue v8: * Merge two if{} as one if{} * Add to print RMRR range info when stop assign a group device v5 ~ v7: * Nothing is changed. v4: * R

[Xen-devel] [v11][PATCH 12/16] tools: introduce a new parameter to set a predefined rdm boundary

2015-07-21 Thread Tiejun Chen
Acked-by: Ian Jackson Signed-off-by: Tiejun Chen --- v8 ~ v10: * Nothing is changed. v7: * Just sync with the fallout of renaming parameters from patch #10. v6: * Nothing is changed. v5: * Make this variable "rdm_mem_boundary_memkb" specific to .hvm v4: * Separated from t

[Xen-devel] [v11][PATCH 02/16] xen/vtd: create RMRR mapping

2015-07-21 Thread Tiejun Chen
CC: Yang Zhang CC: Kevin Tian Reviewed-by: Kevin Tian Reviewed-by: Tim Deegan Acked-by: George Dunlap Signed-off-by: Tiejun Chen --- v6 ~ v11: * Nothing is changed. v5: * Fold our original patch #2 and #3 as this new * Introduce a new, clear_identity_p2m_entry, which can wrapper

[Xen-devel] [v11][PATCH 04/16] xen: enable XENMEM_memory_map in hvm

2015-07-21 Thread Tiejun Chen
This patch enables XENMEM_memory_map in hvm. So hvmloader can use it to setup the e820 mappings. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Tiejun Chen Reviewed-by: Tim Deegan Reviewed-by: Kevin Tian Acked-by: Jan Beulich Acked-by: George Dunlap --- v5 ~ v11

[Xen-devel] [v11][PATCH 00/16] Fix RMRR

2015-07-21 Thread Tiejun Chen
ents. There are still several tasks not implemented now. We'll include them in final version after RFC is agreed: - remove existing USB hack - detect and fail assigning device which has a shared RMRR with another device - add a config parameter to configure that memory boundary flexibly - In the

[Xen-devel] [v11][PATCH 10/16] tools: introduce some new parameters to set rdm policy

2015-07-21 Thread Tiejun Chen
a warning message thrown out. Default per-device RDM policy is same as default global RDM policy as being 'relaxed'. And the per-device policy would override the global policy like others. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Acked-b

[Xen-devel] [v11][PATCH 08/16] tools/libxc: Expose new hypercall xc_reserved_device_memory_map

2015-07-21 Thread Tiejun Chen
Stabellini CC: Ian Campbell CC: Wei Liu Reviewed-by: Kevin Tian Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v4 ~ v11: * Nothing is changed. tools/libxc/include/xenctrl.h | 8 tools/libxc/xc_domain.c | 36 2 files changed, 44 insertions

[Xen-devel] [v10][PATCH 16/16] tools: parse to enable new rdm policy parameters

2015-07-19 Thread Tiejun Chen
Default per-device RDM policy is same as default global RDM policy as being 'relaxed'. And the per-device policy would override the global policy like others. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v

[Xen-devel] [v10][PATCH 01/16] xen: introduce XENMEM_reserved_device_memory_map

2015-07-19 Thread Tiejun Chen
From: Jan Beulich This is a prerequisite for punching holes into HVM and PVH guests' P2M to allow passing through devices that are associated with (on VT-d) RMRRs. CC: Jan Beulich CC: Yang Zhang CC: Kevin Tian Signed-off-by: Jan Beulich Signed-off-by: Tiejun Chen Acked-by: Kevin

[Xen-devel] [v10][PATCH 08/16] tools/libxc: Expose new hypercall xc_reserved_device_memory_map

2015-07-19 Thread Tiejun Chen
Stabellini CC: Ian Campbell CC: Wei Liu Reviewed-by: Kevin Tian Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v4 ~ v10: * Nothing is changed. tools/libxc/include/xenctrl.h | 8 tools/libxc/xc_domain.c | 36 2 files changed, 44 insertions

[Xen-devel] [v10][PATCH 02/16] xen/vtd: create RMRR mapping

2015-07-19 Thread Tiejun Chen
CC: Yang Zhang CC: Kevin Tian Reviewed-by: Kevin Tian Reviewed-by: Tim Deegan Acked-by: George Dunlap Signed-off-by: Tiejun Chen --- v6 ~ v10: * Nothing is changed. v5: * Fold our original patch #2 and #3 as this new * Introduce a new, clear_identity_p2m_entry, which can wrapper

[Xen-devel] [v10][PATCH 06/16] hvmloader/pci: Try to avoid placing BARs in RMRRs

2015-07-19 Thread Tiejun Chen
er in the guest config. Signed-off-by: George Dunlap Signed-off-by: Tiejun Chen --- v10: * This is from George' draft patch which implements an acceptable solution in current cycle. Here I just implemented check_overlap_all() and some cleanups. v9: * A little improvement to code impl

[Xen-devel] [v10][PATCH 13/16] libxl: construct e820 map with RDM information for HVM guest

2015-07-19 Thread Tiejun Chen
: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v8 ~ v10: * Nothing is changed. v7: * Just sync with the fallout of renaming parameters from patch #10. v6: * Nothing is changed. v5: * Make this var

[Xen-devel] [v10][PATCH 04/16] xen: enable XENMEM_memory_map in hvm

2015-07-19 Thread Tiejun Chen
This patch enables XENMEM_memory_map in hvm. So hvmloader can use it to setup the e820 mappings. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Tiejun Chen Reviewed-by: Tim Deegan Reviewed-by: Kevin Tian Acked-by: Jan Beulich Acked-by: George Dunlap --- v5 ~ v10

[Xen-devel] [v10][PATCH 12/16] tools: introduce a new parameter to set a predefined rdm boundary

2015-07-19 Thread Tiejun Chen
Acked-by: Ian Jackson Signed-off-by: Tiejun Chen --- v8 ~ v10: * Nothing is changed. v7: * Just sync with the fallout of renaming parameters from patch #10. v6: * Nothing is changed. v5: * Make this variable "rdm_mem_boundary_memkb" specific to .hvm v4: * Separated from t

[Xen-devel] [v10][PATCH 05/16] hvmloader: get guest memory map into memory_map[]

2015-07-19 Thread Tiejun Chen
: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen Reviewed-by: Kevin Tian Reviewed-by: George Dunlap Acked-by: Jan Beulich --- v10: * Nothing is changed. v9: * Correct [RESERVED_MEMORY_DYNAMIC_START, RESERVED_MEMORY_DYNAMIC_END] -> [RESERVED_MEMORY_DYNAMIC_ST

[Xen-devel] [v10][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM

2015-07-19 Thread Tiejun Chen
CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen Reviewed-by: Kevin Tian --- v9 ~ v10: * Nothing is changed. v8: * Introduce pfn_to_paddr(x) -> ((uint64_t)x << XC_PAGE_SHIFT) and set_rdm_entries() to factor out current codes. v7: * Just sync with the fall

[Xen-devel] [v10][PATCH 10/16] tools: introduce some new parameters to set rdm policy

2015-07-19 Thread Tiejun Chen
a warning message thrown out. Default per-device RDM policy is same as default global RDM policy as being 'relaxed'. And the per-device policy would override the global policy like others. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Acked-b

[Xen-devel] [v10][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-19 Thread Tiejun Chen
egion if necessary) * Sort all the ranges so that they appear in memory order. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen --- v10: * Instead of correcting e820, I'd like

[Xen-devel] [v10][PATCH 03/16] xen/passthrough: extend hypercall to support rdm reservation policy

2015-07-19 Thread Tiejun Chen
ng CC: Kevin Tian Signed-off-by: Tiejun Chen Reviewed-by: George Dunlap Acked-by: Jan Beulich --- v10: * Nothing is changed. v9: * Correct one check condition of XEN_DOMCTL_DEV_RDM_RELAXED v8: * Force to pass "0"(strict) when add or move a device in hardware domain, and improve

[Xen-devel] [v10][PATCH 09/16] tools: extend xc_assign_device() to support rdm reservation policy

2015-07-19 Thread Tiejun Chen
Liu Signed-off-by: Tiejun Chen --- v6 ~ v10: * Nothing is changed. v5: * Fix the flag field as "0" to DT device v4: * In the patch head description, I add to explain why we need to sync the xc.c file tools/libxc/include/xenctrl.h | 3 ++- tools/libxc/xc_domain.c

[Xen-devel] [v10][PATCH 14/16] xen/vtd: enable USB device assignment

2015-07-19 Thread Tiejun Chen
USB RMRR may conflict with guest BIOS region. In such case, identity mapping setup is simply skipped in previous implementation. Now we can handle this scenario cleanly with new policy mechanism so previous hack code can be removed now. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen

[Xen-devel] [v10][PATCH 15/16] xen/vtd: prevent from assign the device with shared rmrr

2015-07-19 Thread Tiejun Chen
. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen Acked-by: Kevin Tian --- v10: * Noting is changed. v9: * Correct one indentation issue v8: * Merge two if{} as one if{} * Add to print RMRR range info when stop assign a group device v5 ~ v7: * Nothing is changed. v4: * Refin

[Xen-devel] [v10][PATCH 00/16] Fix RMRR

2015-07-19 Thread Tiejun Chen
etect and fail assigning device which has a shared RMRR with another device - add a config parameter to configure that memory boundary flexibly - In the case of hotplug we also need to figure out a way to fix that policy conflict between the per-pci policy and the global policy but firstly we think

[Xen-devel] [v9][PATCH 00/16] Fix RMRR

2015-07-16 Thread Tiejun Chen
. We'll include them in final version after RFC is agreed: - remove existing USB hack - detect and fail assigning device which has a shared RMRR with another device - add a config parameter to configure that memory boundary flexibly - In the case of hotplug we also need to figur

[Xen-devel] [v9][PATCH 12/16] tools: introduce a new parameter to set a predefined rdm boundary

2015-07-16 Thread Tiejun Chen
Acked-by: Ian Jackson Signed-off-by: Tiejun Chen --- v8 ~ v9: * Nothing is changed. v7: * Just sync with the fallout of renaming parameters from patch #10. v6: * Nothing is changed. v5: * Make this variable "rdm_mem_boundary_memkb" specific to .hvm v4: * Separated from t

[Xen-devel] [v9][PATCH 06/16] hvmloader/pci: disable all pci devices conflicting with rdm

2015-07-16 Thread Tiejun Chen
CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen --- v9: * A little improvement to code implementation but again, its still argued about this solution. v8: * Based on current discussion its hard to reshape the original mmio allocation

[Xen-devel] [v9][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-16 Thread Tiejun Chen
on if necessary) * Sort all the ranges so that they appear in memory order. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen --- v9: * Refine that chunk of codes to check/modify highmem v8: * d

[Xen-devel] [v9][PATCH 03/16] xen/passthrough: extend hypercall to support rdm reservation policy

2015-07-16 Thread Tiejun Chen
ng CC: Kevin Tian Signed-off-by: Tiejun Chen Reviewed-by: George Dunlap --- v9: * Correct one check condition of XEN_DOMCTL_DEV_RDM_RELAXED v8: * Force to pass "0"(strict) when add or move a device in hardware domain, and improve some associated code comments. v6 ~ v7: * Nothin

[Xen-devel] [v9][PATCH 09/16] tools: extend xc_assign_device() to support rdm reservation policy

2015-07-16 Thread Tiejun Chen
Liu Signed-off-by: Tiejun Chen --- v6 ~ v9: * Nothing is changed. v5: * Fix the flag field as "0" to DT device v4: * In the patch head description, I add to explain why we need to sync the xc.c file tools/libxc/include/xenctrl.h | 3 ++- tools/libxc/xc_domain.c

[Xen-devel] [v9][PATCH 04/16] xen: enable XENMEM_memory_map in hvm

2015-07-16 Thread Tiejun Chen
This patch enables XENMEM_memory_map in hvm. So hvmloader can use it to setup the e820 mappings. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Tiejun Chen Reviewed-by: Tim Deegan Reviewed-by: Kevin Tian Acked-by: Jan Beulich Acked-by: George Dunlap --- v5 ~ v9

[Xen-devel] [v9][PATCH 10/16] tools: introduce some new parameters to set rdm policy

2015-07-16 Thread Tiejun Chen
a warning message thrown out. Default per-device RDM policy is same as default global RDM policy as being 'relaxed'. And the per-device policy would override the global policy like others. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Acked-

[Xen-devel] [v9][PATCH 05/16] hvmloader: get guest memory map into memory_map[]

2015-07-16 Thread Tiejun Chen
: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen Reviewed-by: Kevin Tian Reviewed-by: George Dunlap Acked-by: Jan Beulich --- v9: * Correct [RESERVED_MEMORY_DYNAMIC_START, RESERVED_MEMORY_DYNAMIC_END] -> [RESERVED_MEMORY_DYNAMIC_START, RESERVED_MEMORY_DYNAMIC_

[Xen-devel] [v9][PATCH 02/16] xen/vtd: create RMRR mapping

2015-07-16 Thread Tiejun Chen
CC: Yang Zhang CC: Kevin Tian Reviewed-by: Kevin Tian Reviewed-by: Tim Deegan Acked-by: George Dunlap Signed-off-by: Tiejun Chen --- v6 ~ v9: * Nothing is changed. v5: * Fold our original patch #2 and #3 as this new * Introduce a new, clear_identity_p2m_entry, which can wrapper

[Xen-devel] [v9][PATCH 13/16] libxl: construct e820 map with RDM information for HVM guest

2015-07-16 Thread Tiejun Chen
: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v8 ~ v9: * Nothing is changed. v7: * Just sync with the fallout of renaming parameters from patch #10. v6: * Nothing is changed. v5: * Make this variable "rdm_mem_boun

[Xen-devel] [v9][PATCH 15/16] xen/vtd: prevent from assign the device with shared rmrr

2015-07-16 Thread Tiejun Chen
. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen Acked-by: Kevin Tian --- v9: * Correct one indentation issue v8: * Merge two if{} as one if{} * Add to print RMRR range info when stop assign a group device v5 ~ v7: * Nothing is changed. v4: * Refine one code comment. xen/dr

[Xen-devel] [v9][PATCH 08/16] tools/libxc: Expose new hypercall xc_reserved_device_memory_map

2015-07-16 Thread Tiejun Chen
Stabellini CC: Ian Campbell CC: Wei Liu Reviewed-by: Kevin Tian Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v4 ~ v9: * Nothing is changed. tools/libxc/include/xenctrl.h | 8 tools/libxc/xc_domain.c | 36 2 files changed, 44 insertions

[Xen-devel] [v9][PATCH 16/16] tools: parse to enable new rdm policy parameters

2015-07-16 Thread Tiejun Chen
Default per-device RDM policy is same as default global RDM policy as being 'relaxed'. And the per-device policy would override the global policy like others. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen ---

[Xen-devel] [v9][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM

2015-07-16 Thread Tiejun Chen
CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen Reviewed-by: Kevin Tian --- v9: * Nothing is changed. v8: * Introduce pfn_to_paddr(x) -> ((uint64_t)x << XC_PAGE_SHIFT) and set_rdm_entries() to factor out current codes. v7: * Just sync with the fallout o

[Xen-devel] [v9][PATCH 14/16] xen/vtd: enable USB device assignment

2015-07-16 Thread Tiejun Chen
USB RMRR may conflict with guest BIOS region. In such case, identity mapping setup is simply skipped in previous implementation. Now we can handle this scenario cleanly with new policy mechanism so previous hack code can be removed now. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen

[Xen-devel] [v9][PATCH 01/16] xen: introduce XENMEM_reserved_device_memory_map

2015-07-16 Thread Tiejun Chen
From: Jan Beulich This is a prerequisite for punching holes into HVM and PVH guests' P2M to allow passing through devices that are associated with (on VT-d) RMRRs. CC: Jan Beulich CC: Yang Zhang CC: Kevin Tian Signed-off-by: Jan Beulich Signed-off-by: Tiejun Chen Acked-by: Kevin

[Xen-devel] [v8][PATCH 14/16] xen/vtd: enable USB device assignment

2015-07-15 Thread Tiejun Chen
USB RMRR may conflict with guest BIOS region. In such case, identity mapping setup is simply skipped in previous implementation. Now we can handle this scenario cleanly with new policy mechanism so previous hack code can be removed now. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen

[Xen-devel] [v8][PATCH 04/16] xen: enable XENMEM_memory_map in hvm

2015-07-15 Thread Tiejun Chen
This patch enables XENMEM_memory_map in hvm. So hvmloader can use it to setup the e820 mappings. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Tiejun Chen Reviewed-by: Tim Deegan Reviewed-by: Kevin Tian Acked-by: Jan Beulich Acked-by: George Dunlap --- v5 ~ v8

[Xen-devel] [v8][PATCH 08/16] tools/libxc: Expose new hypercall xc_reserved_device_memory_map

2015-07-15 Thread Tiejun Chen
Stabellini CC: Ian Campbell CC: Wei Liu Reviewed-by: Kevin Tian Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v4 ~ v8: * Nothing is changed. tools/libxc/include/xenctrl.h | 8 tools/libxc/xc_domain.c | 36 2 files changed, 44 insertions

[Xen-devel] [v8][PATCH 03/16] xen/passthrough: extend hypercall to support rdm reservation policy

2015-07-15 Thread Tiejun Chen
ng CC: Kevin Tian Signed-off-by: Tiejun Chen --- v8: * Force to pass "0"(strict) when add or move a device in hardware domain, and improve some associated code comments. v6 ~ v7: * Nothing is changed. v5: * Just leave one bit XEN_DOMCTL_DEV_RDM_RELAXED as our flag, so "0&q

[Xen-devel] [v8][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM

2015-07-15 Thread Tiejun Chen
CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen Reviewed-by: Kevin Tian --- v8: * Introduce pfn_to_paddr(x) -> ((uint64_t)x << XC_PAGE_SHIFT) and set_rdm_entries() to factor out current codes. v7: * Just sync with the fallout of renaming parameters

[Xen-devel] [v8][PATCH 09/16] tools: extend xc_assign_device() to support rdm reservation policy

2015-07-15 Thread Tiejun Chen
Liu Signed-off-by: Tiejun Chen --- v6 ~ v8: * Nothing is changed. v5: * Fix the flag field as "0" to DT device v4: * In the patch head description, I add to explain why we need to sync the xc.c file tools/libxc/include/xenctrl.h | 3 ++- tools/libxc/xc_domain.c

[Xen-devel] [v8][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-15 Thread Tiejun Chen
on if necessary) * Sort all the ranges so that they appear in memory order. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen --- v8: * define low_mem_end as uint32_t * Correct those two wrong

[Xen-devel] [v8][PATCH 15/16] xen/vtd: prevent from assign the device with shared rmrr

2015-07-15 Thread Tiejun Chen
. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen Acked-by: Kevin Tian --- v8: * Merge two if{} as one if{} * Add to print RMRR range info when stop assign a group device v5 ~ v7: * Nothing is changed. v4: * Refine one code comment. xen/drivers/passthrough/vtd/iommu.c

[Xen-devel] [v8][PATCH 12/16] tools: introduce a new parameter to set a predefined rdm boundary

2015-07-15 Thread Tiejun Chen
Acked-by: Ian Jackson Signed-off-by: Tiejun Chen --- v8: * Nothing is changed. v7: * Just sync with the fallout of renaming parameters from patch #10. v6: * Nothing is changed. v5: * Make this variable "rdm_mem_boundary_memkb" specific to .hvm v4: * Separated from the previou

[Xen-devel] [v8][PATCH 13/16] libxl: construct e820 map with RDM information for HVM guest

2015-07-15 Thread Tiejun Chen
: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v8: * make that core construction function as arch-specific to make sure we don't break ARM at this point. v7: * Just sync with the fallout of renaming parameters from

[Xen-devel] [v8][PATCH 05/16] hvmloader: get guest memory map into memory_map[]

2015-07-15 Thread Tiejun Chen
: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen Reviewed-by: Kevin Tian --- v8: * Actually we should check this range started from RESERVED_MEMORY_DYNAMIC_START, not RESERVED_MEMORY_DYNAMIC_START - 1. So correct this and sync the patch head description. v5 ~ v7

[Xen-devel] [v8][PATCH 16/16] tools: parse to enable new rdm policy parameters

2015-07-15 Thread Tiejun Chen
Default per-device RDM policy is same as default global RDM policy as being 'relaxed'. And the per-device policy would override the global policy like others. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen ---

[Xen-devel] [v8][PATCH 00/16] Fix RMRR

2015-07-15 Thread Tiejun Chen
comments. There are still several tasks not implemented now. We'll include them in final version after RFC is agreed: - remove existing USB hack - detect and fail assigning device which has a shared RMRR with another device - add a config parameter to configure that memory boundary flexibly

[Xen-devel] [v8][PATCH 02/16] xen/vtd: create RMRR mapping

2015-07-15 Thread Tiejun Chen
CC: Yang Zhang CC: Kevin Tian Reviewed-by: Kevin Tian Reviewed-by: Tim Deegan Acked-by: George Dunlap Signed-off-by: Tiejun Chen --- v6 ~ v8: * Nothing is changed. v5: * Fold our original patch #2 and #3 as this new * Introduce a new, clear_identity_p2m_entry, which can wrapper

[Xen-devel] [v8][PATCH 01/16] xen: introduce XENMEM_reserved_device_memory_map

2015-07-15 Thread Tiejun Chen
From: Jan Beulich This is a prerequisite for punching holes into HVM and PVH guests' P2M to allow passing through devices that are associated with (on VT-d) RMRRs. CC: Jan Beulich CC: Yang Zhang CC: Kevin Tian Signed-off-by: Jan Beulich Signed-off-by: Tiejun Chen Acked-by: Kevin

[Xen-devel] [v8][PATCH 06/16] hvmloader/pci: disable all pci devices conflicting with rdm

2015-07-15 Thread Tiejun Chen
CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen --- v8: * Based on current discussion its hard to reshape the original mmio allocation mechanism but we haven't a good and simple way to in short term. So instead, we don't

[Xen-devel] [v8][PATCH 10/16] tools: introduce some new parameters to set rdm policy

2015-07-15 Thread Tiejun Chen
a warning message thrown out. Default per-device RDM policy is same as default global RDM policy as being 'relaxed'. And the per-device policy would override the global policy like others. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Acked-b

[Xen-devel] [v7][PATCH 08/16] tools/libxc: Expose new hypercall xc_reserved_device_memory_map

2015-07-08 Thread Tiejun Chen
Stabellini CC: Ian Campbell CC: Wei Liu Reviewed-by: Kevin Tian Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v4 ~ v7: * Nothing is changed. tools/libxc/include/xenctrl.h | 8 tools/libxc/xc_domain.c | 36 2 files changed, 44 insertions

[Xen-devel] [v7][PATCH 12/16] tools: introduce a new parameter to set a predefined rdm boundary

2015-07-08 Thread Tiejun Chen
iu Signed-off-by: Tiejun Chen --- v7: * Just sync with the fallout of renaming parameters from patch #10. v6: * Nothing is changed. v5: * Make this variable "rdm_mem_boundary_memkb" specific to .hvm v4: * Separated from the previous patch to provide a parameter to set that

[Xen-devel] [v7][PATCH 15/16] xen/vtd: prevent from assign the device with shared rmrr

2015-07-08 Thread Tiejun Chen
. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen Acked-by: Kevin Tian --- v5 ~ v7: * Nothing is changed. v4: * Refine one code comment. xen/drivers/passthrough/vtd/iommu.c | 32 +--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/xen/dr

[Xen-devel] [v7][PATCH 05/16] hvmloader: get guest memory map into memory_map[]

2015-07-08 Thread Tiejun Chen
: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen Reviewed-by: Kevin Tian --- v5 ~ v7: * Nothing is changed. v4: * Move some codes related to e820 to that specific file, e820.c. * Consolidate "printf()+BUG()" and "BUG_ON()" * Avoid another fixe

[Xen-devel] [v7][PATCH 09/16] tools: extend xc_assign_device() to support rdm reservation policy

2015-07-08 Thread Tiejun Chen
Liu Signed-off-by: Tiejun Chen --- v6 ~ v7: * Nothing is changed. v5: * Fix the flag field as "0" to DT device v4: * In the patch head description, I add to explain why we need to sync the xc.c file tools/libxc/include/xenctrl.h | 3 ++- tools/libxc/xc_domain.c

[Xen-devel] [v7][PATCH 01/16] xen: introduce XENMEM_reserved_device_memory_map

2015-07-08 Thread Tiejun Chen
From: Jan Beulich This is a prerequisite for punching holes into HVM and PVH guests' P2M to allow passing through devices that are associated with (on VT-d) RMRRs. CC: Jan Beulich CC: Yang Zhang CC: Kevin Tian Signed-off-by: Jan Beulich Signed-off-by: Tiejun Chen Acked-by: Kevin

[Xen-devel] [v7][PATCH 14/16] xen/vtd: enable USB device assignment

2015-07-08 Thread Tiejun Chen
USB RMRR may conflict with guest BIOS region. In such case, identity mapping setup is simply skipped in previous implementation. Now we can handle this scenario cleanly with new policy mechanism so previous hack code can be removed now. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen

[Xen-devel] [v7][PATCH 04/16] xen: enable XENMEM_memory_map in hvm

2015-07-08 Thread Tiejun Chen
This patch enables XENMEM_memory_map in hvm. So hvmloader can use it to setup the e820 mappings. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Tiejun Chen Reviewed-by: Tim Deegan Reviewed-by: Kevin Tian Acked-by: Jan Beulich Acked-by: George Dunlap --- v5 ~ v7

[Xen-devel] [v7][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM

2015-07-08 Thread Tiejun Chen
CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen Reviewed-by: Kevin Tian --- v7: * Just sync with the fallout of renaming parameters from patch #10. v6: * fix some code stypes * Refine libxl__xc_device_get_rdm() v5: * A little change to make sure the per-device p

[Xen-devel] [v7][PATCH 02/16] xen/vtd: create RMRR mapping

2015-07-08 Thread Tiejun Chen
CC: Yang Zhang CC: Kevin Tian Reviewed-by: Kevin Tian Reviewed-by: Tim Deegan Acked-by: George Dunlap Signed-off-by: Tiejun Chen --- v6 ~ v7: * Nothing is changed. v5: * Fold our original patch #2 and #3 as this new * Introduce a new, clear_identity_p2m_entry, which can wrapper

[Xen-devel] [v7][PATCH 06/16] hvmloader/pci: skip reserved ranges

2015-07-08 Thread Tiejun Chen
When allocating mmio address for PCI bars, we need to make sure they don't overlap with reserved regions. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen --- v6 ~ v7: * Nothing is ch

[Xen-devel] [v7][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-08 Thread Tiejun Chen
Now we can use that memory map to build our final e820 table but it may need to reorder all e820 entries. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun Chen --- v5 ~ v7: * Nothing is changed

[Xen-devel] [v7][PATCH 03/16] xen/passthrough: extend hypercall to support rdm reservation policy

2015-07-08 Thread Tiejun Chen
ng CC: Kevin Tian Signed-off-by: Tiejun Chen --- v6 ~ v7: * Nothing is changed. v5: * Just leave one bit XEN_DOMCTL_DEV_RDM_RELAXED as our flag, so "0" means "strict" and "1" means "relaxed". * So make DT device ignore the flag field * Improve the co

[Xen-devel] [v7][PATCH 10/16] tools: introduce some new parameters to set rdm policy

2015-07-08 Thread Tiejun Chen
a warning message thrown out. Default per-device RDM policy is same as default global RDM policy as being 'relaxed'. And the per-device policy would override the global policy like others. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Acked

[Xen-devel] [v7][PATCH 00/16] Fix RMRR

2015-07-08 Thread Tiejun Chen
m in final version after RFC is agreed: - remove existing USB hack - detect and fail assigning device which has a shared RMRR with another device - add a config parameter to configure that memory boundary flexibly - In the case of hotplug we also need to figure out a way to fix that policy

[Xen-devel] [v7][PATCH 13/16] libxl: construct e820 map with RDM information for HVM guest

2015-07-08 Thread Tiejun Chen
: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v7: * Just sync with the fallout of renaming parameters from patch #10. v6: * Nothing is changed. v5: * Rephrase patch's short log * Make libxl__domain_construct_e820()

[Xen-devel] [v7][PATCH 16/16] tools: parse to enable new rdm policy parameters

2015-07-08 Thread Tiejun Chen
DM policy is same as default global RDM policy as being 'relaxed'. And the per-device policy would override the global policy like others. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v7: * Just sync with the fallo

[Xen-devel] [v6][PATCH 14/16] xen/vtd: enable USB device assignment

2015-07-08 Thread Tiejun Chen
USB RMRR may conflict with guest BIOS region. In such case, identity mapping setup is simply skipped in previous implementation. Now we can handle this scenario cleanly with new policy mechanism so previous hack code can be removed now. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen

[Xen-devel] [v6][PATCH 10/16] tools: introduce some new parameters to set rdm policy

2015-07-08 Thread Tiejun Chen
ith a warning message thrown out. Default per-device RDM policy is same as default global RDM policy as being 'relaxed'. And the per-device policy would override the global policy like others. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Signed-off-by: Tiejun C

[Xen-devel] [v6][PATCH 13/16] libxl: construct e820 map with RDM information for HVM guest

2015-07-08 Thread Tiejun Chen
: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Signed-off-by: Tiejun Chen --- v6: * Nothing is changed. v5: * Rephrase patch's short log * Make libxl__domain_construct_e820() hidden v4: * Use goto style error handling. * Instead of NOGC, we

[Xen-devel] [v6][PATCH 02/16] xen/vtd: create RMRR mapping

2015-07-08 Thread Tiejun Chen
CC: Yang Zhang CC: Kevin Tian Reviewed-by: Kevin Tian Reviewed-by: Tim Deegan Acked-by: George Dunlap Signed-off-by: Tiejun Chen --- v6: * Nothing is changed. v5: * Fold our original patch #2 and #3 as this new * Introduce a new, clear_identity_p2m_entry, which can wrapper

[Xen-devel] [v6][PATCH 09/16] tools: extend xc_assign_device() to support rdm reservation policy

2015-07-08 Thread Tiejun Chen
Liu Signed-off-by: Tiejun Chen --- v6: * Nothing is changed. v5: * Fix the flag field as "0" to DT device v4: * In the patch head description, I add to explain why we need to sync the xc.c file tools/libxc/include/xenctrl.h | 3 ++- tools/libxc/xc_domain.c

  1   2   3   >