summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* PCI/migration merge vmstate_pci_device and vmstate_pcie_deviceDr. David Alan Gilbert2017-01-2410-41/+26Star
| | | | | | | | | | | | | | | | | | | | | | | | | | The vmstate_pci_device and vmstate_pcie_devices differ just in the size of one buffer; combine the two using a _TEST macro. I think this is safe as long as everywhere which currently uses either of these two uses the right type. One thing that concerns me is that some places use pci_device_load/save which does some irq mangling, but others just use the VMSTATE_PCI_DEVICE macro - how are they getting the same irq mangling? This passes a smoke test migrate of: ./x86_64-softmmu/qemu-system-x86_64 -M pc,accel=kvm -m 1024 ./littlefed20.img -device e1000e -device virtio-net -device e1000 -device virtio-rng -device megasas -device megasas-gen2 -device ioh3420 -device nec-usb-xhci to an unmodified qemu. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20161214195829.18241-1-dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Change name of live migration threadPankaj Gupta2017-01-241-1/+1
| | | | | | | | | | | | | | Change the name of live migration thread from 'migration' to 'live_migration' to identify it clearly. 'migration' is a generic word and kernel also has tasks for process migration with the name 'migration/cpu#'. Signed-off-by: Pankaj Gupta <pagupta@redhat.com> Message-Id: <1485178976-15225-1-git-send-email-pagupta@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: re-active images while migration been canceled after inactive themzhanghailiang2017-01-242-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit fe904ea8242cbae2d7e69c052c754b8f5f1ba1d6 fixed a case which migration aborted QEMU because it didn't regain the control of images while some errors happened. Actually, there are another two cases can trigger the same error reports: " bdrv_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed", Case 1, codes path: migration_thread() migration_completion() bdrv_inactivate_all() ----------------> inactivate images qemu_savevm_state_complete_precopy() socket_writev_buffer() --------> error because destination fails qemu_fflush() ----------------> set error on migration stream -> qmp_migrate_cancel() ----------------> user cancelled migration concurrently -> migrate_set_state() ------------------> set migrate CANCELLIN migration_completion() -----------------> go on to fail_invalidate if (s->state == MIGRATION_STATUS_ACTIVE) -> Jump this branch Case 2, codes path: migration_thread() migration_completion() bdrv_inactivate_all() ----------------> inactivate images migreation_completion() finished -> qmp_migrate_cancel() ---------------> user cancelled migration concurrently qemu_mutex_lock_iothread(); qemu_bh_schedule (s->cleanup_bh); As we can see from above, qmp_migrate_cancel can slip in whenever migration_thread does not hold the global lock. If this happens after bdrv_inactive_all() been called, the above error reports will appear. To prevent this, we can call bdrv_invalidate_cache_all() in qmp_migrate_cancel() directly if we find images become inactive. Besides, bdrv_invalidate_cache_all() in migration_completion() doesn't have the protection of big lock, fix it by add the missing qemu_mutex_lock_iothread(); Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Message-Id: <1485244792-11248-1-git-send-email-zhang.zhanghailiang@huawei.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Fail migration blocker for --only-migratableAshijeet Acharya2017-01-242-1/+8
| | | | | | | | | | | | | | migrate_add_blocker should rightly fail if the '--only-migratable' option was specified and the device in use should not be able to perform the action which results in an unmigratable VM. Make migrate_add_blocker return -EACCES in this case. Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com> Message-Id: <1484566314-3987-6-git-send-email-ashijeetacharya@gmail.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: disallow migrate_add_blocker during migrationAshijeet Acharya2017-01-2418-81/+222
| | | | | | | | | | | | | | | If a migration is already in progress and somebody attempts to add a migration blocker, this should rightly fail. Add an errp parameter and a retcode return value to migrate_add_blocker. Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com> Message-Id: <1484566314-3987-5-git-send-email-ashijeetacharya@gmail.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Greg Kurz <groug@kaod.org> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Merged with recent 'Allow invtsc migration' change
* migration: Allow "device add" options to only add migratable devicesAshijeet Acharya2017-01-242-0/+28
| | | | | | | | | | | | | | Introduce checks for the unmigratable flag in the VMStateDescription structs of respective devices when user attempts to add them. If the "--only-migratable" was specified, all unmigratable devices will rightly fail to add. This feature is made compatible for both "-device" and "-usbdevice" command line options and covers their hmp and qmp counterparts as well. Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com> Message-Id: <1484566314-3987-4-git-send-email-ashijeetacharya@gmail.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: Add a new option to enable only-migratableAshijeet Acharya2017-01-243-0/+16
| | | | | | | | | | | | | Add a new option "--only-migratable" in qemu which will allow to add only those devices which will not fail qemu after migration. Devices set with the flag 'unmigratable' cannot be added when this option will be used. Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com> Message-Id: <1484566314-3987-3-git-send-email-ashijeetacharya@gmail.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* block/vvfat: Remove the undesirable commentAshijeet Acharya2017-01-241-1/+0Star
| | | | | | | | | Remove the "// assert(is_consistent(s))" comment in block/vvfat.c Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com> Message-Id: <1484566314-3987-2-git-send-email-ashijeetacharya@gmail.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: add error_reportJianjun Duan2017-01-241-0/+6
| | | | | | | | | | Added error_report where version_ids do not match in vmstate_load_state. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Jianjun Duan <duanj@linux.vnet.ibm.com> Message-Id: <1484852453-12728-5-git-send-email-duanj@linux.vnet.ibm.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* tests/migration: Add test for QTAILQ migrationJianjun Duan2017-01-241-0/+147
| | | | | | | | | Add a test for QTAILQ migration to tests/test-vmstate.c. Signed-off-by: Jianjun Duan <duanj@linux.vnet.ibm.com> Message-Id: <1484852453-12728-4-git-send-email-duanj@linux.vnet.ibm.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: migrate QTAILQJianjun Duan2017-01-244-0/+153
| | | | | | | | | | | | | | | | | | | | | | | | | Currently we cannot directly transfer a QTAILQ instance because of the limitation in the migration code. Here we introduce an approach to transfer such structures. We created VMStateInfo vmstate_info_qtailq for QTAILQ. Similar VMStateInfo can be created for other data structures such as list. When a QTAILQ is migrated from source to target, it is appended to the corresponding QTAILQ structure, which is assumed to have been properly initialized. This approach will be used to transfer pending_events and ccs_list in spapr state. We also create some macros in qemu/queue.h to access a QTAILQ using pointer arithmetic. This ensures that we do not depend on the implementation details about QTAILQ in the migration code. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Jianjun Duan <duanj@linux.vnet.ibm.com> Message-Id: <1484852453-12728-3-git-send-email-duanj@linux.vnet.ibm.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* migration: extend VMStateInfoJianjun Duan2017-01-2422-106/+263
| | | | | | | | | | | | | Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. put now will return int type. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Jianjun Duan <duanj@linux.vnet.ibm.com> Message-Id: <1484852453-12728-2-git-send-email-duanj@linux.vnet.ibm.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* MAINTAINERS: Add myself as a migration submaintainerDr. David Alan Gilbert2017-01-241-0/+1
| | | | | | | | Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20170124100437.18200-1-dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* Merge remote-tracking branch ↵Peter Maydell2017-01-2419-135/+108Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging x86, machine, numa queue (2017-01-23) # gpg: Signature made Mon 23 Jan 2017 23:26:59 GMT # gpg: using RSA key 0x2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/x86-and-machine-pull-request: kvm: Allow invtsc migration if tsc-khz is set explicitly kvm: Simplify invtsc check hw/core/null-machine: Add the possibility to instantiate a CPU and RAM qemu-options: Rename variables on the -numa "cpus" option MAINTAINERS: Add an entry for hw/core/null-machine.c machine: Make possible_cpu_arch_ids() return const pointer pc: don't return cpu pointer from pc_new_cpu() as it's not needed anymore pc: cleanup: move smbios_set_cpuid() into pc_build_smbios() arch_init: Remove unnecessary default_config_files table vl: Ensure the numa_post_machine_init func in the appropriate location i386: Return migration-safe field on query-cpu-definitions i386: Remove AMD feature flag aliases from Opteron models x86: add AVX512_VPOPCNTDQ features Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * kvm: Allow invtsc migration if tsc-khz is set explicitlyEduardo Habkost2017-01-241-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We can safely allow a VM to be migrated with invtsc enabled if tsc-khz is set explicitly, because: * QEMU already refuses to start if it can't set the TSC frequency to the configured value. * Management software is already required to keep device configuration (including CPU configuration) the same on migration source and destination. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170108173234.25721-3-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * kvm: Simplify invtsc checkEduardo Habkost2017-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | Instead of searching the table we have just built, we can check the env->features field directly. Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170108173234.25721-2-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * hw/core/null-machine: Add the possibility to instantiate a CPU and RAMThomas Huth2017-01-242-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes it is useful to have just a machine with CPU and RAM, without any further hardware in it, e.g. if you just want to do some instruction debugging for TCG with a remote GDB attached to QEMU, or run some embedded code with the "-semihosting" QEMU parameter. qemu-system-m68k already features a "dummy" machine, and xtensa a "sim" machine for exactly this purpose. All target architectures have nowadays also a "none" machine, which would be a perfect match for this, too - but it currently does not allow to add CPU and RAM yet. Thus let's add these possibilities in a generic way to the "none" machine, too, so that we hopefully do not need additional "dummy" machines in the future anymore (and maybe can also get rid of the already existing "dummy"/"sim" machines one day). Note that the default behaviour of the "none" machine is not changed, i.e. no CPU and no RAM is instantiated by default. You have explicitely got to specify the CPU model with "-cpu" and the amount of RAM with "-m" to get these new features. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1484743490-24721-1-git-send-email-thuth@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * qemu-options: Rename variables on the -numa "cpus" optionEduardo Habkost2017-01-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use @var{firstcpu} and @var{lastcpu} to make the metasyntatic variables a bit clearer. While doing this, use @var only around the metasyntatic variables, not including the square brackets and hyphen. The semantics of the "cpus" option will be clarified by rewriting the whole -numa documentation in a follow-up patch. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170123180632.28942-2-ehabkost@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * MAINTAINERS: Add an entry for hw/core/null-machine.cThomas Huth2017-01-241-0/+1
| | | | | | | | | | | | | | | | | | The "Machine core" section sounds like a good match for this file. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1485150895-19753-1-git-send-email-thuth@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * machine: Make possible_cpu_arch_ids() return const pointerIgor Mammedov2017-01-248-23/+13Star
| | | | | | | | | | | | | | | | | | | | | | make sure that external callers won't try to modify possible_cpus and owner of possible_cpus can access it directly when it modifies it. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1484759609-264075-5-git-send-email-imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * pc: don't return cpu pointer from pc_new_cpu() as it's not needed anymoreIgor Mammedov2017-01-241-16/+8Star
| | | | | | | | | | | | | | Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1484759609-264075-4-git-send-email-imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * pc: cleanup: move smbios_set_cpuid() into pc_build_smbios()Igor Mammedov2017-01-241-8/+9
| | | | | | | | | | | | | | | | | | | | move smbios_set_cpuid() close to the rest of smbios init code where it belongs to instead of calling it from pc_cpus_init(). Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1484759609-264075-3-git-send-email-imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * arch_init: Remove unnecessary default_config_files tableEduardo Habkost2017-01-243-35/+14Star
| | | | | | | | | | | | | | | | | | | | | | The existing default_config_files table in arch_init.c has a single entry, making it completely unnecessary. The whole code can be replaced by a single qemu_read_config_file() call in vl.c. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170117180051.11958-1-ehabkost@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * vl: Ensure the numa_post_machine_init func in the appropriate locationDou Liyang2017-01-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the numa_post_machine_init(), we use CPU_FOREACH macro to set all CPUs' namu_node. So, we should make sure that we call it after Qemu has already initialied all the CPUs. As we all know, the CPUs can be created by "-smp"(pc_new_cpu) or "-device"(qdev_device_add) command. But, before the device init, Qemu execute the numa_post_machine_init earlier. It makes the mapping of NUMA nodes and CPUs incorrect. The patch move the numa_post_machine_init func in the appropriate location. Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com> Message-Id: <1484664152-24446-2-git-send-email-douly.fnst@cn.fujitsu.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * i386: Return migration-safe field on query-cpu-definitionsEduardo Habkost2017-01-242-0/+5
| | | | | | | | | | | | | | | | | | | | Return the migration-safe field on query-cpu-definitions. All CPU models in x86 are migration-safe except "host". Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170116181212.31565-1-ehabkost@redhat.com> Acked-by: David Hildenbrand <david@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * i386: Remove AMD feature flag aliases from Opteron modelsEduardo Habkost2017-01-241-34/+12Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CPU vendor is set to AMD, the AMD feature alias bits on CPUID[0x80000001].EDX are already automatically copied from CPUID[1].EDX on x86_cpu_realizefn(). When CPU vendor is Intel, those bits are reserved and should be zero. On either case, those bits shouldn't be set in the CPU model table. Commit 726a8ff68677d8d5fba17eb0ffb85076bfb598dc removed those bits from most CPU models, but the Opteron_* entries still have them. Remove the alias bits from Opteron_* too. Add an assert() to x86_register_cpudef_type() to ensure we don't make the same mistake again. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170113190057.6327-1-ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
| * x86: add AVX512_VPOPCNTDQ featuresHe Chen2017-01-242-1/+2
| | | | | | | | | | | | | | | | | | | | AVX512_VPOPCNTDQ: Vector POPCNT instructions for word and qwords. variable precision. Signed-off-by: He Chen <he.chen@linux.intel.com> Message-Id: <1484272411-28073-1-git-send-email-he.chen@linux.intel.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* | Makefile: Add qemu-doc.txt to distclean and dependenciesPeter Maydell2017-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When qemu-doc.txt was added as a new output format in commit f8bab10b4c3f, it was not added to either the list of files to remove in distclean or to the dependency line that forces qemu-options.texi to be built before attempting to build qemu-doc.*. In particular, the missing dependency meant that on some platforms (notably OSX hosts) we would try to build qemu-doc.txt before qemu-options.texi had been fully written out, and then makeinfo would complain about missing cross-reference targets. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1485266538-10119-1-git-send-email-peter.maydell@linaro.org Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* | Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20170123' into stagingPeter Maydell2017-01-2436-77/+9842
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hppa-linux target support # gpg: Signature made Mon 23 Jan 2017 17:54:09 GMT # gpg: using RSA key 0xAD1270CC4DD0279B # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>" # gpg: aka "Richard Henderson <rth@redhat.com>" # gpg: aka "Richard Henderson <rth@twiddle.net>" # Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC 16A4 AD12 70CC 4DD0 279B * remotes/rth/tags/pull-hppa-20170123: (25 commits) target-hppa: Implement floating-point insns target-hppa: Implement system and memory-management insns target-hppa: Implement loads and stores target-hppa: Implement shifts and deposits target-hppa: Implement linux-user gateway page target-hppa: Implement branches target-hppa: Implement basic arithmetic target-hppa: Add nullification framework target-hppa: Add framework and enable compilation target-hppa: Add softfloat specializations linux-user: Add HPPA startup and main loop linux-user: Add HPPA signal handling linux-user: Add HPPA target_signal.h and target_cpu.h linux-user: Add HPPA target_structs.h linux-user: Add HPPA definitions to syscall_defs.h linux-user: Add HPPA target_syscall.h linux-user: Add HPPA termbits.h linux-user: Add HPPA syscall numbers linux-user: Add HPPA socket.h definitions linux-user: Add some hppa ioctls ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * target-hppa: Implement floating-point insnsRichard Henderson2017-01-233-0/+1177
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-hppa: Implement system and memory-management insnsRichard Henderson2017-01-233-0/+219
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-hppa: Implement loads and storesRichard Henderson2017-01-233-0/+699
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-hppa: Implement shifts and depositsRichard Henderson2017-01-231-0/+309
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-hppa: Implement linux-user gateway pageRichard Henderson2017-01-231-4/+81
| | | | | | | | | | | | | | | | | | | | | | | | For linux, page 0 is mapped as an execute-only gateway. A gateway page is a special bit in the page table that allows a B,GATE insn within that page to raise processor permissions. This is how system calls are implemented for HPPA. Rather than actually map anything here, or handle permissions at all, implement the semantics of the actual linux syscall entry points. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-hppa: Implement branchesRichard Henderson2017-01-231-0/+477
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-hppa: Implement basic arithmeticRichard Henderson2017-01-233-0/+907
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-hppa: Add nullification frameworkRichard Henderson2017-01-231-4/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HPPA cpu has a unique form of predicated execution in which almost any instruction can set the PSW[N] (or "nullify") bit, which suppresses execution (and even decoding) of the following instruction. Execution of a nullified insn clears the PSW[N] bit. This adds a generic framework for branching over nullified insns, or for sufficiently simple insns, transforming the writeback of the result to a conditional move. In the process, we want to be able to represent PSW[N] as a TCG condition, which implies management of the related tcg temps. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-hppa: Add framework and enable compilationRichard Henderson2017-01-2312-3/+1116
| | | | | | | | | | | | | | | | | | | | This is just about the minimum required to enable compilation without actually executing any instructions. This contains the HPPACPU structure and the required callbacks, the gdbstub, the basic translation loop, and a translate_one function that always results in an illegal instruction. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-hppa: Add softfloat specializationsRichard Henderson2017-01-231-1/+19
| | | | | | | | | | | | | | | | | | | | | | Like the original MIPS, HPPA has the MSB of an SNaN set. However, it has different rules for silencing an SNaN: (1) msb is cleared and (2) msb-1 must be set if the fraction is now zero, and (implementation defined) may be set always. I haven't checked real hardware but chose the set always alternative because it's easy and within spec. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * linux-user: Add HPPA startup and main loopRichard Henderson2017-01-232-0/+196
| | | | | | | | | | | | Including support for the atomic memory op syscalls. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * linux-user: Add HPPA signal handlingRichard Henderson2017-01-231-1/+190
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * linux-user: Add HPPA target_signal.h and target_cpu.hRichard Henderson2017-01-232-0/+64
| | | | | | | | | | | | | | The cpu.h structure that these manipulate hasn't been defined yet, but we haven't enabled compilation yet either. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * linux-user: Add HPPA target_structs.hRichard Henderson2017-01-231-0/+54
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * linux-user: Add HPPA definitions to syscall_defs.hRichard Henderson2017-01-231-1/+130
| |
| * linux-user: Add HPPA target_syscall.hRichard Henderson2017-01-231-0/+237
| | | | | | | | | | | | Which is primarily a re-definition of errno numbers. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * linux-user: Add HPPA termbits.hRichard Henderson2017-01-231-0/+219
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * linux-user: Add HPPA syscall numbersRichard Henderson2017-01-231-0/+353
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * linux-user: Add HPPA socket.h definitionsRichard Henderson2017-01-232-0/+99
| | | | | | | | | | | | | | Split this out into a "cpu/sockbits.h" file now, like we ought to do for all of the other targets. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * linux-user: Add some hppa ioctlsHelge Deller2017-01-231-0/+15
| | | | | | | | | | | | | | | | Add F_GETLK, F_SETLK, F_SETLKW, F_GETOWN, F_SETOWN, F_SETSIG, F_GETSIG, F_GETLK64, F_SETLK64 and F_SETLKW64 for hppa. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * linux-user: Handle ERFKILL and EHWPOISONRichard Henderson2017-01-235-0/+21
| | | | | | | | | | | | With definitions for generic, alpha and mips taken from 4.9-rc2. Signed-off-by: Richard Henderson <rth@twiddle.net>