From: Janosch Frank <frankja@linux.ibm.com>
To: "Cédric Le Goater" <clg@redhat.com>,
"Cédric Le Goater" <clg@kaod.org>,
qemu-s390x@nongnu.org
Cc: qemu-devel@nongnu.org, Thomas Huth <thuth@redhat.com>,
Halil Pasic <pasic@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
David Hildenbrand <david@redhat.com>,
Ilya Leoshkevich <iii@linux.ibm.com>,
Eric Farman <farman@linux.ibm.com>
Subject: Re: [PATCH v2 3/4] s390x/pv: Introduce a s390_pv_check() helper for runtime
Date: Mon, 9 Jan 2023 15:52:32 +0100 [thread overview]
Message-ID: <a6aa35a8-c3fe-47d8-3a80-38cb8d94fdba@linux.ibm.com> (raw)
In-Reply-To: <d4ec20fc-5b68-ee04-c387-4e87428d6c7f@linux.ibm.com>
On 1/9/23 15:31, Janosch Frank wrote:
> On 1/9/23 14:53, Cédric Le Goater wrote:
>> On 1/9/23 14:45, Janosch Frank wrote:
>>> On 1/9/23 14:30, Cédric Le Goater wrote:
>>>> On 1/9/23 10:49, Janosch Frank wrote:
>>>>> On 1/9/23 10:27, Cédric Le Goater wrote:
>>>>>> On 1/9/23 10:04, Janosch Frank wrote:
>>>>>>> On 1/6/23 08:53, Cédric Le Goater wrote:
>>>>>>>> From: Cédric Le Goater <clg@redhat.com>
>>>>>>>>
>>>>>>>> If a secure kernel is started in a non-protected VM, the OS will hang
>>>>>>>> during boot without giving a proper error message to the user.
>>>>>>>
>>>>>>> Most of the time you see nothing in the console because libvirt is too slow. If you start the VM in paused mode, attach a console and then resume it, then you'll see a nice error message.
>>>>>>
>>>>>> If you wait long enough, the VM fails to mount / and falls into the dracut
>>>>>> initrams.
>>>>>
>>>>> I have the feeling that we're not talking about the same thing here.>
>>>> > A PV VM always starts out as a non-PV VM and is put into PV mode via two diag308 subcodes (8 & 10). ALL PV subcodes (8 - 10) are spec exceptions if the host isn't enabled for PV.
>>>>
>>>> The corner case this patch is trying to address is for a PV-enabled host,
>>>> a secure enabled OS and !PV-enabled QEMU.
>>>>
>>>> Please run this command on a secure disk image :
>>>>
>>>> qemu-system-s390x -M s390-ccw-virtio -accel kvm -drive file=<file>,if=virtio,format=qcow2 -nographic -nodefaults -serial mon:stdio
>>>>
>>>> and tell me what you get.
>>>>
>>>
>>> qemu-system-s390x -M s390-ccw-virtio -accel kvm -drive file=u2204.qcow2,if=virtio,format=qcow2 -nographic -nodefaults -serial mon:stdio
>>> LOADPARM=[ ]
>>> Using virtio-blk.
>>> Using SCSI scheme.
>>> .............................................................................................................................
>>> Secure unpack facility is not available
>>
>> Yes. That's with a !PV-enabled host. Correct ?
>>
>> Can you try with prot_virt=1 on the host please ?
>
> With prot_virt=1 it boots until it doesn't find the file system (at
> least if you give it a bit more memory than the standard 256MB):
>
> qemu-system-s390x -M s390-ccw-virtio -accel kvm -drive
> file=u2204.qcow2,if=virtio,format=qcow2 -nographic -nodefaults -serial
> mon:stdio -m 4096
> [Linux boot stuff]
> ALERT! /dev/disk/by-path/ccw-0.0.0000-part1 does not exist. Dropping
> to a shell!
>
I.e. it boots into secure mode just fine.
Now if you add iommu_platform=true to the device then it'll even boot
from disk.
So we'd rather need an error message if you attach a device without the
iommu being set to true. The whole topic of PV iommu problems has a few
windings which I don't fully want to bring to electronic paper right now.
Either you start a secure guest that has devices with manual iommu
entries or you go the launch security route and let libvirt/qemu handle
it for you.
next prev parent reply other threads:[~2023-01-09 14:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 7:53 [PATCH v2 0/4] s390x/pv: Improve protected VM support Cédric Le Goater
2023-01-06 7:53 ` [PATCH v2 1/4] s390x/pv: Implement a CGS check helper Cédric Le Goater
2023-01-09 13:34 ` Thomas Huth
2023-01-09 13:57 ` Cédric Le Goater
2023-01-09 14:12 ` Thomas Huth
2023-01-09 14:28 ` Cédric Le Goater
2023-01-06 7:53 ` [PATCH v2 2/4] s390x/pv: Check for support on the host Cédric Le Goater
2023-01-09 8:45 ` Janosch Frank
2023-01-09 9:44 ` Cédric Le Goater
2023-01-09 10:49 ` Janosch Frank
2023-01-06 7:53 ` [PATCH v2 3/4] s390x/pv: Introduce a s390_pv_check() helper for runtime Cédric Le Goater
2023-01-09 9:04 ` Janosch Frank
2023-01-09 9:27 ` Cédric Le Goater
2023-01-09 9:49 ` Janosch Frank
2023-01-09 13:30 ` Cédric Le Goater
2023-01-09 13:45 ` Janosch Frank
2023-01-09 13:53 ` Cédric Le Goater
2023-01-09 14:31 ` Janosch Frank
2023-01-09 14:52 ` Janosch Frank [this message]
2023-01-09 15:24 ` Cédric Le Goater
2023-01-06 7:53 ` [PATCH v2 4/4] s390x/pv: Move check on hugepage under s390_pv_guest_check() Cédric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a6aa35a8-c3fe-47d8-3a80-38cb8d94fdba@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=clg@kaod.org \
--cc=clg@redhat.com \
--cc=david@redhat.com \
--cc=farman@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).