kvm: qemu: fix pci_enable_capabilities to set the CAP feature in pci::statusmasterpending
commit84474e4f393700bbe26b2618d50b295afc1ef5ad
authorGregory Haskins <ghaskins@novell.com>
Mon, 20 Apr 2009 15:20:57 +0000 (20 11:20 -0400)
committerAvi Kivity <avi@redhat.com>
Tue, 21 Apr 2009 14:53:10 +0000 (21 17:53 +0300)
tree65548dbd2869ab975751296296cf217ceba7ded6
parent1008a93d282adc2bbcd2069d1060c44d4a0cd63f
kvm: qemu: fix pci_enable_capabilities to set the CAP feature in pci::status

The PCI spec requires bit 4 of the config-space STATUS register to be set
in order to indicate that the capabilities pointer and capabilities area are
valid.  We have a pci_enable_capabilities() routine to fill out the
config-space metadata, but we leave the status bit cleared. It is not
apparent if this was intentionally omitted as part of the related
device-assignment support, or simply an oversight.  This patch completes
the function by also setting the status bit appropriately.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
CC: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
qemu/hw/pci.c