1. 04 4月, 2017 7 次提交
  2. 03 4月, 2017 11 次提交
    • 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
    • A
      qemu: Advertise ACPI support for aarch64 guests · 560335c3
      Andrea Bolognani 提交于
      So far, libvirt has assumed that only x86 supports ACPI,
      but that's inaccurate since aarch64 supports it too.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1429509
      560335c3
    • A
      tests: Initialize basic capabilities properly · 1cf3e52a
      Andrea Bolognani 提交于
      The capabilities used in test cases should match those used
      during normal operation for the tests to make any sense.
      
      This results in the generated command line for a few test
      cases (most notably non-x86 test cases that were wrongly
      assuming they could use -no-acpi) changing.
      1cf3e52a
    • A
      qemu: Split virQEMUCapsInitArchQMPBasic() · a8fc7ef8
      Andrea Bolognani 提交于
      Instead of having a single function that probes the
      architecture from the monitor and then sets a bunch of
      basic capabilities based on it, have a separate function
      for each part: virQEMUCapsInitQMPArch() only sets the
      architecture, and virQEMUCapsInitQMPBasicArch() only sets
      the capabilities.
      
      This split will be useful later on, when we will want to
      set basic capabilities from the test suite without having
      to go through the pain of mocking the monitor.
      a8fc7ef8
    • P
      storage: driver: Remove unavailable transient pools after restart · f3a8e80c
      Peter Krempa 提交于
      If a transient storage pool is deemed inactive after libvirtd restart it
      would not be deleted from the list. Reuse virStoragePoolUpdateInactive
      along with a refactor necessary to properly update the state.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1242801
      f3a8e80c
    • P
      storage: driver: Split out code fixing pool state after deactivation · aced6b23
      Peter Krempa 提交于
      After a pool is made inactive the definition objects need to be updated
      (if a new definition is prepared) and transient pools need to be
      completely removed. Split out the code doing these steps into a separate
      function for later reuse.
      aced6b23
    • P
      storage: backend: Use correct stringifier for pool type · 894133a3
      Peter Krempa 提交于
      When registering a storage poll backend, the code would use
      virStorageTypeToString instead of virStoragePoolTypeToString. The
      following message would be logged:
      
      virDriverLoadModuleFunc:71 : Lookup function 'virStorageBackendSCSIRegister'
      virStorageBackendRegister:174 : Registering storage backend '(null)'
      894133a3
    • 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
    • M
    • M
      networkUpdateState: Create virMacMap module more frequently · 3054dacf
      Michal Privoznik 提交于
      The virMacMap module is there for dumping [domain, <list of is
      MACs>] pairs into a file so that libvirt_guest NSS module can use
      it. Whenever a interface is allocated from network (e.g. on
      domain<F2> startup or NIC hotplug), network is notified and so is
      virMacMap module subsequently. The module update functions
      networkMacMgrAdd() and networkMacMgrDel() gracefully handle the
      case when there's no module. The problem is, the module is
      created if and only if network is freshly started, or if the
      daemon restarts and network previously had the module.
      
      This is not very user friendly - if users want to use the NSS
      module they need to destroy their network and bring it up again
      (and subsequently all the domains using it).
      
      One disadvantage of this approach implemented here is that one
      may get just partial results: any already running network does
      not record mac maps, thus only newly plugged domains will be
      stored in the module. The network restart scenario is not touched
      by this of course. But one can argue that older libvirts had
      never recorded the mac maps anyway.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3054dacf
    • M
      virGetDomain: Set domain ID too · 5683b213
      Michal Privoznik 提交于
      So far our code is full of the following pattern:
      
        dom = virGetDomain(conn, name, uuid)
        if (dom)
            dom->id = 42;
      
      There is no reasong why it couldn't be just:
      
        dom = virGetDomain(conn, name, uuid, id);
      
      After all, client domain representation consists of tuple (name,
      uuid, id).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5683b213
  3. 01 4月, 2017 2 次提交
  4. 31 3月, 2017 1 次提交
  5. 30 3月, 2017 4 次提交
    • M
      qemuDomainSnapshotPrepare: Don't always assume vm->def->os.loader · fa3b5107
      Michal Privoznik 提交于
      In 9e246583 a check that denies internal snapshots when pflash
      based loader is configured for the domain. However, if there's
      none and an user tries to do an internal snapshot they will
      witness daemon crash as in that case vm->def->os.loader is NULL
      and we dereference it unconditionally.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      fa3b5107
    • J
      qemu: Check non-migratable host CPU features · 385c1cc9
      Jiri Denemark 提交于
      CPU features which change their value from disabled to enabled between
      two calls to query-cpu-model-expansion (the first with no extra
      properties set and the second with 'migratable' property set to false)
      can be marked as enabled and non-migratable in qemuMonitorCPUModelInfo.
      
      Since the code consuming qemuMonitorCPUModelInfo currently ignores the
      migratable flag, this change is effectively changing the CPU model
      advertised in domain capabilities to contain all features (even those
      which block migration). And this matches what we do for QEMU older than
      2.9.0, when we detect all CPUID bits ourselves without asking QEMU.
      
      As a result of this change
      
          <cpu mode='host-model'>
            <feature name='invtsc' policy='require'/>
          </cpu>
      
      will work with all QEMU versions. Such CPU definition would be forbidden
      with QEMU >= 2.9.0 without this patch.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      385c1cc9
    • J
      qemu: Check migratable host CPU features · 91927c62
      Jiri Denemark 提交于
      If calling query-cpu-model-expansion on the 'host'/'max' CPU model with
      'migratable' property set to false succeeds, we know QEMU is able to
      tell us which features would disable migration. Thus we can mark all
      enabled features as migratable.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      91927c62
    • J
      qemuMonitorCPUModelInfo: Add support for non-migratable features · 03a6a0db
      Jiri Denemark 提交于
      QEMU is able to tell us whether a CPU feature would block migration or
      not. This patch adds support for storing such features in
      qemuMonitorCPUModelInfo.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      03a6a0db
  6. 29 3月, 2017 4 次提交
  7. 28 3月, 2017 11 次提交