History | View | Annotate | Download (13.1 kB)
vmstate, memory: decouple vmstate from memory API
Currently creating a memory region automatically registers it forlive migration. This differs from other state (which is enumeratedin a VMStateDescription structure) and ties the live migration codeinto the memory core....
ppcr500_mpc8544ds: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
Merge remote-tracking branch 'upstream' into memory/batch
PPC: booke timers
While working on the emulation of the freescale p2010 (e500v2) I realized thatthere's no implementation of booke's timers features. Currently mpc8544 usesppc_emb (ppc_emb_timers_init) which is close but not exactly like booke (forexample booke uses different SPR)....
kvm: ppc: booke206: use MMU API
Share the TLB array with KVM. This allows us to set the initial TLBboth on initial boot and reset, is useful for debugging, and couldeventually be used to support migration.
Signed-off-by: Scott Wood <scottwood@freescale.com>...
ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pages
This definition is backward compatible with MAV=1.0 as long asthe guest does not set reserved bits in MAS1/MAS4.
Also, fix the shift in booke206_tlb_to_page_size -- it's the basethat should be able to hold a 4G page size, not the shift count....
MPC8544DS: Generate CPU nodes on init
With this patch, we generate CPU nodes in the machine initialization, givingus the freedom to generate as many nodes as we want and as the machine supports,but only those.
This is a first step towards a much cleaner device tree generation...
PPC: E500: Bump CPU count to 15
Now that we have everything in place, make the machine descriptionaware of the fact that we can now handle 15 virtual CPUs!
Signed-off-by: Alexander Graf <agraf@suse.de>
v1 -> v2:
- Max cpus is 15 because of MPIC
PPC: E500: Update cpu-release-addr property in cpu nodes
The guest OS wants to know where the guest spins, so let's tell him whileupdating the CPU nodes with the frequencies anyways.
- use new spin table address
PPC: E500: Add PV spinning code
CPUs that are not the boot CPU need to run in spinning code to check if theyshould run off to execute and if so where to jump to. This usually happensby leaving secondary CPUs looping and checking if some variable in memory...
PPC: E500: Update freqs for all CPUs
Now that we can so nicely find out the host's frequencies, we should alsomake sure that we get them into all virtual CPUs' device tree nodes.
PPC: E500: Remove unneeded CPU nodes
We should only keep CPU nodes in the device tree around that we really havevirtual CPUs for. So remove all superfluous entries that we just keep therein case someone wants to create a lot of vCPUs.
PPC: E500: Use generic kvm function for freq
Now that we have generic KVM functions to read out the host tb and clockfrequencies, let's use them in the e500 code!
PPC: E500: Remove mpc8544_copy_soc_cell
We don't need mpc8544_copy_soc_cell anymore, since we're explicitly readinghost values and writing guest values respectively.
PPC: E500: create multiple envs
When creating a VM, we should go through smp_cpus and create a virtual CPU forevery CPU the user requested. This patch adds support for that and moves somecode around to make that more convenient.
PPC: E500: Generate IRQ lines for many CPUs
Now that we can generate multiple envs for all our virtual CPUs, wealso need to tell the MPIC that we have multiple CPUs connected andconnect them all to the respective virtual interrupt lines.
serial: Add MemoryRegion parameter to serial_mm_init
Remove the get_system_memory() call from serial_mm_init, pushingit back into the callers. In many cases we already have thesystem memory region available.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
openpic: Memory API conversion for mpic
This patch converts mpic to the new memory API (through old mmio).
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>Signed-off-by: Avi Kivity <avi@redhat.com>
serial: Use enum device_endian in serial_mm_init parameter
The use of DEVICE_NATIVE_ENDIAN cleans up lots of ifdefs inmany of the callers.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
serial: Remove ioregister parameter from serial_mm_init
All callers passed 1.
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
PPC: E500: Use MAS registers instead of internal TLB representation
The natural format for e500 cores to do TLB manipulation with are the MASregisters. Instead of converting them into some internal representationand back again when the guest reads them, we can just keep the data...
PPC: mpc8544ds: Add hypervisor node
When running a PPC guest with KVM that can do PV operations, we needto indicate the guest which instructions to use for a hypercall andthat it is running as KVM guest.
This logic was available on openbios based machines already. This patch...
PPC: E500: Implement reboot controller
When Linux reboots an e500 VM, it writes to a magic register in the"global-utilities" device indicated by the device tree. We were notemulating that device so far, rendering the VM reboot-less.
This patch implements that device with only the reboot functionality...
PPC: fix mpc8544ds pci default devices
After the Qdev'ification of the MPC8544DS board and PCI bus, the internalPCI bus name changed from "pci" to "pci.0". Reflect this change in thesearch for that bus.
This patch enables networking on e500 guests again....
PPC: Qdev'ify e500 pci
The e500 PCI controller isn't qdev'ified yet. This leads to severe issueswhen running with -drive.
To be able to use a virtio disk with an e500 VM, let's convert the PCIcontroller over to qdev.
Reviewed-by: Paul Brook <paul@codesourcery.com>...
PPC: Make MPC8544DS obey -cpu switch
The MPC8544DS board emulation code ignored the user defined -cpu switch.This patch enables it to only provide a sane default, not force an e500v2CPU inside.
PPC: Make MPC8544DS emulation work w/o KVM
The MPC8544DS board emulation was only used with KVM so far, so someparts of the code didn't provide proper values for non-KVM execution.
This patch makes the machine work without KVM enabled. To actually usethis, you also need proper e500v2 MMU emulation....
PPC MPC7544DS: Use new TLB helper function
Now that we have some nice helpers that can find us a TLB entry, let'suse that on the machine initialization code, so we don't need to knowabout the internals of the TLB array.
Don't call cpu_synchronize_state() from machine init.
This will deadlock when the I/O thread is used, since theCPU thread is blocked waiting for qemu_system_ready.
The synchronization is unnecessary since this is beforecpu_synchronize_all_post_init()....
isa_mmio: Always use little endian
This patch converts the ISA MMIO bridge code to always use little endian mmio.All bswap code that existed was only there to convert from native cpuendianness to little endian ISA devices.
Signed-off-by: Alexander Graf <agraf@suse.de>...
Delete write only variables
Compiling with GCC 4.6.0 20100925 produced warnings like:/src/qemu/net/tap-win32.c: In function 'tap_win32_open':/src/qemu/net/tap-win32.c:582:12: error: variable 'hThread' set but not used [-Werror=unused-but-set-variable]...
qemu_ram_alloc: Add DeviceState and name parameters
These will be used to generate unique id strings for ramblocks. The namefield is required, the device pointer is optional as most callers don'thave a device. When there's no device or the device isn't a child of...
Compile serial only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Compile isa_mmio only once
load_elf: replace the address addend by a translation function
A few machines need to translate the ELF header addresses into physicaladdresses. Currently the only possibility is to add a value to theaddresses.
This patch replaces the addend argument by and a translation function...
powerpc/e500: adjust fdt and ramdisk loading addr
Since kernel uimage is getting bigger,old fixed loading bases will result in regions overlap.
Add pad for fdt and ramdisk, so that they won't overlap with uimage.
Signed-off-by: Liu Yu <yu.liu@freescale.com>...
powerpc: fix compilation with CONFIG_FDT undefined
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
powerpc/booke: move fdt loading to rom infrastructure
It's convinent to use rom to checking overlap, to reset etc.And uImage and ramdisk loading has already moved to it.
Also, after we add fdt to rom, free it.
target-ppc: add synchronize register for booke init
So that the following registers init could be flushed back to kvm.
Signed-off-by: Liu Yu <yu.liu@freescale.com>Acked-by: Hollis Blanchard <hollis@penguinppc.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix pci_add nic not to exit on bad model
Monitor command "pci_add ADDR nic model=MODEL" uses pci_nic_init() tocreate the NIC. When MODEL is unknown or "?", this prints to stderrand terminates the program.
Change pci_nic_init() not to treat "?" specially, and to return NULL...
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
Compile loader only once
Callers must pass ELF machine, byte swapping and symbol LSB clearinginformation to ELF loader. A.out loader needs page size information, passthat too as a parameter.
Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw....
qdev-ify virtio-blk.
First user of the new drive property. With this patch applied hostand guest config can be specified separately, like this:
-drive if=none,id=disk1,file=/path/to/disk.img -device virtio-blk-pci,drive=disk1
You can set any property for virtio-blk-pci now. You can set the pci...
Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kill drives_table
First step cleaning up the drives handling. This one does nothing butremoving drives_table[], still it became seriously big.
drive_get_index() is gone and is replaced by drives_get() which handsout DriveInfo pointers instead of a table index. This needs adaption in...
Support addr=... in option argument of -net nic
Make net_client_init() accept addr=, put the value into structNICinfo. Use it in pci_nic_init(), and remove arguments bus anddevfn.
Don't support addr= in third argument of monitor command pci_add,because that clashes with its first argument. Admittedly unelegant....
Support addr=... in option argument of -drive if=virtio
Make drive_init() accept addr=, put the value into struct DriveInfo.Use it in all the places that create virtio-blk-pci devices:pc_init1(), bamboo_init(), mpc8544ds_init().
Don't support addr= in third argument of monitor command pci_add and...
Use relative path for bios
Look for bios and other support files relative to qemu binary, rather thana hardcoded prefix.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Convert machine registration to use module init functions
This cleans up quite a lot of #ifdefs, extern variables, and other ugliness.
Separate virtio PCI code
Split the PCI host bindings from the VRing transport implementation.
Virtio-blk qdev conversion
Remove vga_ram_size
The vga_ram_size argument to machine init functions always has the samevalue, and is ignored by many machines (including SPARC32 which has anobsolete ifdef for VGA_RAM_SIZE).
Remove it and push VGA_RAM_SIZE into vga_int.h.
Remove redundant ram_require machine properly.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7090 c046a42c-6fe2-441c-8c8c-71466251a162
Wean device tree code off phys_ram_base.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7068 c046a42c-6fe2-441c-8c8c-71466251a162
More phys_ram_base elimination.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7064 c046a42c-6fe2-441c-8c8c-71466251a162
Sparse fixes: NULL use, header order, ANSI prototypes, static
Fix Sparse warnings: * use NULL instead of plain 0 * rearrange header include order to avoid redefining types accidentally * ANSIfy SLIRP * avoid "restrict" keyword * add static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162
kvm/powerpc: Add MPC8544DS board support
This patch add an emulation of MPC8544DS board.It can work on All E500 platforms.
Signed-off-by: Liu Yu <yu.liu@freescale.com>Acked-by: Hollis Blanchard <hollisb@us.ibm.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...