dm: don't present ioapic and pic to RT VM

Per ACRN RT VM design, there is no virtual IOAPIC and virtual PIC emulated for RT VM.
This commit removes the entries of IOAPIC, PIC, PPRT and APRT in ACPI table for RT VM.

Tracked-On: #3227
Signed-off-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yan, Like 2019-06-03 17:18:48 +08:00 committed by Eddie Dong
parent ac6c5dce81
commit 771f15cd6b
4 changed files with 71 additions and 66 deletions

View File

@ -915,7 +915,6 @@ main(int argc, char *argv[])
break;
case CMD_OPT_LAPIC_PT:
lapic_pt = true;
break;
case CMD_OPT_RTVM:
is_rtvm = true;
break;

View File

@ -1598,6 +1598,7 @@ pci_bus_write_dsdt(int bus)
dsdt_line(" ,, , AddressRangeMemory, TypeStatic)");
dsdt_line(" })");
if (!is_rtvm) {
count = pci_count_lintr(bus);
if (count != 0) {
dsdt_indent(2);
@ -1622,6 +1623,7 @@ pci_bus_write_dsdt(int bus)
dsdt_line("}");
dsdt_unindent(2);
}
}
dsdt_indent(2);
for (slot = 0; slot < MAXSLOTS; slot++) {

View File

@ -33,6 +33,7 @@
#include <stdbool.h>
#include <sys/errno.h>
#include "dm.h"
#include "vmmapi.h"
#include "acpi.h"
#include "inout.h"
@ -262,6 +263,7 @@ pci_lpc_write_dsdt(struct pci_vdev *dev)
ldp->handler();
}
if(!is_rtvm) {
dsdt_line("");
dsdt_line("Device (PIC)");
dsdt_line("{");
@ -275,7 +277,7 @@ pci_lpc_write_dsdt(struct pci_vdev *dev)
dsdt_unindent(2);
dsdt_line(" })");
dsdt_line("}");
}
dsdt_line("");
dsdt_line("Device (TIMR)");
dsdt_line("{");

View File

@ -280,6 +280,7 @@ basl_fwrite_madt(FILE *fp, struct vmctx *ctx)
EFPRINTF(fp, "\n");
}
if (!is_rtvm) {
/* Always a single IOAPIC entry, with ID 0 */
EFPRINTF(fp, "[0001]\t\tSubtable Type : 01\n");
EFPRINTF(fp, "[0001]\t\tLength : 0C\n");
@ -310,6 +311,7 @@ basl_fwrite_madt(FILE *fp, struct vmctx *ctx)
EFPRINTF(fp, "\t\t\tPolarity : 1\n");
EFPRINTF(fp, "\t\t\tTrigger Mode : 3\n");
EFPRINTF(fp, "\n");
}
/* Local APIC NMI is connected to LINT 1 on all CPUs */
EFPRINTF(fp, "[0001]\t\tSubtable Type : 04\n");