• This reworks the slot management to handle more patterns of
    cpu_register_physical_memory*, finally allowing to reset KVM guests (so
    far address remapping on reset broke the slot management).
    
    We could actually handle all possible ones without failing, but a KVM
    kernel bug in older versions would force us to track all previous
    fragmentations and maintain them (as that bug prevents registering
    larger slots that overlap also deleted ones). To remain backward
    compatible but avoid overly complicated workarounds, we apply a simpler
    workaround that covers all currently used patterns.
    
    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@7139 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Fail loudly if we run out of memory slot.
    
    Make sure that dirty log start/stop works with consistent memory regions
    by reporting invalid parameters. This reveals several inconsistencies in
    the vga code, patch to fix them follows later in this series.
    
    And, for simplicity reasons, also catch and report unaligned memory
    regions passed to kvm_set_phys_mem (KVM works on page basis).
    
    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@7138 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Testing for TLB_MMIO on unmap makes no sense as A) that flag belongs to
    CPUTLBEntry and not to io_memory slots or physical addresses and B) we
    already use a different condition before mapping. So make this test
    consistent.
    
    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@7137 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »


  • This is a backport of the guest debugging support for the KVM
    accelerator that is now part of the KVM tree. It implements the reworked
    KVM kernel API for guest debugging (KVM_CAP_SET_GUEST_DEBUG) which is
    not yet part of any mainline kernel but will probably be 2.6.30 stuff.
    So far supported is x86, but PPC is expected to catch up soon.
    
    Core features are:
     - unlimited soft-breakpoints via code patching
     - hardware-assisted x86 breakpoints and watchpoints
    
    Changes in this version:
     - use generic hook cpu_synchronize_state to transfer registers between
       user space and kvm
     - push kvm_sw_breakpoints into KVMState
    
    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@6825 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »

  • env->interrupt_request is accessed as the bit level from both main code
    and signal handler, making a race condition possible even on CISC CPU.
    This causes freeze of QEMU under high load when running the dyntick
    clock.
    
    The patch below move the bit corresponding to CPU_INTERRUPT_EXIT in a
    separate variable, declared as volatile sig_atomic_t, so it should be
    work even on RISC CPU.
    
    We may want to move the cpu_interrupt(env, CPU_INTERRUPT_EXIT) case in
    its own function and get rid of CPU_INTERRUPT_EXIT. That can be done
    later, I wanted to keep the patch short for easier review.
    
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6728 c046a42c-6fe2-441c-8c8c-71466251a162
    aurel32 authored
     
    Browse Code »




  • MMIO exits are more expensive in KVM or Xen than in QEMU because they 
    involve, at least, privilege transitions.  However, MMIO write 
    operations can be effectively batched if those writes do not have side 
    effects.
    
    Good examples of this include VGA pixel operations when in a planar 
    mode.  As it turns out, we can get a nice boost in other areas too.  
    Laurent mentioned a 9.7% performance boost in iperf with the coalesced 
    MMIO changes for the e1000 when he originally posted this work for KVM.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5961 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Prior to kvm-80, memory slot deletion was broken in the KVM kernel 
    modules.  In kvm-81, a new capability is introduced to signify that this
    problem has been fixed.
    
    Since we rely on being able to delete memory slots, refuse to work with 
    any kernel module that does not have this capability present.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5960 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »




  • KVM keeps track of physical memory based on slots in the kernel.  The current
    code that translates QEMU memory mappings to slots work but is not robust
    in the fact of reregistering partial regions of memory.
    
    This patch does the right thing for reregistering partial regions of memory.  It
    also prevents QEMU from using KVM private slots.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5734 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »