search for: pci_config_space_size

Displaying 18 results from an estimated 18 matches for "pci_config_space_size".

2009 Jun 05
1
[PATCHv3 03/13] qemu: add routines to manage PCI capabilities
...if (version_id >= 2) + for (i = 0; i < 4; i ++) + s->irq_state[i] = qemu_get_be32(f); + /* Clear wmask and used bits for capabilities. + Must be restored separately, since capabilities can + be placed anywhere in config space. */ + memset(s->used, 0, PCI_CONFIG_SPACE_SIZE); + for (i = PCI_CONFIG_HEADER_SIZE; i < PCI_CONFIG_SPACE_SIZE; ++i) + s->wmask[i] = 0xff; return 0; } @@ -870,3 +877,76 @@ PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name) return (PCIDevice *)dev; } + +static int pci_find_space(PCIDevice *pdev,...
2009 Jun 05
1
[PATCHv3 03/13] qemu: add routines to manage PCI capabilities
...if (version_id >= 2) + for (i = 0; i < 4; i ++) + s->irq_state[i] = qemu_get_be32(f); + /* Clear wmask and used bits for capabilities. + Must be restored separately, since capabilities can + be placed anywhere in config space. */ + memset(s->used, 0, PCI_CONFIG_SPACE_SIZE); + for (i = PCI_CONFIG_HEADER_SIZE; i < PCI_CONFIG_SPACE_SIZE; ++i) + s->wmask[i] = 0xff; return 0; } @@ -870,3 +877,76 @@ PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name) return (PCIDevice *)dev; } + +static int pci_find_space(PCIDevice *pdev,...
2009 May 25
2
[PATCH 03/11] qemu: add routines to manage PCI capabilities
...if (version_id >= 2) + for (i = 0; i < 4; i ++) + s->irq_state[i] = qemu_get_be32(f); + /* Clear mask and used bits for capabilities. + Must be restored separately, since capabilities can + be placed anywhere in config space. */ + memset(s->used, 0, PCI_CONFIG_SPACE_SIZE); + for (i = PCI_CONFIG_HEADER_SIZE; i < PCI_CONFIG_SPACE_SIZE; ++i) + s->mask[i] = 0xff; return 0; } @@ -870,3 +877,76 @@ PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name) return (PCIDevice *)dev; } + +static int pci_find_space(PCIDevice *pdev,...
2009 May 25
2
[PATCH 03/11] qemu: add routines to manage PCI capabilities
...if (version_id >= 2) + for (i = 0; i < 4; i ++) + s->irq_state[i] = qemu_get_be32(f); + /* Clear mask and used bits for capabilities. + Must be restored separately, since capabilities can + be placed anywhere in config space. */ + memset(s->used, 0, PCI_CONFIG_SPACE_SIZE); + for (i = PCI_CONFIG_HEADER_SIZE; i < PCI_CONFIG_SPACE_SIZE; ++i) + s->mask[i] = 0xff; return 0; } @@ -870,3 +877,76 @@ PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name) return (PCIDevice *)dev; } + +static int pci_find_space(PCIDevice *pdev,...
2009 Jun 21
0
[PATCHv6 04/12] qemu/pci: check constant registers on load
...5 +++++ 2 files changed, 30 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 72ca27b..d8fa439 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -136,13 +136,19 @@ void pci_device_save(PCIDevice *s, QEMUFile *f) int pci_device_load(PCIDevice *s, QEMUFile *f) { + uint8_t config[PCI_CONFIG_SPACE_SIZE]; uint32_t version_id; int i; version_id = qemu_get_be32(f); if (version_id > 2) return -EINVAL; - qemu_get_buffer(f, s->config, 256); + qemu_get_buffer(f, config, sizeof config); + for (i = 0; i < sizeof config; ++i) + if ((config[i] ^ s->...
2009 Jun 21
0
[PATCHv6 04/12] qemu/pci: check constant registers on load
...5 +++++ 2 files changed, 30 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 72ca27b..d8fa439 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -136,13 +136,19 @@ void pci_device_save(PCIDevice *s, QEMUFile *f) int pci_device_load(PCIDevice *s, QEMUFile *f) { + uint8_t config[PCI_CONFIG_SPACE_SIZE]; uint32_t version_id; int i; version_id = qemu_get_be32(f); if (version_id > 2) return -EINVAL; - qemu_get_buffer(f, s->config, 256); + qemu_get_buffer(f, config, sizeof config); + for (i = 0; i < sizeof config; ++i) + if ((config[i] ^ s->...
2009 Jun 21
1
[PATCHv6 05/12] qemu/pci: MSI-X support functions
...ce *dev, unsigned vector); + +void msix_reset(PCIDevice *dev); + +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index 558e18f..03b0a70 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -155,6 +155,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_present field. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -186,6 +191,24 @@ struct PCIDevice { /* Current IRQ levels. Used internally by the generic PCI code. */ int irq_state[4]; + +...
2009 Jun 21
1
[PATCHv6 05/12] qemu/pci: MSI-X support functions
...ce *dev, unsigned vector); + +void msix_reset(PCIDevice *dev); + +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index 558e18f..03b0a70 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -155,6 +155,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_present field. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -186,6 +191,24 @@ struct PCIDevice { /* Current IRQ levels. Used internally by the generic PCI code. */ int irq_state[4]; + +...
2009 Jun 02
0
[PATCHv2 05/13] qemu: MSI-X support functions
...+ +void msix_reset(PCIDevice *dev); + +extern int msix_disable; +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index 4e112a3..6da626b 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -156,6 +156,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_supported/cap_present fields. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -189,6 +194,21 @@ struct PCIDevice { /* Capability bits for save/load */ uint32_t cap_supported; uint32_t cap...
2009 Jun 02
0
[PATCHv2 05/13] qemu: MSI-X support functions
...+ +void msix_reset(PCIDevice *dev); + +extern int msix_disable; +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index 4e112a3..6da626b 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -156,6 +156,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_supported/cap_present fields. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -189,6 +194,21 @@ struct PCIDevice { /* Capability bits for save/load */ uint32_t cap_supported; uint32_t cap...
2009 Jun 18
0
[PATCHv5 05/13] qemu: MSI-X support functions
...+ +void msix_reset(PCIDevice *dev); + +extern int msix_disable; +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index b0a8acf..25865d7 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -154,6 +154,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_supported/cap_present fields. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -185,6 +190,21 @@ struct PCIDevice { /* Capability bits for save/load */ uint32_t cap_supported; uint32_t cap...
2009 Jun 18
0
[PATCHv5 05/13] qemu: MSI-X support functions
...+ +void msix_reset(PCIDevice *dev); + +extern int msix_disable; +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index b0a8acf..25865d7 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -154,6 +154,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_supported/cap_present fields. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -185,6 +190,21 @@ struct PCIDevice { /* Capability bits for save/load */ uint32_t cap_supported; uint32_t cap...
2009 Jun 10
0
[PATCHv4 05/13] qemu: MSI-X support functions
...+ +void msix_reset(PCIDevice *dev); + +extern int msix_disable; +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index c603384..a5e7561 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -154,6 +154,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_supported/cap_present fields. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -185,6 +190,21 @@ struct PCIDevice { /* Capability bits for save/load */ uint32_t cap_supported; uint32_t cap...
2009 Jun 10
0
[PATCHv4 05/13] qemu: MSI-X support functions
...+ +void msix_reset(PCIDevice *dev); + +extern int msix_disable; +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index c603384..a5e7561 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -154,6 +154,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_supported/cap_present fields. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -185,6 +190,21 @@ struct PCIDevice { /* Capability bits for save/load */ uint32_t cap_supported; uint32_t cap...
2009 May 25
1
[PATCH 05/11] qemu: MSI-X support functions
...+ +void msix_reset(PCIDevice *dev); + +extern int msix_disable; +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index 4e112a3..6da626b 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -156,6 +156,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_supported/cap_present fields. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -189,6 +194,21 @@ struct PCIDevice { /* Capability bits for save/load */ uint32_t cap_supported; uint32_t cap...
2009 May 25
1
[PATCH 05/11] qemu: MSI-X support functions
...+ +void msix_reset(PCIDevice *dev); + +extern int msix_disable; +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index 4e112a3..6da626b 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -156,6 +156,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_supported/cap_present fields. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -189,6 +194,21 @@ struct PCIDevice { /* Capability bits for save/load */ uint32_t cap_supported; uint32_t cap...
2009 Jun 05
1
[PATCHv3 05/13] qemu: MSI-X support functions
...+ +void msix_reset(PCIDevice *dev); + +extern int msix_disable; +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index 477aa64..98a34ee 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -156,6 +156,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_supported/cap_present fields. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -189,6 +194,21 @@ struct PCIDevice { /* Capability bits for save/load */ uint32_t cap_supported; uint32_t cap...
2009 Jun 05
1
[PATCHv3 05/13] qemu: MSI-X support functions
...+ +void msix_reset(PCIDevice *dev); + +extern int msix_disable; +extern int msix_supported; + +#endif diff --git a/hw/pci.h b/hw/pci.h index 477aa64..98a34ee 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -156,6 +156,11 @@ typedef struct PCIIORegion { /* Size of the standard PCI config space */ #define PCI_CONFIG_SPACE_SIZE 0x100 +/* Bits in cap_supported/cap_present fields. */ +enum { + QEMU_PCI_CAP_MSIX = 0x1, +}; + struct PCIDevice { DeviceState qdev; /* PCI config space */ @@ -189,6 +194,21 @@ struct PCIDevice { /* Capability bits for save/load */ uint32_t cap_supported; uint32_t cap...