1. 28 3月, 2020 2 次提交
  2. 27 3月, 2020 28 次提交
  3. 26 3月, 2020 5 次提交
  4. 25 3月, 2020 5 次提交
    • D
      qemu: allow PMU feature to be enabled for ppc64 guests · 79736aaa
      Daniel Henrique Barboza 提交于
      The PMU feature is enabled by default in ppc64 guests and can't
      be disabled via Libvirt or QEMU [1]. The current PMU feature
      implementation does not allow PMU to enabled or disabled in the
      ppc64 guest. Declaring the PMU feature will make the 'pmu'
      property to be passed on to QEMU, but this property isn't
      available for ppc64:
      
      qemu-kvm: can't apply global host-powerpc64-cpu.pmu=on: Property '.pmu' not found
      
      A similar error is thrown when trying to disable the PMU.
      
      This patch standardizes the PMU handling for ppc64 guests by:
      
      - throwing an error if the user attempts to set the feature to
      'off', given that this feature can't be turned off at all;
      
      - allowing the feature to be declared as 'on' in the domain XML.
      This is done by skipping ppc64 guests when creating the command
      line for this feature.
      
      [1] https://www.redhat.com/archives/libvir-list/2020-March/msg00874.htmlSigned-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      79736aaa
    • D
      qemu: make Hyperv settings exclusive to x86 and aarch64 · f1ea7523
      Daniel Henrique Barboza 提交于
      Hyperv features are supported by both x86 and aarch64. The <hyperv/>
      declaration in the XML by itself is benign to other architectures,
      but any of its 14 current features will break QEMU with an error
      like this (from ppc64):
      
      qemu-kvm: Expected key=value format, found hv_relaxed
      
      This is a more extreme case than the one for apic eoi because we
      would need an extra 'switch' statement, with all current Hyperv
      features in the body of qemuDomainDefValidateFeatures(), to
      check if the user attempted to activate any of them. It's easier to
      simply fail to launch with any 'hyperv' declaration in the XML for
      every arch which is not x86 and aarch64.
      
      A fair disclaimer about Windows and PowerPC: the last Windows version
      that ran in the architecture is the hall of famer Windows NT 4.0,
      launched in 1996 and with end of extended support for the Server
      version in 2004 [1]. I am acknowledging that there might be Windows
      NT 4.0 users running in PowerPC, but not enough people running it
      under KVM/QEMU to justify Libvirt allowing 'hyperv' to exist in the
      domain XML of ppc64 domains.
      
      [1] https://en.wikipedia.org/wiki/Windows_NT_4.0Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      f1ea7523
    • D
      qemu: avoid launching non-x86 guests with 'pvspinlock' setting · da7485c5
      Daniel Henrique Barboza 提交于
      The 'pvspinlock' feature is x86 only. The "<pvspinlock/>" declaration
      will always have a value 'on' or 'off', and both will break QEMU when
      launching non-x86 guests. This is the error message for
      "<pvspinlock state='on'/>" when running a ppc64 guest:
      
      qemu-kvm: Expected key=value format, found +kvm_pv_unhalt
      
      A similar error message is thrown for "<pvspinlock state='off'/>".
      
      This patch prevents non-x86 guests from launching with any
      pvspinlock setting with a more informative error message:
      
      error: unsupported configuration: The 'pvspinlock' feature is not
      supported for architecture 'ppc64' or machine type 'pseries'
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      da7485c5
    • D
      qemu: avoid launching non-x86 guests with APIC-EOI setting · dbda73ff
      Daniel Henrique Barboza 提交于
      The "<apic/>" feature, although it's available only for x86 guests,
      can be declared in the domain XML of other archs without errors.
      But setting its 'eoi' attribute will break QEMU. For "<apic eoi='on'/>",
      in a ppc64 guest:
      
      qemu-kvm: Expected key=value format, found +kvm_pv_eoi
      
      A similar error happens with eoi='off'.
      
      One can argue that it's better to simply forbid launching non-x86
      guests with "<apic/>" declared in the XML - it is a feature that
      the architecture doesn't support and this would make it clearer
      about it. This is sensible, but there are non-x86 guests that are
      running with "<apic/>" declared in the domain (and A LOT of guests
      running with "<acpi/>" for that matter, probably reminiscent of x86
      templates that were reused for other archs) that will stop working if we
      go this route.
      
      A more subtle approach is to detect if the 'eoi' element is being set
      for non-x86 guests and warn the user about it with a better error
      message than the one QEMU provides. This is the new error message
      when any value is set for the 'eoi' element in a ppc64 XML:
      
      error: unsupported configuration: The 'eoi' attribute of the 'apic'
      feature is not supported for architecture 'ppc64' or machine type
      'pseries'.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1236440Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      dbda73ff
    • P
      qemuDomainGetGuestInfo: Suppress non-fatal errors · be01dbdb
      Peter Krempa 提交于
      Don't report cases when the guest information is not requested
      explicitly and not present either.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      be01dbdb