[PATCH 0/3] Change default machine type for aarch64 and riscv64

Jim Fehlig posted 3 patches 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20230414211449.10885-1-jfehlig@suse.com
NEWS.rst                                           |  6 ++++++
src/qemu/qemu_capabilities.c                       |  4 ++--
tests/domaincapsdata/qemu_4.2.0.aarch64.xml        | 14 ++++++++++----
tests/domaincapsdata/qemu_5.0.0.aarch64.xml        | 14 ++++++++++----
tests/domaincapsdata/qemu_5.2.0.aarch64.xml        | 14 ++++++++++----
tests/domaincapsdata/qemu_6.0.0.aarch64.xml        | 14 ++++++++++----
tests/domaincapsdata/qemu_6.2.0.aarch64.xml        | 14 ++++++++++----
.../domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml  |  6 ++++--
tests/domaincapsdata/qemu_7.0.0.aarch64.xml        | 14 ++++++++++----
tests/qemucapabilitiesdata/caps_4.2.0_aarch64.xml  |  4 ++--
tests/qemucapabilitiesdata/caps_5.0.0_aarch64.xml  |  8 ++++----
tests/qemucapabilitiesdata/caps_5.0.0_riscv64.xml  |  2 +-
tests/qemucapabilitiesdata/caps_5.2.0_aarch64.xml  |  8 ++++----
tests/qemucapabilitiesdata/caps_5.2.0_riscv64.xml  |  2 +-
tests/qemucapabilitiesdata/caps_6.0.0_aarch64.xml  |  8 ++++----
tests/qemucapabilitiesdata/caps_6.2.0_aarch64.xml  |  8 ++++----
.../caps_7.0.0_aarch64+hvf.xml                     |  8 ++++----
tests/qemucapabilitiesdata/caps_7.0.0_aarch64.xml  |  8 ++++----
tests/qemucapabilitiesdata/caps_8.0.0_riscv64.xml  |  4 ++--
19 files changed, 102 insertions(+), 58 deletions(-)
[PATCH 0/3] Change default machine type for aarch64 and riscv64
Posted by Jim Fehlig 1 year, 1 month ago
This series is a first attempt at changing the default machine type for
aarch64 and riscv64. It is difficult, if not impossible, to create a
working VM with the current defaults of 'integratorcp' and 'spike_v1.10',
so let's change the default to type 'virt'. See the following thread for
more details

https://listman.redhat.com/archives/libvir-list/2023-March/238746.html

On aarch64, the default CPU for machine type 'virt' is 'cortex-a15',
which works fine for <domain type='qemu'>, but fails for type='kvm'

2023-04-14T21:03:03.392256Z qemu-system-aarch64: KVM is not supported for this guest CPU type

Do we need to go a step further and define a default CPU (presumably
host-passthrough) for machine type 'virt' for kvm domains on aarch64?

TIA for comments and suggestions!

Regards,
Jim

Jim Fehlig (3):
  qemu: Change default machine type for aarch64
  qemu: Change default machine type for riscv64
  NEWS: Mention change of default machine type for aarch64 and riscv64

 NEWS.rst                                           |  6 ++++++
 src/qemu/qemu_capabilities.c                       |  4 ++--
 tests/domaincapsdata/qemu_4.2.0.aarch64.xml        | 14 ++++++++++----
 tests/domaincapsdata/qemu_5.0.0.aarch64.xml        | 14 ++++++++++----
 tests/domaincapsdata/qemu_5.2.0.aarch64.xml        | 14 ++++++++++----
 tests/domaincapsdata/qemu_6.0.0.aarch64.xml        | 14 ++++++++++----
 tests/domaincapsdata/qemu_6.2.0.aarch64.xml        | 14 ++++++++++----
 .../domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml  |  6 ++++--
 tests/domaincapsdata/qemu_7.0.0.aarch64.xml        | 14 ++++++++++----
 tests/qemucapabilitiesdata/caps_4.2.0_aarch64.xml  |  4 ++--
 tests/qemucapabilitiesdata/caps_5.0.0_aarch64.xml  |  8 ++++----
 tests/qemucapabilitiesdata/caps_5.0.0_riscv64.xml  |  2 +-
 tests/qemucapabilitiesdata/caps_5.2.0_aarch64.xml  |  8 ++++----
 tests/qemucapabilitiesdata/caps_5.2.0_riscv64.xml  |  2 +-
 tests/qemucapabilitiesdata/caps_6.0.0_aarch64.xml  |  8 ++++----
 tests/qemucapabilitiesdata/caps_6.2.0_aarch64.xml  |  8 ++++----
 .../caps_7.0.0_aarch64+hvf.xml                     |  8 ++++----
 tests/qemucapabilitiesdata/caps_7.0.0_aarch64.xml  |  8 ++++----
 tests/qemucapabilitiesdata/caps_8.0.0_riscv64.xml  |  4 ++--
 19 files changed, 102 insertions(+), 58 deletions(-)

-- 
2.40.0
Re: [PATCH 0/3] Change default machine type for aarch64 and riscv64
Posted by Andrea Bolognani 1 year, 1 month ago
On Fri, Apr 14, 2023 at 03:14:46PM -0600, Jim Fehlig wrote:
> On aarch64, the default CPU for machine type 'virt' is 'cortex-a15',
> which works fine for <domain type='qemu'>, but fails for type='kvm'
>
> 2023-04-14T21:03:03.392256Z qemu-system-aarch64: KVM is not supported for this guest CPU type
>
> Do we need to go a step further and define a default CPU (presumably
> host-passthrough) for machine type 'virt' for kvm domains on aarch64?

Even for TCG, you're probably going to want to use something newer
and more featureful than the default. Heck, even on x86_64 the
default CPU model is pretty terrible and you really want to be using
either host-model or host-passthrough.

There's some movement in QEMU land when it comes to adding proper
support for CPU models on Arm. So I would leave things as they are
for now, in the hope that in the not-so-distant future we're going to
be able to make host-model work across both TCG and KVM.

-- 
Andrea Bolognani / Red Hat / Virtualization
Re: [PATCH 0/3] Change default machine type for aarch64 and riscv64
Posted by Jim Fehlig 1 year, 1 month ago
On 4/17/23 05:57, Andrea Bolognani wrote:
> On Fri, Apr 14, 2023 at 03:14:46PM -0600, Jim Fehlig wrote:
>> On aarch64, the default CPU for machine type 'virt' is 'cortex-a15',
>> which works fine for <domain type='qemu'>, but fails for type='kvm'
>>
>> 2023-04-14T21:03:03.392256Z qemu-system-aarch64: KVM is not supported for this guest CPU type
>>
>> Do we need to go a step further and define a default CPU (presumably
>> host-passthrough) for machine type 'virt' for kvm domains on aarch64?
> 
> Even for TCG, you're probably going to want to use something newer
> and more featureful than the default. Heck, even on x86_64 the
> default CPU model is pretty terrible and you really want to be using
> either host-model or host-passthrough.

Nod. The default for 'pc' machine type is qemu64 IIRC :-).

> 
> There's some movement in QEMU land when it comes to adding proper
> support for CPU models on Arm. So I would leave things as they are
> for now, in the hope that in the not-so-distant future we're going to
> be able to make host-model work across both TCG and KVM.

Sounds good. Thanks for the review! Your comments have been incorporated in V2

https://listman.redhat.com/archives/libvir-list/2023-April/239435.html

Regards,
Jim