[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v3 02/16] x86/altp2m: check if altp2m active when giving away p2midx
On 03.06.2024 13:09, Sergiy Kibrik wrote: > @@ -38,9 +34,13 @@ static inline bool altp2m_active(const struct domain *d) > } > > /* Only declaration is needed. DCE will optimise it out when linking. */ > -uint16_t altp2m_vcpu_idx(const struct vcpu *v); > void altp2m_vcpu_disable_ve(struct vcpu *v); > > #endif > > +static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v) > +{ > + return altp2m_active(v->domain) ? vcpu_altp2m(v).p2midx : 0; > +} While perhaps okay this way as a first step, my general expectation would be that with ALTP2M=n there also wouldn't be any p2midx field in the respective struct. Which in turn will mean that this code would need re-doing again, and perhaps again splitting between an inline one and a decl-only one. With that I wonder whether that split wouldn't better be retained right away. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |