On 08.05.2024 13:23, Roger Pau Monne wrote:
> @@ -1043,7 +1045,7 @@ static inline int p2m_entry_modify(struct p2m_domain
> *p2m, p2m_type_t nt,
> break;
>
> case p2m_map_foreign:
> - if ( !mfn_valid(nfn) )
> + if ( !mfn_valid(nfn) || p2m != p2m_get_hostp2m(p2m->domain) )
> {
> ASSERT_UNREACHABLE();
> return -EINVAL;
> @@ -1068,7 +1070,7 @@ static inline int p2m_entry_modify(struct p2m_domain
> *p2m, p2m_type_t nt,
> break;
>
> case p2m_map_foreign:
> - if ( !mfn_valid(ofn) )
> + if ( !mfn_valid(ofn) || p2m != p2m_get_hostp2m(p2m->domain) )
> {
> ASSERT_UNREACHABLE();
> return -EINVAL;
I wonder whether these two hunks wouldn't more logically be part of patch 1
or 2 (probably not 1, as at that point the assertion isn't quite correct
yet). Then again it may be as (seemingly) unrelated there as it is here.
Thus
Reviewed-by: Jan Beulich <[email protected]>
Jan