1. 07 4月, 2017 17 次提交
  2. 06 4月, 2017 2 次提交
    • J
      qemu: Fix regression when hyperv/vendor_id feature is used · ae102b5d
      Jiri Denemark 提交于
      qemuProcessVerifyHypervFeatures is supposed to check whether all
      requested hyperv features were actually honored by QEMU/KVM. This is
      done by checking the corresponding CPUID bits reported by the virtual
      CPU. In other words, it doesn't work for string properties, such as
      VIR_DOMAIN_HYPERV_VENDOR_ID (there is no CPUID bit we could check). We
      could theoretically check all 96 bits corresponding to the vendor
      string, but luckily we don't have to check the feature at all. If QEMU
      is too old to support hyperv features, the domain won't even start.
      Otherwise, it is always supported.
      
      Without this patch, libvirt refuses to start a domain which contains
      
        <features>
          <hyperv>
            <vendor_id state='on' value='...'/>
          </hyperv>
        </features>
      
      reporting internal error: "unknown CPU feature __kvm_hv_vendor_id.
      
      This regression was introduced by commit v3.1.0-186-ge9dbe701, which
      (by fixing the virCPUDataCheckFeature condition in
      qemuProcessVerifyHypervFeatures) revealed an old bug in the feature
      verification code. It's been there ever since the verification was
      implemented by commit v1.3.3-rc1-5-g95bbe4bf, which effectively did not
      check VIR_DOMAIN_HYPERV_VENDOR_ID at all.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1439424Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      ae102b5d
    • A
      qemu: Move some functions to qemu_capspriv.h · 2e5de445
      Andrea Bolognani 提交于
      This header file has been created so that we can expose
      internal functions to the test suite without making them
      public: those in qemu_capabilities.h bearing the comment
      
        /* Only for use by test suite */
      
      are obvious candidates for being moved over.
      2e5de445
  3. 05 4月, 2017 4 次提交
  4. 04 4月, 2017 6 次提交
  5. 03 4月, 2017 6 次提交
    • 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
    • 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
      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
  6. 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
  7. 29 3月, 2017 1 次提交