amd iommu: Add a hypercall for hvmloader
PATCH v4 1/1 amd iommu: Add a hypercall for hvmloader
In reply to a message not in the archive# HG changeset patch
# User Wei Wang <[email protected]>
# Date 1327066823 -3600
# Node ID c5cd29b41f2526bb4f93c76ceade924feac1f1c3 # Parent ea3af8fa078c07d357de79931a102450b59156ea amd iommu: Add a hypercall for hvmloader.
IOMMU MMIO base address is dynamically allocated by firmware. This patch allows hvmloader to notify hypervisor where the iommu mmio pages are.
Signed-off-by Wei Wang <[email protected]>
xen/arch/x86/hvm/hvm.c +4 -0
@@ -65,6 +65,7 @@#include <public/memory.h> #include <asm/mem_event.h> #include <public/mem_event.h> +#include <asm/hvm/svm/amd-iommu-proto.h> bool_t __read_mostly hvm_enabled;
@@ -3673,6 +3674,9 @@ long do_hvm_op(unsigned long op, XEN_GUEcase HVM_PARAM_BUFIOREQ_EVTCHN : rc = -EINVAL ;break ; +case HVM_PARAM_IOMMU_BASE : + rc =guest_iommu_set_base (d, a.value); +break ; }if ( rc ==0 )
xen/include/public/hvm/params.h +2 -1
@@ -141,7 +141,8 @@/* Boolean: Enable nestedhvm (hvm only) */ #define HVM_PARAM_NESTEDHVM 24 +#define HVM_PARAM_IOMMU_BASE 27 -#define HVM_NR_PARAMS 27 +#define HVM_NR_PARAMS 28#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
_______________________________________________
osrc-patches mailing list
[email protected]
https://elbe.amd.com/mailman/listinfo/osrc-patches