  Convection is one of the most important mixing processes in stellar
interiors. Hydrodynamic mass entrainment can bring fresh fuel from neighboring
stable layers into a convection zone, modifying the structure and evolution of
the star. Under some conditions, strong magnetic fields can be sustained by the
action of a turbulent dynamo, adding another layer of complexity and possibly
altering the dynamics in the convection zone and at its boundaries. In this
study, we used our fully compressible Seven-League Hydro code to run detailed
and highly resolved three-dimensional magnetohydrodynamic simulations of
turbulent convection, dynamo amplification, and convective boundary mixing in a
simplified setup whose stratification is similar to that of an oxygen-burning
shell in a star with an initial mass of $25\ M_\odot$. We find that the random
stretching of magnetic field lines by fluid motions in the inertial range of
the turbulent spectrum (i.e., a small-scale dynamo) naturally amplifies the
seed field by several orders of magnitude in a few convective turnover
timescales. During the subsequent saturated regime, the magnetic-to-kinetic
energy ratio inside the convective shell reaches values as high as $0.33$, and
the average magnetic field strength is ${\sim}10^{10}\,\mathrm{G}$. Such strong
fields efficiently suppress shear instabilities, which feed the turbulent
cascade of kinetic energy, on a wide range of spatial scales. The resulting
convective flows are characterized by thread-like structures that extend over a
large fraction of the convective shell. The reduced flow speeds and the
presence of magnetic fields with strengths up to $60\%$ of the equipartition
value at the upper convective boundary diminish the rate of mass entrainment
from the stable layer by ${\approx}\,20\%$ as compared to the purely
hydrodynamic case.
