From: Jan Beulich Date: Fri, 21 Feb 2020 16:16:25 +0000 (+0100) Subject: x86/p2m: p2m_flags_to_type() deals only with "unsigned int" X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~648 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a446a330117998a655e76c2e05ea46c01d365516;p=xen.git x86/p2m: p2m_flags_to_type() deals only with "unsigned int" PTE flags, for now at least, get stored in "unsigned int". Hence there's no need to widen the values to "unsigned long" before processing them. Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Acked-by: Andrew Cooper --- diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h index cca6a1a223..517974be54 100644 --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -796,7 +796,7 @@ extern void audit_p2m(struct domain *d, */ /* Extract the type from the PTE flags that store it */ -static inline p2m_type_t p2m_flags_to_type(unsigned long flags) +static inline p2m_type_t p2m_flags_to_type(unsigned int flags) { /* For AMD IOMMUs we need to use type 0 for plain RAM, but we need * to make sure that an entirely empty PTE doesn't have RAM type */