qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] pci: use pci_config_header in pci.c


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 4/4] pci: use pci_config_header in pci.c
Date: Thu, 02 Oct 2008 09:56:03 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Anthony Liguori wrote:
> Because the config structure is loaded after pci_register device and
> because the MMIO callbacks into the config space?  If you look at
> pci_default_read_config(), it actually does conversion from le to host
> CPU because that's what MMIO callbacks expect.

Yep.

> If you simply removed
> this, it would work.

Ah, *now* I see what you mean.

Well.  That assumes the guests always use the correct in{b,w,l}
instruction to access the config space values, i.e. never ever try to
use two inb reads for a 16bit value for example.  Or a inw for the lower
16 bits of a 32bit value because they know the high bits are zero anyway.

I have my doubts that this is a sane expectation.

> Of course, you'll have to audit each caller of
> pci_register_device() and make sure their config's get changed too.

Sure, that would be a *big* task & patch.

cheers,
  Gerd






reply via email to

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