identity mapping in p2m layer, regardless of
whether EPT is shared or not. And we still keep creating VT-d table.
Signed-off-by: Tiejun Chen
---
xen/arch/x86/mm/p2m.c | 10 --
xen/drivers/passthrough/vtd/iommu.c | 3 +--
2 files changed, 9 insertions(+), 4 deletions(-)
diff
domain, and remove a
device from user domain, 'relaxed' is fine enough since this is always safe
to hwdomain.
Signed-off-by: Tiejun Chen
---
xen/arch/x86/mm/p2m.c | 8 +++-
xen/drivers/passthrough/amd/pci_amd_iommu.c | 3 ++-
xen/drivers/passthrough/ar
This patch enables XENMEM_memory_map in hvm. So we can use it to
setup the e820 mappings.
Signed-off-by: Tiejun Chen
Reviewed-by: Tim Deegan
---
xen/arch/x86/hvm/hvm.c | 2 --
xen/arch/x86/mm.c | 6 --
2 files changed, 8 deletions(-)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86
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.
Signed-off-by: Jan Beulich
Signed-off-by: Tiejun Chen
---
xen/common/compat/memory.c
We will create this sort of identity mapping as follows:
If the gfn space is unoccupied, we just set the mapping. If the space
is already occupied by 1:1 mappings, do nothing. Failed for any
other cases.
Signed-off-by: Tiejun Chen
---
xen/arch/x86/mm/p2m.c | 35
[RESERVED_MEMORY_DYNAMIC_START - 1, RESERVED_MEMORY_DYNAMIC_END].
This range is used to allocate memory in hvmloder level, and
we would lead hvmloader failed in case of conflict since its
another rare possibility in real world.
Signed-off-by: Tiejun Chen
---
tools/firmware/hvmloader/e820.h | 7
hink
we'd better collect some good or correct ideas to step next in RFC.
So here I made this as RFC to collect your any comments.
--------
Jan Beulich (1):
xen: introduce XENMEM_reserved_device_memory_map
Tiejun Chen (15):
omain.
Signed-off-by: Tiejun Chen
---
xen/drivers/passthrough/vtd/iommu.c | 30 +++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/xen/drivers/passthrough/vtd/iommu.c
b/xen/drivers/passthrough/vtd/iommu.c
index d3233b8..f220081 100644
--- a/xen/drivers/passth
We will introduce the hypercall xc_reserved_device_memory_map
approach to libxc. This helps us get rdm entry info according to
different parameters. If flag == PCI_DEV_RDM_ALL, all entries
should be exposed. Or we just expose that rdm entry specific to
a SBDF.
Signed-off-by: Tiejun Chen
7;. When both policies are specified on a given region, 'strict' is
always preferred.
Signed-off-by: Tiejun Chen
---
docs/man/xl.cfg.pod.5| 50
docs/misc/vtd.txt| 24
tools/libxl/libxl_create.c | 13 +++
tools/libxl/libxl_int
This patch passes rdm reservation policy to xc_assign_device() so the policy
is checked when assigning devices to a VM.
Signed-off-by: Tiejun Chen
---
tools/libxc/include/xenctrl.h | 3 ++-
tools/libxc/xc_domain.c | 6 +-
tools/libxl/libxl_pci.c | 3
When allocating mmio address for PCI bars, we need to make
sure they don't overlap with reserved regions.
Signed-off-by: Tiejun Chen
---
tools/firmware/hvmloader/pci.c | 36 ++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/tools/fir
Now we can use that memory map to build our final
e820 table but it may need to reorder all e820
entries.
Signed-off-by: Tiejun Chen
---
tools/firmware/hvmloader/e820.c | 62 +++--
1 file changed, 48 insertions(+), 14 deletions(-)
diff --git a/tools/firmware
rict' is always preferred.
"relaxed" policy issue a warning message and also mask this entry
INVALID
to indicate we shouldn't expose this entry to hvmloader.
Note this predefined boundary can be changes with the parameter
"rdm_mem_boundary" in .cfg file.
This patch passes our rdm reservation policy inside libxl
when we assign a device or attach a device.
Signed-off-by: Tiejun Chen
---
docs/man/xl.pod.1 | 7 ++-
tools/libxl/libxl_pci.c | 10 +-
tools/libxl/xl_cmdimpl.c | 23 +++
tools/libxl
Here we'll construct a basic guest e820 table via
XENMEM_set_memory_map. This table includes lowmem, highmem
and RDMs if they exist. And hvmloader would need this info
later.
Signed-off-by: Tiejun Chen
---
tools/libxl/libxl_dom.c | 5 +++
tools/libxl/libxl_internal.h
Before we refine RMRR mechanism, USB RMRR may conflict with guest bios
region so we always ignore USB RMRR. Now this can be gone when we enable
pci_force to check/reserve RMRR.
Signed-off-by: Tiejun Chen
---
xen/drivers/passthrough/vtd/dmar.h | 1 -
xen/drivers/passthrough/vtd/iommu.c | 11
identity mapping in p2m layer, regardless of
whether EPT is shared or not. And we still keep creating VT-d table.
CC: Yang Zhang
CC: Kevin Tian
Signed-off-by: Tiejun Chen
---
v4:
* Instead of intel_iommu_unmap_page(), we should use
guest_physmap_remove_page() to unmap rmrr mapping correctly
figure 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
we'd better collect some good or correct ideas to step next in RFC.
So here I made this as RF
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
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
---
v4:
* We have to re-design
Stabellini
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: Tiejun Chen
Reviewed-by: Kevin Tian
---
v4:
* Nothing is changed.
tools/libxc/include/xenctrl.h | 8
tools/libxc/xc_domain.c | 36
2 files changed, 44 insertions(+)
diff --git a/tools/libxc
DM policy is 'strict', while default global RDM policy
is 'relaxed'. When both policies are specified on a given region, 'strict' is
always preferred.
CC: Ian Jackson
CC: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: Tiejun Chen
---
v4:
* Separa
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
---
v4:
* Rename local variable
en both policies are specified on a given region, 'strict' is
always preferred.
CC: Ian Jackson
CC: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: Tiejun Chen
---
v4:
* No need to define init_val for libxl_rdm_reserve_type
Here we'll construct a basic guest e820 table via
XENMEM_set_memory_map. This table includes lowmem, highmem
and RDMs if they exist. And hvmloader would need this info
later.
CC: Ian Jackson
CC: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: Tiejun Chen
---
v4:
* Use
.
CC: Yang Zhang
CC: Kevin Tian
Signed-off-by: Tiejun Chen
Acked-by: Kevin Tian
---
v4:
* Refine one code comment.
xen/drivers/passthrough/vtd/iommu.c | 32 +---
1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/xen/drivers/passthrough/vtd/iommu.c
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
---
v4:
* Just refine the patch head
Signed-off-by: Tiejun Chen
---
v4:
* Separate this from currenpt patch #14 since this is specific to xc.
tools/libxc/xc_hvm_build_x86.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/libxc/xc_hvm_build_x86.c b/tools/libxc/xc_hvm_build_x86.c
index 003ea06..7343e87 100644
--
as a better helper to clear such a p2m entry.
CC: Tim Deegan
CC: Keir Fraser
CC: Jan Beulich
CC: Andrew Cooper
Signed-off-by: Tiejun Chen
Reviewed-by: Kevin Tian
---
v4:
* Change that orginal condition,
if ( p2mt == p2m_invalid || p2mt == p2m_mmio_dm )
to make sure we catch those
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
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: Tiejun Chen
Reviewed-by: Kevin Tian
---
v4:
* Consistent to use term "RDM".
* Unconditionally set *nr_entries to 0
* Grab to all sutffs to provide a parameter to set our predefined boundary
dynamically to as a separated patch later
tools/
Previously we always fix that predefined boundary as 2G to handle
conflict between memory and rdm, but now this predefined boundar
can be changes with the parameter "rdm_mem_boundary" in .cfg file.
CC: Ian Jackson
CC: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: T
: Tiejun Chen
---
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 | 6 +-
tools/libxl/libxl_pci.c | 3 ++-
tools/ocaml/libs/xc/xenctrl_stubs.c | 18
: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: Tiejun Chen
Reviewed-by: Kevin Tian
---
v4:
* Move some codes related to e820 to that specific file, e820.c.
* Consolidate "printf()+BUG()" and "BUG_ON()"
* Avoid another fixed width type
ng
CC: Kevin Tian
Signed-off-by: Tiejun Chen
---
v4:
* Add code comments to describer why we fix to set a policy flag in some
cases like adding a device to hwdomain, and removing a device from user
domain.
* Avoid using fixed width types for the parameter of set_identity_p2m_entry()
* Fix
This patch passes our rdm reservation policy inside libxl
when we assign a device or attach a device.
CC: Ian Jackson
CC: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: Tiejun Chen
---
v4:
* Fix one typo, s/unkwon/unknown
* In command description, we should use "[
ked-by: Wei Liu
Signed-off-by: Tiejun Chen
---
As we discussed previously, we'd like to sent this separately. For more
detail please see,
http://osdir.com/ml/general/2015-06/msg38370.html
tools/libxc/xc_hvm_build_x86.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/libxc/xc_hvm
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
---
v5:
* Rename that field, is_
: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: Tiejun Chen
Reviewed-by: Kevin Tian
---
v5:
* 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
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: Tiejun Chen
Reviewed-by: Kevin Tian
---
v5:
* A little change to make sure the per-device policy always override the global
policy and correct its associated code comments.
* Fix one typo in the patch head description
* Rename xc_device_get_rdm() with
ng
CC: Kevin Tian
Signed-off-by: Tiejun Chen
---
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 code comments
v4:
* Add code comm
Previously we always fix that predefined boundary as 2G to handle
conflict between memory and rdm, but now this predefined boundar
can be changes with the parameter "rdm_mem_boundary" in .cfg file.
CC: Ian Jackson
CC: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: T
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
: Ian Jackson
CC: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: Tiejun Chen
---
v5:
* Rephrase patch's short log
* Make libxl__domain_construct_e820() hidden
v4:
* Use goto style error handling.
* Instead of NOGC, we shoud use libxl__malloc(gc,XXX) to allocate local e82
CC: Yang Zhang
CC: Kevin Tian
Reviewed-by: Kevin Tian
Reviewed-by: Tim Deegan
Acked-by: George Dunlap
Signed-off-by: Tiejun Chen
---
v5:
* Fold our original patch #2 and #3 as this new
* Introduce a new, clear_identity_p2m_entry, which can wrapper
guest_physmap_remove_page(). And we use
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:
* Nothing is
DM policy is 'strict', while default global RDM policy
is 'relaxed'. When both policies are specified on a given region, 'strict' is
always preferred.
CC: Ian Jackson
CC: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Acked-by: Wei Liu
Signed-off-by: Tiejun Ch
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:
* Nothing is changed.
v4
laxed'. 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 Chen
---
v5:
* Just make sure the per-device plicy always override the global policy,
and so cleanup some associated
.
CC: Yang Zhang
CC: Kevin Tian
Signed-off-by: Tiejun Chen
Acked-by: Kevin Tian
---
v5:
* 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
d 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
we&
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
Stabellini
CC: Ian Campbell
CC: Wei Liu
Reviewed-by: Kevin Tian
Acked-by: Wei Liu
Signed-off-by: Tiejun Chen
---
v5:
* Nothing is changed.
v4:
* Nothing is changed.
tools/libxc/include/xenctrl.h | 8
tools/libxc/xc_domain.c | 36
2 files
Liu
Signed-off-by: Tiejun Chen
---
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 | 9 -
tools/libxl/l
Stabellini
CC: Ian Campbell
CC: Wei Liu
Reviewed-by: Kevin Tian
Acked-by: Wei Liu
Signed-off-by: Tiejun Chen
---
v6:
* Nothing is changed.
v5:
* Nothing is changed.
v4:
* Nothing is changed.
tools/libxc/include/xenctrl.h | 8
tools/libxc/xc_domain.c | 36
- 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
conflict between the per-pci policy and the glo
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
ng
CC: Kevin Tian
Signed-off-by: Tiejun Chen
---
v6:
* 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
DM policy is 'strict', while default global RDM policy
is 'relaxed'. When both policies are specified on a given region, 'strict' is
always preferred.
CC: Ian Jackson
CC: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Acked-by: Wei Liu
Signed-off-by: Tiejun Chen
---
iu
Signed-off-by: Tiejun Chen
---
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
predefined boundary dynamically.
docs/man/xl.cfg.pod.5 | 22 +
CC: Ian Campbell
CC: Wei Liu
Acked-by: Wei Liu
Signed-off-by: Tiejun Chen
Reviewed-by: Kevin Tian
---
v6:
* fix some code stypes
* Refine libxl__xc_device_get_rdm()
v5:
* A little change to make sure the per-device policy always override the global
policy and correct its associated co
.
CC: Yang Zhang
CC: Kevin Tian
Signed-off-by: Tiejun Chen
Acked-by: Kevin Tian
---
v6:
* Nothing is changed.
v5:
* Nothing is changed.
v4:
* Refine one code comment.
xen/drivers/passthrough/vtd/iommu.c | 32 +---
1 file changed, 29 insertions(+), 3 dele
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:
* Nothing is changed
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
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
: 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
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
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
---
v6:
* Nothing is
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
: Stefano Stabellini
CC: Ian Campbell
CC: Wei Liu
Signed-off-by: Tiejun Chen
Reviewed-by: Kevin Tian
---
v6:
* Nothing is changed.
v5:
* Nothing is changed.
v4:
* Move some codes related to e820 to that specific file, e820.c.
* Consolidate "printf()+BUG()" and "BUG_ON()&qu
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
---
v6:
* Nothing is changed.
v5
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
: 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()
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
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
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
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
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
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
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
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
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
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
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
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
.
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
: 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
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
Actually we always return 1 if pci device exists.
Signed-off-by: Tiejun Chen
---
xen/drivers/passthrough/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index 862e20f..6cb6e00 100644
--- a/xen/drivers
This function should better return as bool_t and
remove that pointless comment.
Signed-off-by: Tiejun Chen
---
v2:
* Instead of correcting that comment directly, we make this function
return as bool_t.
xen/drivers/passthrough/pci.c | 7 ++-
xen/drivers/passthrough/vtd/dmar.c | 4
We will create this sort of identity mapping as follows:
If the gfn space is unoccupied, we just set the mapping. If the space
is already occupied by 1:1 mappings, do nothing. Failed for any
other cases.
Signed-off-by: Tiejun Chen
---
xen/arch/x86/mm/p2m.c | 30
in RFC.
So here I made this as RFC to collect your any comments.
Jan Beulich (1):
introduce XENMEM_reserved_device_memory_map
Tiejun Chen (13):
tools: introduce some new parameters to set rdm policy
tools/libxc: Expose new hyp
7;. When both policies are specified on a given region, 'strict' is
always preferred.
Signed-off-by: Tiejun Chen
---
docs/man/xl.cfg.pod.5| 57 +++
docs/misc/vtd.txt| 24
tools/libxl/libxl_create.c | 13 +++
tools/libxl/li
We will introduce the hypercall xc_reserved_device_memory_map
approach to libxc. This helps us get rdm entry info according to
different parameters. If flag == PCI_DEV_RDM_ALL, all entries
should be exposed. Or we just expose that rdm entry specific to
a SBDF.
Signed-off-by: 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.
Signed-off-by: Jan Beulich
Signed-off-by: Tiejun Chen
---
xen/common/compat/memory.c
identity mapping in p2m layer, regardless of
whether EPT is shared or not. And we still keep creating VT-d table.
Signed-off-by: Tiejun Chen
---
xen/arch/x86/mm/p2m.c | 5 +
xen/drivers/passthrough/vtd/iommu.c | 3 +--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a
try' is fine enough since
this is always safe to hwdomain.
Signed-off-by: Tiejun Chen
---
xen/arch/x86/mm/p2m.c | 8 +++-
xen/drivers/passthrough/amd/pci_amd_iommu.c | 3 ++-
xen/drivers/passthrough/arm/smmu.c | 2 +-
xen/drivers/passthrough/device_tree
rict' is always preferred.
"relaxed" policy issue a warning message and also mask this entry
INVALID
to indicate we shouldn't expose this entry to hvmloader.
Note this predefined boundary can be changes with the parameter
"rdm_mem_boundary" in .cfg file.
When allocating mmio address for PCI bars, we need to make
sure they don't overlap with reserved regions.
Signed-off-by: Tiejun Chen
---
tools/firmware/hvmloader/pci.c | 36 ++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/tools/fir
1 - 100 of 222 matches
Mail list logo