Skip to contentSkip to conversation

Mysterious address matching in assigned_dev_pci_read_config

DISCUSSION Jan Kiszka 1 participant 1 message Nov 27, 2010 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Hi,

can anyone explain this code in assigned_dev_pci_read_config?

    ...
    /* vga specific, remove later */
    if (address == 0xFC)
        goto do_log;

    fd = pci_dev->real_device.config_fd;

again:

    ret = pread(fd, &val, len, address);
    if (ret != len) {
        ...
    }

do_log:

    ...

So this skips any read access to address 0xfc and returns 0 for some "vga specific" reasons. But even if it's supposed to work around issues with passing through some VGA adapters, this skipping affects all device types, no?

Unfortunately, this hunk was already part of the very first version, no hints in git.

Jan