diff mbox series

x86/p2m: p2m_flags_to_type() deals only with "unsigned int"

Message ID ed08a701-01bd-4cae-0b7f-4872c805470e@suse.com (mailing list archive)
State New, archived
Headers show
Series x86/p2m: p2m_flags_to_type() deals only with "unsigned int" | expand

Commit Message

Jan Beulich Feb. 6, 2020, 3:19 p.m. UTC
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 <jbeulich@suse.com>

Comments

Roger Pau Monne Feb. 6, 2020, 3:53 p.m. UTC | #1
On Thu, Feb 06, 2020 at 04:19:14PM +0100, Jan Beulich wrote:
> 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 <jbeulich@suse.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks.
Andrew Cooper Feb. 21, 2020, 2:06 p.m. UTC | #2
On 06/02/2020 15:19, Jan Beulich wrote:
> 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 <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox series

Patch

--- 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 */