From 4c797ebc31e1ac6ebe13807c293f4e0c747953e1 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Sat, 31 Jul 2010 20:04:24 +0400 Subject: [PATCH] kvm, pci: Return "no device" by default Signed-off-by: Cyrill Gorcunov --- include/kvm/pci.h | 2 ++ pci.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/include/kvm/pci.h b/include/kvm/pci.h index 34d408e..e9e6859 100644 --- a/include/kvm/pci.h +++ b/include/kvm/pci.h @@ -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 */ diff --git a/pci.c b/pci.c index cbcf864..57d3452 100644 --- a/pci.c +++ b/pci.c @@ -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; }