From: David Hildenbrand <david@redhat.com>
To: "Christian Borntraeger" <borntraeger@de.ibm.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>
Cc: KVM <kvm@vger.kernel.org>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
linux-s390 <linux-s390@vger.kernel.org>,
QingFeng Hao <haoqf@linux.vnet.ibm.com>
Subject: Re: [GIT PULL 7/9] KVM: s390: Backup the guest's machine check info
Date: Wed, 28 Jun 2017 20:56:45 +0200 [thread overview]
Message-ID: <5d3bbee4-b3cf-ad98-828c-779624c3a138@redhat.com> (raw)
In-Reply-To: <c1c85f4e-62b9-82ea-a669-6ecf1380189f@de.ibm.com>
On 28.06.2017 20:37, Christian Borntraeger wrote:
> On 06/28/2017 08:20 PM, David Hildenbrand wrote:
>> On 28.06.2017 19:30, Christian Borntraeger wrote:
>>> From: QingFeng Hao <haoqf@linux.vnet.ibm.com>
>>>
>>> When a machine check happens in the guest, related mcck info (mcic,
>>> external damage code, ...) is stored in the vcpu's lowcore on the host.
>>> Then the machine check handler's low-level part is executed, followed
>>> by the high-level part.
>>>
>>> If the high-level part's execution is interrupted by a new machine check
>>> happening on the same vcpu on the host, the mcck info in the lowcore is
>>> overwritten with the new machine check's data.
>>>
>>> If the high-level part's execution is scheduled to a different cpu,
>>> the mcck info in the lowcore is uncertain.
>>>
>>> Therefore, for both cases, the further reinjection to the guest will use
>>> the wrong data.
>>> Let's backup the mcck info in the lowcore to the sie page
>>> for further reinjection, so that the right data will be used.
>>>
>>> Add new member into struct sie_page to store related machine check's
>>> info of mcic, failing storage address and external damage code.
>>>
>>
>>
>> When this happens while the guest is running, there will be some
>> registers written into the low core save area (gprs, cr etc.) during the
>> machine check. Are these always host registers? Or can these be guest
>> registers?
>
> Always host registers (the machine will exit SIE before presenting the machine
> check).
>>
>> Also, do the "valid" flags always refer to guest or host bits?
>
> The host bits.
Okay, then why is mcic extracted from the real machine check and passed
on to the guest (almost unmodified)?
Wouldn't all guest registers than have to be always valid?
Also, if the guest does not have vector registers enabled, but the host
does, and there is a machine check, the guest would suddenly have the
vector registers valid flag indicated, which is strange.
For ordinary crw machine checks, we properly take care of that (QEMU
build_channel_report_mcic()).
--
Thanks,
David
next prev parent reply other threads:[~2017-06-28 18:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 17:30 [GIT PULL 0/9] KVM: s390: fixes and features for 4.13 (via kvm/next) Christian Borntraeger
2017-06-28 17:30 ` [GIT PULL 1/9] KVM: s390: CMMA tracking, ESSA emulation, migration mode Christian Borntraeger
2017-06-28 17:30 ` [GIT PULL 2/9] KVM: s390: ioctls to get and set guest storage attributes Christian Borntraeger
2017-06-28 17:30 ` [GIT PULL 3/9] KVM: s390: implement instruction execution protection for emulated ifetch Christian Borntraeger
2017-06-28 17:30 ` [GIT PULL 4/9] KVM: S390: add new group for flic Christian Borntraeger
2017-06-28 17:30 ` [GIT PULL 5/9] KVM: s390: avoid packed attribute Christian Borntraeger
2017-06-28 17:30 ` [GIT PULL 6/9] s390/nmi: s390: New low level handling for machine check happening in guest Christian Borntraeger
2017-06-28 17:30 ` [GIT PULL 7/9] KVM: s390: Backup the guest's machine check info Christian Borntraeger
2017-06-28 18:20 ` David Hildenbrand
2017-06-28 18:37 ` Christian Borntraeger
2017-06-28 18:56 ` David Hildenbrand [this message]
2017-06-28 19:14 ` Christian Borntraeger
2017-06-28 19:46 ` David Hildenbrand
2017-06-28 17:30 ` [GIT PULL 8/9] KVM: s390: Inject machine check into the guest Christian Borntraeger
2017-06-28 17:30 ` [GIT PULL 9/9] KVM: s390: Inject machine check into the nested guest Christian Borntraeger
2017-06-28 18:06 ` David Hildenbrand
2017-06-28 18:59 ` Christian Borntraeger
2017-06-28 19:08 ` David Hildenbrand
2017-06-28 19:16 ` Christian Borntraeger
2017-06-28 19:17 ` David Hildenbrand
2017-06-29 14:57 ` Christian Borntraeger
2017-06-30 16:30 ` David Hildenbrand
2017-06-28 20:39 ` [GIT PULL 0/9] KVM: s390: fixes and features for 4.13 (via kvm/next) Paolo Bonzini
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=5d3bbee4-b3cf-ad98-828c-779624c3a138@redhat.com \
--to=david@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=haoqf@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@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