qemu/default-configs/devices
Huacai Chen c76b409fef hw/mips: Add Loongson-3 machine support
Add Loongson-3 based machine support, it use liointc as the interrupt
controler and use GPEX as the pci controller. Currently it can work with
both TCG and KVM.

As the machine model is not based on any exiting physical hardware, the
name of the machine is "loongson3-virt". It may be superseded in future
by a real machine model. If this happens, then a regular deprecation
procedure shall occur for "loongson3-virt" machine.

We now already have a full functional Linux kernel (based on Linux-5.4.x
LTS) here:

https://github.com/chenhuacai/linux

Of course the upstream kernel is also usable (the kvm host side and
guest side have both been upstream in Linux-5.9):

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

How to use QEMU/Loongson-3?
1, Download kernel source from the above URL;
2, Build a kernel with arch/mips/configs/loongson3_defconfig;
3, Boot a Loongson-3A4000 host with this kernel (for KVM mode);
4, Build QEMU-master with this patchset;
5, modprobe kvm (only necessary for KVM mode);
6, Use QEMU with TCG:
       qemu-system-mips64el -M loongson3-virt,accel=tcg -cpu Loongson-3A1000 -kernel <path_to_kernel> -append ...
   Use QEMU with KVM:
       qemu-system-mips64el -M loongson3-virt,accel=kvm -cpu Loongson-3A4000 -kernel <path_to_kernel> -append ...

   The "-cpu" parameter is optional here and QEMU will use the correct type for TCG/KVM automatically.

Co-developed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@kernel.org>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Message-Id: <20201221110538.3186646-5-chenhuacai@kernel.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
[PMD: Set TYPE_LOONGSON_MACHINE instance_size in TypeInfo,
      select FW_CFG_MIPS in Kconfig]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2021-01-04 23:36:03 +01:00
..
aarch64-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
alpha-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
arm-softmmu.mak hw/arm: Restrict APEI tables generation to the 'virt' machine 2020-10-20 16:12:00 +01:00
avr-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
cris-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
hppa-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
i386-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
lm32-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
m68k-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
microblaze-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
microblazeel-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
mips-softmmu-common.mak hw/mips: Remove the 'r4k' machine 2020-11-03 16:51:13 +01:00
mips-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
mips64-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
mips64el-softmmu.mak hw/mips: Add Loongson-3 machine support 2021-01-04 23:36:03 +01:00
mipsel-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
moxie-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
nios2-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
or1k-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
ppc-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
ppc64-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
riscv32-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
riscv64-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
rx-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
s390x-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
sh4-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
sh4eb-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
sparc-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
sparc64-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
tricore-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
unicore32-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
x86_64-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
xtensa-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00
xtensaeb-softmmu.mak default-configs: move files to default-configs/devices/ 2020-10-03 08:07:35 -04:00