Presumably you'd follow the same regulations regarding actual animals in testing regarding inflicting pain or distress. Usually IRB's weigh whether the scientific results offset the risk of harm and emphasize minimizing pain (doing things under anesthesia, providing analgesia, or not letting animals regain consciousness). The ethical bars you have to clear get higher the "higher" the animal you use.
If you're doing it via simulation, physical pain issues become a lot easier to fix and more over you can probably simulate subsections of the brain rather than the whole thing. You can also limit simulation time to prevent perception of harm, and you can arbitrarily limit negative feedback in the whole simulation (stress hormones, etc).
I would also imagine one should act conservatively to the question of whether you should treat a simulated "thing" humanely.
I wonder at what level of simulation complexity do we have to worry about any pain the simulations may be experiencing?
If you simulate a brain, assuming you do it well enough, you’ll start getting into ethical concerns.