On 06.12.21 11:54, Ralf Ramsauer wrote: > Running Jailhouse in QEMU with the upstream config is currently broken, > as qemu-vm.c provides a hardcoded description of the Intel IOMMU. As a > consequence, starting Jailhouse in QEMU on a AMD system fails. > > Fix it by simply skipping non-AMD IOMMU types and drop a WARNING that > there's some oddity inside the config. > > Signed-off-by: Ralf Ramsauer <[email protected]> > --- > > Side note: I know we don't do any config sanity checks in the > hypervisor, but in this case it's way easier than providing two > qemu-vm.c-variants for Intel and AMD. > > hypervisor/arch/x86/amd_iommu.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/hypervisor/arch/x86/amd_iommu.c b/hypervisor/arch/x86/amd_iommu.c > index 40ec4e20..4b563e9e 100644 > --- a/hypervisor/arch/x86/amd_iommu.c > +++ b/hypervisor/arch/x86/amd_iommu.c > @@ -782,8 +782,11 @@ static int amd_iommu_init(void) > > iommu = &system_config->platform_info.iommu_units[0]; > for (n = 0; iommu->base && n < iommu_count_units(); iommu++, n++) { > - if (iommu->type != JAILHOUSE_IOMMU_AMD) > - return trace_error(-EINVAL); > + if (iommu->type != JAILHOUSE_IOMMU_AMD) { > + printk("WARNING: The config contains a" > + "non-AMD IOMMU type\n"); > + continue; > + } > > entry = &iommu_units[iommu_units_count]; > >
Let's better provide Intel/AMD-specific configs (we could keep qemu-x86.cell as link to qemu-intel-x86.cell). "Just" needs someone to take care of the AMD part. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/44f3b16b-c481-7c42-fe8b-6fd892b73dfd%40siemens.com.
