MonitorJSONCommand(mon, cmd, ) < 0)
> goto cleanup;
>
> -/* Urgh, some QEMU architectures have query-cpu-model-baseline
> - * command but return 'GenericError' with string "Not supported",
> - * instead of simply omitting the command entirely
> - */
> if (qemuMonitorJSONHasError(reply, "GenericError")) {
> +/* QEMU does not support query-cpu-model-baseline or cpu model */
> ret = 0;
> goto cleanup;
> }
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
around only allowing cpu-name to be valid iff the cpu mode is
set to "custom".
Otherwise some clarity on the documentation would suffice. Something like "A
CPU model
specified in the domain xml will be ignored." Thoughts?
Thank you for your time.
--
Respectfully,
- Collin Wall
-
> tools/virsh-domain.c | 223 --
> tools/virsh-host.c | 224 +++
> 2 files changed, 224 insertions(+), 223 deletions(-)
>
Makes sense to me.
Reviewed-by: Collin Walling <wall...@linux.ibm.com>
--
Respectful
> capabilities XML already contains the relevant data.
>
> Any comments? I'd like to have these new APIs in the upcoming 4.4
> release.
>
> Jirka
>
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-
, number of elements in @models on success (0 means
> * libvirt accepts any CPU model).
>
Other than that:
Reviewed-by: Collin Walling <wall...@linux.ibm.com>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
containing the element. For more
> -information on guest CPU definition see:
> +definition or the CPU definition created from the host CPU model found in
> +domain capabilities XML (printed by B command). In
> +addition to the element itself, this command accepts
> +full domain
mation on guest CPU definition see:
> L<https://libvirt.org/formatdomain.html#elementsCPU>. If I<--error> is
> specified, the command will return an error when the given CPU is
> incompatible with host CPU and a message providing more details about the
>
Reviewed-by: Collin
ow any CPU models and
> +the usable CPU models are only limited by the hypervisor. This command will
> +print that all CPU models are accepted for these architectures.
>
> =item B [I<--shell>] [I<--xml>] [I...]
>
>
Reviewed-by: Collin Walling <wall...@linux.ibm.co
gt; +virReportUnsupportedError();
> +
> + error:
> +virDispatchError(conn);
> +return VIR_CPU_COMPARE_ERROR;
> +}
> +
> +
> /**
> * virConnectGetCPUModelNames:
> *
> diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
> index 95df3a0dbc..97597d7708 100644
> --- a/src/libvirt_public.syms
> +++ b/src/libvirt_public.syms
> @@ -785,4 +785,9 @@ LIBVIRT_4.1.0 {
> virStoragePoolLookupByTargetPath;
> } LIBVIRT_3.9.0;
>
> +LIBVIRT_4.4.0 {
> +global:
> +virConnectCompareHypervisorCPU;
> +} LIBVIRT_4.1.0;
> +
> # define new API here using predicted next version number
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
I've applied and looked at the patches up to this point. Things are looking
good thus far. Will give
them another once-over tomorrow and continue with the rest of the patches.
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman
result = virConnectCompareCPU(priv->conn, snippet, flags);
> +result = virConnectCompareCPU(priv->conn, cpus[0], flags);
I wonder if it's worth commenting here or adding to the cpu compare docs that
comparison only
compares the host CPU with the _first_ cpu found in the XML fil
_DOMAIN_VIRT_QEMU)
> {
> -virReportError(VIR_ERR_INVALID_ARG,
> - _("KVM is not supported by '%s' on this host"),
> - emulatorbin);
> -goto cleanup;
> -}
> -
> -if (!(domCaps = virDomainCapsNew(emulatorbin, machine, arch, virttype)))
> +if (!(domCaps = virDomainCapsNew(virQEMUCapsGetBinary(qemuCaps), machine,
> + arch, virttype)))
> goto cleanup;
>
> if (virQEMUCapsFillDomainCaps(caps, domCaps, qemuCaps,
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
CC'ing Chris just in case.
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
API takes a CPU definition XML and libvirt will use
> anything it needs from that.
>
I had to bat this around in my head a bit. Truthfully, I think trying to expand
on
why we got the result might be a little much. Perhaps I should have more faith
in the
user to understand what is taken int
On 05/16/2018 04:39 AM, Jiri Denemark wrote:
> To make it more consistent with the rest of the CPU driver code.
>
> Signed-off-by: Jiri Denemark <jdene...@redhat.com>
> ---
> src/cpu/cpu.c | 8
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
Review
> +
> /**
> * virConnectSetKeepAlive:
> * @conn: pointer to a hypervisor connection
> diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
> index 97597d7708..05ab077fb4 100644
> --- a/src/libvirt_public.syms
> +++ b/src/libvirt_public.syms
> @@ -788,6 +788,7 @@ LIBVIRT_4.1.0 {
> LIBVIRT_4.4.0 {
> global:
> virConnectCompareHypervisorCPU;
> +virConnectBaselineHypervisorCPU;
> } LIBVIRT_4.1.0;
>
> # define new API here using predicted next version number
>
Other than the nits above:
Reviewed-by: Collin Walling <wall...@linux.ibm.com>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
r? If so, wouldn't it be more sensible
>> to return a
>> "VIR_HYPERVISOR_CPU_COMPARE_ERROR" instead?
>
> The function returns a value from enum virCPUCompareResult just like the
> original connectCompareCPU API. I don't see a reason for introducing a
> new set of return values for the new
ATTRIBUTE_UNUSED,
> const char **xmlCPUs,
> @@ -21326,6 +21385,7 @@ static virHypervisorDriver qemuHypervisorDriver = {
> .domainSetVcpu = qemuDomainSetVcpu, /* 3.1.0 */
> .domainSetBlockThreshold = qemuDomainSetBlockThreshold, /* 3.2.0 */
> .domainSetLifecycleAction = qemuDomainSetLifecycleAction, /* 3.9.0 */
> +.connectCompareHypervisorCPU = qemuConnectCompareHypervisorCPU, /* 4.4.0
> */
> };
>
>
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
rd CPU related API virConnectGetCPUModelNames is pretty useless
> too, but no new API with similar functionality is needed because domain
> capabilities XML already contains the relevant data.
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On 05/16/2018 04:39 AM, Jiri Denemark wrote:
> Signed-off-by: Jiri Denemark <jdene...@redhat.com>
> ---
> src/qemu/qemu_driver.c | 91 ++
> 1 file changed, 91 insertions(+)
>
Reviewed-by: Collin Walling <wall...@linux.ibm.com>
ML.
"from domain capabilities XML to _a_ form directly usable in the domain XML."
> +
> +The I option specifies the virtualization type (usable in the
> 'type'
> +attribute of the top level element from the domain XML). I
> +specifies the path to the emulator, I specifies t
> src/libxl/libxl_driver.c | 2 +-
> src/qemu/qemu_driver.c | 2 +-
> src/test/test_driver.c | 2 +-
> src/vz/vz_driver.c | 2 +-
> tests/cputest.c | 2 +-
> 11 files changed, 33 insertions(+), 9 deletions(-)
Reviewed-by: Collin Walling <wall...@lin
dene...@redhat.com>
> ---
> src/qemu/qemu_capabilities.c | 52
> src/qemu/qemu_capabilities.h | 4 +++
> 2 files changed, 56 insertions(+)
>
Reviewed-by: Collin Walling <wall...@linux.ibm.com>
--
Respectfully,
- Collin Walling
--
libvir-list
, 19 insertions(+), 12 deletions(-)
>
Reviewed-by: Collin Walling <wall...@linux.ibm.com>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
;
> +command. The guest CPU definition is the element and its contents from
"from _the_ domain XML definition"
> +domain XML definition or the CPU definition created from the host CPU model
> +found in domain capabilities XML (printed by B command). In
"found in _the_ domain capabilities XML (printed by _the_ B +addition to the element itself, this command accepts full domain XML,
> +capabilities XML, or domain capabilities XML containing the CPU definition.
> For
> +more information on guest CPU definition see:
> +L<https://libvirt.org/formatdomain.html#elementsCPU>.
> +
> +The I option specifies the virtualization type (usable in the
> 'type'
> +attribute of the top level element from the domain XML). I
> +specifies the path to the emulator, I specifies the CPU architecture,
> and
> +I specifies the machine type. If I<--error> is specified, the
> command
> +will return an error when the given CPU is incompatible with host CPU and a
"is incompatible with _the_ host CPU"
> +message providing more details about the incompatibility will be printed out.
> +
> =back
>
> =head1 DOMAIN COMMANDS
>
Functionally, everything looks good.
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
"
for RHEL, Fedora, and Debian/Ubuntu. A little bit of work would allow us to
reuse this to
get the appropriate qemu caps for the other distros.
A "virQEMUCapsFindNativeBinary" or something like that comes to mind.
Just a thought.
>
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
arison patches with what we've learned thus far to
see how they look. Otherwise, I have no problem waiting until we come up
with something more definitive -- I have plenty to keep me busy in the
meantime :)
>
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.r
On 05/17/2018 03:28 PM, Jiri Denemark wrote:
> On Wed, May 09, 2018 at 13:36:55 +0200, Halil Pasic wrote:
>>
>>
>> On 05/09/2018 12:41 PM, Jiri Denemark wrote:
>>> On Tue, May 08, 2018 at 10:44:22 -0400, Collin Walling wrote:
>>>> Hi
>>>>
g list
>> libvir-list@redhat.com
>> https://www.redhat.com/mailman/listinfo/libvir-list
>
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
ret;
> +}
> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
> index 9a62b014ac..6098378f6c 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -591,6 +591,10 @@ void virQEMUCapsFilterByMachineType(virQEMUCapsPtr
> qemuCaps,
> qemuMonitorCPUModelInfoPtr virQEMUCa
comment on 11/12. You may not need this anymore.
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
virJSONValuePtr data = NULL;
> +virJSONValuePtr modela = NULL;
> +virJSONValuePtr modelb = NULL;
> +virJSONValuePtr cpu_model = NULL;
> +
> +*model_baseline = NULL;
> +
> +if (!(modela = qemuMonitorJSONBuildCPUModelInfoToJSON(model_a)))
> +goto cleanup;
> +
> +
; void qemuMonitorCPUModelInfoFree(qemuMonitorCPUModelInfoPtr model_info);
> +void qemuMonitorCPUModelInfoFreeContents(qemuMonitorCPUModelInfoPtr
> model_info);
> +
> +int qemuMonitorCPUModelInfoInit(const char *name, qemuMonitorCPUModelInfoPtr
> model)
> +ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
>
> qemuMonitorCPUModelInfoPtr
> qemuMonitorCPUModelInfoCopy(const qemuMonitorCPUModelInfo *orig);
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
it's a bit hard to see if the code fits together nicely. We
> have two approaches now... Chris makes the monitor APIs work on
> CPUModelInfo while Collin's APIs use virCPUDef. We need to see how this
> all fits into the public APIs first.
>
> Jirka
>
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
>
I agree with Jiri. In their current state, I think your patches look fine but
I'll hold off on giving my r-b's until I see how they get used.
Great progress! Looking forward to seeing how it all hooks up.
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
ting baseline hypervisor CPU is not
>>> supported "
>>> @@ -13458,9 +13485,36 @@ qemuConnectBaselineHypervisorCPU(virConnectPtr
>>> conn,
>>>
>>> cpu->fallback = VIR_CPU_FALLBACK_FORBID;
>>>
>>> -if ((flags & VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES) &&
>>> -virCPUExpandFeatures(arch, cpu) < 0)
>>> -goto cleanup;
>>> +if (flags & VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES) {
>>> + if (ARCH_IS_X86(arch)) {
>>> + if (virCPUExpandFeatures(arch, cpu) < 0)
>>> + goto cleanup;
>>> + } else if (ARCH_IS_S390(arch)) {
>>> +
>>
>> Extra empty line.
>>
>>> + if (!(modelInfo = virQEMUCapsCPUModelInfoFromCPUDef(cpu)))
>>> + goto cleanup;
>>> +
>>> + virCPUDefFree(cpu); /* Null on failure, repopulated on success */
>>
>> I think it would be better to drop the comment and just do it:
>>
>> cpu = NULL;
>>
>> Oh and since this goes from CPUDef to modelInfo and back, you may
>> actually need to do some extra work to persist some parts of the
>> original CPU definitions which get lost during the translation (e.g.,
>> the CPU vendor) if it's applicable for s390. We have to do similar stuff
>> for x86 too when we translate CPUDef into CPUID bits and back.
>
> My assumption is that there are not such things (e.g. like vendor).
>
Correct. AFAIK and from what I've seen, s390 only cares about the arch, model,
and
features data with regards to cpu models and libvirt.
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On 07/21/2018 12:05 AM, Chris Venteicher wrote:
> Quoting David Hildenbrand (2018-07-18 02:26:24)
>> On 18.07.2018 00:39, Collin Walling wrote:
>>> On 07/17/2018 05:01 PM, David Hildenbrand wrote:
>>>> On 13.07.2018 18:00, Jiri Denemark wrote:
>>>>>
Use model name "qemu" instead of "max" when calling
query-cpu-model-expansion for s390 on tcg.
Signed-off-by: Collin Walling
---
src/qemu/qemu_capabilities.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_
quot;parseh": false, "csske": false, "hfpm": false, "hfpue":
false, "dfp": false, "km-dea": false,
"emon": false, "kimd-sha-1": false, "cmpsceh": false, "dfpzc": false, "dfphp":
false, "kmc-d
On 07/24/2018 12:03 PM, Jiri Denemark wrote:
> On Mon, Jul 23, 2018 at 17:45:32 -0400, Collin Walling wrote:
>> When calling the query-cpu-model-expansion command via libvirt, we pass in
>> model
>> name "max" when using TCG. However, this model name is not su
On 07/24/2018 12:59 PM, Daniel P. Berrangé wrote:
> On Tue, Jul 24, 2018 at 06:53:54PM +0200, Cornelia Huck wrote:
>> On Tue, 24 Jul 2018 18:08:21 +0200
>> Jiri Denemark wrote:
>>
>>> On Mon, Jul 23, 2018 at 17:45:33 -0400, Collin Walling wrote:
>>>> U
d virQEMUCapsFilterByMachineType(virQEMUCapsPtr
> qemuCaps,
> qemuMonitorCPUModelInfoPtr virQEMUCapsCPUModelInfoFromCPUDef(const virCPUDef
> *cpuDef);
> virCPUDefPtr virQEMUCapsCPUModelInfoToCPUDef(bool migratable_only,
> qemuMonitorCPUModelInfoPtr model);
>
> +int virQEMUCapsQMPBaselineCPUModel(virQEMUCapsInitQMPCommandPtr cmd,
> + virCPUDefPtr *cpus,
> + virCPUDefPtr *baseline);
> +
> virFileCachePtr virQEMUCapsCacheNew(const char *libDir,
> const char *cacheDir,
> uid_t uid,
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
emovePropByBoolValue(
> qemuMonitorCPUModelInfoPtr model,
> + bool value)
> +ATTRIBUTE_NONNULL(1);
> +
> int qemuMonitorGetCPUModelBaseline(qemuMonitorPtr mon,
> qemuMonitorCPUModelInfoPtr model_a,
> qemuMonitorCPUModelInfoPtr model_b,
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
;
> +uid_t runUid;
> +gid_t runGid;
> +char **qmperr;
> +char *qmperr_internal;
> +char *monarg;
> +char *monpath;
> +char *pidfile;
> +virCommandPtr cmd;
> +qemuMonitorPtr mon;
> +virDomainChrSourceDef config;
> +pid_t pid
) < 0)
> goto error;
>
> -copy->migratability = orig->migratability;
> +copy->props_migratable_valid = orig->props_migratable_valid;
> copy->nprops = orig->nprops;
>
> for (i = 0; i < orig->nprops; i++) {
> diff --gi
AL_PTR(ret, cpu);
> +
> + cleanup:
> +virCPUDefFree(cpu);
> +return ret;
> +}
>
> static void
> virQEMUCapsFormatHostCPUModelInfo(virQEMUCapsPtr qemuCaps,
> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
> index a048a1cf02..d5cd486295 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -564,6 +564,9 @@ int virQEMUCapsGetMachineTypesCaps(virQEMUCapsPtr
> qemuCaps,
> void virQEMUCapsFilterByMachineType(virQEMUCapsPtr qemuCaps,
> const char *machineType);
>
> +qemuMonitorCPUModelInfoPtr virQEMUCapsCPUModelInfoFromCPUDef(const virCPUDef
> *cpuDef);
> +virCPUDefPtr virQEMUCapsCPUModelInfoToCPUDef(bool migratable_only,
> qemuMonitorCPUModelInfoPtr model);
> +
> virFileCachePtr virQEMUCapsCacheNew(const char *libDir,
> const char *cacheDir,
> uid_t uid,
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
| 33
> src/qemu/qemu_driver.c | 74 +++-
> src/qemu/qemu_monitor.c | 117 +++-
> src/qemu/qemu_monitor.h | 21 ++-
> src/qemu/qemu_monitor_json.c | 232 +++
> src/qemu/qemu_monitor_json.h | 14 +-
> tests/cputest.c
On 04/18/2018 02:46 AM, Jiri Denemark wrote:
> On Tue, Apr 17, 2018 at 11:32:17 -0400, Collin Walling wrote:
>> On 04/17/2018 04:18 AM, Jiri Denemark wrote:
>>> On Mon, Apr 16, 2018 at 19:16:05 -0400, Collin Walling wrote:
>>>> [Overview]
>>>>
>
On 04/17/2018 04:18 AM, Jiri Denemark wrote:
> On Mon, Apr 16, 2018 at 19:16:05 -0400, Collin Walling wrote:
>> [Overview]
>>
>> This patch series implements an interface to "query-cpu-model-comparison"
>> (available QEMU ~2.8.0) via virsh cpu-compare.
>&
> works with qemuMonitorCPUModelInfoPtrs, and mine works with virCPUDefPtrs).
>>
>> Ultimately, I think your patches are in good shape.
>>
>> Let's discuss further on my comparison patches posted here:
>>
>> https://www.redhat.com/archives/libvir-list/2018-April/msg0
(identical, superset, subset, incompatible) as
its model name as well as a list of properties (aka CPU features)
responsible for this result.
Signed-off-by: Collin Walling <wall...@linux.ibm.com>
---
src/qemu/qemu_capabilities.c | 53 ++
src/qemu/qemu_capabilities.h | 6 +
is available, compare
the host CPU with the CPU defined in the xml file.
Signed-off-by: Collin Walling <wall...@linux.ibm.com>
---
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_capabilities.h | 3 ++
src/qemu/qemu_driver.c | 96
3
query the same
cache file consistently between libvirtd executions, so let's
query the qemuCaps from the first qemu-system-ARCH found in $PATH
(via virQEMUCapsCacheLookup).
Signed-off-by: Collin Walling <wall...@linux.ibm.com>
---
src/qemu/qemu_capabilities.
comparison command)
- consider adding a new test file for comparing cpu models via QEMU if
necessary
Collin Walling (4):
qemu: place qemuCaps host cpu model in virCaps
cpu_conf: xml to cpu definition parse helper
qemu: implement query-cpu-model-comparison via qemu
qemu: hook up cpu-co
Implement an xml to virCPUDefPtr helper that handles
the ctxt prerequisite for virCPUDefParseXML.
Signed-off-by: Collin Walling <wall...@linux.ibm.com>
---
src/conf/cpu_conf.c | 30 ++
src/conf/cpu_conf.h | 6 ++
src/cpu/cpu.c
/www.redhat.com/archives/libvir-list/2018-April/msg01375.html
I'm open to any suggestions / design ideas you have.
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
+ATTRIBUTE_NONNULL(4);
> +
> +
I believe you want NONNULL(2) and (3) here as well.
> int qemuMonitorJSONGetCommands(qemuMonitorPtr mon,
> char ***commands)
> ATTRIBUTE_NONNULL(2);
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
UModelProperty,
> - machine_model) < 0)
> +if (!(machine_model = qemuMonitorJSONBuildCPUModelInfoFromJSON(data)))
> goto cleanup;
>
> ret = 0;
>
Not super important at all, but:
Since you're in the neighborhood, I think it would be helpful to clean up
qemuMonitorJSONGetCPUModelExpansion a tiny bit and do a VIR_STEAL_PTR for
model_info
and machine_model here.
It should also be safe to remove the free on machine_model here, since both the
allocation and freeing is now handled within your Build function.
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
/qemu/qemu_monitor_json.h | 7 ++
> 4 files changed, 178 insertions(+), 22 deletions(-)
>
Please CC me on future posts so they grab my attention easier :)
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
tor.h | 29 +-
>> src/qemu/qemu_monitor_json.c | 226 +--
>> src/qemu/qemu_monitor_json.h | 12 +-
>> src/qemu/qemu_process.c | 359 +++
>> src/qemu/qemu_process.h | 37 ++
>> tests/cputest.c | 11 +-
>> .../caps_2.10.0.s390x.xml | 60 +-
>> .../caps_2.11.0.s390x.xml | 58 +-
>> .../caps_2.12.0.s390x.xml | 56 +-
>> .../qemucapabilitiesdata/caps_2.8.0.s390x.xml | 32 +-
>> .../qemucapabilitiesdata/caps_2.9.0.s390x.xml | 34 +-
>> .../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 64 +-
>> tests/qemucapabilitiestest.c | 7 +
>> 17 files changed, 1388 insertions(+), 571 deletions(-)
>>
>> --
>> 2.17.1
>>
>
--
Respectfully,
- Collin Walling
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
May I ask what the current status of this item is? Is this still
being worked on or has it been shelved?
On 1/12/19 7:49 PM, Chris Venteicher wrote:
Some architectures (S390) depend on QEMU to compute baseline CPU model and
expand a models feature set.
Interacting with QEMU requires starting
Refactor some code in qemuMonitorJSONGetCPUModelExpansion to be
later used for the comparison and baseline functions.
This does not alter any functionality.
Signed-off-by: Collin Walling
Reviewed-by: Bjoern Walk
---
src/qemu/qemu_monitor_json.c | 166 ---
1
Implement an XML to virCPUDefPtr helper that handles
the ctxt prerequisite for virCPUDefParseXML.
This does not alter any functionality.
Signed-off-by: Collin Walling
Reviewed-by: Bjoern Walk
---
src/conf/cpu_conf.c | 30 ++
src/conf/cpu_conf.h | 6
his is posted as an RFC to make sure these patches are set
in the correct direction before tackling the baseline patches.
Thanks!
Collin Walling (4):
cpu_conf: xml to cpu definition parse helper
qemu: monitor: helper functions for CPU models
qemu_capabilities: introduce QEMU_CAPS_QUERY_CPU_MOD
s a subset of the second
(B). If A is the hypervisor CPU and a subset of B (the CPU contained
in the XML), then B would not be able to run on this machine and thus
we will report that CPU model B is incompatible.
Signed-off-by: Collin Walling
---
src/qemu/qemu_capabilities.c | 47 +++
This capability enables CPU model comparison between two CPU
definitions via QMP.
Signed-off-by: Collin Walling
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 +
tests
On 4/17/19 4:25 PM, Daniel Henrique Barboza wrote:
On 4/15/19 5:59 PM, Collin Walling wrote:
This is a preview of the CPU comparison (and soon baseline)
patches. Comments are welcome on all aspects, as they will
help guide the development of the baseline implementation.
The first couple
to run on both A and B.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_monitor.c | 22
src/qemu/qemu_monitor.h | 9 +++
src/qemu/qemu_monitor_json.c | 61
src/qemu/qemu_monitor_json.h
Refactor some code in qemuMonitorJSONGetCPUModelExpansion to be
later used for the comparison and baseline functions.
This does not alter any functionality.
Signed-off-by: Collin Walling
Reviewed-by: Bjoern Walk
---
src/qemu/qemu_monitor_json.c | 173
domcapabilities).
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_capabilities.c | 84
src/qemu/qemu_capabilities.h | 7
src/qemu/qemu_driver.c | 27 ++
3 files changed, 118 insertions
Implement an XML to virCPUDefPtr helper that handles
the ctxt prerequisite for virCPUDefParseXML.
This does not alter any functionality.
Signed-off-by: Collin Walling
Reviewed-by: Bjoern Walk
Reviewed-by: Daniel Henrique Barboza
---
src/conf/cpu_conf.c | 30
This capability enables CPU model comparison between two CPU
definitions via QMP.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_capabilities.c | 4
src/qemu/qemu_capabilities.h | 3 +++
tests
es
- hook up monitor functions to virsh command
Patch 7 pulls out some code from the CPUDef XML parser to be
reused in the comparison hookup.
Thanks.
x86 and Power review by Daniel Henrique Barboza (thanks!)
Collin Walling (8):
qemu_monitor: helper functions for CPU models
qemu_monitor:
domcapabilities).
s390x can report that the first model (A) is a subset of the second
(B). If A is the hypervisor CPU and a subset of B (the CPU contained
in the XML), then B would not be able to run on this machine and thus
we will report that CPU model B is incompatible.
Signed-off-by: Collin Walling
This capability enables CPU model baselining between two CPU
definitions via QMP.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata
, superset, subset, incompatible) as well as a list
of properties (aka CPU features) responsible for the subset or
superset result.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_monitor.c | 22 ++
src/qemu/qemu_monitor.h | 9 +
src/qemu
Polite ping. I'd like to at least make sure these patches are on the
right track with what libvirt expects for these commands. :)
On 5/30/19 10:23 AM, Collin Walling wrote:
Changelog:
v2
- numerous cleanups
- removed "policy fix function" and now prop
On 4/17/19 4:19 PM, Daniel Henrique Barboza wrote:
On 4/15/19 5:59 PM, Collin Walling wrote:
Interfaces with QEMU to compare CPU models. The command takes two
CPU models, A and B, that are given a model name and an optional list
of CPU features. Through the query-cpu-model-comparison command
On 4/29/19 10:08 AM, Daniel Henrique Barboza wrote:
On 4/26/19 5:22 PM, wall...@linux.ibm.com wrote:
From: Collin Walling
Refactor some code in qemuMonitorJSONGetCPUModelExpansion to be
later used for the comparison and baseline functions.
This does not alter any functionality.
Signed-off
ts rather
than discussion pieces. I'm working through them.
> On Wed, Jul 17, 2019 at 10:03:21 -0400, Collin Walling wrote:
>> When baselining CPU models and the user appends the --features argument
>> to the command, s390x will only report back features that supersede the
On 9/10/19 11:38 AM, David Hildenbrand wrote:
On 10.09.19 17:22, Jiri Denemark wrote:
On Tue, Sep 03, 2019 at 15:32:34 -0400, Collin Walling wrote:
On 8/20/19 10:06 AM, Jiri Denemark wrote:
First, let me apologize for such a late review. I'll try my best to
review your series earlier next
This capability enables CPU model baselining between two CPU
definitions via QMP.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata
oduce capability and update test files
- hook up monitor functions to virsh command
Patch 7 pulls out some code from the CPUDef XML parser to be
reused in the comparison hookup.
Thanks.
x86 and Power review by Daniel Henrique Barboza (thanks!)
Collin Walling (8):
qemu_monitor: helper function
Implement an XML to virCPUDefPtr helper that handles
the ctxt prerequisite for virCPUDefParseXML.
This does not alter any functionality.
Signed-off-by: Collin Walling
Reviewed-by: Bjoern Walk
Reviewed-by: Daniel Henrique Barboza
---
src/conf/cpu_conf.c | 30
, superset, subset, incompatible) as well as a list
of properties (aka CPU features) responsible for the subset or
superset result.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_monitor.c | 22 ++
src/qemu/qemu_monitor.h | 9 +
src/qemu
Refactor some code in qemuMonitorJSONGetCPUModelExpansion to be
later used for the comparison and baseline functions.
This does not alter any functionality.
Signed-off-by: Collin Walling
Reviewed-by: Bjoern Walk
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_monitor_json.c | 173
domcapabilities).
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_capabilities.c | 84
src/qemu/qemu_capabilities.h | 7
src/qemu/qemu_driver.c | 27 ++
3 files changed, 118 insertions
to run on both A and B.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_monitor.c | 22
src/qemu/qemu_monitor.h | 9 +++
src/qemu/qemu_monitor_json.c | 61
src/qemu/qemu_monitor_json.h
This capability enables CPU model comparison between two CPU
definitions via QMP.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata
domcapabilities).
s390x can report that the first model (A) is a subset of the second
(B). If A is the hypervisor CPU and a subset of B (the CPU contained
in the XML), then B would not be able to run on this machine and thus
we will report that CPU model B is incompatible.
Signed-off-by: Collin Walling
On 7/24/19 12:18 PM, Boris Fiuczynski wrote:
On 7/17/19 4:03 PM, Collin Walling wrote:
[...]
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index b599ee6..3c33c63 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -5875,6 +5875,101
[...]
+
+virCPUCompareResult
+virQEMUCapsCPUModelComparison(virQEMUCapsPtr qemuCaps,
+ const char *libDir,
+ uid_t runUid,
+ gid_t runGid,
+ virCPUDefPtr cpu_a,
+
Thanks for taking the time to review these!
On 7/24/19 12:18 PM, Boris Fiuczynski wrote:
Reviewed-by: Boris Fiuczynski
On 7/17/19 4:03 PM, Collin Walling wrote:
[...]
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
This command is hooked into the virsh hypervisor-cpu-baseline command.
The CPU models provided in the XML sent to the command will be baselined
via the query-cpu-model-baseline QMP command. The resulting CPU model
will be reported.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique
(-1), then set the property value to true. Otherwise
(optional, disabled) set the value to false.
Signed-off-by: Collin Walling
---
src/qemu/qemu_monitor_json.c | 30 +-
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src
ble to run
on the hypervisor.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
Reviewed-by: Boris Fiuczynski
---
src/qemu/qemu_driver.c | 52 ++
1 file changed, 52 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
ind
to run on both A and B.
Signed-off-by: Collin Walling
Reviewed-by: Daniel Henrique Barboza
---
src/qemu/qemu_monitor.c | 14 ++
src/qemu/qemu_monitor.h | 5 +
src/qemu/qemu_monitor_json.c | 42 ++
src/qemu/qemu_monitor_json.h | 6
Implement an XML to virCPUDefPtr helper that handles the ctxt
prerequisite for virCPUDefParseXML.
This does not alter any functionality.
Signed-off-by: Collin Walling
Reviewed-by: Bjoern Walk
Reviewed-by: Daniel Henrique Barboza
---
src/conf/cpu_conf.c | 29
Modify the error messages in qemuMonitorJSONParseCPUModelData to print
the command name provided to the function.
Signed-off-by: Collin Walling
---
src/qemu/qemu_monitor_json.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src
Perform a full CPU model expansion on the result of the baselined
model name when the features flag is present.
Signed-off-by: Collin Walling
---
src/qemu/qemu_driver.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu
to the expansion function in preparation for
taking features into consideration.
Signed-off-by: Collin Walling
---
src/qemu/qemu_capabilities.c | 9 +++--
src/qemu/qemu_monitor.c | 7 +++
src/qemu/qemu_monitor.h | 2 +-
src/qemu/qemu_monitor_json.c | 8
src/qemu
1 - 100 of 164 matches
Mail list logo