1. 22 2月, 2017 2 次提交
  2. 21 2月, 2017 3 次提交
    • M
      hw/i386: Deprecate -drive if=scsi with PC machine types · f778a82f
      Markus Armbruster 提交于
      The PC machines (pc-q35-* pc-i440fx-* pc-* isapc xenfv) automatically
      create lsi53c895a SCSI HBAs and SCSI devices to honor -drive if=scsi.
      For giggles, try -drive if=scsi,bus=25,media=cdrom --- this makes QEMU
      create 25 of them.
      
      lsi53c895a is thoroughly obsolete (PCI Ultra2 SCSI, ca. 2000), and
      currently has no maintainer in QEMU.  megasas is a better choice,
      except with old OSes that lack drivers.  virtio-scsi is a much better
      choice when you have a driver, but only (newish) Linux comes with one
      in the box.  There is no good default that works for all guests.
      
      Encourage users to pick a non-obsolete SCSI HBA that works for them by
      deprecating -drive if=scsi.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1487161136-9018-4-git-send-email-armbru@redhat.com>
      Acked-By: NPaolo Bonzini <pbonzini@redhat.com>
      f778a82f
    • M
      hw: Deprecate -drive if=scsi with non-onboard HBAs · a64aa578
      Markus Armbruster 提交于
      Block backends defined with "-drive if=T" with T other than "none" are
      meant to be picked up by machine initialization code: a suitable
      frontend gets created and wired up automatically.
      
      Drives defined with if=scsi are also picked up by SCSI HBAs added with
      -device, unlike other interface types.  Deprecate this usage, as follows.
      
      Create the frontends for onboard HBAs in machine initialization code,
      exactly like we do for if=ide and other interface types.  Change
      scsi_legacy_handle_cmdline() to create a frontend only when it's still
      missing, and warn that this usage is deprecated.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1487161136-9018-3-git-send-email-armbru@redhat.com>
      a64aa578
    • M
      hw: Default -drive to if=ide explicitly where it works · 2059839b
      Markus Armbruster 提交于
      Block backends defined with -drive if=ide are meant to be picked up by
      machine initialization code: a suitable frontend gets created and
      wired up automatically.
      
      if=ide drives not picked up that way can still be used with -device as
      if they had if=none, but that's unclean and best avoided.  Unused ones
      produce an "Orphaned drive without device" warning.
      
      -drive parameter "if" is optional, and the default depends on the
      machine type.  If a machine type doesn't specify a default, the
      default is "ide".
      
      Many machine types default to if=ide, even though they don't actually
      have an IDE controller.  A future patch will change these defaults to
      something more sensible.  To prepare for it, this patch makes default
      "ide" explicit for the machines that actually pick up if=ide drives:
      
      * alpha: clipper
      * arm/aarch64: spitz borzoi terrier tosa
      * i386/x86_64: generic-pc-machine (with concrete subtypes pc-q35-*
        pc-i440fx-* pc-* isapc xenfv)
      * mips64el: fulong2e
      * mips/mipsel/mips64el: malta mips
      * ppc/ppc64: mac99 g3beige prep
      * sh4/sh4eb: r2d
      * sparc64: sun4u sun4v
      
      Note that ppc64 machine powernv already sets an "ide" default
      explicitly.  Its IDE controller isn't implemented, yet.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1487153147-11530-2-git-send-email-armbru@redhat.com>
      2059839b
  3. 01 2月, 2017 1 次提交
  4. 25 1月, 2017 1 次提交
  5. 24 1月, 2017 3 次提交
  6. 17 1月, 2017 1 次提交
  7. 22 12月, 2016 3 次提交
  8. 16 11月, 2016 3 次提交
  9. 15 11月, 2016 3 次提交
  10. 03 11月, 2016 1 次提交
  11. 02 11月, 2016 2 次提交
  12. 25 10月, 2016 4 次提交
  13. 24 10月, 2016 1 次提交
  14. 18 10月, 2016 1 次提交
  15. 10 10月, 2016 1 次提交
  16. 14 9月, 2016 1 次提交
    • W
      pc: apic: fix touch LAPIC when irqchip is split · bb93e099
      Wanpeng Li 提交于
      Add -kernel_irqchip=split
      ./x86-run x86/eventinj.flat
      
      qemu-system-x86_64 -enable-kvm -machine kernel_irqchip=split -cpu host
      -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc
      none -serial stdio -device pci-testdev -kernel x86/eventinj.flat
      enabling apic
      paging enabled
      cr0 = 80010011
      cr3 = 7fff000
      cr4 = 20
      Sending vec 33 and 62 and mask one with TPR
      irq1 running
      irq1 running
      After 33/62 TPR test
      FAIL: TPR
      irq0 running
      irq0 running
      
      Both irq1 and irq0 are executing twice.
      
      kvm_entry: vcpu 0
      kvm_exit: reason MSR_WRITE rip 0x401f33 info 0 0
      kvm_apic: apic_write APIC_EOI = 0x0
      kvm_eoi: apicid 0 vector 62
      kvm_msr: msr_write 80b = 0x0
      kvm_entry: vcpu 0
      kvm_exit: reason PENDING_INTERRUPT rip 0x401f35 info 0 0
      kvm_userspace_exit: reason KVM_EXIT_IRQ_WINDOW_OPEN (7)
      kvm_inj_virq: irq 62
      kvm_entry: vcpu 0
      kvm_exit: reason IO_INSTRUCTION rip 0x4016ec info 3fd0008 0
      
      From the trace we can see there is an interrupt window exit
      after the first interrupt EOI(irq 62), and the same irq(62)
      is injected duplicately after the interrupt window.
      
      QEMU does KVM_INTERRUPT(62) ioctl after KVM exits with
      KVM_EXIT_IRQ_WINDOW_OPEN, which QEMU requested while the
      guest was printing.  The printing calls
      
      serial_update_irq() -> qemu_irq_lower() -> qemu_set_irq() ->
      gsi_handler() -> qemu_set_irq() -> pic_irq_request() ->
      apic_deliver_pic_intr() -> kvm_handle_interrupt()
      
      kvm_handle_interrupt() does
      
      	interrupt_request |= CPU_INTERRUPT_HARD
      
      which later calls cpu_get_pic_interrupt() in kvm_arch_pre_run(),
      but that function uses stale information from APIC and injects
      62 again. If we synchronized the APIC, then the test would #GP,
      because there would be no injectable interrupt in LAPIC or PIC,
      so pic_read_irq() would return 15, thinking it was spurious.
      
      This patch fix it by don't touch LAPIC if LAPIC is in kernel.
      Suggested-by: NPaolo Bonzini <pbonzini@redhat.com>
      Suggested-by: NRadim Krčmář <rkrcmar@redhat.com>
      Cc: qemu-stable@nongnu.org
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NWanpeng Li <wanpeng.li@hotmail.com>
      Message-Id: <1473832464-3478-1-git-send-email-wanpeng.li@hotmail.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      bb93e099
  17. 08 9月, 2016 2 次提交
  18. 08 8月, 2016 1 次提交
  19. 27 7月, 2016 2 次提交
  20. 22 7月, 2016 1 次提交
  21. 20 7月, 2016 3 次提交