All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org, rth@twiddle.net,
	agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH v2 1/2] s390x/tcg: wire up pci instructions
Date: Thu, 1 Feb 2018 13:48:03 +0100	[thread overview]
Message-ID: <20180201134803.78ef2b65.cohuck@redhat.com> (raw)
In-Reply-To: <de34c0e5-002e-f461-bc4d-498548424177@redhat.com>

On Thu, 1 Feb 2018 13:42:52 +0100
David Hildenbrand <david@redhat.com> wrote:

> On 31.01.2018 19:17, Cornelia Huck wrote:

> > +#ifndef CONFIG_USER_ONLY
> > +void HELPER(clp)(CPUS390XState *env, uint32_t r2)
> > +{
> > +    S390CPU *cpu = s390_env_get_cpu(env);
> > +    int r;
> > +
> > +    qemu_mutex_lock_iothread();
> > +    r = clp_service_call(cpu, r2, GETPC());
> > +    qemu_mutex_unlock_iothread();
> > +    if (r) {
> > +        s390_program_interrupt(env, PGM_OPERATION, 4, GETPC());
> > +    }  
> 
> We don't need the if (r) ... so I suggest dropping all these. (as I
> said, will be handled later via the generic flag checking in translation
> code). We can ignore any error from these functions.

I did not check the instruction implementations in detail... was the
error really only for the !CONFIG_PCI case?

(I really should know that...)

> A sane guest will newer trigger this. (if we have no CONFIG_PCI, the
> also the ZPCI feature will not be available)

Hopefully we can also handle non-sane guests correctly...

> 
> Makes the code even shorter :)
> 

  reply	other threads:[~2018-02-01 12:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 18:17 [Qemu-devel] [PATCH v2 0/2] s390x: support zpci in tcg Cornelia Huck
2018-01-31 18:17 ` [Qemu-devel] [PATCH v2 1/2] s390x/tcg: wire up pci instructions Cornelia Huck
2018-02-01 10:00   ` Pierre Morel
2018-02-01 14:23     ` Cornelia Huck
2018-02-01 12:42   ` David Hildenbrand
2018-02-01 12:48     ` Cornelia Huck [this message]
2018-02-01 12:59       ` David Hildenbrand
2018-02-01 16:05         ` Cornelia Huck
2018-02-01 14:47   ` Cornelia Huck
2018-01-31 18:17 ` [Qemu-devel] [PATCH v2 2/2] s390x/cpumodel: allow zpci features in qemu model Cornelia Huck
2018-02-01 12:31   ` David Hildenbrand
2018-02-01 14:04     ` 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=20180201134803.78ef2b65.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=agraf@suse.de \
    --cc=david@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    /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.