Commit Graph

3 Commits

Author SHA1 Message Date
Peter Krempa
1e5c4d9999 qemuxml2argvdata: Don't use 'host-model' cpu in 'hugepages-memaccess3'
The test case doesn't really test anything about the specific CPU. Using
a host-model cpu with DO_TEST_CAPS_LATEST results in commandline changes
every time qemu updates the cpu definiton.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-08-25 10:33:38 +02:00
Luyao Huang
fe67e3e28e qemu: Validate memory access during validate domain config
Commit 6534b3c4 tried to raise an error when there is no numa
nodes by setting access='shared' in the domain config, but added
a helper called from qemuDomainDeviceDefValidate instead of a
helper called from qemuDomainDefValidate for XML:

  <memoryBacking>
    <hugepages/>
    <access mode='shared'/>
  </memoryBacking>

Since there are no memory devices in the test XML, there would
be no validation failure, but the test added was still failing.
Investigating that it turns out that unnecessary XML elements
were causing the failure (no need for <video>, <graphics>,
<pm>, usb controller model "piix3-uhci", disk attribute for
"discard='unmap'", <serial>, <console>, <channel> and a
memballoon model). Removing all those before moving the method
caused the test to succeed.

So this patch moves the validation to the right place and
removes all the unnecessary XML pieces that were causing
a false validation failure.

https://bugzilla.redhat.com/show_bug.cgi?id=1448149#c14

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-08-29 11:03:07 -04:00
Michal Privoznik
6534b3c4bb qemuBuildMemPathStr: Forbid memoryBacking/access for non-numa case
https://bugzilla.redhat.com/show_bug.cgi?id=1448149

If a domain has no numa nodes, that means we don't put any
memory-backend-file onto the qemu command line. That in turn
means we can't set access='shared'. Therefore, we should produce
an error instead of ignoring the setting silently.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2018-01-03 15:53:00 +01:00