spapr_pci.c (58560ad254fbda71d4daa6622d71683190070ee2) | spapr_pci.c (038adc2f5850e32019bda06c559d0301be436eae) |
---|---|
1/* 2 * QEMU sPAPR PCI host originated from Uninorth PCI host 3 * 4 * Copyright (c) 2011 Alexey Kardashevskiy, IBM Corporation. 5 * Copyright (C) 2011 David Gibson, IBM Corporation. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 1928 unchanged lines hidden (view full) --- 1937 * As MSIMessage:addr is going to be the same and MSIMessage:data 1938 * is going to be a VIRQ number, 4 bytes of the MSI MR will only 1939 * be used. 1940 * 1941 * For KVM we want to ensure that this memory is a full page so that 1942 * our memory slot is of page size granularity. 1943 */ 1944 if (kvm_enabled()) { | 1/* 2 * QEMU sPAPR PCI host originated from Uninorth PCI host 3 * 4 * Copyright (c) 2011 Alexey Kardashevskiy, IBM Corporation. 5 * Copyright (C) 2011 David Gibson, IBM Corporation. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 1928 unchanged lines hidden (view full) --- 1937 * As MSIMessage:addr is going to be the same and MSIMessage:data 1938 * is going to be a VIRQ number, 4 bytes of the MSI MR will only 1939 * be used. 1940 * 1941 * For KVM we want to ensure that this memory is a full page so that 1942 * our memory slot is of page size granularity. 1943 */ 1944 if (kvm_enabled()) { |
1945 msi_window_size = getpagesize(); | 1945 msi_window_size = qemu_real_host_page_size; |
1946 } 1947 1948 memory_region_init_io(&sphb->msiwindow, OBJECT(sphb), &spapr_msi_ops, spapr, 1949 "msi", msi_window_size); 1950 memory_region_add_subregion(&sphb->iommu_root, SPAPR_PCI_MSI_WINDOW, 1951 &sphb->msiwindow); 1952 1953 pci_setup_iommu(bus, spapr_pci_dma_iommu, sphb); --- 539 unchanged lines hidden --- | 1946 } 1947 1948 memory_region_init_io(&sphb->msiwindow, OBJECT(sphb), &spapr_msi_ops, spapr, 1949 "msi", msi_window_size); 1950 memory_region_add_subregion(&sphb->iommu_root, SPAPR_PCI_MSI_WINDOW, 1951 &sphb->msiwindow); 1952 1953 pci_setup_iommu(bus, spapr_pci_dma_iommu, sphb); --- 539 unchanged lines hidden --- |