if ( !first_map )
{
/* Remove old mapping */
- ret = xc_domain_memory_mapping(xc_handle, domid, old_ebase >> 12,
- assigned_device->bases[i].access.maddr >> 12,
- (e_size+0xFFF) >> 12,
+ ret = xc_domain_memory_mapping(xc_handle, domid,
+ old_ebase >> PAGE_SHIFT,
+ assigned_device->bases[i].access.maddr >> PAGE_SHIFT,
+ (e_size+PAGE_MASK) >> PAGE_SHIFT,
DPCI_REMOVE_MAPPING);
if ( ret != 0 )
{
/* Create new mapping */
ret = xc_domain_memory_mapping(xc_handle, domid,
- assigned_device->bases[i].e_physbase >> 12,
- assigned_device->bases[i].access.maddr >> 12,
- (e_size+0xFFF) >> 12,
+ assigned_device->bases[i].e_physbase >> PAGE_SHIFT,
+ assigned_device->bases[i].access.maddr >> PAGE_SHIFT,
+ (e_size+PAGE_MASK) >> PAGE_SHIFT,
DPCI_ADD_MAPPING);
if ( ret != 0 )
PT_LOG("Error: create new mapping failed!\n");
/* Misc PCI constants that should be moved to a separate library :) */
#define PCI_CONFIG_SIZE (256)
#define PCI_EXP_DEVCAP_FLR (1 << 28)
-#define PCI_EXP_DEVCTL_FLR (0x1b)
+#define PCI_EXP_DEVCTL_FLR (1 << 15)
#define PCI_BAR_ENTRIES (6)
struct pt_region {