vdpa: validate device feature provisioning against supported class
authorSi-Wei Liu <si-wei.liu@oracle.com>
Mon, 6 Feb 2023 23:12:02 +0000 (15:12 -0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 21 Feb 2023 00:27:00 +0000 (19:27 -0500)
commitdbb6f1c42ade73f2c1652bf167d48f20f98bb834
tree4998cf6c27b12a8687a12616e2f77786aaefb7fd
parente7d09cd1d4a2a83e91a2d2b1713621a8042dd73c
vdpa: validate device feature provisioning against supported class

Today when device features are explicitly provisioned, the features
user supplied may contain device class specific features that are
not supported by the parent management device. On the other hand,
when parent management device supports more than one class, the
device features to provision may be ambiguous if none of the class
specific attributes is provided at the same time. Validate these
cases and prompt appropriate user errors accordingly.

Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Message-Id: <1675725124-7375-5-git-send-email-si-wei.liu@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/vdpa.c