hv: more cleanup for pci.h

Don't have any logical changes.
- add more common PCI macros
- remove redundant definitions in dmar_parse.c
- move all the common mascos from vpci.h to pci.h

Tracked-On: #1568
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Zide Chen
2018-10-23 10:05:06 -07:00
committed by lijinxia
parent e24899d9c9
commit bc4f82d1d1
4 changed files with 105 additions and 39 deletions

View File

@@ -30,8 +30,7 @@
#ifndef VPCI_H_
#define VPCI_H_
#define PCI_BAR_COUNT 0x6U
#define PCI_REGMAX 0xFFU
#include <pci.h>
struct pci_vdev;
struct pci_vdev_ops {
@@ -46,22 +45,6 @@ struct pci_vdev_ops {
uint32_t bytes, uint32_t *val);
};
union pci_bdf {
uint16_t value;
struct {
uint8_t f : 3; /* BITs 0-2 */
uint8_t d : 5; /* BITs 3-7 */
uint8_t b; /* BITs 8-15 */
} bits;
};
enum pci_bar_type {
PCIBAR_NONE = 0,
PCIBAR_MEM32,
PCIBAR_MEM64,
};
struct pci_bar {
uint64_t base;
uint64_t size;