From: Paolo Bonzini <pbonzini@redhat.com>
To: Xiaoyao Li <xiaoyao.li@intel.com>,
Chenyi Qiang <chenyi.qiang@intel.com>,
Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH 1/2] KVM: X86: Add support for the emulation of DR6_BUS_LOCK bit
Date: Wed, 27 Jan 2021 11:04:20 +0100 [thread overview]
Message-ID: <6bf8fc0d-ad7d-0282-9dcc-695f16af0715@redhat.com> (raw)
In-Reply-To: <5f3089a2-5a5c-a839-9ed9-471c404738a3@intel.com>
On 27/01/21 04:41, Xiaoyao Li wrote:
> On 1/27/2021 12:31 AM, Paolo Bonzini wrote:
>> On 08/01/21 07:49, Chenyi Qiang wrote:
>>> To avoid breaking the CPUs without bus lock detection, activate the
>>> DR6_BUS_LOCK bit (bit 11) conditionally in DR6_FIXED_1 bits.
>>>
>>> The set/clear of DR6_BUS_LOCK is similar to the DR6_RTM in DR6
>>> register. The processor clears DR6_BUS_LOCK when bus lock debug
>>> exception is generated. (For all other #DB the processor sets this bit
>>> to 1.) Software #DB handler should set this bit before returning to the
>>> interrupted task.
>>>
>>> For VM exit caused by debug exception, bit 11 of the exit qualification
>>> is set to indicate that a bus lock debug exception condition was
>>> detected. The VMM should emulate the exception by clearing bit 11 of the
>>> guest DR6.
>>
>> Please rename DR6_INIT to DR6_ACTIVE_LOW, and then a lot of changes
>> become simpler:
>
> Paolo,
>
> What do you want to convey with the new name DR6_ACTIVE_LOW? To be
> honest, the new name is confusing to me.
"Active low" means that the bit is usually 1 and goes to 0 when the
condition (such as RTM or bus lock) happens. For almost all those DR6
bits the value is in fact always 1, but if they are defined in the
future it will require no code change.
Paolo
>>> - dr6 |= DR6_BD | DR6_RTM;
>>> + dr6 |= DR6_BD | DR6_RTM | DR6_BUS_LOCK;
>>
>> dr6 |= DR6_BD | DR6_ACTIVE_LOW;
>>
>
>
next prev parent reply other threads:[~2021-01-27 10:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 6:49 [RESEND PATCH 0/2] Add KVM support for bus lock debug exception Chenyi Qiang
2021-01-08 6:49 ` [RESEND PATCH 1/2] KVM: X86: Add support for the emulation of DR6_BUS_LOCK bit Chenyi Qiang
2021-01-08 16:38 ` kernel test robot
2021-01-26 16:31 ` Paolo Bonzini
2021-01-27 1:48 ` Chenyi Qiang
2021-01-27 3:41 ` Xiaoyao Li
2021-01-27 10:04 ` Paolo Bonzini [this message]
2021-01-28 7:17 ` Xiaoyao Li
2021-01-28 7:25 ` Paolo Bonzini
2021-01-28 7:41 ` Xiaoyao Li
2021-01-08 6:49 ` [RESEND PATCH 2/2] KVM: X86: Expose bus lock debug exception to guest Chenyi Qiang
2021-01-08 18:16 ` kernel test robot
2021-01-26 16:33 ` Paolo Bonzini
2021-01-27 0:57 ` Chenyi Qiang
2021-01-27 12:31 ` 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=6bf8fc0d-ad7d-0282-9dcc-695f16af0715@redhat.com \
--to=pbonzini@redhat.com \
--cc=chenyi.qiang@intel.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=seanjc@google.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=xiaoyao.li@intel.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
all inboxes | Powered by JetHome®