Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libvirt: support s390x architecture for domain XML #1248

Closed
CarstenLeue opened this issue Jul 26, 2023 · 0 comments · Fixed by #1262
Closed

libvirt: support s390x architecture for domain XML #1248

CarstenLeue opened this issue Jul 26, 2023 · 0 comments · Fixed by #1262

Comments

@CarstenLeue
Copy link
Contributor

The domain XML created by the libvirt provider here: https://github.com/confidential-containers/cloud-api-adaptor/blob/main/pkg/adaptor/cloud/libvirt/libvirt.go#L162 has dependencies on the x86_64 architecture:

  • explicit value of x86_64
  • use of sata and ide on the drivers

I suggest to make the following changes:

  • detect the target architecture by consulting the libvirt connection
  • if the target architecture is s390x create the libvirt XML with the required settings, in particular (probably not complete)
    • correct arch value on the DomainOSType
    • use virtio instead of ide and sata
    • add the IOMMU: "on", flag to the devices, this is important to support Secure Execution on s390x going forward
    • make sure no mem-balloon is used
CarstenLeue added a commit to CarstenLeue/cloud-api-adaptor that referenced this issue Jul 27, 2023
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
CarstenLeue added a commit to CarstenLeue/cloud-api-adaptor that referenced this issue Jul 27, 2023
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>

Adding a constant for the s390x architecture for reuse.
CarstenLeue added a commit to CarstenLeue/cloud-api-adaptor that referenced this issue Jul 27, 2023
Fixes confidential-containers#1248

This PR creates a domainXML based on the architecture of the target host.
First it finds the architecture via the GetNodeInfo method. Then if the architecture (aka Model) is s390x we'd create the domain XML with the s390x specifics, else it returns the x86_64 version as before.

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
CarstenLeue added a commit to CarstenLeue/cloud-api-adaptor that referenced this issue Jul 27, 2023
Fixes confidential-containers#1248

This PR creates a domainXML based on the architecture of the target host.
First it finds the architecture via the GetNodeInfo method. Then if the
architecture (aka Model) is s390x we'd create the domain XML with the s390x
specifics, else it returns the x86_64 version as before.

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
CarstenLeue added a commit to CarstenLeue/cloud-api-adaptor that referenced this issue Aug 10, 2023
Fixes confidential-containers#1248

This PR creates a domainXML based on the architecture of the
target host.
First it finds the architecture via the GetNodeInfo method.
Then if the architecture (aka Model) is s390x we'd create the
domain XML with the s390x specifics, else it returns the
x86_64 version as before.

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
wainersm pushed a commit that referenced this issue Aug 11, 2023
Fixes #1248

This PR creates a domainXML based on the architecture of the
target host.
First it finds the architecture via the GetNodeInfo method.
Then if the architecture (aka Model) is s390x we'd create the
domain XML with the s390x specifics, else it returns the
x86_64 version as before.

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
wainersm pushed a commit to wainersm/cc-cloud-api-adaptor that referenced this issue Sep 5, 2023
Fixes confidential-containers#1248

This PR creates a domainXML based on the architecture of the
target host.
First it finds the architecture via the GetNodeInfo method.
Then if the architecture (aka Model) is s390x we'd create the
domain XML with the s390x specifics, else it returns the
x86_64 version as before.

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
bpradipt pushed a commit to bpradipt/cloud-api-adaptor that referenced this issue Sep 25, 2023
Fixes confidential-containers#1248

This PR creates a domainXML based on the architecture of the
target host.
First it finds the architecture via the GetNodeInfo method.
Then if the architecture (aka Model) is s390x we'd create the
domain XML with the s390x specifics, else it returns the
x86_64 version as before.

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
bpradipt pushed a commit to bpradipt/cloud-api-adaptor that referenced this issue Sep 25, 2023
Fixes confidential-containers#1248

This PR creates a domainXML based on the architecture of the
target host.
First it finds the architecture via the GetNodeInfo method.
Then if the architecture (aka Model) is s390x we'd create the
domain XML with the s390x specifics, else it returns the
x86_64 version as before.

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
(cherry picked from commit 63a002c)
lysliu pushed a commit to lysliu/cloud-api-adaptor that referenced this issue Nov 9, 2023
Fixes confidential-containers#1248

This PR creates a domainXML based on the architecture of the
target host.
First it finds the architecture via the GetNodeInfo method.
Then if the architecture (aka Model) is s390x we'd create the
domain XML with the s390x specifics, else it returns the
x86_64 version as before.

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant