This patch set fixes PCI bar allocation when bar overflow occured.
I checked if pmm_alloc facility can be used, but it doesn't suit for
pci bar allocation. So I resulted in new API, pci_region which
encapsulates region allocation and overflow checks.
The first patch introduces pci_region, and the second patch fixes
the overflow case with pci_region.
Isaku Yamahata (2):
pci: introduce pci_region to manage pci io/memory/prefmemory regions.
pciinit: use pci_region functions.
Makefile | 3 +-
src/pci_region.c | 70 +++++++++++++++++++++++++++++++
src/pciinit.c | 122 ++++++++++++++++++++++++++---------------------------
src/util.h | 15 +++++++
4 files changed, 147 insertions(+), 63 deletions(-)
create mode 100644 src/pci_region.c
On 10/11/2010 07:53 PM, Ruben Kerkhof wrote:
> On Mon, Oct 11, 2010 at 18:57, Avi Kivity<avi(a)redhat.com> wrote:
> > On 10/11/2010 06:29 PM, Ruben Kerkhof wrote:
> >>
> >> Hi Avi,
> >>
> >> On Sun, Aug 15, 2010 at 13:00, Avi Kivity<avi(a)redhat.com> wrote:
> >>
> >> > I'm betting 73b48d914f9 is the cause, but let's see the full bisect.
> >>
> >> system_powerdown with FreeBSD 8.1 works on 73b48d914f9.
> >>
> >> I've bisected the issue to commit 76e617c.
> >>
> >> Let me know if I should do some other tests.
> >
> > It works on 73b48d914f9 but fails on 76e617c due to the seabios change.
> >
> > Can you try 76e617c but with SeaBIOS 0.5.0? If that works, keep qemu-kvm on
> > 76e617c but bisect SeaBIOS from 0.5.0 to 0.5.1 to see which commit broke
> > freebsd.
> >
>
> Sure,
>
> 5c99b6c984682ddb1d4543a7e27a1f4ca633e6a6 is the first bad commit
> commit 5c99b6c984682ddb1d4543a7e27a1f4ca633e6a6
> Author: Kevin O'Connor<kevin(a)koconnor.net>
> Date: Wed Dec 30 12:36:22 2009 -0500
>
> Commit compiled dsdt file; misc comment updates.
>
> Commit new dsdt with recent changes.
> Add some misc comments.
> Also, fix uninitialized warning in mptable code.
>
> Regards, Ruben
Gleb, Kevin, any ideas?
(summary: qemu-kvm doesn't acpi shutdown freebsd 8.1 with this commit;
qemu.git does. May be due to interrupt polarity which kvm implements
but qemu does not)
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
Currently if VM is started with multiple disks it is almost impossible to
guess which one of them will be used as boot device especially if there
is a mix of ATA/virtio/SCSI devices. Essentially BIOS decides the order
and without looking into the code you can't tell what the order will
be (and in qemu-kvm if boot=on is used it brings even more havoc). We
should allow fine-grained control of boot order from qemu command line,
or as a minimum control what device will be used for booting.
To do that along with inventing syntax to specify boot order on qemu
command line we need to communicate boot order to seabios via fw_cfg
interface. For that we need to have a way to unambiguously specify a
disk from qemu to seabios. PCI bus address is not enough since not all
devices are PCI (do we care about them?) and since one PCI device may
control more then one disk (ATA slave/master, SCSI LUNs). We can do what
EDD specification does. Describe disk as:
bus type (isa/pci),
address on a bus (16 bit base address for isa, b/s/f for pci)
device type (ATA/SCSI/VIRTIO)
device path (slave/master for ATA, LUN for SCSI, nothing for virtio)
Will it cover all use cased? Any other ideas? Any ideas about qemu
command line syntax? May be somebody whats to implement it? :)
--
Gleb.