1. 04 6月, 2014 2 次提交
  2. 22 5月, 2014 1 次提交
    • P
      target-i386: get CPL from SS.DPL · 7125c937
      Paolo Bonzini 提交于
      CS.RPL is not equal to the CPL in the few instructions between
      setting CR0.PE and reloading CS.  We get this right in the common
      case, because writes to CR0 do not modify the CPL, but it would
      not be enough if an SMI comes exactly during that brief period.
      Were this to happen, the RSM instruction would erroneously set
      CPL to the low two bits of the real-mode selector; and if they are
      not 00, the next instruction fetch cannot access the code segment
      and causes a triple fault.
      
      However, SS.DPL *is* always equal to the CPL.  In real processors
      (AMD only) there is a weird case of SYSRET setting SS.DPL=SS.RPL
      from the STAR register while forcing CPL=3, but we do not emulate
      that.
      Tested-by: NKevin O'Connor <kevin@koconnor.net>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7125c937
  3. 13 5月, 2014 3 次提交
  4. 27 3月, 2014 1 次提交
  5. 14 3月, 2014 1 次提交
  6. 04 2月, 2014 5 次提交
  7. 20 1月, 2014 1 次提交
  8. 23 12月, 2013 1 次提交
  9. 18 12月, 2013 1 次提交
  10. 12 12月, 2013 3 次提交
  11. 07 11月, 2013 1 次提交
    • S
      kvm: Fix uninitialized cpuid_data · ef4cbe14
      Stefan Weil 提交于
      This error was reported by valgrind when running qemu-system-x86_64
      with kvm:
      
      ==975== Conditional jump or move depends on uninitialised value(s)
      ==975==    at 0x521C38: cpuid_find_entry (kvm.c:176)
      ==975==    by 0x5235BA: kvm_arch_init_vcpu (kvm.c:686)
      ==975==    by 0x4D5175: kvm_init_vcpu (kvm-all.c:267)
      ==975==    by 0x45035B: qemu_kvm_cpu_thread_fn (cpus.c:858)
      ==975==    by 0xD361E0D: start_thread (pthread_create.c:311)
      ==975==    by 0xD65E9EC: clone (clone.S:113)
      ==975==  Uninitialised value was created by a stack allocation
      ==975==    at 0x5226E4: kvm_arch_init_vcpu (kvm.c:446)
      
      Instead of adding more memset calls for parts of cpuid_data, the existing
      calls were removed and cpuid_data is now initialized completely in one
      call.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      ef4cbe14
  12. 05 11月, 2013 1 次提交
  13. 21 8月, 2013 2 次提交
  14. 17 8月, 2013 1 次提交
  15. 10 8月, 2013 1 次提交
  16. 27 7月, 2013 1 次提交
  17. 25 7月, 2013 1 次提交
  18. 23 7月, 2013 2 次提交
  19. 10 7月, 2013 2 次提交
    • A
      cpu: Make first_cpu and next_cpu CPUState · 182735ef
      Andreas Färber 提交于
      Move next_cpu from CPU_COMMON to CPUState.
      Move first_cpu variable to qom/cpu.h.
      
      gdbstub needs to use CPUState::env_ptr for now.
      cpu_copy() no longer needs to save and restore cpu_next.
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      [AF: Rebased, simplified cpu_copy()]
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      182735ef
    • M
      Fix -machine options accel, kernel_irqchip, kvm_shadow_mem · 36ad0e94
      Markus Armbruster 提交于
      Multiple -machine options with the same ID are merged.  All but the
      one without an ID are to be silently ignored.
      
      In most places, we query these options with a null ID.  This is
      correct.
      
      In some places, we instead query whatever options come first in the
      list.  This is wrong.  When the -machine processed first happens to
      have an ID, options are taken from that ID, and the ones specified
      without ID are silently ignored.
      
      Example:
      
          $ upstream-qemu -nodefaults -S -display none -monitor stdio -machine id=foo -machine accel=kvm,usb=on
          $ upstream-qemu -nodefaults -S -display none -monitor stdio -machine id=foo,accel=kvm,usb=on -machine accel=xen
          $ upstream-qemu -nodefaults -S -display none -monitor stdio -machine accel=xen -machine id=foo,accel=kvm,usb=on
      
          $ qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -machine accel=kvm,usb=on
          QEMU 1.5.50 monitor - type 'help' for more information
          (qemu) info kvm
          kvm support: enabled
          (qemu) info usb
          (qemu) q
          $ qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -machine id=foo -machine accel=kvm,usb=on
          QEMU 1.5.50 monitor - type 'help' for more information
          (qemu) info kvm
          kvm support: disabled
          (qemu) info usb
          (qemu) q
          $ qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -machine id=foo,accel=kvm,usb=on -machine accel=xen
          QEMU 1.5.50 monitor - type 'help' for more information
          (qemu) info kvm
          kvm support: enabled
          (qemu) info usb
          USB support not enabled
          (qemu) q
          $ qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -machine accel=xen -machine id=foo,accel=kvm,usb=on
          xc: error: Could not obtain handle on privileged command interface (2 = No such file or directory): Internal error
          xen be core: can't open xen interface
          failed to initialize Xen: Operation not permitted
      
      Option usb is queried correctly, and the one without an ID wins,
      regardless of option order.
      
      Option accel is queried incorrectly, and which one wins depends on
      option order and ID.
      
      Affected options are accel (and its sugared forms -enable-kvm and
      -no-kvm), kernel_irqchip, kvm_shadow_mem.
      
      Additionally, option kernel_irqchip is normally on by default, except
      it's off when no -machine options are given.  Bug can't bite, because
      kernel_irqchip is used only when KVM is enabled, KVM is off by
      default, and enabling always creates -machine options.  Downstreams
      that enable KVM by default do get bitten, though.
      
      Use qemu_get_machine_opts() to fix these bugs.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1372943363-24081-5-git-send-email-armbru@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      36ad0e94
  20. 04 7月, 2013 1 次提交
  21. 28 6月, 2013 2 次提交
  22. 02 5月, 2013 2 次提交
  23. 18 4月, 2013 1 次提交
  24. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  25. 12 3月, 2013 1 次提交
  26. 16 2月, 2013 1 次提交