- Feb 25, 2016
-
-
Lluís Vilanova authored
This fixes double-definitions in bsd-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h"). Signed-off-by:
Lluís Vilanova <vilanova@ac.upc.edu> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Feb 23, 2016
-
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
- Feb 04, 2016
-
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1454089805-5470-4-git-send-email-peter.maydell@linaro.org
-
- Feb 03, 2016
-
-
Paolo Bonzini authored
Split the bits that require it to exec/log.h. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Denis V. Lunev <den@openvz.org> Acked-by:
Christian Borntraeger <borntraeger@de.ibm.com> Message-id: 1452174932-28657-8-git-send-email-den@openvz.org Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Dec 17, 2015
-
-
Paolo Bonzini authored
"Unimplemented" messages go to stderr, everything else goes to tracepoints Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Dec 02, 2015
-
-
Paolo Bonzini authored
Anthony reported that >4GB guests on Xen with 32bit QEMU broke after commit 4ed023ce ("Round up RAMBlock sizes to host page sizes", 2015-11-05). In that patch sizes are masked against qemu_host_page_size/mask which are uintptr_t, and thus 32bit on a 32bit QEMU, even though the ram space might be bigger than 4GB on Xen. Since ram_addr_t is not available on user-mode emulation targets, ensure that we get a sign extension when masking away the low bits of the address. Remove the ~10 year old scary comment that the type of these variables is probably wrong, with another equally scary comment. The new comment however does not have "???" in it, which is arguably an improvement. For completeness use the alignment macros in linux-user and bsd-user instead of manually doing an &. linux-user and bsd-user are not affected by the Xen issue, however. Reviewed-by:
Juan Quintela <quintela@redhat.com> Reported-by:
Anthony PERARD <anthony.perard@citrix.com> Fixes: 4ed023ce Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 08, 2015
-
-
Christopher Covington authored
This should help clarify the purpose of the function that returns the host system's CPU cycle count. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> ppc portion Acked-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Sep 11, 2015
-
-
Daniel P. Berrangé authored
The free() and g_free() functions both happily accept NULL on any platform QEMU builds on. As such putting a conditional 'if (foo)' check before calls to 'free(foo)' merely serves to bloat the lines of code. Signed-off-by:
Daniel P. Berrange <berrange@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Daniel P. Berrangé authored
A number of files were including signal.h but not using any of the functions it provides Signed-off-by:
Daniel P. Berrange <berrange@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Sep 09, 2015
-
-
Paolo Bonzini authored
There is some iffy lock hierarchy going on in translate-all.c. To fix it, we need to take the mmap_lock in cpu-exec.c. Make the functions globally available. Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 24, 2015
-
-
Laurent Vivier authored
All tcg host architectures now support the guest base and as there is no real performance lost, it can be always enabled. Anyway, guest base use can be disabled lively by setting guest base to 0. CONFIG_USE_GUEST_BASE is defined as (USE_GUEST_BASE && USER_ONLY), it should have to be replaced by CONFIG_USER_ONLY in non CONFIG_USER_ONLY parts, but as some other parts are using !CONFIG_SOFTMMU I have chosen to use !CONFIG_SOFTMMU instead. Reviewed-by:
Alexander Graf <agraf@suse.de> Signed-off-by:
Laurent Vivier <laurent@vivier.eu> Message-Id: <1440373328-9788-2-git-send-email-laurent@vivier.eu> Signed-off-by:
Richard Henderson <rth@twiddle.net>
-
- Jul 30, 2015
-
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <rth@twiddle.net> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1438195252-21968-1-git-send-email-rth@twiddle.net Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Jul 09, 2015
-
-
Peter Crosthwaite authored
Remove un-needed usages of ENV_GET_CPU() by converting the APIs to use CPUState pointers and retrieving the env_ptr as minimally needed. Scripted conversion for target-* change: for I in target-*/cpu.h; do sed -i \ 's/\(^int cpu_[^_]*_exec(\)[^ ][^ ]* \*s);$/\1CPUState *cpu);/' \ $I; done Signed-off-by:
Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
Peter Crosthwaite authored
All callsites to this function navigate the cpu->env_ptr only for the function to take the env ptr back to the original cpu ptr. Change the function to just pass in the CPU pointer instead. Removes a core code usage of ENV_GET_CPU() (in gdbstub.c). Cc: Riku Voipio <riku.voipio@iki.fi> Reviewed-by:
Andreas Färber <afaerber@suse.de> Reviewed-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
- Jun 05, 2015
-
-
Paolo Bonzini authored
Remove cpu_smm_register and cpu_smm_update. Instead, each CPU address space gets an extra region which is an alias of /machine/smram. This extra region is enabled or disabled as the CPU enters/exits SMM. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Apr 27, 2015
-
-
Fam Zheng authored
The function is a nop for user mode, so just remove them. Signed-off-by:
Fam Zheng <famz@redhat.com> Message-Id: <1426496617-10702-3-git-send-email-famz@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Mar 10, 2015
-
-
Eduardo Habkost authored
Instead of making cpu_init() return CPUArchState, return CPUState. Changes were made using the Coccinelle semantic patch below. @@ typedef CPUState; identifier e; expression args; type CPUArchState; @@ - e = + cpu = cpu_init(args); - if (!e) { + if (!cpu) { ... } - cpu = ENV_GET_CPU(env); + e = cpu->env_ptr; @@ identifier new_env, new_cpu, env, cpu; type CPUArchState; expression args; @@ -{ - CPUState *cpu = ENV_GET_CPU(env); - CPUArchState *new_env = cpu_init(args); - CPUState *new_cpu = ENV_GET_CPU(new_env); +{ + CPUState *cpu = ENV_GET_CPU(env); + CPUState *new_cpu = cpu_init(args); + CPUArchState *new_env = new_cpu->env_ptr; ... } @@ identifier c, cpu_init_func, cpu_model; type StateType, CPUType; @@ -static inline StateType* cpu_init(const char *cpu_model) -{ - CPUType *c = cpu_init_func(cpu_model); ( - if (c == NULL) { - return NULL; - } - return &c->env; | - if (c) { - return &c->env; - } - return NULL; ) -} +#define cpu_init(cpu_model) CPU(cpu_init_func(cpu_model)) @@ identifier cpu_init_func; identifier model; @@ -#define cpu_init(model) (&cpu_init_func(model)->env) +#define cpu_init(model) CPU(cpu_init_func(model)) Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Richard Henderson <rth@twiddle.net> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Michael Walle <michael@walle.cc> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Leon Alrae <leon.alrae@imgtec.com> Cc: Anthony Green <green@moxielogic.com> Cc: Jia Liu <proljc@gmail.com> Cc: Alexander Graf <agraf@suse.de> Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Cc: Max Filippov <jcmvbkbc@gmail.com> [AF: Fixed up cpu_copy() manually] Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
- Jan 20, 2015
-
-
Peter Maydell authored
Use get_user_u64() and get_user_ual() instead of the ldl() and ldq_raw() functions. [Note that this change is not compile tested as it is actually in dead code -- none of the bsd-user configurations are PPC.] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <rth@twiddle.net> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-6-git-send-email-peter.maydell@linaro.org
-
- Jun 10, 2014
-
-
Sean Bruno authored
Signed-off-by:
Sean Bruno <sbruno@freebsd.org> Message-id: 1402246651-71099-10-git-send-email-sbruno@freebsd.org Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Sean Bruno authored
Signed-off-by:
Sean Bruno <sbruno@freebsd.org> Message-id: 1402246651-71099-9-git-send-email-sbruno@freebsd.org Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Sean Bruno authored
Signed-off-by:
Sean Bruno <sbruno@freebsd.org> Message-id: 1402246651-71099-8-git-send-email-sbruno@freebsd.org Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Sean Bruno authored
Signed-off-by:
Sean Bruno <sbruno@freebsd.org> Message-id: 1402246651-71099-7-git-send-email-sbruno@freebsd.org Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Sean Bruno authored
Signed-off-by:
Sean Bruno <sbruno@freebsd.org> Message-id: 1402246651-71099-5-git-send-email-sbruno@freebsd.org Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Sean Bruno authored
Signed-off-by:
Sean Bruno <sbruno@freebsd.org> Message-id: 1402246651-71099-4-git-send-email-sbruno@freebsd.org Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Sean Bruno authored
Signed-off-by:
Sean Bruno <sbruno@freebsd.org> Message-id: 1402246651-71099-3-git-send-email-sbruno@freebsd.org Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Peter Maydell authored
Trying to override the implementations of g_malloc and g_free is a really bad idea -- it means statically linked builds fail to link (because of the multiple definitions provided by this file and by glib), and non-statically linked builds segfault as soon as they try to do anything more complicated than printing the usage message. Remove these overridden versions and just use the glib ones. This is sufficient that bsd-user can run basic x86-64 binaries on OpenBSD again; FreeBSD and NetBSD seem to have further issues. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Sean Bruno <sbruno@freebsd.org> Reviewed-by:
Ed Maste <emaste@freebsd.org>
-
Stacey Son authored
Update FreeBSD system call numbers in freebsd/syscall_nr.h. Signed-off-by:
Stacey Son <sson@FreeBSD.org> Reviewed-by:
Ed Maste <emaste@freebsd.org> Signed-off-by:
Sean Bruno <sbruno@freebsd.org> Message-id: 1401220104-7147-2-git-send-email-sbruno@freebsd.org Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Jun 05, 2014
-
-
Paolo Bonzini authored
This will collect all load and store helpers soon. For now it is just a replacement for softmmu_exec.h, which this patch stops including directly, but we also include it where this will be necessary in order to simplify the next patch. Reviewed-by:
Richard Henderson <rth@twiddle.net> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 02, 2014
-
-
Peter Maydell authored
This reverts commit 1fba5095. That commit converted various fprintf(stderr, ...) calls to use error_report(); however none of these bsd-user files include a header which gives a prototype for error_report, so this causes compiler warnings. Since these are just straightforward reporting of command line errors, we should handle these in the obvious way by printing to stderr, as we do for linux-user. There's no need to drag in the error-handling framework for this, especially since user-mode doesn't have the "maybe we need to send this to the monitor" issues system emulation does. Acked-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- May 26, 2014
-
-
Le Tan authored
Replace fprintf(stderr,...) with error_report() in files bsd-user/*. The trailing "\n"s of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by:
Le Tan <tamlokveer@gmail.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- May 21, 2014
-
-
Paolo Bonzini authored
With the next patch, these need to be correct or VM86 tasks have the wrong CPL. The flags are basically what the Intel VMX documentation say is mandatory for entry into a VM86 guest. For consistency, SMM ought to have the same flags except with CPL=0. Tested-by:
Kevin O'Connor <kevin@koconnor.net> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 13, 2014
-
-
Peter Maydell authored
Commit e586822a broke the bsd-user build when it removed the CONFIG_UNAME_RELEASE define but forgot to remove the use of it in bsd-user. Fix this in the simplest possible way (bsd-user doesn't make any use at all of the qemu_uname_release variable except to allow it to be pointlessly set by the user, so this is all we need to do.) Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1399648001-20980-1-git-send-email-peter.maydell@linaro.org
-
Kevin O'Connor authored
Instead of manually calling cpu_x86_set_cpl() when the CPL changes, check for CPL changes on calls to cpu_x86_load_seg_cache(R_CS). Every location that called cpu_x86_set_cpl() also called cpu_x86_load_seg_cache(R_CS), so cpu_x86_set_cpl() is no longer required. This fixes the SMM handler code as it was not setting/restoring the CPL level manually. Signed-off-by:
Kevin O'Connor <kevin@koconnor.net> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Mar 13, 2014
-
-
Andreas Färber authored
Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
- Sep 20, 2013
-
-
Stefan Weil authored
Add a missing "function" and replace "and" by "any". BSD and Linux use the same documentation here, so fix both. Signed-off-by:
Stefan Weil <sw@weilnetz.de> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Stefan Weil authored
Signed-off-by:
Stefan Weil <sw@weilnetz.de> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Jul 23, 2013
-
-
Andreas Färber authored
Prepares for changing GDBState::c_cpu to CPUState. Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
- Jul 09, 2013
-
-
Andreas Färber authored
Signed-off-by:
Andreas Färber <afaerber@suse.de>
-
- Jun 28, 2013
-
-
Andreas Färber authored
Make cpustats monitor command available unconditionally. Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec() arguments to CPUState. Signed-off-by:
Andreas Färber <afaerber@suse.de>
-