-
Notifications
You must be signed in to change notification settings - Fork 100
Conversation
The PR needs to be rebased on top of #101 |
l g t m. @alicefr could you add some unit tests? |
Hi @alicefr any update on this? also looks like the CI is not happy
|
@alicefr sounds good to me 😃 |
3e47a12
to
7afdaf0
Compare
@devimc I rebased the PR and added the tests |
qemu/qmp.go
Outdated
|
||
// isDieIDSupported returns if the cpu driver and the qemu version support the die id option | ||
func (q *QMP) isDieIDSupported(driver string) bool { | ||
if q.version.Major > 4 || (q.version.Major == 4 && q.version.Minor >= 1) && driver == "qemu64-x86_64-cpu" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in my system the driver is host-x86_64-cpu
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I had that previously but then I saw the test and here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh - I think qemu64-x86_64-cpu
was used just for testing 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sboeuf Any idea what the correct cpu driver to use here is? Perhaps we need to check for both. Basically, we only want die-id to be specified on x86 systems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok changed back to host-x86_64-cpu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markdryan host-x86_64-cpu
is correct
$ qemu-system-x86_64 -device host-x86_64-cpu,help
host-x86_64-cpu options:
min-xlevel2=<uint32>
amd-ssbd=<bool>
vendor=<string>
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the qmp command query-hotpluggable-cpus
returns this:
{"props": {"core-id": 0, "thread-id": 0, "node-id": 0, "socket-id": 7}, "vcpus-count": 1, "type": "host-x86_64-cpu"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @alicefr
@markdryan can we merge this? |
qemu/qmp.go
Outdated
|
||
// isDieIDSupported returns if the cpu driver and the qemu version support the die id option | ||
func (q *QMP) isDieIDSupported(driver string) bool { | ||
if q.version.Major > 4 || (q.version.Major == 4 && q.version.Minor >= 1) && driver == "host-x86_64-cpu" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this test correct? Won't it always enable die-id for qemu version 5 and above regardless of the driver?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the parenthesis, sorry
Support for function isSocketIDSupported, isThreadIDSupported and isDieIDSupported. The functions check if the cpu driver and the qemu version support the id parameter. Fixes: kata-containers#102 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
Add cpu driver types in TestQMPCPUDeviceAdd Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi!Does arm64 support cpu hotplug? |
@Shunnnnnnnn no, |
Support for function isSocketIDSupported, isThreadIDSupported and isDieIDSupported.
The functions check if the cpu driver and the qemu version support the
id parameter.
Fixes: #102
The support table for various param looks like:
taken from #101 (comment)
Signed-off-by: Alice Frosi afrosi@de.ibm.com