From: Scott Wood <scottwood@freescale.com>
To: Bhushan Bharat-R65777 <R65777@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"agraf@suse.de" <agraf@suse.de>
Subject: Re: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support
Date: Mon, 20 Aug 2012 23:55:35 +0000 [thread overview]
Message-ID: <5032CE77.1090507@freescale.com> (raw)
In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D03E03460@039-SN2MPN1-022.039d.mgd.msft.net>
On 08/16/2012 10:12 AM, Bhushan Bharat-R65777 wrote:
>
>
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Tuesday, July 31, 2012 3:31 AM
>> To: Bhushan Bharat-R65777
>> Cc: Wood Scott-B07421; kvm-ppc@vger.kernel.org; kvm@vger.kernel.org;
>> agraf@suse.de
>> Subject: Re: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support
>>
>> On 07/30/2012 02:37 AM, Bhushan Bharat-R65777 wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Wood Scott-B07421
>>>> Sent: Friday, July 27, 2012 7:00 AM
>>>> To: Bhushan Bharat-R65777
>>>> Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; agraf@suse.de;
>>>> Bhushan Bharat-
>>>> R65777
>>>> Subject: Re: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug
>>>> support
>>>>
>>>>> +#ifndef CONFIG_PPC_FSL_BOOK3E
>>>>> + PPC_LD(r7, VCPU_HOST_DBG+KVMPPC_DBG_IAC3, r4)
>>>>> + PPC_LD(r8, VCPU_HOST_DBG+KVMPPC_DBG_IAC4, r4)
>>>>> + mtspr SPRN_IAC3, r7
>>>>> + mtspr SPRN_IAC4, r8
>>>>> +#endif
>>>>
>>>> Can you handle this at runtime with a feature section?
>>>
>>> Why you want this to make run time? Removing config_ ?
>>
>> Currently KVM hardcodes the target hardware in a way that is unacceptable in
>> much of the rest of the kernel. We have a long term goal to stop doing that,
>> and we should avoid making it worse by adding random ifdefs for specific CPUs.
>
> I do not see any CPU_FTR_* which I can use directly. Should I define a new FTR, something like:
>
> #define CPU_FTR_DEBUG_E500 LONG_ASM_CONST(0x4000000000000000)
>
> Use this in: CPU_FTRS_E500_2, CPU_FTRS_E500MC, CPU_FTRS_E5500 etc
>
> BEGIN_FTR_SECTION
> PPC_LD(r7, VCPU_HOST_DBG+KVMPPC_DBG_IAC3, r4)
> PPC_LD(r8, VCPU_HOST_DBG+KVMPPC_DBG_IAC4, r4)
> mtspr SPRN_IAC3, r7
> mtspr SPRN_IAC4, r8
> END_FTR_SECTION_IFCLR(CPU_FTR_DEBUG_E500)
It looks like other parts of the kernel use CONFIG_PPC_ADV_DEBUG_IACS
for this, though ideally it would be made runtime in the future.
-Scott
WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Bhushan Bharat-R65777 <R65777@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"agraf@suse.de" <agraf@suse.de>
Subject: Re: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support
Date: Mon, 20 Aug 2012 18:55:35 -0500 [thread overview]
Message-ID: <5032CE77.1090507@freescale.com> (raw)
In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D03E03460@039-SN2MPN1-022.039d.mgd.msft.net>
On 08/16/2012 10:12 AM, Bhushan Bharat-R65777 wrote:
>
>
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Tuesday, July 31, 2012 3:31 AM
>> To: Bhushan Bharat-R65777
>> Cc: Wood Scott-B07421; kvm-ppc@vger.kernel.org; kvm@vger.kernel.org;
>> agraf@suse.de
>> Subject: Re: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support
>>
>> On 07/30/2012 02:37 AM, Bhushan Bharat-R65777 wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Wood Scott-B07421
>>>> Sent: Friday, July 27, 2012 7:00 AM
>>>> To: Bhushan Bharat-R65777
>>>> Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; agraf@suse.de;
>>>> Bhushan Bharat-
>>>> R65777
>>>> Subject: Re: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug
>>>> support
>>>>
>>>>> +#ifndef CONFIG_PPC_FSL_BOOK3E
>>>>> + PPC_LD(r7, VCPU_HOST_DBG+KVMPPC_DBG_IAC3, r4)
>>>>> + PPC_LD(r8, VCPU_HOST_DBG+KVMPPC_DBG_IAC4, r4)
>>>>> + mtspr SPRN_IAC3, r7
>>>>> + mtspr SPRN_IAC4, r8
>>>>> +#endif
>>>>
>>>> Can you handle this at runtime with a feature section?
>>>
>>> Why you want this to make run time? Removing config_ ?
>>
>> Currently KVM hardcodes the target hardware in a way that is unacceptable in
>> much of the rest of the kernel. We have a long term goal to stop doing that,
>> and we should avoid making it worse by adding random ifdefs for specific CPUs.
>
> I do not see any CPU_FTR_* which I can use directly. Should I define a new FTR, something like:
>
> #define CPU_FTR_DEBUG_E500 LONG_ASM_CONST(0x4000000000000000)
>
> Use this in: CPU_FTRS_E500_2, CPU_FTRS_E500MC, CPU_FTRS_E5500 etc
>
> BEGIN_FTR_SECTION
> PPC_LD(r7, VCPU_HOST_DBG+KVMPPC_DBG_IAC3, r4)
> PPC_LD(r8, VCPU_HOST_DBG+KVMPPC_DBG_IAC4, r4)
> mtspr SPRN_IAC3, r7
> mtspr SPRN_IAC4, r8
> END_FTR_SECTION_IFCLR(CPU_FTR_DEBUG_E500)
It looks like other parts of the kernel use CONFIG_PPC_ADV_DEBUG_IACS
for this, though ideally it would be made runtime in the future.
-Scott
next prev parent reply other threads:[~2012-08-20 23:55 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-26 5:32 [PATCH 1/2] KVM: PPC: booke: Allow multiple exception types Bharat Bhushan
2012-07-26 5:44 ` Bharat Bhushan
2012-07-26 5:32 ` [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support Bharat Bhushan
2012-07-26 5:44 ` Bharat Bhushan
2012-07-27 1:29 ` Scott Wood
2012-07-27 1:29 ` Scott Wood
2012-07-30 7:37 ` Bhushan Bharat-R65777
2012-07-30 7:37 ` Bhushan Bharat-R65777
2012-07-30 22:00 ` Scott Wood
2012-07-30 22:00 ` Scott Wood
2012-08-16 8:48 ` Bhushan Bharat-R65777
2012-08-16 8:48 ` Bhushan Bharat-R65777
2012-08-20 23:53 ` Scott Wood
2012-08-20 23:53 ` Scott Wood
2012-08-16 15:12 ` Bhushan Bharat-R65777
2012-08-16 15:12 ` Bhushan Bharat-R65777
2012-08-20 23:55 ` Scott Wood [this message]
2012-08-20 23:55 ` Scott Wood
2012-07-26 23:01 ` [PATCH 1/2] KVM: PPC: booke: Allow multiple exception types Scott Wood
2012-07-26 23:01 ` Scott Wood
-- strict thread matches above, loose matches on Subject: below --
2012-07-30 11:11 Bharat Bhushan
2012-07-30 11:23 ` Bharat Bhushan
2012-07-30 11:11 ` [PATCH 2/2] KVM: PPC: booke: Added debug handler Bharat Bhushan
2012-07-30 11:23 ` Bharat Bhushan
2012-07-31 0:55 ` Scott Wood
2012-07-31 0:55 ` Scott Wood
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=5032CE77.1090507@freescale.com \
--to=scottwood@freescale.com \
--cc=B07421@freescale.com \
--cc=R65777@freescale.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.