1. 11 6月, 2015 36 次提交
  2. 10 6月, 2015 1 次提交
  3. 04 6月, 2015 3 次提交
    • J
      vhost: logs sharing · 309750fa
      Jason Wang 提交于
      Currently we allocate one vhost log per vhost device. This is sub
      optimal when:
      
      - Guest has several device with vhost as backend
      - Guest has multiqueue devices
      
      In the above cases, we can avoid the memory allocation by sharing a
      single vhost log among all the vhost devices. This is done through:
      
      - Introducing a new vhost_log structure with refcnt inside.
      - Using a global pointer to vhost_log structure that will be used. And
        introduce helper to get the log with expected log size and helper to
      - drop the refcnt to the old log.
      - Each vhost device still keep track of a pointer to the log that was
        used.
      
      With above, if no resize happens, all vhost device will share a single
      vhost log. During resize, a new vhost_log structure will be allocated
      and made for the global pointer. And each vhost devices will drop the
      refcnt to the old log.
      
      Tested by doing scp during migration for a 2 queues virtio-net-pci.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      309750fa
    • L
      hw/acpi: piix4_pm_init(): take fw_cfg object no more · 6e7d8249
      Laszlo Ersek 提交于
      This PIIX4 init function has no more reason to receive a pointer to the
      FwCfg object. Remove the parameter from the prototype, and update callers.
      
      As a result, the pc_init1() function no longer needs to save the return
      value of pc_memory_init() and xen_load_linux(), which makes it more
      similar to pc_q35_init().
      
      The return type & value of pc_memory_init() and xen_load_linux() are not
      changed themselves; maybe we'll need their return values sometime later.
      
      RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1204696
      Cc: Amit Shah <amit.shah@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      6e7d8249
    • L
      hw/acpi: move "etc/system-states" fw_cfg file from PIIX4 to core · e3845e7c
      Laszlo Ersek 提交于
      The acpi_pm1_cnt_init() core function is responsible for setting up the
      register block that will ultimately react to S3 and S4 requests (see
      acpi_pm1_cnt_write()). It makes sense to advertise this configuration to
      the guest firmware via an easy to parse fw_cfg file (ACPI is too complex
      for firmware to parse), and indeed PIIX4 does that. However, since
      acpi_pm1_cnt_init() is not specific to PIIX4, neither should be the fw_cfg
      file.
      
      This patch makes "etc/system-states" appear on all chipsets modified in
      the previous patch, not just PIIX4 (assuming they have fw_cfg at all).
      
      RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1204696
      Cc: Amit Shah <amit.shah@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      e3845e7c