mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
msix: Move msix_mmio_read
What's this doing so far from msix_mmio_ops? Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
b2357c484d
commit
eebcb0a76a
1 changed files with 10 additions and 10 deletions
20
hw/msix.c
20
hw/msix.c
|
@ -86,16 +86,6 @@ static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t msix_mmio_read(void *opaque, target_phys_addr_t addr,
|
|
||||||
unsigned size)
|
|
||||||
{
|
|
||||||
PCIDevice *dev = opaque;
|
|
||||||
unsigned int offset = addr & (MSIX_PAGE_SIZE - 1) & ~0x3;
|
|
||||||
void *page = dev->msix_table_page;
|
|
||||||
|
|
||||||
return pci_get_long(page + offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint8_t msix_pending_mask(int vector)
|
static uint8_t msix_pending_mask(int vector)
|
||||||
{
|
{
|
||||||
return 1 << (vector % 8);
|
return 1 << (vector % 8);
|
||||||
|
@ -203,6 +193,16 @@ void msix_write_config(PCIDevice *dev, uint32_t addr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uint64_t msix_mmio_read(void *opaque, target_phys_addr_t addr,
|
||||||
|
unsigned size)
|
||||||
|
{
|
||||||
|
PCIDevice *dev = opaque;
|
||||||
|
unsigned int offset = addr & (MSIX_PAGE_SIZE - 1) & ~0x3;
|
||||||
|
void *page = dev->msix_table_page;
|
||||||
|
|
||||||
|
return pci_get_long(page + offset);
|
||||||
|
}
|
||||||
|
|
||||||
static void msix_mmio_write(void *opaque, target_phys_addr_t addr,
|
static void msix_mmio_write(void *opaque, target_phys_addr_t addr,
|
||||||
uint64_t val, unsigned size)
|
uint64_t val, unsigned size)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue