1. 04 10月, 2011 1 次提交
  2. 16 9月, 2011 2 次提交
  3. 10 9月, 2011 1 次提交
    • B
      kvm: remove unnecessary assignments · 6115c0a8
      Blue Swirl 提交于
      Avoid these warnings from clang analyzer:
      /src/qemu/target-i386/kvm.c:772:5: warning: Value stored to 'cwd' is never read
          cwd = swd = twd = 0;
      /src/qemu/target-i386/kvm.c:772:11: warning: Although the value stored to 'swd' is used in the enclosing expression, the value is never actually read from 'swd'
          cwd = swd = twd = 0;
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      6115c0a8
  4. 03 9月, 2011 1 次提交
    • S
      Use new macro QEMU_PACKED for packed structures · 541dc0d4
      Stefan Weil 提交于
      Most changes were made using these commands:
      
      git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/'
      git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/'
      git grep -la '__attribute__((__packed__))'|xargs perl -pi -e 's/__attribute__\(\(__packed__\)\)/QEMU_PACKED/'
      git grep -la '__attribute__ ((__packed__))'|xargs perl -pi -e 's/__attribute__ \(\(__packed__\)\)/QEMU_PACKED/'
      git grep -la '__attribute((packed))'|xargs perl -pi -e 's/__attribute\(\(packed\)\)/QEMU_PACKED/'
      
      Whitespace in linux-user/syscall_defs.h was fixed manually
      to avoid warnings from scripts/checkpatch.pl.
      
      Manual changes were also applied to hw/pc.c.
      
      I did not fix indentation with tabs in block/vvfat.c.
      The patch will show 4 errors with scripts/checkpatch.pl.
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      541dc0d4
  5. 25 8月, 2011 1 次提交
  6. 21 8月, 2011 1 次提交
  7. 05 8月, 2011 2 次提交
  8. 21 6月, 2011 4 次提交
  9. 19 6月, 2011 1 次提交
    • J
      kvm: x86: Save/restore FPU OP, IP and DP · 42cc8fa6
      Jan Kiszka 提交于
      These FPU states are properly maintained by KVM but not yet by TCG. So
      far we unconditionally set them to 0 in the guest which may cause
      state corruptions, though not with modern guests.
      
      To avoid breaking backward migration, use a conditional subsection that
      is only written if any of the three fields is non-zero. The guest's
      FNINIT clears them frequently, and cleared IA32_MISC_ENABLE MSR[2]
      reduces the probability of non-zero values further so that this
      subsection is not expected to restrict migration in any common scenario.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      42cc8fa6
  10. 14 6月, 2011 1 次提交
  11. 01 6月, 2011 1 次提交
  12. 02 5月, 2011 2 次提交
  13. 17 3月, 2011 5 次提交
  14. 15 3月, 2011 7 次提交
    • H
      KVM, MCE, unpoison memory address across reboot · 3c85e74f
      Huang Ying 提交于
      In Linux kernel HWPoison processing implementation, the virtual
      address in processes mapping the error physical memory page is marked
      as HWPoison.  So that, the further accessing to the virtual
      address will kill corresponding processes with SIGBUS.
      
      If the error physical memory page is used by a KVM guest, the SIGBUS
      will be sent to QEMU, and QEMU will simulate a MCE to report that
      memory error to the guest OS.  If the guest OS can not recover from
      the error (for example, the page is accessed by kernel code), guest OS
      will reboot the system.  But because the underlying host virtual
      address backing the guest physical memory is still poisoned, if the
      guest system accesses the corresponding guest physical memory even
      after rebooting, the SIGBUS will still be sent to QEMU and MCE will be
      simulated.  That is, guest system can not recover via rebooting.
      
      In fact, across rebooting, the contents of guest physical memory page
      need not to be kept.  We can allocate a new host physical page to
      back the corresponding guest physical address.
      
      This patch fixes this issue in QEMU-KVM via calling qemu_ram_remap()
      to clear the corresponding page table entry, so that make it possible
      to allocate a new page to recover the issue.
      
      [ Jan: rebasing and tiny cleanups]
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      3c85e74f
    • J
      kvm: x86: Fail kvm_arch_init_vcpu if MCE initialization fails · 75d49497
      Jan Kiszka 提交于
      There is no reason to continue if the kernel claims to support MCE but
      then fails to process our request.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      CC: Huang Ying <ying.huang@intel.com>
      CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      CC: Jin Dongming <jin.dongming@np.css.fujitsu.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      75d49497
    • J
      kvm: x86: Clean up kvm_setup_mce · 32a42024
      Jan Kiszka 提交于
      There is nothing to abstract here. Fold kvm_setup_mce into its caller
      and fix up the error reporting (return code of kvm_vcpu_ioctl holds the
      error value).
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      CC: Huang Ying <ying.huang@intel.com>
      CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      CC: Jin Dongming <jin.dongming@np.css.fujitsu.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      32a42024
    • J
      kvm: x86: Consolidate TCG and KVM MCE injection code · c34d440a
      Jan Kiszka 提交于
      This switches KVM's MCE injection path to cpu_x86_inject_mce, both for
      SIGBUS and monitor initiated events. This means we prepare the MCA MSRs
      in the VCPUState also for KVM.
      
      We have to drop the MSRs writeback restrictions for this purpose which
      is now safe as every uncoordinated MSR injection is removed with this
      patch.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      CC: Huang Ying <ying.huang@intel.com>
      CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      CC: Jin Dongming <jin.dongming@np.css.fujitsu.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      c34d440a
    • J
      kvm: x86: Inject pending MCE events on state writeback · ab443475
      Jan Kiszka 提交于
      The current way of injecting MCE events without updating of and
      synchronizing with the CPUState is broken and causes spurious
      corruptions of the MCE-related parts of the CPUState.
      
      As a first step towards a fix, enhance the state writeback code with
      support for injecting events that are pending in the CPUState. A pending
      exception will then be signaled via cpu_interrupt(CPU_INTERRUPT_MCE).
      And, just like for TCG, we need to leave the halt state when
      CPU_INTERRUPT_MCE is pending (left broken for the to-be-removed old KVM
      code).
      
      This will also allow to unify TCG and KVM injection code.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      CC: Huang Ying <ying.huang@intel.com>
      CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      CC: Jin Dongming <jin.dongming@np.css.fujitsu.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      ab443475
    • J
      kvm: Rename kvm_arch_process_irqchip_events to async_events · 99036865
      Jan Kiszka 提交于
      We will broaden the scope of this function on x86 beyond irqchip events.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      99036865
    • J
      kvm: x86: Move MCE functions together · 419fb20a
      Jan Kiszka 提交于
      Pure function suffling to avoid multiple #ifdef KVM_CAP_MCE sections,
      no functional changes. While at it, annotate some #ifdef sections.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      CC: Huang Ying <ying.huang@intel.com>
      CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      CC: Jin Dongming <jin.dongming@np.css.fujitsu.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      419fb20a
  15. 13 3月, 2011 1 次提交
  16. 14 2月, 2011 7 次提交
  17. 23 1月, 2011 2 次提交