- Jun 04, 2010
-
-
Paolo Bonzini authored
Negative four byte displacements need to be sign-extended after c086b783. Do so. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Acked-by:
Richard Henderson <rth@twiddle.net> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Jun 01, 2010
-
-
Andre Przywara authored
Create a kvm32 CPU model that describes a least common denominator for KVM capable guest CPUs. Useful for migration purposes. Signed-off-by:
Andre Przywara <andre.przywara@amd.com> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- May 11, 2010
-
-
Gleb Natapov authored
On AMD some bits from 1.EDX are reported in 80000001.EDX. The mask used to copy bits from 1.EDX to 80000001.EDX is incorrect resulting in unsupported features passed into a guest. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Gleb Natapov authored
Continue vcpu execution in case emulation failure happened while vcpu was in userspace. In this case #UD will be injected into the guest allowing guest OS to kill offending process and continue. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Marcelo Tosatti authored
Process INIT/SIPI requests and enable -smp > 1. Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Jan Kiszka authored
Validate that KVM vcpu state is only read/written from cpu thread itself or that cpu is stopped. Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
- May 05, 2010
-
-
Richard Henderson authored
The proper logging for -d cpu is done in generic code. Signed-off-by:
Richard Henderson <rth@twiddle.net> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
- Apr 26, 2010
-
-
Sheng Yang authored
If we use larger BIOS image than current 256KB, we would need move reserved TSS and EPT identity mapping pages. Currently TSS support this, but not EPT. Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Marcelo Tosatti authored
Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Avi Kivity <avi@redhat.com>
-
Jan Kiszka authored
Make use of the new KVM_GET/SET_DEBUGREGS to save/restore the x86 debug registers. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
- Apr 25, 2010
-
-
Blue Swirl authored
Value stored is never read. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Apr 18, 2010
-
-
Blue Swirl authored
Fixes clang errors: CC i386-softmmu/kvm.o /src/qemu/target-i386/kvm.c:40:9: error: 'dprintf' macro redefined In file included from /src/qemu/target-i386/kvm.c:21: In file included from /src/qemu/qemu-common.h:27: In file included from /usr/include/stdio.h:910: /usr/include/bits/stdio2.h:189:12: note: previous definition is here CC i386-softmmu/kvm-all.o /src/qemu/kvm-all.c:39:9: error: 'dprintf' macro redefined In file included from /src/qemu/kvm-all.c:23: In file included from /src/qemu/qemu-common.h:27: In file included from /usr/include/stdio.h:910: /usr/include/bits/stdio2.h:189:12: note: previous definition is here Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Apr 08, 2010
-
-
Adam Lackorzynski authored
Signed-off-by:
Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Stefan Weil authored
With argument checking for cpu_fprintf, gcc throws this warning: CC i386-softmmu/helper.o cc1: warnings being treated as errors /qemu/ar7/target-i386/helper.c: In function ‘cpu_x86_dump_seg_cache’: /qemu/ar7/target-i386/helper.c:220: error: format not a string literal and no format arguments The code is correct, but current gcc versions don't detect this. Therefore the patch rewrites the statement to satisfy the compiler. Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
- Mar 17, 2010
-
-
Paul Brook authored
QEMU uses a fixed page size for the CPU TLB. If the guest uses large pages then we effectively split these into multiple smaller pages, and populate the corresponding TLB entries on demand. When the guest invalidates the TLB by virtual address we must invalidate all entries covered by the large page. However the address used to invalidate the entry may not be present in the QEMU TLB, so we do not know which regions to clear. Implementing a full vaiable size TLB is hard and slow, so just keep a simple address/mask pair to record which addresses may have been mapped by large pages. If the guest invalidates this region then flush the whole TLB. Signed-off-by:
Paul Brook <paul@codesourcery.com>
-
- Mar 13, 2010
-
-
Aurelien Jarno authored
Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
Enable all features of real CPU, unsupported features will be trimmed depending on TCG or KVM capabilities. Move the list of unsupported TCG features near the TCG capabilities masks. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Andre Przywara authored
Bump up the xlevel number for qemu32 to allow parsing of the processor name string for this model. Similiarly the 486 processor should have at least the feature bit leaf enabled. Signed-off-by:
Andre Przywara <andre.przywara@amd.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Andre Przywara authored
Since 64-bit capability is just another CPUID bit we now properly mask, there is no reason anymore to hide the 64-bit capable CPU models from a 32-bit only QEMU. All 64-bit CPUs can be used perfectly in 32-bit legacy mode anyway, so these models also make sense for 32-bit. Signed-off-by:
Andre Przywara <andre.przywara@amd.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Andre Przywara authored
In KVM we trim the user provided CPUID bits to match the host CPU's one. Introduce a similar feature to QEMU/TCG. Create a mask of TCG's capabilities and apply it to the user bits. This allows to let the CPU models reflect their native archetypes. Signed-off-by:
Andre Przywara <andre.przywara@amd.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Andre Przywara authored
Correct me if I am wrong, but kvm_trim looks like a really bloated implementation of a bitwise AND. So remove this function and replace it with the real stuff(TM). Signed-off-by:
Andre Przywara <andre.przywara@amd.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Andre Przywara authored
Signed-off-by:
Andre Przywara <andre.przywara@amd.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Andre Przywara authored
Some CPUID feature flags had no string value, so they could not be switched on or off from the command line. Add names for the missing ones mentioned in the current public CPUID specification from both Intel and AMD. Those only mentioned in the Linux kernel source I put as comments. Signed-off-by:
Andre Przywara <andre.przywara@amd.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Andre Przywara authored
the host_cpuid function was located at the end of the file and had a prototype before it's first use. Move it up and remove the prototype. Signed-off-by:
Andre Przywara <andre.przywara@amd.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Andre Przywara authored
This one was accidently removed with commit bb0300dc Signed-off-by:
Andre Przywara <andre.przywara@amd.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Andre Przywara authored
CPUID leaf Fn8000_0001.EDX contains a copy of many Fn0000_0001.EDX bits. Define a name for this mask to improve readability and avoid typos. Signed-off-by:
Andre Przywara <andre.przywara@amd.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Andre Przywara authored
about half of target-i386/helper.c consist of CPUID related functions. Only one of them is a real TCG helper function. So move the whole CPUID stuff out of this into a separate file to get better maintainable parts. This is only code reordering and should not affect QEMU's functionality. Signed-off-by:
Andre Przywara <andre.przywara@amd.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
TeLeMan authored
The commit c2254920 led movntps & movntdq to be translated incorrectly. Signed-off-by:
TeLeMan <geleman@gmail.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
- Mar 12, 2010
-
-
Paul Brook authored
cpu_get_phys_page_debug makes no sense for userspace emulation, so remove it. Signed-off-by:
Paul Brook <paul@codesourcery.com>
-
Richard Henderson authored
Removes a set of ifdefs from exec.c. Introduce TARGET_VIRT_ADDR_SPACE_BITS for all targets other than Alpha. This will be used for page_find_alloc, which is supposed to be using virtual addresses in the first place. Signed-off-by:
Richard Henderson <rth@twiddle.net>
-
- Mar 10, 2010
-
-
Aurelien Jarno authored
A SIB byte with an index of 4 means "no scaled index", even if the scale value is not 0. In 64-bit mode, if REX.X is used, an index of 4 selects %r12. This is correctly handled by the computation of the index variable, which includes the index bits, and also the REX.X prefix: index = ((code >> 3) & 7) | REX_X(s); Thanks to Avi Kivity, Jamie Lokier and Malc for the analysis of the problem and the initial patch. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
- Mar 06, 2010
-
-
malc authored
Signed-off-by:
malc <av1474@comtv.ru> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
Aurelien Jarno authored
This instruction load data from memory to register and not the reverse. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
- Mar 04, 2010
-
-
Jan Kiszka authored
Do not write nmi_pending, sipi_vector, and mpstate unless we at least go through a reset. And TSC as well as KVM wallclocks should only be written on full sync, otherwise we risk to drop some time on state read-modify-write. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Jan Kiszka authored
This grand cleanup drops all reset and vmsave/load related synchronization points in favor of four(!) generic hooks: - cpu_synchronize_all_states in qemu_savevm_state_complete (initial sync from kernel before vmsave) - cpu_synchronize_all_post_init in qemu_loadvm_state (writeback after vmload) - cpu_synchronize_all_post_init in main after machine init - cpu_synchronize_all_post_reset in qemu_system_reset (writeback after system reset) These writeback points + the existing one of VCPU exec after cpu_synchronize_state map on three levels of writeback: - KVM_PUT_RUNTIME_STATE (during runtime, other VCPUs continue to run) - KVM_PUT_RESET_STATE (on synchronous system reset, all VCPUs stopped) - KVM_PUT_FULL_STATE (on init or vmload, all VCPUs stopped as well) This level is passed to the arch-specific VCPU state writing function that will decide which concrete substates need to be written. That way, no writer of load, save or reset functions that interact with in-kernel KVM states will ever have to worry about synchronization again. That also means that a lot of reasons for races, segfaults and deadlocks are eliminated. cpu_synchronize_state remains untouched, just as Anthony suggested. We continue to need it before reading or writing of VCPU states that are also tracked by in-kernel KVM subsystems. Consequently, this patch removes many cpu_synchronize_state calls that are now redundant, just like remaining explicit register syncs. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Jan Kiszka authored
So far we synchronized any dirty VCPU state back into the kernel before updating the guest debug state. This was a tribute to a deficite in x86 kernels before 2.6.33. But as this is an arch-dependent issue, it is better handle in the x86 part of KVM and remove the writeback point for generic code. This also avoids overwriting the flushed state later on if user space decides to change some more registers before resuming the guest. We furthermore need to reinject guest exceptions via the appropriate mechanism. That is KVM_SET_GUEST_DEBUG for older kernels and KVM_SET_VCPU_EVENTS for recent ones. Using both mechanisms at the same time will cause state corruptions. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
- Mar 01, 2010
-
-
Paul Brook authored
Only include ioport.h where it is actually needed. Signed-off-by:
Paul Brook <paul@codesourcery.com>
-
- Feb 28, 2010
-
-
Jason Wessel authored
If you make use of hw breakpoints on a 32bit x86 linux host, qemu will segmentation fault when processing the exception. The problem is that the value of env is stored in $ebp in the op_helper raise_exception() function, and it can have the wrong value when calling it from non generated code. It is possible to work around the problem by restoring the value of env before calling raise_exception() using a new helper function that takes (CPUState *) as one of the arguments. Signed-off-by:
Jason Wessel <jason.wessel@windriver.com> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net>
-
- Feb 23, 2010
-
-
Blue Swirl authored
helper.o(.text+0x11e0): In function `listflags': /src/qemu/target-i386/helper.c:661: warning: sprintf() is often misused, please use snprintf() Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-