1. 20 4月, 2013 5 次提交
  2. 19 4月, 2013 19 次提交
    • J
      qemu: move PCI address check out of qemuPCIAddressAsString · db180a1d
      Ján Tomko 提交于
      Create a new function qemuPCIAddressValidate and call it everywhere
      the user might supply an incorrect address:
      * qemuCollectPCIAddress for domain definition
      * qemuDomainPCIAddressEnsureAddr and ReleaseSlot for hotplug
      
      Slot and function shouldn't be wrong at this point, since values
      out of range should be rejected by the XML parser.
      db180a1d
    • J
      qemu: QEMU_PCI constant consistency · 62940d6c
      Ján Tomko 提交于
      Change QEMU_PCI_ADDRESS_LAST_SLOT to the number of slots in the bus,
      not the maximum slot value, to match QEMU_PCI_ADDRESS_LAST_FUNCTION
      and rename them both to have _LAST at the end.
      62940d6c
    • J
      qemu: print PCI address hexadecimally in errors · ba8b8ddb
      Ján Tomko 提交于
      Use the same formatting as we do for XML in error and debug outputs.
      ba8b8ddb
    • J
      qemu: make qemuComparePCIDevice aware of multiple buses · 8e5928de
      Ján Tomko 提交于
      Bus and domain need to be checked as well, otherwise we might
      get false positives when searching for multi-function devices.
      8e5928de
    • P
      conf: Reword error message to be more universal · bcefb507
      Peter Krempa 提交于
      The error message reported when attempting to change/get persistent
      configuration of a transient domain suggests that changes are being
      made. Reword it to suit getter APIs too.
      
      Before:
      $ virsh vcpucount transient-domain --config
      error: Requested operation is not valid: cannot change persistent config of a transient domain
      
      After:
      $ virsh vcpucount transient-domain --config
      error: Requested operation is not valid: transient domains do not have any persistent config
      bcefb507
    • P
      network: bridge_driver: don't lose transient networks on daemon restart · 446dd66b
      Peter Krempa 提交于
      Until now tranisent networks weren't really useful as libvirtd wasn't
      able to remember them across restarts. This patch adds support for
      loading status files of transient networks (that already were generated)
      so that the status isn't lost.
      
      This patch chops up virNetworkObjUpdateParseFile and turns it into
      virNetworkLoadState and a few friends that will help us to load status
      XMLs and refactors the functions that are loading the configs to use
      them.
      446dd66b
    • J
      cpu: Rename PowerPCUpdate and PowerPCDataFree functions · f1a1ebf1
      Jiri Denemark 提交于
      For consistency with other functions in PowerPC CPU driver, the two
      functions are renamed as ppcUpdate and ppcDataFree, respectively.
      f1a1ebf1
    • J
      cpu: Remove hardcoded list of PowerPC models · 7a4f1238
      Jiri Denemark 提交于
      The cpu_map.xml file is there to separate CPU model definitions from the
      code. Having the only interesting data for PowerPC models only in the
      source code. This patch moves this data to the XML file and removes the
      hardcoded list completely.
      7a4f1238
    • J
      cpu: Reimplement PowerPCDecode · f42ecaf1
      Jiri Denemark 提交于
      PowerPC CPUs are either identical or incompatible and thus we just need
      to look up the right model for given PVR without pretending we have
      several candidates which we may choose from.
      
      The function is also renamed as ppcDecode to match other functions in
      PowerPC CPU driver.
      f42ecaf1
    • J
      cpu: Reimplement PowerPCBaseline · fdf6efde
      Jiri Denemark 提交于
      Baseline API is supposed to return guest CPU definition that can be used
      on any of the provided host CPUs. Since PowerPC CPUs are either
      identical or incompatible, the API just needs to check that all provided
      CPUs are identical. Previous implementation was completely bogus.
      
      The function is also renamed as ppcBaseline to match other functions in
      PowerPC CPU driver.
      fdf6efde
    • J
      cpu: Fix loading PowerPC vendor from cpu_map.xml · ba8ba247
      Jiri Denemark 提交于
      When ppcVendorLoad fails to parse the vendor element for whatever
      reason, it is supposed to ignore it and return 0 rather than -1. The
      patch also removes PowerPC vendor string from the XML as it is not
      actually used for anything.
      ba8ba247
    • J
      cpu: Fix PowerPCNodeData · 70349cb9
      Jiri Denemark 提交于
      Make getting node CPU data for PowerPC unsupported on other
      architectures. The function is also renamed as ppcNodeData to match
      other functions in PowerPC CPU driver.
      70349cb9
    • J
      cpu: Make comparing PowerPC CPUs easier to read · 6af5a062
      Jiri Denemark 提交于
      Revert the condition to make it easier to read. The function is also
      renamed as ppcCompare to match other functions in PowerPC CPU driver.
      6af5a062
    • J
      cpu: Introduce cpuModelIsAllowed internal API · 16c6b60c
      Jiri Denemark 提交于
      The API can be used to check if the model is on the supported models
      list, which needs to be done in several places.
      16c6b60c
    • L
      Set legacy USB option with default for ppc64. · 88c6159c
      Li Zhang 提交于
      Currently, -device xxx still doesn't work well for ppc64 platform.
      It's better use legacy USB option with default for ppc64.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      88c6159c
    • J
      qemu: fix default spice password setting · 4327df7e
      Ján Tomko 提交于
      Set spice password even if default VNC password hasn't been set.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=953720
      4327df7e
    • P
      78d7c3c5
    • P
      util: allow using virCommandAllowCap with setuid helpers · 5c1cfea4
      Paolo Bonzini 提交于
      When running unprivileged, virSetUIDGIDWithCaps will fail because it
      tries to add the requested capabilities to the permitted and effective
      sets.
      
      Detect this case, and invoke the child with cleared permitted and
      effective sets.  If it is a setuid program, it will get them.
      
      Some care is needed also because you cannot drop capabilities from the
      bounding set without CAP_SETPCAP.  Because of that, ignore errors from
      setting the bounding set.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5c1cfea4
    • P
      util: simplify virSetUIDGIDWithCaps · 65871845
      Paolo Bonzini 提交于
      The need_prctl variable is not really needed.  If it is false,
      capng_apply will be called twice with the same set, causing
      a little extra work but no problem.  This keeps the code a bit
      simpler.
      
      It is also clearer to invoke capng_apply(CAPNG_SELECT_BOUNDS)
      separately, to make sure it is done while we have CAP_SETPCAP.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      65871845
  3. 18 4月, 2013 4 次提交
  4. 17 4月, 2013 5 次提交
    • O
      remote: Revert removing "libvirt/libvirt.h" in remote_protocol.x · f0431994
      Osier Yang 提交于
      Commit 2d25fd4f removed the including of "libvirt/libvirt.h",
      which breaks the build. Pushed under build-breaker rule.
      f0431994
    • O
      qemu: Allow the disk wwn to have "0x" prefix · 09d2547f
      Osier Yang 提交于
      The recent qemu requires "0x" prefix for the disk wwn, this patch
      changes virValidateWWN to allow the prefix, and prepend "0x" if
      it's not specified. E.g.
      
      qemu-kvm: -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
      drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,wwn=6000c60016ea71ad:
      Property 'scsi-hd.wwn' doesn't take value '6000c60016ea71ad'
      
      Though it's a qemu regression, but it's nice to allow the prefix,
      and doesn't hurt for us to always output "0x".
      09d2547f
    • O
      cleanup: Don't include libvirt/virterror.h · 5829054c
      Osier Yang 提交于
      Which is already included in "internal.h", later patch will add
      syntax-check to avoid it.
      5829054c
    • O
      cleanup: Don't include libvirt/libvirt.h · 2d25fd4f
      Osier Yang 提交于
      Which is already included by "internal.h", later patch will add
      syntax-check to avoid it.
      2d25fd4f
    • O
      cleanup: Remove the duplicate header · bc95be5d
      Osier Yang 提交于
      Detected by a simple Shell script:
      
      for i in $(git ls-files -- '*.[ch]'); do
          awk 'BEGIN {
              fail=0
          }
          /# *include.*\.h/{
              match($0, /["<][^">]*[">]/)
              arr[substr($0, RSTART+1, RLENGTH-2)]++
          }
          END {
              for (key in arr) {
                  if (arr[key] > 1) {
                      fail=1
                      printf("%d %s\n", arr[key], key)
                  }
              }
              if (fail == 1)
                  exit 1
          }' $i
      
          if test $? != 0; then
              echo "Duplicate header(s) in $i"
          fi
      done;
      
      A later patch will add the syntax-check to avoid duplicate
      headers.
      bc95be5d
  5. 16 4月, 2013 7 次提交