1. 24 5月, 2015 2 次提交
    • R
      bhyve: fix build with gcc48 · fcac0cf7
      Roman Bogorodskiy 提交于
      Build with gcc 4.8 fails with:
      
      bhyve/bhyve_monitor.c: In function 'bhyveMonitorIO':
      bhyve/bhyve_monitor.c:51:18: error: missing initializer for field 'tv_sec' of 'const struct timespec' [-Werror=missing-field-initializers]
           const struct timespec zerowait = {};
      
      Explicitly initialize zerowait to fix the build.
      fcac0cf7
    • P
      Add missing XDR_FLAGS · dd42ff07
      Pavel Fedin 提交于
      Fixes build problems on x86_64-cygwin host for aarch64 target:
        CC       lxc/libvirt_driver_lxc_impl_la-lxc_monitor_protocol.lo
      In file included from lxc/lxc_monitor_protocol.c:7:0:
      lxc/lxc_monitor_protocol.h:9:21: fatal error: rpc/rpc.h: No such file or directory
      
        CC       rpc/libvirt_setuid_rpc_client_la-virnetmessage.lo
      In file included from rpc/virnetmessage.h:24:0,
                       from rpc/virnetmessage.c:26:
      rpc/virnetprotocol.h:9:21: fatal error: rpc/rpc.h: No such file or directory
      
        CC       lxc/libvirt_lxc-lxc_monitor_protocol.o
      In file included from lxc/lxc_monitor_protocol.c:7:0:
      lxc/lxc_monitor_protocol.h:9:21: fatal error: rpc/rpc.h: No such file or directory
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      dd42ff07
  2. 22 5月, 2015 6 次提交
    • L
      util: better error message after failure to initialize firewall backend · a9c53462
      Laine Stump 提交于
      If the firewalld backend wasn't available and libvirt decides to try
      setting up a "direct" backend, it checks for the presence of iptables,
      ip6tables, and ebtables. If they are not found, a message like this is logged:
      
        error : virFirewallValidateBackend:193 : direct firewall backend
                requested, but /usr/sbin/ip6tables is not available:
                No such file or directory
      
      But then at a later time if an attempt is made to use the virFirewall
      API, failure will be indicated with:
      
        error : virFirewallApply:936 : out of memory
      
      This patch changes virFirewallApply to first check if a firewall
      backend hadn't been successfully setup, and logs a slightly more
      informative message in that case:
      
        error : virFirewallApply:940 : internal error:
                Failed to initialize a valid firewall backend
      
      This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1223876
      a9c53462
    • L
      interface: allow multiple IPv4 addresses + dhcp on a single interface · ba5566e8
      Laine Stump 提交于
      As of netcf-0.2.8, netcf supports configuring multipl IPv4 addresses,
      as well as simultaneously configuring dhcp and static IPv4 addresses,
      on a single interface. This patch updates libvirt's interface.rng to
      allow such configurations.
      
      This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1223688
      ba5566e8
    • L
      netdev: fail when setting up an SRIOV VF if PF is offline · 474523fa
      Laine Stump 提交于
      If an SRIOV PF is offline, the kernel won't complain if you set the
      mac address and vlan tag for a VF via this PF, and it will even let
      you assign the VF to a guest using PCI device assignment or macvtap
      passthrough. But in this case (the PF isn't online), the device won't
      be usable in the guest.
      
      Silently setting the PF online would solve the connectivity problem,
      but as pointed out by Dan Berrange, when an interface is set online
      with no associated config, the kernel will by default turn on IPv6
      autoconf, which could create unexpected security problems for the
      host. For this reason, this patch instead logs an error and fails the
      operation.
      
      This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=893738
      
      Originally filed against RHEL6, but present in every version of
      libvirt until today.
      474523fa
    • C
      storage: conf: Don't output owner/group -1 · c4d27bdd
      Cole Robinson 提交于
      -1 is just an internal placeholder and is meaningless to output in the XML.
      c4d27bdd
    • M
      node_device: fix libvirt build if WITH_HAL is defined · b903b3b0
      Maxim Nestratov 提交于
      commit ffc40b63 changed uniond _virNodeDevCapData into a typedef
      named virNodeDevCapData with a struct that contains the union as well
      as a type enum. This change necessitated changing every reference to
      "caps->type" into "caps->data.type", but the author of that patch
      failed to test a build "WITH_HAL". This patch fixes the one place in
      the hal backend that needed changing.
      b903b3b0
    • M
      sysinfo: Fix reports on ARM · 85128e29
      Michal Privoznik 提交于
      Due to a kernel commit (b4b8f770e), cpuinfo format has changed on
      ARMs. Firstly, 'Processor: ...' may not be reported, it's
      replaced by 'model name: ...'. Secondly, the "Processor" string
      may occur in CPU name, e.g. 'ARMv7 Processor rev 5 (v7l)'.
      Therefore, we must firstly look for 'model name' and then for
      'Processor' if not found.
      Moreover, lines in the cpuinfo file are shuffled, so we better
      not manipulate the pointer to start of internal buffer as we may
      lost some info.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      85128e29
  3. 21 5月, 2015 13 次提交
  4. 20 5月, 2015 5 次提交
  5. 19 5月, 2015 5 次提交
    • M
      qemu: Fix numatune nodeset reporting · 9deb96f9
      Martin Kletzander 提交于
      Since af2a1f05,
      qemuDomainGetNumaParameters() returns invalid value for a running
      guest.  The problem is that it is getting the information from cgroups,
      but the parent cgroup is being left alone since the mentioned commit.
      Since the running guest's XML is in sync with cgroups, there is no need
      to look into cgroups (unless someone changes the configuration behind
      libvirt's back).  Returning the info from the definition fixes a bug and
      is also a cleanup.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1221047Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      9deb96f9
    • J
      xenconfig: fix spice mousemode and copypaste · a5b55bd9
      Jim Fehlig 提交于
      From xl.cfg950 man page:
      
      spiceagent_mouse=BOOLEAN
      Whether SPICE agent is used for client mouse mode. The default is
      true (1) (turn on)
      
      spicevdagent=BOOLEAN
      Enables spice vdagent. The Spice vdagent is an optional component for
      enhancing user experience and performing guest-oriented management
      tasks. Its features includes: client mouse mode (no need to grab
      mouse by client, no mouse lag), automatic adjustment of screen
      resolution, copy and paste (text and image) between client and domU.
      It also requires vdagent service installed on domU o.s. to work.
      The default is 0.
      
      spice_clipboard_sharing=BOOLEAN
      Enables Spice clipboard sharing (copy/paste). It requires spicevdagent
      enabled. The default is false (0).
      
      So if spiceagent_mouse is enabled (client mouse mode) or
      spice_clipboard_sharing is enabled, spicevdagent must be enabled.
      Along with this change, s/spicedvagent/spicevdagent, set
      spiceagent_mouse correctly, and add a test for these spice
      features.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      a5b55bd9
    • J
      xenconfig: fix spicepasswd handling · a460295f
      Jim Fehlig 提交于
      The logic related to spicedisable_ticketing and spicepasswd was
      inverted.  As per man xl.cfg(5), 'spicedisable_ticketing = 1'
      means no passwd is required.  On the other hand, a passwd is
      required if 'spicedisable_ticketing = 0'.  Fix the logic and
      produce and error if 'spicedisable_ticketing = 0' but spicepasswd
      is not provided.  Also fix the spice cfg test file.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      a460295f
    • J
      xenconfig: format spice listenAddr when formating ports · e21b1180
      Jim Fehlig 提交于
      Move formating of spice listenAddr to the section of code
      where spice ports are formatted.  It is more logical to
      format address and ports together.  Account for the change
      in spice cfg test file by moving 'spicehost'.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      e21b1180
    • J
      xenconfig: use local variable for graphics def · 096b39c9
      Jim Fehlig 提交于
      'graphics->' is a bit easier to read and type, and makes for
      shorter lines than 'def->graphics[0]->'.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      096b39c9
  6. 18 5月, 2015 9 次提交
    • L
      node_device: replace duplicated code in hal and udev backends · d52d7a64
      Laine Stump 提交于
      Both the hal and udev drivers call virPCI*() functions to the the
      SRIOV VF/PF info about PCI devices, and the UDEV backend calls
      virPCI*() to get IOMMU group info. Since there is now a single
      function call in node_device_linux_sysfs.c to do all of this, replace
      all that code in the two backends with calls to
      nodeDeviceSysfsGetPCIRelatedDevCaps().
      
      Note that this results in the HAL driver (probably) unnecessarily
      calling virPCIDevieAddressGetIOMMUGroupNum(), but in the case that the
      host doesn't support IOMMU groups, that function turns into a NOP (it
      returns -2, which causes the caller to skip the call to
      virPCIDeviceAddressGetIOMMUGroupAddresses()). So in the worst case it
      is a few extra cycles spent, and in the best case a mythical platform
      that supported IOMMU groups but used HAL rather than UDEV would gain
      proper reporting of IOMMU group info.
      d52d7a64
    • L
      node_device: update sriov/iommu info before dumpxml of a device · 601b0fa8
      Laine Stump 提交于
      Because reloading a PF driver with a different number of VFs doesn't
      result in any sort of event sent from udev to the libvirt node_device
      driver, libvirt's cache of that info can be out of date when a request
      arrives for the info about a device. To fix this, we refresh that data
      at the time of the dumpxml request, similar to what is already done
      for netdev link info and SCSI host capabilities.
      
      Since the same is true for iommu group information (for example, some
      other device in the same iommu group could have been detached from the
      host), we also create a function to update the iommu group info from
      sysfs, and a common function that does both. (a later patch will call
      this common function from the udev and hal backends).
      
      This resolves:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=981546
      601b0fa8
    • L
      node_device: new functions to get sriov/iommu info from sysfs · 7349fa2e
      Laine Stump 提交于
      The udev and hal drivers both already call the same functions as these
      new functions added to node_device_linux_sysfs.c, but 1) we need to
      call them from node_device_driver.c, and 2) it would be nice to
      eliminate the duplicated code from the hal and udev backends.
      7349fa2e
    • L
      node device: prepare node_device_linux_sysfs.c to add more functions · d2a57815
      Laine Stump 提交于
      This file contains only a single function, detect_scsi_host_caps(),
      which is declared in node_device_driver.h and called from both the hal
      and udev backends. Other things common to the hal and udev drivers
      can be placed in that file though. As a prelude to adding further
      functions, this patch renames the existing function to something
      closer in line with other internal libvirt function names
      (nodeDeviceSysfsGetSCSIHostCaps()), and puts the declarations into a
      separate .h file.
      d2a57815
    • L
      nodedev: change if-else if in update_caps to switch · 3c93419b
      Laine Stump 提交于
      Makes it nicer as update bits are added for different cap types.
      3c93419b
    • L
      conf: make virNodeDevCapData an official type · ffc40b63
      Laine Stump 提交于
      For some reason a union (_virNodeDevCapData) that had only been
      declared inside the toplevel struct virNodeDevCapsDef was being used
      as an argument to functions all over the place. Since it was only a
      union, the "type" attribute wasn't necessarily sent with it. While
      this works, it just seems wrong.
      
      This patch creates a toplevel typedef for virNodeDevCapData and
      virNodeDevCapDataPtr, making it a struct that has the type attribute
      as a member, along with an anonymous union of everything that used to
      be in union _virNodeDevCapData. This way we only have to change the
      following:
      
        s/union _virNodeDevCapData */virNodeDevCapDataPtr /
      
      and
      
        s/caps->type/caps->data.type/
      
      This will make me feel less guilty when adding functions that need a
      pointer to one of these.
      ffc40b63
    • A
      virsh: Improve handling of send-process-signal --pid. · 8e2c5940
      Andrea Bolognani 提交于
      Use vshCommandOptLongLong() instead of retrieving the value as a
      string and converting it to a number manually.
      8e2c5940
    • A
      virsh: Fix dommemstat --period option type. · 2f4a45a2
      Andrea Bolognani 提交于
      The option didn't have VSH_OT_INT type even thought it's expected
      to be numeric, as shown by the fact that vshCommandOptInt() is later
      used to retrieve its value.
      2f4a45a2
    • A
      virsh: Improve error message on integer value parsing failure. · 44931670
      Andrea Bolognani 提交于
      Replace more than 30 ad-hoc error messages with a single, generic one
      that contains the name of the option being processed and some hints
      to help the user understand what could have gone wrong.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1207043
      44931670