  The magnetorotational instability (MRI) can be a powerful mechanism
amplifying the magnetic field in core-collapse supernovae. Whether initially
weak magnetic fields can be amplified by this instability to dynamically
relevant strengths is still a matter of debate. One of the main uncertainties
concerns the process that terminates the growth of the instability. Parasitic
instabilities of both Kelvin-Helmholtz and tearing-mode type have been
suggested to play a crucial role in this process, disrupting MRI channel flows
and quenching magnetic field amplification. We perform two-dimensional and
three-dimensional sheering-disc simulations of a differentially rotating
protoneutron star layer in non-ideal magnetohydrodynamics with unprecedented
high numerical accuracy, finding that Kelvin-Helmholtz parasitic modes dominate
tearing modes in the regime of large hydrodynamic and magnetic Reynolds
numbers, as encountered close to the surface of protoneutron stars. They also
determine the maximum magnetic field stress achievable during the exponential
growth of the MRI. Our results are consistent with the theory of parasitic
instabilities based on a local stability analysis. To simulate the
Kelvin-Helmholtz instabilities properly, a very high numerical resolution is
necessary. Using ninth-order spatial reconstruction schemes, we find that at
least eight grid zones per MRI channel are necessary to simulate the growth
phase of the MRI and reach an accuracy of ~10 per cent in the growth rate,
while more than ~60 zones per channel are required to achieve convergent
results for the value of the magnetic stress at MRI termination.
