qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Halil Pasic <pasic@linux.ibm.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Boris Fiuczynski" <fiuczy@linux.ibm.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, "Bruce Rogers" <brogers@suse.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	qemu-s390x@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH 1/1] hw/s390x: modularize virtio-gpu-ccw
Date: Thu, 18 Feb 2021 19:17:39 +0100	[thread overview]
Message-ID: <20210218191739.71bf8800.pasic@linux.ibm.com> (raw)
In-Reply-To: <20210218133820.cflf455nj44mxzja@sirius.home.kraxel.org>

On Thu, 18 Feb 2021 14:38:20 +0100
Gerd Hoffmann <kraxel@redhat.com> wrote:

>   Hi,
> 
> > > The explanation is simple. Unlike most devices, the ccw devices aren't
> > > portable. In particular both css.c and css.h includes "cpu.h", and
> > > virtio-ccw-gpu.c includes "qemu/osdep.h". Furthermore osdep.h contains:
> > > #ifdef NEED_CPU_H
> > > #include CONFIG_TARGET
> > > #else
> > > #include "exec/poison.h"
> > > #endif
> > > so if we don't have NEED_CPU_H, among others CONFIG_KVM is poisoned, and
> > > CONFIG_KVM is used in "css.h". Frankly, I can't tell under what circumstances
> > > does css need "cpu.h".   
> > 
> > s390_crw_mchk() and s390_io_interrupt() are in cpu.h. Nowadays, they
> > use the flic to inject interrupts; but their earlier implementations
> > had a dummy cpu state.
> > 
> > I'm wondering whether s390_flic.h is a better place for functions
> > injecting floating interrupts, now that we don't have the non-flic
> > support anymore.  
> 
> Sounds like the easiest way forward.  

I believe the easiest way forward is what I propose in this patch. Does
this mean, that the code I propose here is not viable? If yes, why?

I'm not against cleaning up the includes for virtio-ccw devices, but I
tend to see that as a separate, less pressing issue.

> Alternatively add support for
> target-specific modules (which we don't really have right now).

I think a target-specific module is what I did in this patch.
Furthermore, I think any virtio-ccw device that is about to be built as
a module, must be built as a target-specific module. If the realized
(guest) architecture is not s390x, then there are no s390 IO instructions
and ccw won't fly. Yes, in theory other architectures could introduce the
exact same stuff, but I don't see that happening.

Even if I were to move the two functions like Connie suggests, I don't
see a way around making virtio-9p-ccw target specific.

Regards,
Halil


  reply	other threads:[~2021-02-18 18:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18  2:22 [PATCH 1/1] hw/s390x: modularize virtio-gpu-ccw Halil Pasic
2021-02-18  9:23 ` Thomas Huth
2021-02-18 10:34   ` Halil Pasic
2021-02-18 12:56     ` Cornelia Huck
2021-02-18 13:38       ` Gerd Hoffmann
2021-02-18 18:17         ` Halil Pasic [this message]
2021-02-19  8:34           ` Gerd Hoffmann
2021-02-19  2:52         ` Halil Pasic
2021-02-19  8:45           ` Gerd Hoffmann
2021-02-19  9:42             ` Halil Pasic
2021-02-19 13:58               ` Gerd Hoffmann
2021-02-18 14:44     ` Thomas Huth
2021-02-18 18:26       ` Halil Pasic

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=20210218191739.71bf8800.pasic@linux.ibm.com \
    --to=pasic@linux.ibm.com \
    --cc=berrange@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=brogers@suse.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=fiuczy@linux.ibm.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.com \
    --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).