From nobody Sat Feb 7 21:11:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1542228376993787.573840942915; Wed, 14 Nov 2018 12:46:16 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4679BC05D402; Wed, 14 Nov 2018 20:46:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 03CBA5D759; Wed, 14 Nov 2018 20:46:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B132A4BB79; Wed, 14 Nov 2018 20:46:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAEJrA8O002965 for ; Wed, 14 Nov 2018 14:53:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3B6286051E; Wed, 14 Nov 2018 19:53:10 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DB9246013F; Wed, 14 Nov 2018 19:53:07 +0000 (UTC) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B7ADF3078A4C; Wed, 14 Nov 2018 19:53:06 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id o89so28038214qko.0; Wed, 14 Nov 2018 11:53:06 -0800 (PST) Received: from localhost.localdomain ([2804:431:f700:6757:dabd:2c88:c24c:80fc]) by smtp.gmail.com with ESMTPSA id n3sm11048027qtc.81.2018.11.14.11.53.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Nov 2018 11:53:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=udD2hMlAnWzqKZkWty0wiTNTZl30FwwU8mwxmnHkyX4=; b=VrPVyX1asbzW6lIUkx6ln/ETBOQKV3Ngou4jLudK++XPfVr/p1zu3Vl3m/G+Ec5wXf BWchxIEQ79cVCmF7ZedxauS8TnGSguK2qldDHEOx0D+3k3/AvQT4XLqyV8LZVks6KWYq sOxdoPplrjIk/Sf+d6MROKp7N8hiVGThWMHk29a7z/i4veolVkt5kVFofLXIY0c4tCgH k0cf63EALN4dhF8tqqr0ueWB3sKIF+jHo6Ywhxgqq2csioVXqivHkIvXJlw64CBpcKIA PEzvQMxnAVuT7NzBpl+9bQMo8U1aOrUVUS+hQhkfwt9SjxaBVVf5rjY1ml6zxxntW5Dh iKWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=udD2hMlAnWzqKZkWty0wiTNTZl30FwwU8mwxmnHkyX4=; b=tw+pUcPo1bb739iUTd8lYXkcB0HKLRa3tAsw8/XK8F42XJYtiL9uNDeWHd+DJX6ZUc 2bERnbApvXKr4Zs03DMw286Rg8ioxT8pjcRxORaTkFaaDcl7RQXfLqK1qBE0eVGxxH96 7B7NkKVhMb31S9s/Kx2FRn316u87w+lJVqgXDIg+2sbeU4IUIMI5hkCXS/6qNH7lIVoL wws+MxUqsKPhsmVxc6YQmIMOpgyfPuSBSwtbua6Js6UTmRMxVN4shTOrebCfRUNR/rSH pN4/CrOAVrn8vLSC3rhVlAn/F/V7zGmsfOglwXbX2IC+FFvxs9M7GgfwF/gGj6jYnRmh jEmQ== X-Gm-Message-State: AGRZ1gLIDc81EYdG6o3kxh4HF27mrVSnjLuTIMPgvWRxOVfVpdzVYLxj e6LOOUu5TA7Sb4OtZBnoFKPWaHsdbfo= X-Google-Smtp-Source: AJdET5dBxeF44Qd0hlX0MIZpEMloe4tct3qS0aim5RXwfJcptUzX81T9vnGxbtpNfBAnY8wRoknnSQ== X-Received: by 2002:a37:b785:: with SMTP id h127mr3096631qkf.294.1542225185876; Wed, 14 Nov 2018 11:53:05 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Wed, 14 Nov 2018 17:52:07 -0200 Message-Id: <20181114195207.26863-6-danielhb413@gmail.com> In-Reply-To: <20181114195207.26863-1-danielhb413@gmail.com> References: <20181114195207.26863-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 14 Nov 2018 19:53:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 14 Nov 2018 19:53:06 +0000 (UTC) for IP:'209.85.222.193' DOMAIN:'mail-qk1-f193.google.com' HELO:'mail-qk1-f193.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.139 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.222.193 mail-qk1-f193.google.com 209.85.222.193 mail-qk1-f193.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v2 5/5] qemu_process.c: removing qemuProcessStartValidateXML X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 14 Nov 2018 20:46:15 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Commit ("qemu_domain.c: moving maxCpu validation to qemuDomainDefValidate") shortened the code of qemuProcessStartValidateXML. The function is called only by qemuProcessStartValidate, in the same file, and its code is now a single check that calls virDomainDefValida= te. Instead of leaving a function call just to execute a single check, this patch puts the check in the body of qemuProcessStartValidate in the place where qemuProcessStartValidateXML was being called. The function can now be removed. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 0d1dc7ed35..c9ef2050a1 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5114,23 +5114,6 @@ qemuProcessStartValidateDisks(virDomainObjPtr vm, } =20 =20 -static int -qemuProcessStartValidateXML(virQEMUDriverPtr driver, - virDomainObjPtr vm, - virCapsPtr caps, - unsigned int flags) -{ - /* checks below should not be executed when starting a qemu process fo= r a - * VM that was running before (migration, snapshots, save). It's more - * important to start such VM than keep the configuration clean */ - if ((flags & VIR_QEMU_PROCESS_START_NEW) && - virDomainDefValidate(vm->def, caps, 0, driver->xmlopt) < 0) - return -1; - - return 0; -} - - /** * qemuProcessStartValidate: * @vm: domain object @@ -5169,7 +5152,11 @@ qemuProcessStartValidate(virQEMUDriverPtr driver, =20 } =20 - if (qemuProcessStartValidateXML(driver, vm, caps, flags) < 0) + /* Checks below should not be executed when starting a qemu process fo= r a + * VM that was running before (migration, snapshots, save). It's more + * important to start such VM than keep the configuration clean */ + if ((flags & VIR_QEMU_PROCESS_START_NEW) && + virDomainDefValidate(vm->def, caps, 0, driver->xmlopt) < 0) return -1; =20 if (qemuProcessStartValidateGraphics(vm) < 0) --=20 2.19.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list