qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>, qemu-s390x@nongnu.org
Cc: qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>,
	Alexander Graf <agraf@suse.de>, Cornelia Huck <cohuck@redhat.com>,
	Thomas Huth <thuth@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v1 for-2.12 2/2] s390x: load_psw() should only exchange the PSW for KVM
Date: Mon, 9 Apr 2018 13:36:43 +0200	[thread overview]
Message-ID: <e6ee002c-373f-d619-a3e4-a3a6f56b2bda@redhat.com> (raw)
In-Reply-To: <a82acbd9-3023-8f3a-c5a6-3fb5b5a0832c@de.ibm.com>

On 09.04.2018 13:35, Christian Borntraeger wrote:
> 
> 
> On 04/09/2018 01:30 PM, David Hildenbrand wrote:
>> Let's simplify it a bit. On some weird circumstances we would have tried
>> to recompute watchpoints when running under KVM.
>>
>> Signed-off-by: David Hildenbrand <david@redhat.com>
>> ---
>>  target/s390x/helper.c | 10 ++++++----
>>  1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/target/s390x/helper.c b/target/s390x/helper.c
>> index 615fa24ab9..e8548f340a 100644
>> --- a/target/s390x/helper.c
>> +++ b/target/s390x/helper.c
>> @@ -103,16 +103,18 @@ void load_psw(CPUS390XState *env, uint64_t mask, uint64_t addr)
>>
>>      env->psw.addr = addr;
>>      env->psw.mask = mask;
>> -    if (tcg_enabled()) {
>> -        env->cc_op = (mask >> 44) & 3;
>> +
>> +    /* KVM will handle all WAITs and trigger a WAIT exit on disabled_wait */
>> +    if (!tcg_enabled()) {
>> +        return;
>>      }
>> +    env->cc_op = (mask >> 44) & 3;
> 
> Do we have any call path were KVM could call load_psw?

do_restart_interrupt()

SIGP while the target CPU is stopped.

> 
>>
>>      if ((old_mask ^ mask) & PSW_MASK_PER) {
>>          s390_cpu_recompute_watchpoints(CPU(s390_env_get_cpu(env)));
>>      }
>>
>> -    /* KVM will handle all WAITs and trigger a WAIT exit on disabled_wait */
>> -    if (tcg_enabled() && (mask & PSW_MASK_WAIT)) {
>> +    if (mask & PSW_MASK_WAIT) {
>>          s390_handle_wait(s390_env_get_cpu(env));
>>      }
>>  }
>>
> 


-- 

Thanks,

David / dhildenb

  reply	other threads:[~2018-04-09 11:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 11:30 [Qemu-devel] [PATCH v1 for-2.12 0/2] s390x/kvm: last minute fixes David Hildenbrand
2018-04-09 11:30 ` [Qemu-devel] [PATCH v1 for-2.12 1/2] s390x/mmu: don't overwrite pending exception in mmu translate David Hildenbrand
2018-04-09 11:44   ` Thomas Huth
2018-04-09 11:50   ` [Qemu-devel] [qemu-s390x] " Christian Borntraeger
2018-04-09 11:55     ` Cornelia Huck
2018-04-09 11:30 ` [Qemu-devel] [PATCH v1 for-2.12 2/2] s390x: load_psw() should only exchange the PSW for KVM David Hildenbrand
2018-04-09 11:35   ` Christian Borntraeger
2018-04-09 11:36     ` David Hildenbrand [this message]
2018-04-09 11:40       ` Christian Borntraeger
2018-04-09 11:44         ` David Hildenbrand
2018-04-09 11:46           ` Christian Borntraeger
2018-04-09 11:49           ` Cornelia Huck
2018-04-09 11:56   ` Thomas Huth
2018-04-09 12:35 ` [Qemu-devel] [PATCH v1 for-2.12 0/2] s390x/kvm: last minute fixes Cornelia Huck

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=e6ee002c-373f-d619-a3e4-a3a6f56b2bda@redhat.com \
    --to=david@redhat.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    --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).