mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/domain: check IOMMU options doesn't contain unknown bits set
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 59b27f360e
master date: 2020-10-02 08:38:50 +0200
This commit is contained in:
1 parent
8d148003fd
commit
829dbe2cfb
1 file changed
+6
@@ -310,6 +310,12 @@ static int sanitise_domain_config(struct xen_domctl_createdomain *config)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ( config->iommu_opts & ~XEN_DOMCTL_IOMMU_no_sharept )
|
||||
{
|
||||
dprintk(XENLOG_INFO, "Unknown IOMMU options %#x\n", config->iommu_opts);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ( !(config->flags & XEN_DOMCTL_CDF_iommu) && config->iommu_opts )
|
||||
{
|
||||
dprintk(XENLOG_INFO,
|
||||
|
||||