All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/PV: account for 32-bit Dom0 in mark_pv_pt_pages_rdonly()'s ASSERT()s
@ 2021-08-20  6:22 Jan Beulich
  2021-08-20  9:13 ` Andrew Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2021-08-20  6:22 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu, Roger Pau Monné

Clearly I neglected the special needs here, and also failed to test the
change with a debug build of Xen.

Fixes: 6b1ca51b1a91 ("x86/PV: assert page state in mark_pv_pt_pages_rdonly()")
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -67,7 +67,7 @@ static __init void mark_pv_pt_pages_rdon
          */
         ASSERT((page->u.inuse.type_info & PGT_type_mask) >= PGT_l1_page_table);
         ASSERT((page->u.inuse.type_info & PGT_type_mask) <= PGT_root_page_table);
-        ASSERT(!(page->u.inuse.type_info & ~PGT_type_mask));
+        ASSERT(!(page->u.inuse.type_info & ~(PGT_type_mask | PGT_pae_xen_l2)));
 
         /* Read-only mapping + PGC_allocated + page-table page. */
         page->count_info         = PGC_allocated | 3;



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/PV: account for 32-bit Dom0 in mark_pv_pt_pages_rdonly()'s ASSERT()s
  2021-08-20  6:22 [PATCH] x86/PV: account for 32-bit Dom0 in mark_pv_pt_pages_rdonly()'s ASSERT()s Jan Beulich
@ 2021-08-20  9:13 ` Andrew Cooper
  2021-08-20  9:30   ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cooper @ 2021-08-20  9:13 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Wei Liu, Roger Pau Monné

On 20/08/2021 07:22, Jan Beulich wrote:
> Clearly I neglected the special needs here, and also failed to test the
> change with a debug build of Xen.
>
> Fixes: 6b1ca51b1a91 ("x86/PV: assert page state in mark_pv_pt_pages_rdonly()")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/xen/arch/x86/pv/dom0_build.c
> +++ b/xen/arch/x86/pv/dom0_build.c
> @@ -67,7 +67,7 @@ static __init void mark_pv_pt_pages_rdon
>           */

^ this comment needs adjusting too.

Presumably this is because PGT_pae_xen_l2 is logically part of the type?

~Andrew

>          ASSERT((page->u.inuse.type_info & PGT_type_mask) >= PGT_l1_page_table);
>          ASSERT((page->u.inuse.type_info & PGT_type_mask) <= PGT_root_page_table);
> -        ASSERT(!(page->u.inuse.type_info & ~PGT_type_mask));
> +        ASSERT(!(page->u.inuse.type_info & ~(PGT_type_mask | PGT_pae_xen_l2)));
>  
>          /* Read-only mapping + PGC_allocated + page-table page. */
>          page->count_info         = PGC_allocated | 3;
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/PV: account for 32-bit Dom0 in mark_pv_pt_pages_rdonly()'s ASSERT()s
  2021-08-20  9:13 ` Andrew Cooper
@ 2021-08-20  9:30   ` Jan Beulich
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2021-08-20  9:30 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Wei Liu, Roger Pau Monné, xen-devel

On 20.08.2021 11:13, Andrew Cooper wrote:
> On 20/08/2021 07:22, Jan Beulich wrote:
>> Clearly I neglected the special needs here, and also failed to test the
>> change with a debug build of Xen.
>>
>> Fixes: 6b1ca51b1a91 ("x86/PV: assert page state in mark_pv_pt_pages_rdonly()")
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> --- a/xen/arch/x86/pv/dom0_build.c
>> +++ b/xen/arch/x86/pv/dom0_build.c
>> @@ -67,7 +67,7 @@ static __init void mark_pv_pt_pages_rdon
>>           */
> 
> ^ this comment needs adjusting too.

I didn't precisely because ...

> Presumably this is because PGT_pae_xen_l2 is logically part of the type?

... I would have viewed it this way. But I'll send v2 in a minute.

Jan



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-20  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20  6:22 [PATCH] x86/PV: account for 32-bit Dom0 in mark_pv_pt_pages_rdonly()'s ASSERT()s Jan Beulich
2021-08-20  9:13 ` Andrew Cooper
2021-08-20  9:30   ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.