1. 10 7月, 2013 2 次提交
    • M
      Simplify -machine option queries with qemu_get_machine_opts() · 2ff3de68
      Markus Armbruster 提交于
      The previous two commits fixed bugs in -machine option queries.  I
      can't find fault with the remaining queries, but let's use
      qemu_get_machine_opts() everywhere, for consistency, simplicity and
      robustness.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1372943363-24081-7-git-send-email-armbru@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      2ff3de68
    • M
      Fix -machine options accel, kernel_irqchip, kvm_shadow_mem · 36ad0e94
      Markus Armbruster 提交于
      Multiple -machine options with the same ID are merged.  All but the
      one without an ID are to be silently ignored.
      
      In most places, we query these options with a null ID.  This is
      correct.
      
      In some places, we instead query whatever options come first in the
      list.  This is wrong.  When the -machine processed first happens to
      have an ID, options are taken from that ID, and the ones specified
      without ID are silently ignored.
      
      Example:
      
          $ upstream-qemu -nodefaults -S -display none -monitor stdio -machine id=foo -machine accel=kvm,usb=on
          $ upstream-qemu -nodefaults -S -display none -monitor stdio -machine id=foo,accel=kvm,usb=on -machine accel=xen
          $ upstream-qemu -nodefaults -S -display none -monitor stdio -machine accel=xen -machine id=foo,accel=kvm,usb=on
      
          $ qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -machine accel=kvm,usb=on
          QEMU 1.5.50 monitor - type 'help' for more information
          (qemu) info kvm
          kvm support: enabled
          (qemu) info usb
          (qemu) q
          $ qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -machine id=foo -machine accel=kvm,usb=on
          QEMU 1.5.50 monitor - type 'help' for more information
          (qemu) info kvm
          kvm support: disabled
          (qemu) info usb
          (qemu) q
          $ qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -machine id=foo,accel=kvm,usb=on -machine accel=xen
          QEMU 1.5.50 monitor - type 'help' for more information
          (qemu) info kvm
          kvm support: enabled
          (qemu) info usb
          USB support not enabled
          (qemu) q
          $ qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -machine accel=xen -machine id=foo,accel=kvm,usb=on
          xc: error: Could not obtain handle on privileged command interface (2 = No such file or directory): Internal error
          xen be core: can't open xen interface
          failed to initialize Xen: Operation not permitted
      
      Option usb is queried correctly, and the one without an ID wins,
      regardless of option order.
      
      Option accel is queried incorrectly, and which one wins depends on
      option order and ID.
      
      Affected options are accel (and its sugared forms -enable-kvm and
      -no-kvm), kernel_irqchip, kvm_shadow_mem.
      
      Additionally, option kernel_irqchip is normally on by default, except
      it's off when no -machine options are given.  Bug can't bite, because
      kernel_irqchip is used only when KVM is enabled, KVM is off by
      default, and enabling always creates -machine options.  Downstreams
      that enable KVM by default do get bitten, though.
      
      Use qemu_get_machine_opts() to fix these bugs.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1372943363-24081-5-git-send-email-armbru@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      36ad0e94
  2. 08 7月, 2013 1 次提交
    • D
      pci: Add root bus parameter to pci_nic_init() · 29b358f9
      David Gibson 提交于
      At present, pci_nic_init() and pci_nic_init_nofail() assume that they will
      only create a NIC under the primary PCI root.  As we add support for
      multiple PCI roots, that may no longer be the case.  This patch adds a root
      bus parameter to pci_nic_init() (and updates callers accordingly) to allow
      the machine init code using it to specify the right PCI root for NICs
      created by old-style -net nic parameters.  NICs created new-style, with
      -device can of course be put anywhere.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      29b358f9
  3. 04 7月, 2013 2 次提交
  4. 01 7月, 2013 4 次提交
  5. 06 5月, 2013 2 次提交
  6. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  7. 12 3月, 2013 1 次提交
  8. 16 2月, 2013 1 次提交
  9. 26 1月, 2013 2 次提交
  10. 22 1月, 2013 1 次提交
  11. 19 1月, 2013 2 次提交
  12. 15 1月, 2013 1 次提交
    • A
      cpu: Move cpu_index field to CPUState · 55e5c285
      Andreas Färber 提交于
      Note that target-alpha accesses this field from TCG, now using a
      negative offset. Therefore the field is placed last in CPUState.
      
      Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.
      
      Move common parts of mips cpu_state_reset() to mips_cpu_reset().
      
      Acked-by: Richard Henderson <rth@twiddle.net> (for alpha)
      [AF: Rebased onto ppc CPU subclasses and openpic changes]
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      55e5c285
  13. 08 1月, 2013 2 次提交
  14. 19 12月, 2012 6 次提交
  15. 17 12月, 2012 1 次提交
  16. 14 12月, 2012 9 次提交
    • A
      PPC: e500: pci: Export slot2irq calculation · 9e2c1298
      Alexander Graf 提交于
      We need the calculation method to get from a PCI slot ID to its respective
      interrupt line twice. Once in the internal map function and once when
      assembling the device tree.
      
      So let's extract the calculation to a separate function that can be called
      by both users.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      9e2c1298
    • A
      PPC: E500: Move PCI slot information into params · 492ec48d
      Alexander Graf 提交于
      We have a params struct that allows us to expose differences between
      e500 machine models. Include PCI slot information there, so we can have
      different machines with different PCI slot topology.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      492ec48d
    • A
      PPC: E500: Generate dt pci irq map dynamically · 347dd79d
      Alexander Graf 提交于
      Today we're hardcoding the PCI interrupt map in the e500 machine file.
      Instead, let's write it dynamically so that different machine types
      can have different slot properties.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      347dd79d
    • A
      PPC: e500: Add MSI support · a911b7a9
      Alexander Graf 提交于
      Now that our interrupt controller supports MSIs, let's expose that feature
      to the guest through the device tree!
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      a911b7a9
    • A
      openpic: convert to qdev · d0b72631
      Alexander Graf 提交于
      This patch converts the OpenPIC device to qdev. Along the way it
      renames the "openpic" target to "raven" and the "mpic" target to
      "fsl_mpic_20", to better reflect the actual models they implement.
      
      This way we have a generic OpenPIC device now that can handle
      different flavors of the OpenPIC specification.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      d0b72631
    • A
      openpic: remove irq_out · 5bac0701
      Alexander Graf 提交于
      The current openpic emulation contains half-ready code for bypass mode.
      Remove it, so that when someone wants to finish it they can start from a
      clean state.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      5bac0701
    • A
      mpic: Unify numbering scheme · cdbb912a
      Alexander Graf 提交于
      MPIC interrupt numbers in Linux (device tree) and in QEMU are different,
      because QEMU takes the sparseness of the IRQ number space into account.
      
      Remove that cleverness and instead assume a flat number space. This makes
      the code easier to understand, because we are actually aligned with Linux
      on the view of our worlds.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      cdbb912a
    • B
      Adding BAR0 for e500 PCI controller · 3eddc1be
      Bharat Bhushan 提交于
      PCI Root complex have TYPE-1 configuration header while PCI endpoint
      have type-0 configuration header. The type-1 configuration header have
      a BAR (BAR0). In Freescale PCI controller BAR0 is used for mapping pci
      address space to CCSR address space. This can used for 2 purposes: 1)
      for MSI interrupt generation 2) Allow CCSR registers access when configured
      as PCI endpoint, which I am not sure is a use case with QEMU-KVM guest.
      
      What I observed is that when guest read the size of BAR0 of host controller
      configuration header (TYPE1 header) then it always reads it as 0. When
      looking into the QEMU hw/ppce500_pci.c, I do not find the PCI controller
      device registering BAR0. I do not find any other controller also doing so
      may they do not use BAR0.
      
      There are two issues when BAR0 is not there (which I can think of):
      1) There should be BAR0 emulated for PCI Root complex (TYPE1 header) and
      when reading the size of BAR0, it should give size as per real h/w.
      
      2) Do we need this BAR0 inbound address translation?
              When BAR0 is of non-zero size then it will be configured for PCI
      address space to local address(CCSR) space translation on inbound access.
      The primary use case is for MSI interrupt generation. The device is
      configured with an address offsets in PCI address space, which will be
      translated to MSI interrupt generation MPIC registers. Currently I do
      not understand the MSI interrupt generation mechanism in QEMU and also
      IIRC we do not use QEMU MSI interrupt mechanism on e500 guest machines.
      But this BAR0 will be used when using MSI on e500.
      
      I can see one more issue, There are ATMUs emulated in hw/ppce500_pci.c,
      but i do not see these being used for address translation.
      So far that works because pci address space and local address space are 1:1
      mapped. BAR0 inbound translation + ATMU translation will complete the address
      translation of inbound traffic.
      Signed-off-by: NBharat Bhushan <bharat.bhushan@freescale.com>
      [agraf: fix double variable assignment w/o read]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      3eddc1be
    • B
      e500: Adding CCSR memory region · dffb1dc2
      Bharat Bhushan 提交于
      All devices are also placed under CCSR memory region.
      The CCSR memory region is exported to pci device. The MSI interrupt
      generation is the main reason to export the CCSR region to PCI device.
      This put the requirement to move mpic under CCSR region, but logically
      all devices should be under CCSR. So this patch places all emulated
      devices under ccsr region.
      Signed-off-by: NBharat Bhushan <bharat.bhushan@freescale.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      dffb1dc2
  17. 29 10月, 2012 2 次提交