mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-03-18 19:14:53 +00:00
Today users are able to tweak whether the hypervisor includes support to software SRAM (SSRAM). This, however, gives rise to potential functional incorrectness when the hypervisor is not built with such support but a service VM attempts to assign SSRAM to a post-launched VM (which is possible as the service VM can still see the SSRAM-related ACPI tables). In such cases the SSRAM assigned to a post-launched VM is not properly initialized and thus not locked in cache. As makes little sense for a user to configure the SSRAM support in the hypervisor in a different way as the presence of SSRAM on hardware, this patch removes the "SSRAM support" option from the configurator. The config tools will now automatically enable the SSRAM support if the hardware supports the feature and disable that otherwise. Tracked-On: #8231 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
68 lines
4.1 KiB
XML
68 lines
4.1 KiB
XML
<?xml version="1.0"?>
|
|
<xs:schema xml:id="root"
|
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
xmlns:acrn="https://projectacrn.org">
|
|
|
|
<xs:assert test="if (//VCAT_ENABLED = 'y')
|
|
then (//CDP_ENABLED = 'n' and //RDT_ENABLED = 'y')
|
|
else true()">
|
|
<xs:annotation acrn:severity="error" acrn:report-on="//CDP_ENABLED">
|
|
<xs:documentation>Hypervisor Virtual Cache Allocation Technology may be enabled only when hypervisor Code and Data Prioritization is disabled.</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:assert>
|
|
|
|
<xs:assert test="if (//RDT_ENABLED = 'y' and //CDP_ENABLED = 'y')
|
|
then (count(//capability[./@id = 'CDP']) = count(//cache[./@level = '2' or ./@level = '3']))
|
|
else true()">
|
|
<xs:annotation acrn:severity="error" acrn:report-on="//CDP_ENABLED">
|
|
<xs:documentation>Code and Data Prioritization can only be opened when all L2 and L3 cache region has 'CDP' capability.</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:assert>
|
|
|
|
<xs:assert test="if (count(//virtual_cat_support[text() = 'y']) > 0)
|
|
then (//RDT_ENABLED = 'y' and //VCAT_ENABLED = 'y')
|
|
else true()">
|
|
<xs:annotation acrn:severity="error" acrn:report-on="//VCAT_ENABLED">
|
|
<xs:documentation>VM Virtual Cache Allocation Technology may be enabled only when hypervisor Virtual Cache Allocation Technology is enabled.</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:assert>
|
|
|
|
<xs:assert test="every $vm in //vm satisfies $vm//load_order != 'SERVICE_VM' or count($vm//lapic_passthrough[text() = 'y']) = 0 or count(//nested_virtualization_support[text() = 'y']) > 0">
|
|
<xs:annotation acrn:severity="error" acrn:report-on="$vm//lapic_passthrough">
|
|
<xs:documentation>The Service VM may not use LAPIC passthrough unless hypervisor Nested Virtualization is enabled.</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:assert>
|
|
|
|
<xs:assert test="empty(vm[load_order ='PRE_LAUNCHED_VM' and vm_type='RTVM']) or
|
|
every $cap in caches/cache[@level=3]/capability[@id='Software SRAM'] satisfies
|
|
(compare($cap/end, '0x80000000') < 0 or compare($cap/start, '0xf8000000') >= 0)">
|
|
<xs:annotation acrn:severity="warning" acrn:report-on="hv//SSRAM_ENABLED">
|
|
<xs:documentation>The physical software SRAM region may not overlap with pre-defined regions in any VM.
|
|
|
|
When a pre-launched RTVM is enabled, the physical software SRAM is allocated to it at the same guest physical
|
|
address. Thus it is assumed that the software SRAM region does not overlap with any pre-defined region in the
|
|
pre-launched VM, such as the guest PCI hole which resides at 2GB - 3.5GB.
|
|
|
|
This error cannot be fixed by adjusting the configuration. Report a `GitHub issue <https://github.com/projectacrn/acrn-hypervisor/issues>`_ if you receive this error.</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:assert>
|
|
|
|
<xs:assert test="every $needed in number-of-clos-id-needed(/acrn-config) satisfies
|
|
every $capacity in min(//caches/cache/capability[@id='CAT']/clos_number) satisfies
|
|
$needed < $capacity">
|
|
<xs:annotation acrn:severity="error" acrn:report-on="/acrn-config/hv/CACHE_REGION">
|
|
<xs:documentation>The current CAT configuration requires {string($needed)} CLOS IDs, which exceeds the capacity of the platform which supports {string($capacity)} at most.</xs:documentation>
|
|
</xs:annotation>
|
|
</xs:assert>
|
|
|
|
<xs:assert test="every $cache in //CACHE_ALLOCATION satisfies
|
|
every $ssram in //caches/cache[@level=$cache/CACHE_LEVEL and @id=$cache/CACHE_ID]/capability[@id='Software SRAM'] satisfies
|
|
every $policy in $cache/POLICY satisfies
|
|
bitwise-and($policy/CLOS_MASK, $ssram/waymask) = 0">
|
|
<xs:annotation acrn:severity="error" acrn:report-on="/acrn-config/hv/CACHE_REGION">
|
|
<xs:documentation>VM '{$policy/VM}' vCPU '{$policy/VCPU}' cannot use chunk(s) {bits-of($ssram/waymask)} of L{$cache/CACHE_LEVEL} cache (cache ID: {$cache/CACHE_ID}) as those chunks are consumed by software SRAM. </xs:documentation>
|
|
</xs:annotation>
|
|
</xs:assert>
|
|
|
|
</xs:schema>
|