summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* oslib: rework anonimous RAM allocationMichael S. Tsirkin2015-10-011-2/+10
| | | | | | | | | | | | | | | At the moment we first allocate RAM, sometimes more than necessary for alignment reasons. We then free the extra RAM. Rework this to avoid the temporary allocation: reserve the range by mapping it with PROT_NONE, then use just the necessary range with MAP_FIXED. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
* virtio-net: correctly drop truncated packetsJason Wang2015-10-011-7/+1
| | | | | | | | | | | | | | | | | | | When packet is truncated during receiving, we drop the packets but neither discard the descriptor nor add and signal used descriptor. This will lead several issues: - sg mappings are leaked - rx will be stalled if a lots of packets were truncated In order to be consistent with vhost, fix by discarding the descriptor in this case. Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio: introduce virtqueue_discard()Jason Wang2015-10-012-0/+9
| | | | | | | | | | | | | This patch introduces virtqueue_discard() to discard a descriptor and unmap the sgs. This will be used by the patch that will discard descriptor when packet is truncated. Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio: introduce virtqueue_unmap_sg()Jason Wang2015-10-011-4/+10
| | | | | | | | | | | | | Factor out sg unmapping logic. This will be reused by the patch that can discard descriptor. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Andrew James <andrew.james@hpe.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20150930' ↵Peter Maydell2015-10-017-65/+263
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging migration/next for 20150930 # gpg: Signature made Wed 30 Sep 2015 09:24:02 BST using RSA key ID 5872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" # gpg: aka "Juan Quintela <quintela@trasno.org>" * remotes/juanquintela/tags/migration/20150930: migration: Disambiguate MAX_THROTTLE qmp/hmp: Add throttle ratio to query-migrate and info migrate migration: Dynamic cpu throttling for auto-converge migration: Parameters for auto-converge cpu throttling cpu: Provide vcpu throttling interface migration: yet more possible state transitions Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * migration: Disambiguate MAX_THROTTLEJason J. Herne2015-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Migration has a define for MAX_THROTTLE. Update comment to clarify that this is used for throttling transfer speed. Hopefully this will prevent it from being confused with a guest cpu throttling entity. Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
| * qmp/hmp: Add throttle ratio to query-migrate and info migrateJason J. Herne2015-09-303-1/+16
| | | | | | | | | | | | | | | | | | | | Report throttle percentage in info migrate and query-migrate responses when cpu throttling is active. Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
| * migration: Dynamic cpu throttling for auto-convergeJason J. Herne2015-09-302-59/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove traditional auto-converge static 30ms throttling code and replace it with a dynamic throttling algorithm. Additionally, be more aggressive when deciding when to start throttling. Previously we waited until four unproductive memory passes. Now we begin throttling after only two unproductive memory passes. Four seemed quite arbitrary and only waiting for two passes allows us to complete the migration faster. Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
| * migration: Parameters for auto-converge cpu throttlingJason J. Herne2015-09-303-4/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add migration parameters to allow the user to adjust the parameters that control cpu throttling when auto-converge is in effect. The added parameters are as follows: x-cpu-throttle-initial : Initial percantage of time guest cpus are throttled when migration auto-converge is activated. x-cpu-throttle-increment: throttle percantage increase each time auto-converge detects that migration is not making progress. Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
| * cpu: Provide vcpu throttling interfaceJason J. Herne2015-09-302-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | Provide a method to throttle guest cpu execution. CPUState is augmented with timeout controls and throttle start/stop functions. To throttle the guest cpu the caller simply has to call the throttle set function and provide a percentage of throttle time. Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
| * migration: yet more possible state transitionsJuan Quintela2015-09-301-0/+1
|/ | | | | | | | On destination, we move from INMIGRATE to FINISH_MIGRATE. Add that to the list of allowed states. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
* Merge remote-tracking branch 'remotes/amit-migration/tags/for-juan-201509' ↵Peter Maydell2015-09-2912-142/+211
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging Migration queue # gpg: Signature made Tue 29 Sep 2015 07:13:55 BST using RSA key ID 854083B6 # gpg: Good signature from "Amit Shah <amit@amitshah.net>" # gpg: aka "Amit Shah <amit@kernel.org>" # gpg: aka "Amit Shah <amitshah@gmx.net>" * remotes/amit-migration/tags/for-juan-201509: ram_find_and_save_block: Split out the finding Move dirty page search state into separate structure migration: Use g_new() & friends where that makes obvious sense migration: qemu-file more size_t'ifying migration: size_t'ify some of qemu-file Init page sizes in qtest Split out end of migration code from migration_thread migration/ram.c: Use RAMBlock rather than MemoryRegion vmstate: Remove redefinition of VMSTATE_UINT32_ARRAY Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * ram_find_and_save_block: Split out the findingDr. David Alan Gilbert2015-09-291-25/+59
| | | | | | | | | | | | | | | | | | | | | | | | Split out the finding of the dirty page and all the wrap detection into a separate function since it was getting a bit hairy. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <1443018431-11170-3-git-send-email-dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> [Fix comment -- Amit] Signed-off-by: Amit Shah <amit.shah@redhat.com>
| * Move dirty page search state into separate structureDr. David Alan Gilbert2015-09-291-20/+35
| | | | | | | | | | | | | | | | | | | | | | Pull the search state for one iteration of the dirty page search into a structure. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Message-Id: <1443018431-11170-2-git-send-email-dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
| * migration: Use g_new() & friends where that makes obvious senseMarkus Armbruster2015-09-297-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form sizeof(T). Same Coccinelle semantic patch as in commit b45c03f. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1442231491-23352-1-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
| * migration: qemu-file more size_t'ifyingDr. David Alan Gilbert2015-09-292-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | This time convert the external functions: qemu_get_buffer, qemu_peek_buffer qemu_put_buffer and qemu_put_buffer_async Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <1439463094-5394-6-git-send-email-dgilbert@redhat.com> Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
| * migration: size_t'ify some of qemu-fileDr. David Alan Gilbert2015-09-297-24/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a start on using size_t more in qemu-file and friends; it fixes up QEMUFilePutBufferFunc and QEMUFileGetBufferFunc to take size_t lengths and return ssize_t return values (like read(2)) and fixes up all the different implementations of them. Note that I've not yet followed this deeply into bdrv_ implementations. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <1439463094-5394-5-git-send-email-dgilbert@redhat.com> Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
| * Init page sizes in qtestDr. David Alan Gilbert2015-09-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | One of my patches used a loop that was based on host page size; it dies in qtest since qtest hadn't bothered init'ing it. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Message-Id: <1439463094-5394-4-git-send-email-dgilbert@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
| * Split out end of migration code from migration_threadDr. David Alan Gilbert2015-09-292-28/+49
| | | | | | | | | | | | | | | | | | | | | | | | The code that gets run at the end of the migration process is getting large, and I'm about to add more for postcopy. Split it into a separate function. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <1439463094-5394-3-git-send-email-dgilbert@redhat.com> Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
| * migration/ram.c: Use RAMBlock rather than MemoryRegionDr. David Alan Gilbert2015-09-291-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | RAM migration mainly works on RAMBlocks but in a few places uses data from MemoryRegions to access the same information that's already held in RAMBlocks; clean it up just to avoid the MemoryRegion use. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <1439463094-5394-2-git-send-email-dgilbert@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
| * vmstate: Remove redefinition of VMSTATE_UINT32_ARRAYSoren Brinkmann2015-09-291-3/+0
| | | | | | | | | | | | | | | | | | | | The macro is defined twice in identical ways. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Message-Id: <1439532987-16335-1-git-send-email-soren.brinkmann@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
* | Merge remote-tracking branch 'remotes/pmaydell/tags/pull-cocoa-20150925-1' ↵Peter Maydell2015-09-251-54/+65
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging cocoa queue: * fix stuck-key bug if keys were down when QEMU lost focus * prompt the user whether they really meant to quit * remove the 'open image file' dialog box we used to display if the user started QEMU without arguments # gpg: Signature made Fri 25 Sep 2015 23:17:19 BST using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" # gpg: aka "Peter Maydell <pmaydell@gmail.com>" # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" * remotes/pmaydell/tags/pull-cocoa-20150925-1: ui/cocoa.m: remove open dialog code ui/cocoa.m: prevent stuck key situation ui/cocoa.m: verify with user before quitting QEMU Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * ui/cocoa.m: remove open dialog codeJohn Arbuckle2015-09-251-54/+2
| | | | | | | | | | | | | | | | | | | | | | | | Removes the open dialog code that runs when no arguments are supplied with QEMU. Not everyone needs a hard drive or cdrom to boot their target. A user might only need to use their target's bios to do work. With that said, this patch removes the unneeded open dialog code. Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Message-id: 33856864-321C-4367-9170-FB0BF81E789B@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * ui/cocoa.m: prevent stuck key situationJohn Arbuckle2015-09-251-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user puts QEMU in the background while holding down a key, QEMU will not receive the keyup event when the user lets go of the key. When the user goes back to QEMU, QEMU will think the key is still down causing stuck key symptoms. This patch fixes this problem by releasing all down keys when QEMU goes into the background. Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Message-id: 7A3FA6EE-84C8-4422-A786-C899B7229D32@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * ui/cocoa.m: verify with user before quitting QEMUJohn Arbuckle2015-09-251-1/+38
|/ | | | | | | | | | | | This patch prevents the user from accidentally quitting QEMU by pushing Command-Q or by pushing the close button on the main window. When the user does one of these two things, a dialog box appears verifying with the user if he or she wants to quit QEMU. Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Message-id: 29169A74-0347-47F5-934F-A5AD24C225CA@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell2015-09-2585-386/+1341
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * First batch of MAINTAINERS updates * IOAPIC fixes (to pass kvm-unit-tests with -machine kernel_irqchip=off) * NBD API upgrades from Daniel * strtosz fixes from Marc-André * improved support for readonly=on on scsi-generic devices * new "info ioapic" and "info lapic" monitor commands * Peter Crosthwaite's ELF_MACHINE cleanups * docs patches from Thomas and Daniel # gpg: Signature made Fri 25 Sep 2015 11:20:52 BST using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" * remotes/bonzini/tags/for-upstream: (52 commits) doc: Refresh URLs in the qemu-tech documentation docs: describe the QEMU build system structure / design typedef: add typedef for QemuOpts i386: interrupt poll processing i386: partial revert of interrupt poll fix ppc: Rename ELF_MACHINE to be PPC specific i386: Rename ELF_MACHINE to be x86 specific alpha: Remove ELF_MACHINE from cpu.h mips: Remove ELF_MACHINE from cpu.h sparc: Remove ELF_MACHINE from cpu.h s390: Remove ELF_MACHINE from cpu.h sh4: Remove ELF_MACHINE from cpu.h xtensa: Remove ELF_MACHINE from cpu.h tricore: Remove ELF_MACHINE from cpu.h or32: Remove ELF_MACHINE from cpu.h lm32: Remove ELF_MACHINE from cpu.h unicore: Remove ELF_MACHINE from cpu.h moxie: Remove ELF_MACHINE from cpu.h cris: Remove ELF_MACHINE from cpu.h m68k: Remove ELF_MACHINE from cpu.h ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * doc: Refresh URLs in the qemu-tech documentationThomas Huth2015-09-251-43/+30
| | | | | | | | | | | | | | | | | | | | The TwoOStwo and Willows page seem to have disappeared completely, and also some of the other links were not pointing to the right locations anymore. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1443173916-8895-1-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * docs: describe the QEMU build system structure / designDaniel P. Berrange2015-09-252-0/+515
| | | | | | | | | | | | | | | | | | | | | | | | | | Developers who are new to QEMU, or have a background familiarity with GNU autotools, can have trouble getting their head around the home-grown QEMU build system. This document attempts to explain the structure / design of the configure script and the various Makefile pieces that live across the source tree. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1443102098-13642-1-git-send-email-berrange@redhat.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * typedef: add typedef for QemuOptsPavel Dovgalyuk2015-09-252-4/+4
| | | | | | | | | | | | | | | | | | | | | | This patch moves typedefs for QemuOpts and related types to qemu/typedefs.h file. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162501.8676.85435.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * i386: interrupt poll processingPavel Dovgalyuk2015-09-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | This patch updates x86_cpu_exec_interrupt function. It can process two interrupt request at a time (poll and another one). This makes its execution non-deterministic. Determinism is requred for recorded icount execution. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162410.8676.13042.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * i386: partial revert of interrupt poll fixPavel Dovgalyuk2015-09-252-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | Processing CPU_INTERRUPT_POLL requests in cpu_has_work functions break the determinism of cpu_exec. This patch is required to make interrupts processing deterministic. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162331.8676.15286.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * ppc: Rename ELF_MACHINE to be PPC specificPeter Crosthwaite2015-09-259-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename ELF_MACHINE to be PPC specific. This is used as-is by the various PPC bootloaders and is locally defined to ELF_MACHINE in linux user in PPC specific ifdeffery. This removes another architecture specific definition from the global namespace (as desired by multi-arch). Cc: Alexander Graf <agraf@suse.de> Cc: qemu-ppc@nongnu.org Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * i386: Rename ELF_MACHINE to be x86 specificPeter Crosthwaite2015-09-252-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename ELF_MACHINE to be I386 specific. This is used as-is by the multiboot loader. Linux-user previously used this definition but will not anymore, falling back to the default bahaviour of using ELF_ARCH as ELF_MACHINE. This removes another architecture specific definition from the global namespace. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * alpha: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-251-2/+0
| | | | | | | | | | | | | | | | | | | | ELF_MACHINE is unused by target alpha. Cc: Richard Henderson <rth@twiddle.net> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * mips: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-255-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. The bootloaders can just pass EM_MIPS directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Leon Alrae <leon.alrae@imgtec.com> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * sparc: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-254-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bootloaders can just pass EM_SPARC or EM_SPARCV9 directly, as they are architecture specific code (to one or the other). This removes another architecture specific definition from the global namespace. Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * s390: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-252-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bootloader can just pass EM_S390 directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Richard Henderson <rth@twiddle.net> Cc: Alexander Graf <agraf@suse.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * sh4: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. This removes another architecture specific definition from the global namespace. Cc: Aurelien Jarno <aurelien@aurel32.net> Acked-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * xtensa: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-253-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bootloaders can just pass EM_XTENSA directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * tricore: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-252-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bootloader can just pass EM_TRICORE directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Acked-By: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * or32: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-252-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. The bootloader can just pass EM_OPENRISC directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Jia Liu <proljc@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * lm32: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-253-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bootloaders can just pass EM_LATTICEMICO32 directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Michael Walle <michael@walle.cc> Acked-By: Michael Walle <michael@walle.cc> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * unicore: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. This removes another architecture specific definition from the global namespace. Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * moxie: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-252-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bootloader can just pass EM_MOXIE directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Anthony Green <green@moxielogic.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * cris: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-252-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. The bootloader can just pass EM_CRIS directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * m68k: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-254-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only generic code relying on this is linux-user, but linux users' default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle this. The machine model bootloaders can just pass EM_68K directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Laurent Vivier <laurent@vivier.eu> Cc: Greg Ungerer <gerg@uclinux.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Reviewed-by: Greg Ungerer <gerg@uclinux.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * mb: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-252-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only generic code relying on this is linux-user, but linux-users' default behaviour or setting ELF_MACHINE to ELF_ARCH will handle this. The microblaze bootloader can just pass EM_MICROBLAZE directly, as that is architecture specific code. This removes another architecture specific definition from the global namespace. Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * arm: Remove ELF_MACHINE from cpu.hPeter Crosthwaite2015-09-253-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only generic code relying on this is linux-user. Linux user already has a lot of #ifdef TARGET_ customisation so instead, define ELF_ARCH as either EM_ARM or EM_AARCH64 appropriately. The armv7m bootloader can just pass EM_ARM directly, as that is architecture specific code. Note that arm_boot already has its own logic selecting an arm specific elf machine so this makes V7M more consistent with arm_boot. This removes another architecture specific definition from the global namespace. Cc: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * elf: Update EM_MOXIE definitionPeter Crosthwaite2015-09-254-1/+13
| | | | | | | | | | | | | | | | | | | | EM_MOXIE now has a proper assigned elf code. Use it. Register the old interim value as EM_MOXIE_OLD and accept either in elf loading. Cc: Anthony Green <green@moxielogic.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * elf_ops: Fix coding style for EM alias case statementPeter Crosthwaite2015-09-251-6/+9
| | | | | | | | | | | | | | | | | | Fix the coding style for these cases as per CODING_STYLE. Reverse the Yoda conditions and add missing if braces. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud