1. 15 9月, 2016 1 次提交
  2. 14 9月, 2016 1 次提交
  3. 10 9月, 2016 5 次提交
    • S
      vhost-vsock: add virtio sockets device · fc0b9b0e
      Stefan Hajnoczi 提交于
      Implement the new virtio sockets device for host<->guest communication
      using the Sockets API.  Most of the work is done in a vhost kernel
      driver so that virtio-vsock can hook into the AF_VSOCK address family.
      The QEMU vhost-vsock device handles configuration and live migration
      while the rx/tx happens in the vhost_vsock.ko Linux kernel driver.
      
      The vsock device must be given a CID (host-wide unique address):
      
        # qemu -device vhost-vsock-pci,id=vhost-vsock-pci0,guest-cid=3 ...
      
      For more information see:
      http://qemu-project.org/Features/VirtioVsock
      
      [Endianness fixes and virtio-ccw support by Claudio Imbrenda
      <imbrenda@linux.vnet.ibm.com>]
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      [mst: rebase to master]
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      fc0b9b0e
    • S
      virtio: add virtqueue_rewind() · 297a75e6
      Stefan Hajnoczi 提交于
      virtqueue_discard() requires a VirtQueueElement but virtio-balloon does
      not migrate its in-use element.  Introduce a new function that is
      similar to virtqueue_discard() but doesn't require a VirtQueueElement.
      
      This will allow virtio-balloon to access element again after migration
      with the usual proviso that the guest may have modified the vring since
      last time.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Roman Kagan <rkagan@virtuozzo.com>
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NLadi Prosek <lprosek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      297a75e6
    • M
      virtio-pci: reduce modern_mem_bar size · d9997d89
      Marcel Apfelbaum 提交于
      Currently each VQ Notification Virtio Capability is allocated
      on a different page. The idea is to enable split drivers within
      guests, however there are no known plans to do that.
      The allocation will result in a 8MB BAR, more than various
      guest firmwares pre-allocates for PCI Bridges hotplug process.
      
      Reserve 4 bytes per VQ by default and add a new parameter
      "page-per-vq" to be used with split drivers.
      Signed-off-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      d9997d89
    • L
      target-i386: present virtual L3 cache info for vcpus · 14c985cf
      Longpeng(Mike) 提交于
      Some software algorithms are based on the hardware's cache info, for example,
      for x86 linux kernel, when cpu1 want to wakeup a task on cpu2, cpu1 will trigger
      a resched IPI and told cpu2 to do the wakeup if they don't share low level
      cache. Oppositely, cpu1 will access cpu2's runqueue directly if they share llc.
      The relevant linux-kernel code as bellow:
      
      	static void ttwu_queue(struct task_struct *p, int cpu)
      	{
      		struct rq *rq = cpu_rq(cpu);
      		......
      		if (... && !cpus_share_cache(smp_processor_id(), cpu)) {
      			......
      			ttwu_queue_remote(p, cpu); /* will trigger RES IPI */
      			return;
      		}
      		......
      		ttwu_do_activate(rq, p, 0); /* access target's rq directly */
      		......
      	}
      
      In real hardware, the cpus on the same socket share L3 cache, so one won't
      trigger a resched IPIs when wakeup a task on others. But QEMU doesn't present a
      virtual L3 cache info for VM, then the linux guest will trigger lots of RES IPIs
      under some workloads even if the virtual cpus belongs to the same virtual socket.
      
      For KVM, there will be lots of vmexit due to guest send IPIs.
      The workload is a SAP HANA's testsuite, we run it one round(about 40 minuates)
      and observe the (Suse11sp3)Guest's amounts of RES IPIs which triggering during
      the period:
              No-L3           With-L3(applied this patch)
      cpu0:	363890		44582
      cpu1:	373405		43109
      cpu2:	340783		43797
      cpu3:	333854		43409
      cpu4:	327170		40038
      cpu5:	325491		39922
      cpu6:	319129		42391
      cpu7:	306480		41035
      cpu8:	161139		32188
      cpu9:	164649		31024
      cpu10:	149823		30398
      cpu11:	149823		32455
      cpu12:	164830		35143
      cpu13:	172269		35805
      cpu14:	179979		33898
      cpu15:	194505		32754
      avg:	268963.6	40129.8
      
      The VM's topology is "1*socket 8*cores 2*threads".
      After present virtual L3 cache info for VM, the amounts of RES IPIs in guest
      reduce 85%.
      
      For KVM, vcpus send IPIs will cause vmexit which is expensive, so it can cause
      severe performance degradation. We had tested the overall system performance if
      vcpus actually run on sparate physical socket. With L3 cache, the performance
      improves 7.2%~33.1%(avg:15.7%).
      Signed-off-by: NLongpeng(Mike) <longpeng2@huawei.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      14c985cf
    • L
      pc: Add 2.8 machine · a4d3c834
      Longpeng(Mike) 提交于
      This will used by the next patch.
      Signed-off-by: NLongpeng(Mike) <longpeng2@huawei.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      a4d3c834
  4. 08 9月, 2016 5 次提交
  5. 07 9月, 2016 4 次提交
  6. 06 9月, 2016 4 次提交
  7. 05 9月, 2016 2 次提交
  8. 16 8月, 2016 1 次提交
    • D
      virtio-gpu: fix missing log.h include file · 8afc224f
      Daniel P. Berrange 提交于
      The virtio-gpu.h file defines a macro VIRTIO_GPU_FILL_CMD
      which includes a call to qemu_log_mask, but does not
      include qemu/log.h. In a default configure, it is lucky
      and gets qemu/log.h indirectly due to the 'log' trace
      backend being enabled. If that trace backend is disabled
      though, eg
      
       ./configure --enable-trace-backends=nop
      
      Then the build will fail:
      
      In file included from /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:19:0:
      /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c: In function ‘virgl_cmd_create_resource_2d’:
      /home/berrange/src/virt/qemu/include/hw/virtio/virtio-gpu.h:138:13: error: implicit declaration of function ‘qemu_log_mask’ [-Werror=implicit-function-declaration]
                   qemu_log_mask(LOG_GUEST_ERROR,                              \
                   ^
      /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:34:5: note: in expansion of macro ‘VIRTIO_GPU_FILL_CMD’
           VIRTIO_GPU_FILL_CMD(c2d);
           ^~~~~~~~~~~~~~~~~~~
      /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:34:5: error: nested extern declaration of ‘qemu_log_mask’ [-Werror=nested-externs]
      In file included from /home/berrange/src/virt/qemu/hw/display/virtio-gpu-3d.c:19:0:
      /home/berrange/src/virt/qemu/include/hw/virtio/virtio-gpu.h:138:27: error: ‘LOG_GUEST_ERROR’ undeclared (first use in this function)
                   qemu_log_mask(LOG_GUEST_ERROR,                              \
      
      [snip many more errors]
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1470648700-3474-1-git-send-email-berrange@redhat.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      8afc224f
  9. 13 8月, 2016 2 次提交
  10. 08 8月, 2016 1 次提交
    • D
      spapr: Correctly set query_hotpluggable_cpus hook based on machine version · 3c0c47e3
      David Gibson 提交于
      Prior to c8721d35 "spapr: Error out when CPU hotplug is attempted on older
      pseries machines", attempting to use query-hotpluggable-cpus on pseries-2.6
      and earlier machine types would SEGV.
      
      That change fixed that, but due to some unexpected interactions in init
      order and a brown-paper-bag worthy failure to test, it accidentally
      disabled query-hotpluggable-cpus for all pseries machine types, including
      the current one which should allow it.
      
      In fact, query_hotpluggable_cpus needs to be non-NULL when and only when
      the dr_cpu_enabled flag in sPAPRMachineClass is set, which makes
      dr_cpu_enabled itself redundant.
      
      This patch removes dr_cpu_enabled, instead directly setting
      query_hotpluggable_cpus from the machine class_init functions, and using
      that to determine the availability of CPU hotplug when necessary.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      3c0c47e3
  11. 04 8月, 2016 2 次提交
    • P
      x86: ioapic: add support for explicit EOI · 20fd4b7b
      Peter Xu 提交于
      Some old Linux kernels (upstream before v4.0), or any released RHEL
      kernels has problem in sending APIC EOI when IR is enabled. Meanwhile,
      many of them only support explicit EOI for IOAPIC, which is only
      introduced in IOAPIC version 0x20. This patch provide a way to boost
      QEMU IOAPIC to version 0x20, in order for QEMU to correctly receive EOI
      messages.
      
      Without boosting IOAPIC version to 0x20, kernels before commit d32932d
      ("x86/irq: Convert IOAPIC to use hierarchical irqdomain interfaces")
      will have trouble enabling both IR and level-triggered interrupt devices
      (like e1000).
      
      To upgrade IOAPIC to version 0x20, we need to specify:
      
        -global ioapic.version=0x20
      
      To be compatible with old systems, 0x11 will still be the default IOAPIC
      version. Here 0x11 and 0x20 are the only versions to be supported.
      
      One thing to mention: this patch only applies to emulated IOAPIC. It
      does not affect kernel IOAPIC behavior.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <1470059959-372-1-git-send-email-peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      20fd4b7b
    • I
      apic: fix broken migration for kvm-apic · 7298d4fd
      Igor Mammedov 提交于
      commit f6e98444 (apic: Use apic_id as apic's migration instance_id)
      breaks migration when in kernel irqchip is used for 2.6 and older
      machine types.
      
      It applies compat property only for userspace 'apic' type
      instead of applying it to all apic types inherited from
      'apic-common' type as it was supposed to do.
      
      Fix it by setting compat property 'legacy-instance-id' for
      'apic-common' type which affects inherited types (i.e. not
      only 'apic' but also 'kvm-apic' types)
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <1469800542-11402-1-git-send-email-imammedo@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7298d4fd
  12. 03 8月, 2016 1 次提交
  13. 29 7月, 2016 3 次提交
  14. 27 7月, 2016 1 次提交
  15. 22 7月, 2016 7 次提交