kvm, pci: Return "no device" by default

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov
2015-06-01 16:39:40 +01:00
committed by Will Deacon
parent 4402a5812a
commit 4c797ebc31
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -9,6 +9,8 @@
#define PCI_CONFIG_ADDRESS 0xcf8
#define PCI_CONFIG_DATA 0xcfc
#define PCI_NO_DEVICE 0xffffffff
struct pci_config_address {
unsigned zeros : 2; /* 1 .. 0 */
unsigned register_number : 6; /* 7 .. 2 */
+4
View File
@@ -36,6 +36,10 @@ static bool pci_config_data_out(struct kvm *self, uint16_t port, void *data, int
static bool pci_config_data_in(struct kvm *self, uint16_t port, void *data, int size, uint32_t count)
{
uint32_t *value = data;
*value = PCI_NO_DEVICE;
return true;
}