• - MCE features are initialized when VCPU is intialized according to CPUID.
    - A monitor command "mce" is added to inject a MCE.
    - A new interrupt mask: CPU_INTERRUPT_MCE is added to inject the MCE.
    
    aliguori: fix build for linux-user
    
    Signed-off-by: Huang Ying <ying.huang@intel.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Huang Ying authored
     
    Browse Code »



  • This patch aligns the KVM-related layout and encoding of the CPU state
    to be saved to disk or migrated with qemu-kvm. The major differences are
    reordering of fields and a compressed interrupt_bitmap into a single
    number as there can be no more than one pending IRQ at a time.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • The KVM kernel will disable all bits in CPUID which are not present in
    the host. As this is mostly true for the hypervisor bit (1.ecx),
    preserve its value before the trim and restore it afterwards.
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »
  • KVM provides an in-kernel feature to disable CPUID bits that are not
    present in the current host. So there is no need here to duplicate this
    work. Additionally allows 3DNow! on capable processors, since the
    restriction seems to apply to QEMU/TCG only.
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »
  • If we want to trim the user provided CPUID bits for KVM to be not greater
    than that of the host, we should not remove the bits _after_ we sent
    them to the kernel.
    This fixes the masking of features that are not present on the host by
    moving the trim function and it's call from helper.c to kvm.c.
    It helps to use -cpu host.
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »
  • Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »
  • Although the guest's CPUID bits can be controlled in a fine grained way
    in QEMU, a simple way to inject the host CPU is missing. This is handy
    for KVM desktop virtualization, where one wants the guest to support the
    full host feature set.
    Introduce another CPU type called 'host', which will propagate the host's
    CPUID bits to the guest. Unwanted bits can still be turned off by using
    the existing syntax (-cpu host,-skinit)
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »
  • KVM defaults to the hypervisor CPUID bit to be set, whereas pure
    QEMU clears it. On some occasions one wants to set or clear it the
    other way round (for instance to get HyperV running inside a guest).
    
    Move the bit-set to be done before the command line parsing and
    enable it by default. One can disable it by using: -cpu qemu64,-hypervisor
    Fix some whitespace damage on the way.
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »

  • 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: Gleb Natapov <gleb@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gleb Natapov authored
     
    Browse Code »

  • As per the IA32 processor manual, the accessed bit is set to 1 in the
    processor state after reset. qemu pc cpu_reset code was missing this
    accessed bit setting.
    
    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Nitin A Kamble authored
     
    Browse Code »
  • KVM-enabled QEMU will always report the vendor ID of the physical CPU it is
    running on. Allow to override this if explicitly requested on the
    command line. It will not suffice to name a CPU type (like -cpu phenom),
    but you have to explicitly set the vendor: -cpu phenom,vendor=AuthenticAMD
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »

  • Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Jan Kiszka authored
     
    Browse Code »
  • Save and restore all so far neglected KVM-specific CPU states. Handling
    the TSC stabilizes migration in KVM mode. The interrupt_bitmap and
    mp_state are currently unused, but will become relevant for in-kernel
    irqchip support. By including proper saving/restoring already, we avoid
    having to increment CPU_SAVE_VERSION later on once again.
    
    v2:
     - initialize mp_state runnable (for the boot CPU)
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • This patch adds the missing hooks to allow live migration in KVM mode.
    It adds proper synchronization before/after saving/restoring the VCPU
    states (note: PPC is untested), hooks into
    cpu_physical_memory_set_dirty_tracking() to enable dirty memory logging
    at KVM level, and synchronizes that drity log into QEMU's view before
    running ram_live_save().
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »









  • 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: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7179 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »