1. 21 9月, 2019 1 次提交
    • C
      pc: Add an SMB0 ACPI device to q35 · ebe15582
      Corey Minyard 提交于
      This is so I2C devices can be found in the ACPI namespace.  Currently
      that's only IPMI, but devices can be easily added now.
      
      Adding the devices required some PCI information, and the bus itself
      to be added to the PCMachineState structure.
      
      Note that this only works on Q35, the ACPI for PIIX4 is not capable
      of handling an SMBus device.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      ebe15582
  2. 16 9月, 2019 1 次提交
  3. 21 8月, 2019 1 次提交
  4. 20 8月, 2019 1 次提交
  5. 16 8月, 2019 1 次提交
    • M
      Clean up inclusion of sysemu/sysemu.h · d5938f29
      Markus Armbruster 提交于
      In my "build everything" tree, changing sysemu/sysemu.h triggers a
      recompile of some 5400 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).
      
      Almost a third of its inclusions are actually superfluous.  Delete
      them.  Downgrade two more to qapi/qapi-types-run-state.h, and move one
      from char/serial.h to char/serial.c.
      
      hw/semihosting/config.c, monitor/monitor.c, qdev-monitor.c, and
      stubs/semihost.c define variables declared in sysemu/sysemu.h without
      including it.  The compiler is cool with that, but include it anyway.
      
      This doesn't reduce actual use much, as it's still included into
      widely included headers.  The next commit will tackle that.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NAlistair Francis <alistair.francis@wdc.com>
      Message-Id: <20190812052359.30071-27-armbru@redhat.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      d5938f29
  6. 06 7月, 2019 4 次提交
  7. 05 7月, 2019 1 次提交
  8. 21 6月, 2019 1 次提交
    • G
      hw: Nuke hw_compat_4_0_1 and pc_compat_4_0_1 · 8e8cbed0
      Greg Kurz 提交于
      Commit c87759ce fixed a regression affecting pc-q35 machines by
      introducing a new pc-q35-4.0.1 machine version to be used instead
      of pc-q35-4.0. The only purpose was to revert the default behaviour
      of not using split irqchip, but the change also introduced the usual
      hw_compat and pc_compat bits, and wired them for pc-q35 only.
      
      This raises questions when it comes to add new compat properties for
      4.0* machine versions of any architecture. Where to add them ? In
      4.0, 4.0.1 or both ? Error prone. Another possibility would be to teach
      all other architectures about 4.0.1. This solution isn't satisfying,
      especially since this is a pc-q35 specific issue.
      
      It turns out that the split irqchip default is handled in the machine
      option function and doesn't involve compat lists at all.
      
      Drop all the 4.0.1 compat lists and use the 4.0 ones instead in the 4.0.1
      machine option function.
      
      Move the compat props that were added to the 4.0.1 since c87759ce to
      4.0.
      
      Even if only hw_compat_4_0_1 had an impact on other architectures,
      drop pc_compat_4_0_1 as well for consistency.
      
      Fixes: c87759ce "q35: Revert to kernel irqchip"
      Suggested-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Message-Id: <156051774276.244890.8660277280145466396.stgit@bahia.lan>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      8e8cbed0
  9. 12 6月, 2019 1 次提交
  10. 03 6月, 2019 1 次提交
    • A
      q35: Revert to kernel irqchip · c87759ce
      Alex Williamson 提交于
      Commit b2fc91db ("q35: set split kernel irqchip as default") changed
      the default for the pc-q35-4.0 machine type to use split irqchip, which
      turned out to have disasterous effects on vfio-pci INTx support.  KVM
      resampling irqfds are registered for handling these interrupts, but
      these are non-functional in split irqchip mode.  We can't simply test
      for split irqchip in QEMU as userspace handling of this interrupt is a
      significant performance regression versus KVM handling (GeForce GPUs
      assigned to Windows VMs are non-functional without forcing MSI mode or
      re-enabling kernel irqchip).
      
      The resolution is to revert the change in default irqchip mode in the
      pc-q35-4.1 machine and create a pc-q35-4.0.1 machine for the 4.0-stable
      branch.  The qemu-q35-4.0 machine type should not be used in vfio-pci
      configurations for devices requiring legacy INTx support without
      explicitly modifying the VM configuration to use kernel irqchip.
      
      Link: https://bugs.launchpad.net/qemu/+bug/1826422
      Fixes: b2fc91db ("q35: set split kernel irqchip as default")
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Reviewed-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <155786484688.13873.6037015630912983760.stgit@gimli.home>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c87759ce
  11. 26 4月, 2019 1 次提交
  12. 12 3月, 2019 2 次提交
    • M
      pc: Support firmware configuration with -blockdev · ebc29e1b
      Markus Armbruster 提交于
      The PC machines put firmware in ROM by default.  To get it put into
      flash memory (required by OVMF), you have to use -drive
      if=pflash,unit=0,... and optionally -drive if=pflash,unit=1,...
      
      Why two -drive?  This permits setting up one part of the flash memory
      read-only, and the other part read/write.  It also makes upgrading
      firmware on the host easier.  Below the hood, it creates two separate
      flash devices, because we were too lazy to improve our flash device
      models to support sector protection.
      
      The problem at hand is to do the same with -blockdev somehow, as one
      more step towards deprecating -drive.
      
      Mapping -drive if=none,... to -blockdev is a solved problem.  With
      if=T other than if=none, -drive additionally configures a block device
      frontend.  For non-onboard devices, that part maps to -device.  Also a
      solved problem.  For onboard devices such as PC flash memory, we have
      an unsolved problem.
      
      This is actually an instance of a wider problem: our general device
      configuration interface doesn't cover onboard devices.  Instead, we have
      a zoo of ad hoc interfaces that are much more limited.  One of them is
      -drive, which we'd rather deprecate, but can't until we have suitable
      replacements for all its uses.
      
      Sadly, I can't attack the wider problem today.  So back to the narrow
      problem.
      
      My first idea was to reduce it to its solved buddy by using pluggable
      instead of onboard devices for the flash memory.  Workable, but it
      requires some extra smarts in firmware descriptors and libvirt.  Paolo
      had an idea that is simpler for libvirt: keep the devices onboard, and
      add machine properties for their block backends.
      
      The implementation is less than straightforward, I'm afraid.
      
      First, block backend properties are *qdev* properties.  Machines can't
      have those, as they're not devices.  I could duplicate these qdev
      properties as QOM properties, but I hate that.
      
      More seriously, the properties do not belong to the machine, they
      belong to the onboard flash devices.  Adding them to the machine would
      then require bad magic to somehow transfer them to the flash devices.
      Fortunately, QOM provides the means to handle exactly this case: add
      alias properties to the machine that forward to the onboard devices'
      properties.
      
      Properties need to be created in .instance_init() methods.  For PC
      machines, that's pc_machine_initfn().  To make alias properties work,
      we need to create the onboard flash devices there, too.  Requires
      several bug fixes, in the previous commits.  We also have to realize
      the devices.  More on that below.
      
      If the user sets pflash0, firmware resides in flash memory.
      pc_system_firmware_init() maps and realizes the flash devices.
      
      Else, firmware resides in ROM.  The onboard flash devices aren't used
      then.  pc_system_firmware_init() destroys them unrealized, along with
      the alias properties.
      
      The existing code to pick up drives defined with -drive if=pflash is
      replaced by code to desugar into the machine properties.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Acked-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Message-Id: <87ftrtux81.fsf@dusky.pond.sub.org>
      ebc29e1b
    • P
      pc_sysfw: Pass PCMachineState to pc_system_firmware_init() · 5e640a9e
      Philippe Mathieu-Daudé 提交于
      pc_system_firmware_init() parameter @isapc_ram_fw is PCMachineState
      member pci_enabled negated.  The next commit will need more of
      PCMachineState.  To prepare for that, pass a PCMachineState *, and
      drop the now redundant parameter @isapc_ram_fw.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-Id: <20190308131445.17502-11-armbru@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      5e640a9e
  13. 11 3月, 2019 2 次提交
  14. 06 3月, 2019 1 次提交
  15. 05 2月, 2019 1 次提交
  16. 22 1月, 2019 1 次提交
  17. 10 1月, 2019 1 次提交
  18. 07 1月, 2019 16 次提交
  19. 20 12月, 2018 1 次提交
    • P
      intel_iommu: dma read/write draining support · ccc23bb0
      Peter Xu 提交于
      Support DMA read/write draining should be easy for existing VT-d
      emulation since the emulation itself does not have any request queue
      there so we don't need to do anything to flush the un-commited queue.
      What we need to do is to declare the support.
      
      These capabilities are required to pass Windows SVVP test program.  It
      is verified that when with parameters "x-aw-bits=48,caching-mode=off"
      we can pass the Windows SVVP test with this patch applied.  Otherwise
      we'll fail with:
      
              IOMMU[0] - DWD (DMA write draining) not supported
              IOMMU[0] - DWD (DMA read draining) not supported
              Segment 0 has no DMA remapping capable IOMMU units
      
      However since these bits are not declared support for QEMU<=3.1, we'll
      need a compatibility bit for it and we turn this on by default only
      for QEMU>=4.0.
      
      Please refer to VT-d spec 6.5.4 for more information.
      
      CC: Yu Wang <wyu@redhat.com>
      Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1654550Signed-off-by: NPeter Xu <peterx@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      ccc23bb0
  20. 12 12月, 2018 1 次提交