Commit Graph

2 Commits

Author SHA1 Message Date
Lin Ma
85aafea449 qemu: Remove host-passthrough validation check for host-phys-bits=on
Besides the -cpu host, The host-phys-bits=on applies to custom or max
cpu model, So the host-passthrough validation check is unnecessary for
maxphysaddr with mode='passthrough'.

Signed-off-by: Lin Ma <lma@suse.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
2022-09-29 08:45:03 -06:00
Dario Faggioli
1c1a7cdd40 qemu: Add support for max physical address size
This patch maps /domain/cpu/maxphysaddr into -cpu parameters:

  - <maxphysaddr mode='passthrough'/> becomes host-phys-bits=on
  - <maxphysaddr mode='emualte' bits='42'/> becomes phys-bits=42

Passthrough mode can only be used if the chosen CPU model is
'host-passthrough'. Also validate that an explicitly specified
bits value does not exceed the physical address bits on the host.

The feature is available since QEMU 2.7.0.

Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-08-04 09:04:16 +02:00