VT-d: tidy domid map handling
authorJan Beulich <jbeulich@suse.com>
Fri, 3 Dec 2021 10:33:43 +0000 (11:33 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Dec 2021 10:33:43 +0000 (11:33 +0100)
commitbbcea43d830bdc85bf5a6c1b6b8041bd2b607454
tree1012cf878a841915a1e95300bc9b69e4ff1c5a22
parent75a16d4c5f16c611687a4460dfae23909588f3fa
VT-d: tidy domid map handling

- Correct struct field type.
- Use unsigned int when that suffices.
- Eliminate a (badly typed) local variable from
  context_set_domain_id().
- Don't use -EFAULT inappropriately.
- Move set_bit() such that it won't be done redundantly.
- Constification.
- Reduce scope of some variables.
- Coding style.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/iommu.h