1. 10 6月, 2009 28 次提交
  2. 26 5月, 2009 1 次提交
    • A
      KVM: Fix PDPTR reloading on CR4 writes · a2edf57f
      Avi Kivity 提交于
      The processor is documented to reload the PDPTRs while in PAE mode if any
      of the CR4 bits PSE, PGE, or PAE change.  Linux relies on this
      behaviour when zapping the low mappings of PAE kernels during boot.
      
      The code already handled changes to CR4.PAE; augment it to also notice changes
      to PSE and PGE.
      
      This triggered while booting an F11 PAE kernel; the futex initialization code
      runs before any CR3 reloads and writes to a NULL pointer; the futex subsystem
      ended up uninitialized, killing PI futexes and pulseaudio which uses them.
      
      Cc: stable@kernel.org
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      a2edf57f
  3. 11 5月, 2009 2 次提交
  4. 22 4月, 2009 2 次提交
  5. 24 3月, 2009 7 次提交
    • H
      KVM: fix sparse warnings: Should it be static? · cded19f3
      Hannes Eder 提交于
      Impact: Make symbols static.
      
      Fix this sparse warnings:
        arch/x86/kvm/mmu.c:992:5: warning: symbol 'mmu_pages_add' was not declared. Should it be static?
        arch/x86/kvm/mmu.c:1124:5: warning: symbol 'mmu_pages_next' was not declared. Should it be static?
        arch/x86/kvm/mmu.c:1144:6: warning: symbol 'mmu_pages_clear_parents' was not declared. Should it be static?
        arch/x86/kvm/x86.c:2037:5: warning: symbol 'kvm_read_guest_virt' was not declared. Should it be static?
        arch/x86/kvm/x86.c:2067:5: warning: symbol 'kvm_write_guest_virt' was not declared. Should it be static?
        virt/kvm/irq_comm.c:220:5: warning: symbol 'setup_routing_entry' was not declared. Should it be static?
      Signed-off-by: NHannes Eder <hannes@hanneseder.net>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      cded19f3
    • G
      KVM: Report IRQ injection status to userspace. · 4925663a
      Gleb Natapov 提交于
      IRQ injection status is either -1 (if there was no CPU found
      that should except the interrupt because IRQ was masked or
      ioapic was misconfigured or ...) or >= 0 in that case the
      number indicates to how many CPUs interrupt was injected.
      If the value is 0 it means that the interrupt was coalesced
      and probably should be reinjected.
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      4925663a
    • G
      KVM: Fix kvmclock on !constant_tsc boxes · c8076604
      Gerd Hoffmann 提交于
      kvmclock currently falls apart on machines without constant tsc.
      This patch fixes it.  Changes:
      
        * keep tsc frequency in a per-cpu variable.
        * handle kvmclock update using a new request flag, thus checking
          whenever we need an update each time we enter guest context.
        * use a cpufreq notifier to track frequency changes and force
          kvmclock updates.
        * send ipis to kick cpu out of guest context if needed to make
          sure the guest doesn't see stale values.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      c8076604
    • A
      KVM: Add FFXSR support · 1b2fd70c
      Alexander Graf 提交于
      AMD K10 CPUs implement the FFXSR feature that gets enabled using
      EFER. Let's check if the virtual CPU description includes that
      CPUID feature bit and allow enabling it then.
      
      This is required for Windows Server 2008 in Hyper-V mode.
      
      v2 adds CPUID capability exposure
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      1b2fd70c
    • A
      KVM: Userspace controlled irq routing · 399ec807
      Avi Kivity 提交于
      Currently KVM has a static routing from GSI numbers to interrupts (namely,
      0-15 are mapped 1:1 to both PIC and IOAPIC, and 16:23 are mapped 1:1 to
      the IOAPIC).  This is insufficient for several reasons:
      
      - HPET requires non 1:1 mapping for the timer interrupt
      - MSIs need a new method to assign interrupt numbers and dispatch them
      - ACPI APIC mode needs to be able to reassign the PCI LINK interrupts to the
        ioapics
      
      This patch implements an interrupt routing table (as a linked list, but this
      can be easily changed) and a userspace interface to replace the table.  The
      routing table is initialized according to the current hardwired mapping.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      399ec807
    • A
      KVM: x86: Fix typos and whitespace errors · 19355475
      Amit Shah 提交于
      Some typos, comments, whitespace errors corrected in the cpuid code
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      19355475
    • A
      KVM: MMU: Only enable cr4_pge role in shadow mode · 5a41accd
      Avi Kivity 提交于
      Two dimensional paging is only confused by it.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      5a41accd