misc: fix two IOAPIC related configs

For Service VM, the I/O APIC number and RTE number are from platform.
Otherwise, hypervisor emulates one I/O APIC and 48 RTEs. But
'MAX_IOAPIC_NUM' is always 1 and 'MAX_IOAPIC_LINES' is always 120 for
now.

This patch is introduced to fix these issues.

Tracked-On: #8725
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Suggested-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
This commit is contained in:
Haiwei Li 2024-09-05 10:06:41 +08:00 committed by acrnsi-robot
parent 7d15cc5255
commit fcffdf8dbd
2 changed files with 4 additions and 4 deletions

View File

@ -216,7 +216,7 @@ If your VM is not a security VM, leave this option unchecked. </xs:documentation
<xs:documentation>Maximum number of User VMs allowed.</xs:documentation> <xs:documentation>Maximum number of User VMs allowed.</xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:element name="MAX_IOAPIC_NUM" default="1"> <xs:element name="MAX_IOAPIC_NUM" minOccurs="0">
<xs:annotation acrn:views=""> <xs:annotation acrn:views="">
<xs:documentation>Maximum number of IOAPICs.</xs:documentation> <xs:documentation>Maximum number of IOAPICs.</xs:documentation>
</xs:annotation> </xs:annotation>
@ -250,7 +250,7 @@ If your VM is not a security VM, leave this option unchecked. </xs:documentation
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="MAX_IOAPIC_LINES" default="120"> <xs:element name="MAX_IOAPIC_LINES" minOccurs="0">
<xs:annotation acrn:views=""> <xs:annotation acrn:views="">
<xs:documentation>Maximum number of interrupt lines per IOAPIC.</xs:documentation> <xs:documentation>Maximum number of interrupt lines per IOAPIC.</xs:documentation>
</xs:annotation> </xs:annotation>

View File

@ -18,12 +18,12 @@
<xsl:call-template name="integer-by-key-value"> <xsl:call-template name="integer-by-key-value">
<xsl:with-param name="key" select="'MAX_IOAPIC_NUM'" /> <xsl:with-param name="key" select="'MAX_IOAPIC_NUM'" />
<xsl:with-param name="value" select="//config-data//MAX_IOAPIC_NUM/text()" /> <xsl:with-param name="value" select="//config-data//MAX_IOAPIC_NUM/text()" />
<xsl:with-param name="default" select="count(.//ioapic)" /> <xsl:with-param name="default" select="acrn:max(1, count(.//ioapic))" />
</xsl:call-template> </xsl:call-template>
<xsl:call-template name="integer-by-key-value"> <xsl:call-template name="integer-by-key-value">
<xsl:with-param name="key" select="'MAX_IOAPIC_LINES'" /> <xsl:with-param name="key" select="'MAX_IOAPIC_LINES'" />
<xsl:with-param name="value" select="//config-data//MAX_IOAPIC_LINES/text()" /> <xsl:with-param name="value" select="//config-data//MAX_IOAPIC_LINES/text()" />
<xsl:with-param name="default" select="math:max(.//ioapic/gsi_number/text() | exslt:node-set(0))" /> <xsl:with-param name="default" select="math:max(.//ioapic/gsi_number/text() | exslt:node-set(48))" />
</xsl:call-template> </xsl:call-template>
<xsl:call-template name="msi-msix-max" /> <xsl:call-template name="msi-msix-max" />
</xsl:template> </xsl:template>