1. 05 10月, 2009 4 次提交
  2. 04 10月, 2009 1 次提交
    • A
      target-i386: add RDTSCP support · 1b050077
      Andre Przywara 提交于
      RDTSCP reads the time stamp counter and atomically also the content
      of a 32-bit MSR, which can be freely set by the OS. This allows CPU
      local data to be queried by userspace.
      Linux uses this to allow a fast implementation of the getcpu()
      syscall, which uses the vsyscall page to avoid a context switch.
      AMD CPUs since K8RevF and Intel CPUs since Nehalem support this
      instruction.
      RDTSCP is guarded by the RDTSCP CPUID bit (Fn8000_0001:EDX[27]).
      Signed-off-by: NAndre Przywara <andre.przywara@amd.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      1b050077
  3. 24 8月, 2009 2 次提交
    • N
      cleanup cpu-exec.c, part 0/N: consolidate handle_cpu_signal · 0b5c1ce8
      Nathan Froyd 提交于
      handle_cpu_signal is very nearly copy-paste code for each target, with a
      few minor variations.  This patch sets up appropriate defaults for a
      generic handle_cpu_signal and provides overrides for particular targets
      that did things differently.  Fixing things like the persistent (XXX:
      use sigsetjmp) should now become somewhat easier.
      
      Previous comments on this patch suggest that the "activate soft MMU for
      this block" comments refer to defunct functionality.  I have removed
      such blocks for the appropriate targets in this patch.
      Signed-off-by: NNathan Froyd <froydnj@codesourcery.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0b5c1ce8
    • A
      Unbreak large mem support by removing kqemu · 4a1418e0
      Anthony Liguori 提交于
      kqemu introduces a number of restrictions on the i386 target.  The worst is that
      it prevents large memory from working in the default build.
      
      Furthermore, kqemu is fundamentally flawed in a number of ways.  It relies on
      the TSC as a time source which will not be reliable on a multiple processor
      system in userspace.  Since most modern processors are multicore, this severely
      limits the utility of kqemu.
      
      kvm is a viable alternative for people looking to accelerate qemu and has the
      benefit of being supported by the upstream Linux kernel.  If someone can
      implement work arounds to remove the restrictions introduced by kqemu, I'm
      happy to avoid and/or revert this patch.
      
      N.B. kqemu will still function in the 0.11 series but this patch removes it from
      the 0.12 series.
      
      Paul, please Ack or Nack this patch.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      4a1418e0
  4. 28 7月, 2009 1 次提交
  5. 17 7月, 2009 1 次提交
  6. 16 7月, 2009 1 次提交
  7. 11 7月, 2009 1 次提交
  8. 10 7月, 2009 1 次提交
  9. 30 6月, 2009 1 次提交
  10. 22 6月, 2009 1 次提交
    • G
      Handle init/sipi in a main cpu exec loop. (v2) · b09ea7d5
      Gleb Natapov 提交于
      This should fix compilation problem in case of CONFIG_USER_ONLY.
      
      Currently INIT/SIPI is handled in the context of CPU that sends IPI.
      This patch changes this to handle them like all other events in a main
      cpu exec loop. When KVM will gain thread per vcpu capability it will
      be much more clear to handle those event by cpu thread itself and not
      modify one cpu's state from the context of the other.
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      b09ea7d5
  11. 17 6月, 2009 1 次提交
  12. 22 5月, 2009 2 次提交
  13. 19 4月, 2009 1 次提交
  14. 18 4月, 2009 1 次提交
    • A
      x86: Enhanced dump of segment registers (Jan Kiszka) · a3867ed2
      aliguori 提交于
      Parse the descriptor flags that segment registers refer to and show the
      result in a more human-friendly format. The output of info registers eg.
      then looks like this:
      
      [...]
      ES =007b 00000000 ffffffff 00cff300 DPL=3 DS   [-WA]
      CS =0060 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]
      SS =0068 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
      DS =007b 00000000 ffffffff 00cff300 DPL=3 DS   [-WA]
      FS =0000 00000000 00000000 00000000
      GS =0033 b7dd66c0 ffffffff b7dff3dd DPL=3 DS   [-WA]
      LDT=0000 00000000 00000000 00008200 DPL=0 LDT
      TR =0080 c06da700 0000206b 00008900 DPL=0 TSS32-avl
      [...]
      
      Changes in this version:
       - refactoring so that only a single helper is used for dumping the
         segment descriptor cache
       - tiny typo fixed that broke 64-bit segment type names
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7179 c046a42c-6fe2-441c-8c8c-71466251a162
      a3867ed2
  15. 07 3月, 2009 1 次提交
  16. 09 2月, 2009 1 次提交
  17. 30 1月, 2009 1 次提交
  18. 27 1月, 2009 1 次提交
    • A
      MTRR support on x86 (Carl-Daniel Hailfinger) · 165d9b82
      aliguori 提交于
      The current codebase ignores MTRR (Memory Type Range Register)
      configuration writes and reads because Qemu does not implement caching.
      All BIOS/firmware in know of for x86 do implement a mode called
      Cache-as-RAM (CAR) which locks down the CPU cache lines and uses the CPU
      cache like RAM before RAM is enabled. Qemu assumes RAM is accessible
      from the start, but it would be nice to be able to run real
      BIOS/firmware in Qemu. For that, we need CAR support and for CAR support
      we have to support MTRRs.
      
      This patch is a first step in that direction. MTRRs are MSRs supported
      by all recent x86 CPUs, even old i586. Besides influencing cache, the
      MTRRs can be written and read back, so discarding MTRR writes violates
      the expectations of existing code out there.
      
      An added benefit of this patch is that it fixes the following Linux
      kernel error message present in recent kernels (provided the BIOS has
      the recent MTRR patches applied):
       ------------[ cut here ]------------
      WARNING: at arch/x86/kernel/cpu/mtrr/main.c:1500 mtrr_trim_uncached_memory+0x382/0x384()
      WARNING: strange, CPU MTRRs all blank?
      Modules linked in:
      Supported: Yes
      Pid: 0, comm: swapper Not tainted 2.6.27.7-9-default #1
       [<c0106570>] dump_trace+0x6b/0x249
       [<c01070a5>] show_trace+0x20/0x39
       [<c0343c02>] dump_stack+0x71/0x76
       [<c012acb2>] warn_slowpath+0x6f/0x90
       [<c0542f8f>] mtrr_trim_uncached_memory+0x382/0x384
       [<c053f24d>] setup_arch+0x40d/0x639
       [<c053a6ac>] start_kernel+0x6b/0x31f
       =======================
       ---[ end trace 4eaa2a86a8e2da22 ]---
      
      Handle common x86 MTRR reads and writes, but don't act on them.
      Signed-off-by: NCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6449 c046a42c-6fe2-441c-8c8c-71466251a162
      165d9b82
  19. 05 1月, 2009 1 次提交
  20. 13 12月, 2008 1 次提交
    • B
      x86 cleanup · d9957a8b
      blueswir1 提交于
      Remove some unnecessary includes, add needed includes, move prototypes to
      cpu.h to suppress missing prototype warnings.
      
      Remove unused functions and prototypes (cpu_x86_flush_tlb, cpu_lock,
      cpu_unlock, restore_native_fp_state, save_native_fp_state).
      
      Make some functions and data static (f15rk, parity_table, rclw_table,
      rclb_table, raise_interrupt, fpu_raise_exception), they are not used
      outside op_helper.c anymore.
      
      Make some x86_64 and user only code conditional to avoid warnings.
      
      Document where each function is implemented in cpu.h and exec.h.
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6005 c046a42c-6fe2-441c-8c8c-71466251a162
      d9957a8b
  21. 19 11月, 2008 3 次提交
  22. 17 11月, 2008 1 次提交
  23. 06 11月, 2008 1 次提交
    • A
      Add KVM support to QEMU · 7ba1e619
      aliguori 提交于
      This patch adds very basic KVM support.  KVM is a kernel module for Linux that
      allows userspace programs to make use of hardware virtualization support.  It
      current supports x86 hardware virtualization using Intel VT-x or AMD-V.  It
      also supports IA64 VT-i, PPC 440, and S390.
      
      This patch only implements the bare minimum support to get a guest booting.  It
      has very little impact the rest of QEMU and attempts to integrate nicely with
      the rest of QEMU.
      
      Even though this implementation is basic, it is significantly faster than TCG.
      Booting and shutting down a Linux guest:
      
      w/TCG:  1:32.36 elapsed  84% CPU
      
      w/KVM:  0:31.14 elapsed  59% CPU
      
      Right now, KVM is disabled by default and must be explicitly enabled with
       -enable-kvm.  We can enable it by default later when we have had better
      testing.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5627 c046a42c-6fe2-441c-8c8c-71466251a162
      7ba1e619
  24. 05 11月, 2008 2 次提交
  25. 29 9月, 2008 1 次提交
    • P
      My core2duo patch introduced a vague statement of "missing features" in · 558fa836
      pbrook 提交于
      the CPUID specification. This patch addresses this by specifying exactly 
      what is missing.
      While going along the missing CPUID entries I also stumbled across 
      invalid and missing CPUID #defines while comparing them to the Intel 
      Documentation. This patch also addresses these. I found them too minor 
      to split them up in a separate patch.
      
      Furthermore I looked through CPUID functions > 5 and realized that it 
      should be safe to bump the level to 10. I tried booting Linux with that 
      and it worked fine.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5350 c046a42c-6fe2-441c-8c8c-71466251a162
      558fa836
  26. 27 9月, 2008 1 次提交
  27. 26 9月, 2008 3 次提交
  28. 02 7月, 2008 1 次提交
  29. 01 7月, 2008 1 次提交
  30. 29 6月, 2008 1 次提交