Re: [libvirt PATCH] qemu_validate: Allow kvm hint-dedicated on non-passthrough VMs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 1/18/21 11:43 AM, Tim Wiederhake wrote:
A VM defined similar to:
   ...
   <features><kvm><hint-dedicated state='on'/></kvm></features>
   <cpu mode="host-model"/>
   ...
is currently invalid, as hint-dedicated is only allowed if cpu mode
is host-passthrough. This restriction is unnecessary, see
https://bugzilla.redhat.com/show_bug.cgi?id=1857671.

Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---

Reviewed-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>

  src/qemu/qemu_validate.c | 11 +----------
  1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index a060bd98ba..c58d221cf8 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -253,16 +253,6 @@ qemuValidateDomainDefFeatures(const virDomainDef *def,
              }
              break;
- case VIR_DOMAIN_FEATURE_KVM:
-            if (def->kvm_features[VIR_DOMAIN_KVM_DEDICATED] == VIR_TRISTATE_SWITCH_ON &&
-                (!def->cpu || def->cpu->mode != VIR_CPU_MODE_HOST_PASSTHROUGH)) {
-                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                               _("kvm-hint-dedicated=on is only applicable "
-                                 "for cpu host-passthrough"));
-                return -1;
-            }
-            break;
-
          case VIR_DOMAIN_FEATURE_VMPORT:
              if (def->features[i] != VIR_TRISTATE_SWITCH_ABSENT &&
                  !virQEMUCapsSupportsVmport(qemuCaps, def)) {
@@ -335,6 +325,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def,
              }
              break;
+ case VIR_DOMAIN_FEATURE_KVM:
          case VIR_DOMAIN_FEATURE_XEN:
          case VIR_DOMAIN_FEATURE_ACPI:
          case VIR_DOMAIN_FEATURE_PAE:





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux