Skip to contentSkip to conversation

x86: drop a bogus SHARED_M2P() check from Dom0 building code

PATCH In review Jan Beulich 2 participants 6 messages Jun 28, 2021 – Sep 21, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: drop a bogus SHARED_M2P() check from Dom0 building code

If anything, a check covering a wider range of invalid M2P entries ought to be used (e.g. VALID_M2P()). But since everything is fully under Xen's control at this stage, simply remove the BUG_ON().

xen/arch/x86/pv/dom0_build.c +0 -1
@@ -815,7 +815,6 @@ int __init dom0_construct_pv(struct doma
     page_list_for_each ( page, &d->page_list )
     {
         mfn = mfn_x(page_to_mfn(page));
-        BUG_ON(SHARED_M2P(get_gpfn_from_mfn(mfn)));
         if ( get_gpfn_from_mfn(mfn) >= count )
         {
             BUG_ON(compat);
#1 lore raw

Ping: [PATCH] x86: drop a bogus SHARED_M2P() check from Dom0 building code

Quoted 5 lines · Jan Beulich

If anything, a check covering a wider range of invalid M2P entries ought to be used (e.g. VALID_M2P()). But since everything is fully under Xen's control at this stage, simply remove the BUG_ON().

I didn't expect this to be controversial, so may I please ask for an ack (or otherwise)?

Thanks, Jan

Quoted 11 lines
xen/arch/x86/pv/dom0_build.c +0 -1
@@ -815,7 +815,6 @@ int __init dom0_construct_pv(struct doma
     page_list_for_each ( page, &d->page_list )
     {
         mfn = mfn_x(page_to_mfn(page));
-        BUG_ON(SHARED_M2P(get_gpfn_from_mfn(mfn)));
         if ( get_gpfn_from_mfn(mfn) >= count )
         {
             BUG_ON(compat);
#2 lore raw

Ping²: [PATCH] x86: drop a bogus SHARED_M2P() check from Dom0 building code

Quoted 9 lines · Jan Beulich
Quoted 5 lines · Jan Beulich

If anything, a check covering a wider range of invalid M2P entries ought to be used (e.g. VALID_M2P()). But since everything is fully under Xen's control at this stage, simply remove the BUG_ON().

I didn't expect this to be controversial, so may I please ask for an ack (or otherwise)?

To be quite honest, I find it very strange that even simple changes like this one sit un-responded to for months. This isn't the only example ...

Thanks, Jan

Quoted 12 lines
Quoted 11 lines
xen/arch/x86/pv/dom0_build.c +0 -1
@@ -815,7 +815,6 @@ int __init dom0_construct_pv(struct doma
     page_list_for_each ( page, &d->page_list )
     {
         mfn = mfn_x(page_to_mfn(page));
-        BUG_ON(SHARED_M2P(get_gpfn_from_mfn(mfn)));
         if ( get_gpfn_from_mfn(mfn) >= count )
         {
             BUG_ON(compat);
#3 lore raw

Re: Ping²: [PATCH] x86: drop a bogus SHARED_M2P() check from Dom0 building code

Quoted 6 lines · Jan Beulich
Quoted 5 lines · Jan Beulich
Quoted 4 lines · Jan Beulich

If anything, a check covering a wider range of invalid M2P entries ought to be used (e.g. VALID_M2P()). But since everything is fully under Xen's control at this stage, simply remove the BUG_ON().

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

I didn't expect this to be controversial, so may I please ask for an ack (or otherwise)?

To be quite honest, I find it very strange that even simple changes like this one sit un-responded to for months. This isn't the only example ...

Sorry, I'm trying to catch up with reviews, but after being away so long it's hard to figure out what's pending.

Regards, Roger.

#4 lore raw

Re: Ping²: [PATCH] x86: drop a bogus SHARED_M2P() check from Dom0 building code

Quoted 9 lines · Roger Pau Monné
Quoted 8 lines · Jan Beulich
Quoted 7 lines · Jan Beulich
Quoted 5 lines · Jan Beulich

If anything, a check covering a wider range of invalid M2P entries ought to be used (e.g. VALID_M2P()). But since everything is fully under Xen's control at this stage, simply remove the BUG_ON().

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I didn't expect this to be controversial, so may I please ask for an ack (or otherwise)?

To be quite honest, I find it very strange that even simple changes like this one sit un-responded to for months. This isn't the only example ...

Sorry, I'm trying to catch up with reviews, but after being away so long it's hard to figure out what's pending.

Thanks for the ack, and I know you're still catching up. This wasn't primarily targeted at you (for this reason), but it also wouldn't have felt right to not include you in the ping.

Jan

Acked-by on v1 1/1
#5 lore raw
In reply to Jan Beulich

Could you explicitly mention PV somewhere in the subject?

Quoted 3 lines · Jan Beulich

If anything, a check covering a wider range of invalid M2P entries ought to be used (e.g. VALID_M2P()). But since everything is fully under Xen's control at this stage, simply remove the BUG_ON().

AFAICT adding this BUG_ON was a wholesale change to protect against shared frames, but I also cannot ssee an scenario where we can get here with shared frames in the m2p.

Quoted 1 line

Thanks, Roger.