qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/6] i386: acpi: add IVHD device entry for IOAPI


From: Brijesh Singh
Subject: Re: [Qemu-devel] [PATCH 4/6] i386: acpi: add IVHD device entry for IOAPIC
Date: Thu, 13 Sep 2018 17:20:34 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1



On 09/13/2018 01:18 PM, Michael S. Tsirkin wrote:
...>>
0x01 00a0 00 00 0000 48

Byte 0: 0x48 (special device)
Byte 1 & 2: must be zero
Byte 3: 0 (dte setting)
Byte 4: 0 (handle)
Byte 5 & 6: IOAPIC devfn (14:0.0)

Do you mean *bus* devfn? devfn is 0.0.


Sorry my bad, I was meaning to write devid and not devfn.

See, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iommu/amd_iommu_init.c#n2343

/* SB IOAPIC is always on this device in AMD systems */
#define IOAPIC_SB_DEVID         ((0x00 << 8) | PCI_DEVFN(0x14, 0))


Byte 7: 0x1 (IOAPIC) - See Table 97 in spec


Above should go into code comment, along with
first (oldest) version of spec that has this table.
Additionally the number is IMHO more readable as:
        (0x1ull << 56) | (PCI_BUILD_BDF(14, 0) << 40) | 0x48

(assuming I got what it should be).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]