diff mbox

[V1,3/4] hw/acpi: report IOAPIC on IVRS

Message ID 1470858179-27754-4-git-send-email-davidkiarie4@gmail.com
State New
Headers show

Commit Message

David Kiarie Aug. 10, 2016, 7:42 p.m. UTC
Report IOAPIC via IVRS which effectively allows linux AMD-Vi
driver to enable interrupt remapping

Signed-off-by: David Kiarie <davidkiarie4@gmail.com>
---
 hw/i386/acpi-build.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Valentine Sinitsyn Aug. 12, 2016, 8:14 p.m. UTC | #1
On 11.08.2016 00:42, David Kiarie wrote:
> Report IOAPIC via IVRS which effectively allows linux AMD-Vi
> driver to enable interrupt remapping
>
> Signed-off-by: David Kiarie <davidkiarie4@gmail.com>
> ---
>  hw/i386/acpi-build.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 49bd183..da602c3 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -2615,6 +2615,8 @@ build_amd_iommu(GArray *table_data, BIOSLinker *linker)
>       *   Refer to Spec - Table 95:IVHD Device Entry Type Codes(4-byte)
>       */
>      build_append_int_noprefix(table_data, 0x0000001, 4);
> +    /* IOAPIC represented as an 8-byte entry. Spec v2.62 Tables 97 */
> +    build_append_int_noprefix(table_data, 0x0100a000ff000048, 8);
Nit: bit 3 in DTE Setting is reserved (Table 97 in the spec), while you 
set them all with 0xff.

>
>      build_header(linker, table_data, (void *)(table_data->data + iommu_start),
>                   "IVRS", table_data->len - iommu_start, 1, NULL, NULL);
>

Valentine
David Kiarie Aug. 12, 2016, 8:23 p.m. UTC | #2
On Fri, Aug 12, 2016 at 11:14 PM, Valentine Sinitsyn <
valentine.sinitsyn@gmail.com> wrote:

> On 11.08.2016 00:42, David Kiarie wrote:
>
>> Report IOAPIC via IVRS which effectively allows linux AMD-Vi
>> driver to enable interrupt remapping
>>
>> Signed-off-by: David Kiarie <davidkiarie4@gmail.com>
>> ---
>>  hw/i386/acpi-build.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
>> index 49bd183..da602c3 100644
>> --- a/hw/i386/acpi-build.c
>> +++ b/hw/i386/acpi-build.c
>> @@ -2615,6 +2615,8 @@ build_amd_iommu(GArray *table_data, BIOSLinker
>> *linker)
>>       *   Refer to Spec - Table 95:IVHD Device Entry Type Codes(4-byte)
>>       */
>>      build_append_int_noprefix(table_data, 0x0000001, 4);
>> +    /* IOAPIC represented as an 8-byte entry. Spec v2.62 Tables 97 */
>> +    build_append_int_noprefix(table_data, 0x0100a000ff000048, 8);
>>
> Nit: bit 3 in DTE Setting is reserved (Table 97 in the spec), while you
> set them all with 0xff.


Noted, thanks!


>
>
>
>>      build_header(linker, table_data, (void *)(table_data->data +
>> iommu_start),
>>                   "IVRS", table_data->len - iommu_start, 1, NULL, NULL);
>>
>>
> Valentine
>
>
diff mbox

Patch

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 49bd183..da602c3 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2615,6 +2615,8 @@  build_amd_iommu(GArray *table_data, BIOSLinker *linker)
      *   Refer to Spec - Table 95:IVHD Device Entry Type Codes(4-byte)
      */
     build_append_int_noprefix(table_data, 0x0000001, 4);
+    /* IOAPIC represented as an 8-byte entry. Spec v2.62 Tables 97 */
+    build_append_int_noprefix(table_data, 0x0100a000ff000048, 8);
 
     build_header(linker, table_data, (void *)(table_data->data + iommu_start),
                  "IVRS", table_data->len - iommu_start, 1, NULL, NULL);