|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [v7][PATCH 03/16] xen/passthrough: extend hypercall to support rdm reservation policy
Thanks for this; a few more comments... Thanks for your time.
What about this?
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index 6e23fc6..17a4206 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -1579,7 +1579,7 @@ int iommu_do_pci_domctl(
bus = PCI_BUS(machine_sbdf);
devfn = PCI_DEVFN2(machine_sbdf);
flag = domctl->u.assign_device.flag;
- if ( flag > XEN_DOMCTL_DEV_RDM_RELAXED )
+ if ( flag & ~XEN_DOMCTL_DEV_RDM_MASK )
{
ret = -EINVAL;
break;
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index bca25c9..07549a4 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -480,6 +480,7 @@ struct xen_domctl_assign_device {
} u;
/* IN */
#define XEN_DOMCTL_DEV_RDM_RELAXED 1
+#define XEN_DOMCTL_DEV_RDM_MASK 0x1
uint32_t flag; /* flag of assigned device */
};
typedef struct xen_domctl_assign_device xen_domctl_assign_device_t;
Loos good and thanks. I also said that if we went with anything other than STRICT that we'd need to check to make sure that the domain really was the hardware domain before proceeding, in case the assumption that pdev->domain == hardware_domain ever changed. (Perhaps with an ASSERT -- Jan, what do you think?) Sounds reasonable. Also, passing in RELAXED in locations where the flag is completely ignored (such as when removing mappings) doesn't really make any sense. On the whole I think it would be better if you removed the RELAXED flag for both removals and for hardware domains. Just as I said in another email I agreed your STRICT way. Thanks Tiejun _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |