1. 07 6月, 2017 5 次提交
  2. 05 6月, 2017 2 次提交
  3. 26 5月, 2017 1 次提交
  4. 24 5月, 2017 1 次提交
  5. 18 5月, 2017 1 次提交
  6. 16 5月, 2017 3 次提交
  7. 15 5月, 2017 1 次提交
  8. 03 5月, 2017 5 次提交
    • M
      qemuDomainDetachDeviceUnlink: Don't unlink files we haven't created · 2f0b3b10
      Michal Privoznik 提交于
      Even though there are several checks before calling this function
      and for some scenarios we don't call it at all (e.g. on disk hot
      unplug), it may be possible to sneak in some weird files (e.g. if
      domain would have RNG with /dev/shm/some_file as its backend). No
      matter how improbable, we shouldn't unlink it as we would be
      unlinking a file from the host which we haven't created in the
      first place.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NCedric Bosdonnat <cbosdonnat@suse.com>
      2f0b3b10
    • M
      qemuDomainAttachDeviceMknodRecursive: Don't try to create devices under preserved mount points · b3418f36
      Michal Privoznik 提交于
      Just like in previous commit, this fixes the same issue for
      hotplug.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NCedric Bosdonnat <cbosdonnat@suse.com>
      b3418f36
    • M
      qemuDomainCreateDeviceRecursive: Don't try to create devices under preserved mount points · e30dbf35
      Michal Privoznik 提交于
      While the code allows devices to already be there (by some
      miracle), we shouldn't try to create devices that don't belong to
      us. For instance, we shouldn't try to create /dev/shm/file
      because /dev/shm is a mount point that is preserved. Therefore if
      a file is created there from an outside (e.g. by mgmt application
      or some other daemon running on the system like vhostmd), it
      exists in the qemu namespace too as the mount point is the same.
      It's only /dev and /dev only that is different. The same
      reasoning applies to all other preserved mount points.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NCedric Bosdonnat <cbosdonnat@suse.com>
      e30dbf35
    • M
      qemuDomainCreateDeviceRecursive: pass a structure instead of bare path · 26c14be8
      Michal Privoznik 提交于
      Currently, all we need to do in qemuDomainCreateDeviceRecursive() is to
      take given @device, get all kinds of info on it (major & minor numbers,
      owner, seclabels) and create its copy at a temporary location @path
      (usually /var/run/libvirt/qemu/$domName.dev), if @device live under
      /dev. This is, however, very loose condition, as it also means
      /dev/shm/* is created too. Therefor, we will need to pass more arguments
      into the function for better decision making (e.g. list of mount points
      under /dev). Instead of adding more arguments to all the functions (not
      easily reachable because some functions are callback with strictly
      defined type), lets just turn this one 'const char *' into a 'struct *'.
      New "arguments" can be then added at no cost.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NCedric Bosdonnat <cbosdonnat@suse.com>
      26c14be8
    • M
      qemuDomainBuildNamespace: Move /dev/* mountpoints later · a7cc039d
      Michal Privoznik 提交于
      When setting up mount namespace for a qemu domain the following
      steps are executed:
      
      1) get list of mountpoints under /dev/
      2) move them to /var/run/libvirt/qemu/$domName.ext
      3) start constructing new device tree under /var/run/libvirt/qemu/$domName.dev
      4) move the mountpoint of the new device tree to /dev
      5) restore original mountpoints from step 2)
      
      Note the problem with this approach is that if some device in step
      3) requires access to a mountpoint from step 2) it will fail as
      the mountpoint is not there anymore. For instance consider the
      following domain disk configuration:
      
          <disk type='file' device='disk'>
            <driver name='qemu' type='raw'/>
            <source file='/dev/shm/vhostmd0'/>
            <target dev='vdb' bus='virtio'/>
            <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
          </disk>
      
      In this case operation fails as we are unable to create vhostmd0
      in the new device tree because after step 2) there is no /dev/shm
      anymore. Leave aside fact that we shouldn't try to create devices
      living in other mountpoints. That's a separate bug that will be
      addressed later.
      
      Currently, the order described above is rearranged to:
      
      1) get list of mountpoints under /dev/
      2) start constructing new device tree under /var/run/libvirt/qemu/$domName.dev
      3) move them to /var/run/libvirt/qemu/$domName.ext
      4) move the mountpoint of the new device tree to /dev
      5) restore original mountpoints from step 3)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NCedric Bosdonnat <cbosdonnat@suse.com>
      a7cc039d
  9. 28 4月, 2017 5 次提交
  10. 27 4月, 2017 1 次提交
  11. 24 4月, 2017 1 次提交
  12. 21 4月, 2017 1 次提交
    • M
      conf, docs: Add support for coalesce setting(s) · 523c9960
      Martin Kletzander 提交于
      We are currently parsing only rx/frames/max because that's the only
      value that makes sense for us.  The tun device just added support for
      this one and the others are only supported by hardware devices which
      we don't need to worry about as the only way we'd pass those to the
      domain is using <hostdev/> or <interface type='hostdev'/>.  And in
      those cases the guest can modify the settings itself.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      523c9960
  13. 20 4月, 2017 1 次提交
    • P
      qemu_domain: use correct default USB controller on ppc64 · 90acbc76
      Pavel Hrdina 提交于
      The history of USB controller for ppc64 guest is complex and goes
      back to libvirt 1.3.1 where the fun started.
      
      Prior Libvirt 1.3.1 if no model for USB controller was specified
      we've simply passed "-usb" on QEMU command line.
      
      Since Libvirt 1.3.1 there is a patch (8156493d) that fixes this
      issue by using "-device pci-ohci,..." but it breaks migration with
      older Libvirts which was agreed that's acceptable.  However this
      patch didn't reflect this change in the domain XML and the model
      was still missing.
      
      Since Libvirt 2.2.0 there is a patch (f55eaccb) that fixes the
      issue with not setting the USB model into domain XML which we need
      to know about to not break the migration and since the default
      model was *pci-ohci* it was used as default in this patch as well.
      
      This patch tries to take all the previous changes into account and
      also change the default for newly defined domains that don't specify
      any model for USB controller.
      
      The VIR_DOMAIN_DEF_PARSE_ABI_UPDATE is set only if new domain is
      defined or new device is added into a domain which means that in
      all other cases we will use the old *pci-ohci* model instead of the
      better and not broken *nec-usb-xhci* model.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1373184Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      90acbc76
  14. 18 4月, 2017 1 次提交
    • P
      qemu: refactor qemuDomainMachine* functions · ac97658d
      Pavel Hrdina 提交于
      Introduce new wrapper functions without *Machine* in the function
      name that take the whole virDomainDef structure as argument and
      call the existing functions with *Machine* in the function name.
      
      Change the arguments of existing functions to *machine* and *arch*
      because they don't need the whole virDomainDef structure and they
      could be used in places where we don't have virDomainDef.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      ac97658d
  15. 10 4月, 2017 1 次提交
  16. 03 4月, 2017 2 次提交
    • A
      qemu: Enforce ACPI, UEFI requirements · 396ca36c
      Andrea Bolognani 提交于
      Depending on the architecture, requirements for ACPI and UEFI can
      be different; more specifically, while on x86 UEFI requires ACPI,
      on aarch64 it's the other way around.
      
      Enforce these requirements when validating the domain, and make
      the error message more accurate by mentioning that they're not
      necessarily applicable to all architectures.
      
      Several aarch64 test cases had to be tweaked because they would
      have failed the validation step otherwise.
      396ca36c
    • M
      Introduce and use virDomainDiskEmptySource · 462c4b66
      Michal Privoznik 提交于
      Currently, if we want to zero out disk source (e,g, due to
      startupPolicy when starting up a domain) we use
      virDomainDiskSetSource(disk, NULL). This works well for file
      based storage (storage type file, dir, or block). But it doesn't
      work at all for other types like volume and network.
      
      So imagine that you have a domain that has a CDROM configured
      which source is a volume from an inactive pool. Because it is
      startupPolicy='optional', the CDROM is empty when the domain
      starts. However, the source element is not cleared out in the
      status XML and thus when the daemon restarts and tries to
      reconnect to the domain it refreshes the disks (which fails - the
      storage pool is still not running) and thus the domain is killed.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      462c4b66
  17. 29 3月, 2017 1 次提交
  18. 28 3月, 2017 3 次提交
  19. 27 3月, 2017 4 次提交