qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH master/stable-1.0] pci: fix corrupted pci conf i


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH master/stable-1.0] pci: fix corrupted pci conf index register by unaligned write
Date: Sun, 08 Jan 2012 14:53:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/08/2012 02:45 PM, Michael S. Tsirkin wrote:
> On Sun, Jan 08, 2012 at 12:48:05PM +0200, Avi Kivity wrote:
> > On 01/08/2012 12:12 PM, Michael S. Tsirkin wrote:
> > > > >
> > > > > > And the check for unaligned writes is, well, unusual :-)
> > > > 
> > > > What's unusual?
> > > > 
> > > > 
> > > > > This seems to be how memory API behaves ... right, Avi?
> > > > > Maybe this should be documented somewhere.
> > > > 
> > > > Document what?
> > >
> > > That address passed to callbacks is in fact an offset
> > > from start of the region.
> > >
> > 
> > It's documented already (and it's not new - since 8da3ff18097, Dec 2008).
>
> True, memory.h explicitly says:
> @addr is relative to @mr
>
> But now that's mentioned, I have a question:
> we could also specify min access size and disable
> unaligned access in ops.valid structure.
> That would trigger machine checks on access errors
> instead of ignoring them as we do now.
> Anyone knows offhand what does real hardware do?

It depends on the actual hardware.  qemu has some #ifdefs deep down that
control this.

Ultimately this should be local to the bus rather than global; for
example a bus can intercept unaligned writes and invoke some bus
specific behaviour even though the cpu allows those accesses.

-- 
error compiling committee.c: too many arguments to function




reply via email to

[Prev in Thread] Current Thread [Next in Thread]