From: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Alexander Graf <agraf@suse.de>
Cc: paulus@samba.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/kvm: support to handle sw breakpoint
Date: Tue, 17 Jun 2014 10:51:26 +0000 [thread overview]
Message-ID: <53A01DA4.3060702@linux.vnet.ibm.com> (raw)
In-Reply-To: <1402997541.7661.128.camel@pasglop>
On Tuesday 17 June 2014 03:02 PM, Benjamin Herrenschmidt wrote:
> On Tue, 2014-06-17 at 11:25 +0200, Alexander Graf wrote:
>> On 17.06.14 11:22, Benjamin Herrenschmidt wrote:
>>> On Tue, 2014-06-17 at 10:54 +0200, Alexander Graf wrote:
>>>> Also, why don't we use twi always or something else that actually is
>>>> defined as illegal instruction? I would like to see this shared with
>>>> book3s_32 PR.
>>> twi will be directed to the guest on HV no ? We want a real illegal
>>> because those go to the host (for potential emulation by the HV).
>>
>> Ah, good point. I guess we need different one for PR and HV then to
>> ensure compatibility with older ISAs on PR.
>
> Well, we also need to be careful with what happens if a PR guest puts
> that instruction in, do that stop its HV guest/host ?
>
Damn, my mail client is messed up. did not see the mail till now.
I havent tried this incase of PR guest kernel. I will need to try this
before commenting.
> What if it's done in userspace ? Do that stop the kernel ? :-)
>
Basically flow is that, when we see this instruction, we return to host,
and host checks for address in the SW array and if not it returns to kernel.
> Maddy, I haven't checked, does your patch ensure that we only ever stop
> if the instruction is at a recorded bkpt address ? It still means that a
> userspace process can practically DOS its kernel by issuing a lot of
> these causing a crapload of exits.
>
This is valid, userspace can create a mess, need to handle this, meaning
incase if we dont find a valid SW breakpoint for this address in the
HOST, we need to route it to guest and kill it at app.
Regards
Maddy
> Cheers,
> Ben.
>
>> Alex
>>
>>> I'm
>>> trying to see if I can get the architect to set one in stone in a future
>>> proof way.
>>>
>>> Cheers,
>>> Ben.
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe kvm" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Alexander Graf <agraf@suse.de>
Cc: linuxppc-dev@lists.ozlabs.org, paulus@samba.org,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] powerpc/kvm: support to handle sw breakpoint
Date: Tue, 17 Jun 2014 16:21:16 +0530 [thread overview]
Message-ID: <53A01DA4.3060702@linux.vnet.ibm.com> (raw)
In-Reply-To: <1402997541.7661.128.camel@pasglop>
On Tuesday 17 June 2014 03:02 PM, Benjamin Herrenschmidt wrote:
> On Tue, 2014-06-17 at 11:25 +0200, Alexander Graf wrote:
>> On 17.06.14 11:22, Benjamin Herrenschmidt wrote:
>>> On Tue, 2014-06-17 at 10:54 +0200, Alexander Graf wrote:
>>>> Also, why don't we use twi always or something else that actually is
>>>> defined as illegal instruction? I would like to see this shared with
>>>> book3s_32 PR.
>>> twi will be directed to the guest on HV no ? We want a real illegal
>>> because those go to the host (for potential emulation by the HV).
>>
>> Ah, good point. I guess we need different one for PR and HV then to
>> ensure compatibility with older ISAs on PR.
>
> Well, we also need to be careful with what happens if a PR guest puts
> that instruction in, do that stop its HV guest/host ?
>
Damn, my mail client is messed up. did not see the mail till now.
I havent tried this incase of PR guest kernel. I will need to try this
before commenting.
> What if it's done in userspace ? Do that stop the kernel ? :-)
>
Basically flow is that, when we see this instruction, we return to host,
and host checks for address in the SW array and if not it returns to kernel.
> Maddy, I haven't checked, does your patch ensure that we only ever stop
> if the instruction is at a recorded bkpt address ? It still means that a
> userspace process can practically DOS its kernel by issuing a lot of
> these causing a crapload of exits.
>
This is valid, userspace can create a mess, need to handle this, meaning
incase if we dont find a valid SW breakpoint for this address in the
HOST, we need to route it to guest and kill it at app.
Regards
Maddy
> Cheers,
> Ben.
>
>> Alex
>>
>>> I'm
>>> trying to see if I can get the architect to set one in stone in a future
>>> proof way.
>>>
>>> Cheers,
>>> Ben.
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe kvm" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Alexander Graf <agraf@suse.de>
Cc: paulus@samba.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/kvm: support to handle sw breakpoint
Date: Tue, 17 Jun 2014 16:21:16 +0530 [thread overview]
Message-ID: <53A01DA4.3060702@linux.vnet.ibm.com> (raw)
In-Reply-To: <1402997541.7661.128.camel@pasglop>
On Tuesday 17 June 2014 03:02 PM, Benjamin Herrenschmidt wrote:
> On Tue, 2014-06-17 at 11:25 +0200, Alexander Graf wrote:
>> On 17.06.14 11:22, Benjamin Herrenschmidt wrote:
>>> On Tue, 2014-06-17 at 10:54 +0200, Alexander Graf wrote:
>>>> Also, why don't we use twi always or something else that actually is
>>>> defined as illegal instruction? I would like to see this shared with
>>>> book3s_32 PR.
>>> twi will be directed to the guest on HV no ? We want a real illegal
>>> because those go to the host (for potential emulation by the HV).
>>
>> Ah, good point. I guess we need different one for PR and HV then to
>> ensure compatibility with older ISAs on PR.
>
> Well, we also need to be careful with what happens if a PR guest puts
> that instruction in, do that stop its HV guest/host ?
>
Damn, my mail client is messed up. did not see the mail till now.
I havent tried this incase of PR guest kernel. I will need to try this
before commenting.
> What if it's done in userspace ? Do that stop the kernel ? :-)
>
Basically flow is that, when we see this instruction, we return to host,
and host checks for address in the SW array and if not it returns to kernel.
> Maddy, I haven't checked, does your patch ensure that we only ever stop
> if the instruction is at a recorded bkpt address ? It still means that a
> userspace process can practically DOS its kernel by issuing a lot of
> these causing a crapload of exits.
>
This is valid, userspace can create a mess, need to handle this, meaning
incase if we dont find a valid SW breakpoint for this address in the
HOST, we need to route it to guest and kill it at app.
Regards
Maddy
> Cheers,
> Ben.
>
>> Alex
>>
>>> I'm
>>> trying to see if I can get the architect to set one in stone in a future
>>> proof way.
>>>
>>> Cheers,
>>> Ben.
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe kvm" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
next prev parent reply other threads:[~2014-06-17 10:51 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-14 21:08 [PATCH] powerpc/kvm: support to handle sw breakpoint Madhavan Srinivasan
2014-06-14 21:20 ` Madhavan Srinivasan
2014-06-14 21:08 ` Madhavan Srinivasan
2014-06-17 8:54 ` Alexander Graf
2014-06-17 8:54 ` Alexander Graf
2014-06-17 8:54 ` Alexander Graf
2014-06-17 9:22 ` Benjamin Herrenschmidt
2014-06-17 9:22 ` Benjamin Herrenschmidt
2014-06-17 9:22 ` Benjamin Herrenschmidt
2014-06-17 9:25 ` Alexander Graf
2014-06-17 9:25 ` Alexander Graf
2014-06-17 9:25 ` Alexander Graf
2014-06-17 9:32 ` Benjamin Herrenschmidt
2014-06-17 9:32 ` Benjamin Herrenschmidt
2014-06-17 9:32 ` Benjamin Herrenschmidt
2014-06-17 9:43 ` Alexander Graf
2014-06-17 9:43 ` Alexander Graf
2014-06-17 9:43 ` Alexander Graf
2014-06-17 11:20 ` Madhavan Srinivasan
2014-06-17 11:32 ` Madhavan Srinivasan
2014-06-17 11:20 ` Madhavan Srinivasan
2014-06-17 11:31 ` Alexander Graf
2014-06-17 11:31 ` Alexander Graf
2014-06-17 11:31 ` Alexander Graf
2014-06-17 10:51 ` Madhavan Srinivasan [this message]
2014-06-17 10:51 ` Madhavan Srinivasan
2014-06-17 10:51 ` Madhavan Srinivasan
2014-06-17 11:07 ` Madhavan Srinivasan
2014-06-17 11:19 ` Madhavan Srinivasan
2014-06-17 11:07 ` Madhavan Srinivasan
2014-06-17 11:08 ` Alexander Graf
2014-06-17 11:08 ` Alexander Graf
2014-06-17 11:08 ` Alexander Graf
2014-06-17 11:13 ` Madhavan Srinivasan
2014-06-17 11:25 ` Madhavan Srinivasan
2014-06-17 11:13 ` Madhavan Srinivasan
2014-06-17 14:42 ` Alexander Graf
2014-06-17 14:42 ` Alexander Graf
2014-06-17 14:42 ` Alexander Graf
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=53A01DA4.3060702@linux.vnet.ibm.com \
--to=maddy@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=benh@kernel.crashing.org \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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.