Re: [PATCH] slow_map: minor improvements to ROM BAR handling

Michael S. Tsirkin
2009-12-22T15:30:54Z

On Tue, Dec 22, 2009 at 04:24:43PM +0100, Alexander Graf wrote:
> Avi Kivity wrote:
> > On 12/22/2009 05:19 PM, Michael S. Tsirkin wrote:
> >>
> >>> I'm not sure the BIOS is the only one executing ROMs. If it is, then
> >>> I'm
> >>> good with the change.
> >>> Maybe it'd make sense to also add a read only flag so we don't
> >>> accidently try to write to the ROM region with slow_map.
> >>>
> >>> Alex
> >>>
> >> Correct: I think it's made readonly down the road with mprotect,
> >> so attempt to do so will crash qemu :)
> >>
> >
> > Alex, are you happy with this? I'd like to apply it.
>
> I'd like to see the read-only protection in.

Yes, this is a must, I am working on it.

> Apart from that I'm good on checking it in, though I'm only awaiting
> the day someone runs code off such a ROM region ;-).
>
> Alex

Is there a way to trap this and fprintf something?

--
MST