- Jan 08, 2021
-
-
Andrew Jones authored
virt machine's 'smp_cpus' and machine->smp.cpus must always have the same value. And, anywhere we have virt machine state we have machine state. So let's remove the redundancy. Also, to make it easier to see that machine->smp is the true source for "smp_cpus" and "max_cpus", avoid passing them in function parameters, preferring instead to get them from the state. No functional change intended. Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
David Edmondson <david.edmondson@oracle.com> Reviewed-by:
Ying Fang <fangying1@huawei.com> Message-id: 20201215174815.51520-1-drjones@redhat.com [PMM: minor formatting tweak to smp_cpus variable declaration] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Edgar E. Iglesias authored
Correct the indexing into s->cpu_ctlr for vCPUs. Signed-off-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Luc Michel <luc.michel@greensocs.com> Message-id: 20201214222154.3480243-2-edgar.iglesias@gmail.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Jan 06, 2021
-
-
Mark Cave-Ayland authored
The sun4m board code connects both of the IRQ outputs of each ESCC to the same slavio input qemu_irq. Connecting two qemu_irqs outputs directly to the same input is not valid as it produces subtly wrong behaviour (for instance if both the IRQ lines are high, and then one goes low, the PIC input will see this as a high-to-low transition even though the second IRQ line should still be holding it high). This kind of wiring needs an explicitly created OR gate; add one. Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20201219111934.5540-1-mark.cave-ayland@ilande.co.uk> Reviewed-by:
Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Peter Maydell authored
Currently the GRLIB_IRQMP device is used in one place (the leon3 board), but instead of the device providing inbound gpio lines for the board to wire up, the board code itself calls qemu_allocate_irqs() with the handler function being a set_irq function defined in the code for the device. Refactor this into the standard setup of a device having input gpio lines. This fixes a trivial Coverity memory leak report (the leon3 board code leaks the IRQ array returned from qemu_allocate_irqs()). Fixes: Coverity CID 1421922 Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-Id: <20201212144134.29594-2-peter.maydell@linaro.org> Reviewed-by:
KONRAD Frederic <frederic.konrad@adacore.com> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Philippe Mathieu-Daudé authored
Per the "NCR89C105 Chip Specification" referenced in the header: Chip-level Address Map ------------------------------------------------------------------ | 1D0 0000 -> | Counter/Timers | W,D | | 1DF FFFF | | | ... The address map indicated the allowed accesses at each address. [...] W indicates a word access, and D indicates a double-word access. The SLAVIO timer controller is implemented expecting 32-bit accesses. Commit a3d12d07 restricted the memory accesses to 32-bit, while the device allows 64-bit accesses. This was not an issue until commit 5d971f9e which reverted ("memory: accept mismatching sizes in memory_region_access_valid"). Fix by renaming .valid MemoryRegionOps as .impl, and add the valid access range (W -> 4, D -> 8). Since commit 21786c7e ("memory: Log invalid memory accesses") this class of bug can be quickly debugged displaying 'guest_errors' accesses, as: $ qemu-system-sparc -M SS-20 -m 256 -bios ss20_v2.25_rom -serial stdio -d guest_errors Power-ON Reset Invalid access at addr 0x0, size 8, region 'timer-1', reason: invalid size (min:4 max:4) $ qemu-system-sparc -M SS-20 -m 256 -bios ss20_v2.25_rom -monitor stdio -S (qemu) info mtree address-space: memory 0000000000000000-ffffffffffffffff (prio 0, i/o): system ... 0000000ff1300000-0000000ff130000f (prio 0, i/o): timer-1 ^^^^^^^^^ ^^^^^^^ \ memory region base address and name / (qemu) info qtree bus: main-system-bus dev: slavio_timer, id "" <-- device type name gpio-out "sysbus-irq" 17 num_cpus = 1 (0x1) mmio 0000000ff1310000/0000000000000014 mmio 0000000ff1300000/0000000000000010 <--- base address mmio 0000000ff1301000/0000000000000010 mmio 0000000ff1302000/0000000000000010 ... Reported-by:
Yap KV <yapkv@yahoo.com> Buglink: https://bugs.launchpad.net/bugs/1906905 Fixes: a3d12d07 ("slavio_timer: convert to memory API") CC: qemu-stable@nongnu.org Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201205150903.3062711-1-f4bug@amsat.org> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
BALATON Zoltan authored
This fixes a long standing issue with MorphOS booting on sam460ex which turns out to be because of suspicious values written to PCI config address that apparently works on real machine but caused wrong access on this device model. This replaces a previous work around for this with a better fix that makes it work. Signed-off-by:
BALATON Zoltan <balaton@eik.bme.hu> Message-Id: <6fd215ab2bc5f8d4455cd20ed1a2f059e4415fe5.1609636173.git.balaton@eik.bme.hu> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
BALATON Zoltan authored
The trace event for pci_host_config_write() was also using the trace event for read. Add corresponding trace and correct this. Signed-off-by:
BALATON Zoltan <balaton@eik.bme.hu> Message-Id: <a6c7dcf7153cc537123ed8ceac060f2f64a883cb.1609636173.git.balaton@eik.bme.hu> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
BALATON Zoltan authored
The code mapping all PCI interrupts to a single CPU IRQ works but is not trivial so document it in a comment. Signed-off-by:
BALATON Zoltan <balaton@eik.bme.hu> Message-Id: <c25c0310510672b58466e795fd701e65e8f1ff97.1609636173.git.balaton@eik.bme.hu> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
BALATON Zoltan authored
Dependency on FDT_PPC was added in commit b0048f76 ("hw/ppc/Kconfig: Only select FDT helper for machines using it") but it does not seem to be really necessary so remove it again. Signed-off-by:
BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <7461a20b129a912aeacdb9ad115a55f0b84c8726.1609636173.git.balaton@eik.bme.hu> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
BALATON Zoltan authored
All machines that select SERIAL also select PPC4XX so we can just add this common dependency there once. Signed-off-by:
BALATON Zoltan <balaton@eik.bme.hu> Message-Id: <94f1eb7cfb7f315bd883d825f3ce7e0cfc2f2b69.1609636173.git.balaton@eik.bme.hu> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
qemu-system-ppc64 built with --without-default-devices crashes: Type 'pnv-phb4-root-port' is missing its parent 'pcie-root-port-base' Aborted (core dumped) Have POWERNV to select PCIE_PORT. This is done through a new PCI_POWERNV config in hw/pci-host/Kconfig since POWERNV doesn't have a direct dependency on PCI. For this reason, PCI_EXPRESS and MSI_NONBROKEN are also moved under PCI_POWERNV. Signed-off-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Message-Id: <160883058299.253005.342913177952681375.stgit@bahia.lan> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
Have PSERIES to select XICS and XIVE, and directly check PSERIES in hw/intc/meson.build to enable build of the XICS and XIVE sPAPR backends, like POWERNV already does. This allows to get rid of the intermediate XICS_SPAPR and XIVE_SPAPR. Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <160883057560.253005.4206568349917633920.stgit@bahia.lan> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
Linking of the qemu-system-ppc64 fails on a POWER9 host when --without-default-devices is passed to configure: $ ./configure --without-default-devices \ --target-list=ppc64-softmmu && make ... libqemu-ppc64-softmmu.fa.p/hw_ppc_e500.c.o: In function `ppce500_init_mpic_kvm': /home/greg/Work/qemu/qemu-ppc/build/../hw/ppc/e500.c:777: undefined reference to `kvm_openpic_connect_vcpu' libqemu-ppc64-softmmu.fa.p/hw_ppc_spapr_irq.c.o: In function `spapr_irq_check': /home/greg/Work/qemu/qemu-ppc/build/../hw/ppc/spapr_irq.c:189: undefined reference to `xics_kvm_has_broken_disconnect' libqemu-ppc64-softmmu.fa.p/hw_intc_spapr_xive.c.o: In function `spapr_xive_post_load': /home/greg/Work/qemu/qemu-ppc/build/../hw/intc/spapr_xive.c:530: undefined reference to `kvmppc_xive_post_load' ... and tons of other symbols belonging to the KVM backend of the openpic, XICS and XIVE interrupt controllers. It turns out that OPENPIC_KVM, XICS_KVM and XIVE_KVM are marked to depend on KVM but this has no effect when minikconf runs in allnoconfig mode. Such reverse dependencies should rather be handled with a 'select' statement, eg. config OPENPIC select OPENPIC_KVM if KVM or even better by getting rid of the intermediate _KVM config and directly checking CONFIG_KVM in the meson.build file: specific_ss.add(when: ['CONFIG_KVM', 'CONFIG_OPENPIC'], if_true: files('openpic_kvm.c')) Go for the latter with OPENPIC, XICS and XIVE. This went unnoticed so far because CI doesn't test the build with --without-default-devices and KVM enabled on a POWER host. Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <160883056791.253005.14924294027763955653.stgit@bahia.lan> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
Use a less generic name for an easier experience with tools such as cscope or grep. Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <20201218103400.689660-6-groug@kaod.org> Reviewed-by:
Daniel Henrique Barboza <danielhb413@gmail.com> Tested-by:
Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
Documentation of object_child_foreach_recursive() clearly stipulates that "it is forbidden to add or remove children from @obj from the @fn callback". But this is exactly what we do during machine reset. The call to spapr_drc_reset() can finalize the hot-unplug sequence of a PHB or a PCI bridge, both of which will then in turn destroy their PCI DRCs. This could potentially invalidate the iterator used by do_object_child_foreach(). It is pure luck that this haven't caused any issues so far. Use spapr_drc_reset_all() since it can cope with DRC removal. Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <20201218103400.689660-5-groug@kaod.org> Reviewed-by:
Daniel Henrique Barboza <danielhb413@gmail.com> Tested-by:
Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
No need to expose the way DRCs are traversed outside of spapr_drc.c. Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <20201218103400.689660-4-groug@kaod.org> Reviewed-by:
Daniel Henrique Barboza <danielhb413@gmail.com> Tested-by:
Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
Documentation of object_property_iter_init() clearly stipulates that "it is forbidden to modify the property list while iterating". But this is exactly what we do when resetting transient DR connectors during CAS. The call to spapr_drc_reset() can finalize the hot-unplug sequence of a PHB or a PCI bridge, both of which will then in turn destroy their PCI DRCs. This could potentially invalidate the iterator. It is pure luck that this haven't caused any issues so far. Change spapr_drc_reset() to return true if it caused a device to be removed. Restart from scratch in this case. This can potentially increase the overall DRC reset time, especially with a high maxmem which generates a lot of LMB DRCs. But this kind of setup is rare, and so is the use case of rebooting a guest while doing hot-unplug. Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <20201218103400.689660-3-groug@kaod.org> Reviewed-by:
Daniel Henrique Barboza <danielhb413@gmail.com> Tested-by:
Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
Non-transient DRCs are either in the empty or the ready state, which means spapr_drc_reset() doesn't change their state. It is thus not needed to do any checking. Call spapr_drc_reset() unconditionally and squash spapr_drc_transient() into its only user, spapr_drc_needed(). Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <20201218103400.689660-2-groug@kaod.org> Reviewed-by:
Daniel Henrique Barboza <danielhb413@gmail.com> Tested-by:
Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
It is currently impossible to hot-unplug a memory device between machine reset and CAS. (qemu) device_del dimm1 Error: Memory hot unplug not supported for this guest This limitation was introduced in order to provide an explicit error path for older guests that didn't support hot-plug event sources (and thus memory hot-unplug). The linux kernel has been supporting these since 4.11. All recent enough guests are thus capable of handling the removal of a memory device at all time, including during early boot. Lift the limitation for the latest machine type. This means that trying to unplug memory from a guest that doesn't support it will likely just do nothing and the memory will only get removed at next reboot. Such older guests can still get the existing behavior by using an older machine type. Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <160794035064.23292.17560963281911312439.stgit@bahia.lan> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
Section 13.5.2 of LoPAPR mandates various DR related indentifiers for all hot-pluggable entities to be exposed in the "ibm,drc-indexes", "ibm,drc-power-domains", "ibm,drc-names" and "ibm,drc-types" properties of their parent node. These properties are created with spapr_dt_drc(). PHBs and LMBs are both children of the machine. Their DR identifiers are thus supposed to be exposed in the afore mentioned properties of the root node. When PHB hot-plug support was added, an extra call to spapr_dt_drc() was introduced: this overwrites the existing properties, previously populated with the LMB identifiers, and they end up containing only PHB identifiers. This went unseen so far because linux doesn't care, but this is still not conformant with LoPAPR. Fortunately spapr_dt_drc() is able to handle multiple DR entity types at the same time. Use that to handle DR indentifiers for PHBs and LMBs with a single call to spapr_dt_drc(). While here also account for PMEM DR identifiers, which were forgotten when NVDIMM hot-plug support was added. Also add an assert to prevent further misuse of spapr_dt_drc(). With -m 1G,maxmem=2G,slots=8 passed on the QEMU command line we get: Without this patch: /proc/device-tree/ibm,drc-indexes 0000001f 20000001 20000002 20000003 20000000 20000005 20000006 20000007 20000004 20000009 20000008 20000010 20000011 20000012 20000013 20000014 20000015 20000016 20000017 20000018 20000019 2000000a 2000000b 2000000c 2000000d 2000000e 2000000f 2000001a 2000001b 2000001c 2000001d 2000001e These are the DRC indexes for the 31 possible PHBs. With this patch: /proc/device-tree/ibm,drc-indexes 0000002b 90000000 90000001 90000002 90000003 90000004 90000005 90000006 90000007 20000001 20000002 20000003 20000000 20000005 20000006 20000007 20000004 20000009 20000008 20000010 20000011 20000012 20000013 20000014 20000015 20000016 20000017 20000018 20000019 2000000a 2000000b 2000000c 2000000d 2000000e 2000000f 2000001a 2000001b 2000001c 2000001d 2000001e 80000004 80000005 80000006 80000007 And now we also have the 4 ((2G - 1G) / 256M) LMBs and the 8 (slots) PMEMs. Fixes: 3998ccd0 ("spapr: populate PHB DRC entries for root DT node") Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <160794479566.35245.17809158217760761558.stgit@bahia.lan> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
Signed-off-by:
Cédric Le Goater <clg@kaod.org> Message-Id: <20201215174025.2636824-1-clg@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
All memory DRC objects are created during machine init. It is thus safe to assume spapr_drc_by_id() cannot return NULL when hot-plug/unplugging memory. Make this clear with an assertion, like the code already does a few lines above when looping over memory DRCs. This fixes Coverity reports 1437757 and 1437758. Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <160805381160.228955.5388294067094240175.stgit@bahia.lan> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Peter Maydell authored
Switch the bamboo board to directly creating and configuring the UIC, rather than doing it via the old ppcuic_init() helper function. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-Id: <20201212001537.24520-5-peter.maydell@linaro.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Peter Maydell authored
Switch the virtex_ml507 board to directly creating and configuring the UIC, rather than doing it via the old ppcuic_init() helper function. This fixes a trivial Coverity-detected memory leak where we were leaking the array of IRQs returned by ppcuic_init(). Fixes: Coverity CID 1421992 Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-Id: <20201212001537.24520-4-peter.maydell@linaro.org> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Tested-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Peter Maydell authored
Currently the PPC UIC ("Universal Interrupt Controller") is implemented as a non-QOM device in ppc4xx_devs.c. Convert it to a proper QOM device in hw/intc. The ppcuic_init() function is retained for the moment with its current interface; in subsequent commits this will be tidied up to avoid the allocation of an irq array. This conversion adds VMState support. It leaves the LOG_UIC() macro as-is to maximise the extent to which this is simply code-movement rather than a rewrite (in new code it would be better to use tracepoints). The default property values for dcr-base and use-vectors are set to match those use by most of our boards with a UIC. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-Id: <20201212001537.24520-3-peter.maydell@linaro.org> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Tested-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Peter Maydell authored
In a following commit we will move the PPC UIC implementation to its own file in hw/intc. To prevent checkpatch complaining about that code-motion, fix up the minor style issues first. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-Id: <20201212001537.24520-2-peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Tested-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- Jan 04, 2021
-
-
Jiaxun Yang authored
Missed in 3ca7639f ("hw/mips/fuloong2e: Set CPU frequency to 533 MHz"), we need to tell the kernel the correct clock. Fixes: 3ca7639f ("hw/mips/fuloong2e: Set CPU frequency to 533 MHz"). Signed-off-by:
Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by:
Huacai Chen <chenhuacai@kernel.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201224031750.52146-7-jiaxun.yang@flygoat.com> [PMD: Reworded] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Jiaxun Yang authored
modetty is not handled by kernel and the parameter here seems unreasonable. Signed-off-by:
Jiaxun Yang <jiaxun.yang@flygoat.com> Message-Id: <20201224031750.52146-6-jiaxun.yang@flygoat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> [PMD: Do not remove busclock] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Jiaxun Yang authored
Websites are downing, but GitHub may last forever. Loongson even doesn't recogonize 2E as their products nowadays.. Signed-off-by:
Jiaxun Yang <jiaxun.yang@flygoat.com> Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Huacai Chen <chenhuacai@kernel.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201224031750.52146-3-jiaxun.yang@flygoat.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Jiaxun Yang authored
Seems useless.... Fixes: 051c190b ("MIPS: Initial support of fulong mini pc (machine construction)") Signed-off-by:
Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Huacai Chen <chenhuacai@kernel.org> Message-Id: <20201224031750.52146-2-jiaxun.yang@flygoat.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Jiaxun Yang authored
It will signed extend vaddr properly. Signed-off-by:
Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201215064200.28751-4-jiaxun.yang@flygoat.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Jiaxun Yang authored
So it will sign extend adresses properly. Signed-off-by:
Jiaxun Yang <jiaxun.yang@flygoat.com> Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201215064200.28751-3-jiaxun.yang@flygoat.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Jiaxun Yang authored
Address should be unsigned anyway, otherwise it may carry calculations wrongly. Signed-off-by:
Jiaxun Yang <jiaxun.yang@flygoat.com> Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201215064200.28751-2-jiaxun.yang@flygoat.com> [PMD: Fixed typo and convert hw/mips/mipssim.c too] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Huacai Chen authored
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>
-
Huacai Chen authored
Preparing to add Loongson-3 machine support, add Loongson-3's LEFI (a UEFI-like interface for BIOS-Kernel boot parameters) helpers first. 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> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201221110538.3186646-4-chenhuacai@kernel.org> [PMD: Fixed typo] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Huacai Chen authored
Implement fw_cfg_arch_key_name(), which returns the name of a mips-specific key. 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> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1600742967-12933-7-git-send-email-chenhc@lemote.com> [PMD: Add FW_CFG_MIPS Kconfig selector] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Huacai Chen authored
As suggested by Philippe Mathieu-Daudé, rework Loongson's liointc: 1, Move macro definitions to loongson_liointc.h; 2, Remove magic values and use macros instead; 3, Replace dead D() code by trace events. Suggested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Huacai Chen <chenhuacai@kernel.org> Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201221110538.3186646-2-chenhuacai@kernel.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
Peter Maydell authored
It's common to want to print a human-readable indication of a clock's frequency. Provide a utility function in the clock API to return a string which is a displayable representation of the frequency, and use it in qdev-monitor.c. Before: (qemu) info qtree [...] dev: xilinx,zynq_slcr, id "" clock-in "ps_clk" freq_hz=3.333333e+07 mmio 00000000f8000000/0000000000001000 After: dev: xilinx,zynq_slcr, id "" clock-in "ps_clk" freq_hz=33.3 MHz mmio 00000000f8000000/0000000000001000 Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Luc Michel <luc@lmichel.fr> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201215150929.30311-5-peter.maydell@linaro.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
BALATON Zoltan authored
Use less confusing naming for superio config register handling related parts that makes it clearer what belongs to this part. Signed-off-by:
BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <4d30a2b4b771b2ad651509885daae79d7c4fe7a8.1609584216.git.balaton@eik.bme.hu> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
BALATON Zoltan authored
Rename local variable holding object state for readability and consistency. Signed-off-by:
BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <69655b23df2ecebbf0aff29726f4b4746f5b74de.1609584216.git.balaton@eik.bme.hu> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-