[Qemu-devel] [PATCH v1 0/2] Virtio GPU for S390

2017-09-12 Thread Farhan Ali
These patches wire up the virtio-gpu device for CCW bus for
S390.

For the S390 architecture which does not natively support any graphics
device, virtio gpu in 2D mode could be used to emulate a simple graphics
card and use VNC as the display.

eg: qemu-system-s390x ... -device virtio-gpu-ccw,devno=fe.0.0101
-vnc host_ip_addr:5900

Note, to actually see any display content the
guest kernel needs to support DRM layer, Virtio GPU driver,
the Virtual Terminal layer etc.

I would appreciate any feedback on these patches, specially the
first patch.

Thank you
Farhan

Farhan Ali (2):
  virtio_gpu: Handle endian conversion
  virtio-gpu-ccw: Create a virtio gpu device for the ccw bus

 hw/display/virtio-gpu.c | 53 +++-
 hw/s390x/virtio-ccw.c   | 54 +
 hw/s390x/virtio-ccw.h   | 10 +
 3 files changed, 108 insertions(+), 9 deletions(-)

-- 
1.9.1




Re: [Qemu-devel] [PATCH v1 0/2] Virtio GPU for S390

2017-09-13 Thread Thomas Huth
On 12.09.2017 16:26, Farhan Ali wrote:
> These patches wire up the virtio-gpu device for CCW bus for
> S390.
> 
> For the S390 architecture which does not natively support any graphics
> device, virtio gpu in 2D mode could be used to emulate a simple graphics
> card and use VNC as the display.
> 
> eg: qemu-system-s390x ... -device virtio-gpu-ccw,devno=fe.0.0101
> -vnc host_ip_addr:5900
> 
> Note, to actually see any display content the
> guest kernel needs to support DRM layer, Virtio GPU driver,
> the Virtual Terminal layer etc.

Do you have a list of CONFIG options that need to be enabled there?
Are there also any patches to the guest kernel driver required? Or did
that work out of the box once you've enabled the right CONFIG options?

> I would appreciate any feedback on these patches, specially the
> first patch.

Patches look good to me, but I'm not at all familiar with the virtio-gpu
code, so that likely does not count...

Anyway, thanks a lot for tackling this! It's pretty cool to finally have
a graphics card on s390x, too :-)

 Thomas



Re: [Qemu-devel] [PATCH v1 0/2] Virtio GPU for S390

2017-09-13 Thread Farhan Ali



On 09/13/2017 03:00 PM, Thomas Huth wrote:

On 12.09.2017 16:26, Farhan Ali wrote:

These patches wire up the virtio-gpu device for CCW bus for S390.

For the S390 architecture which does not natively support any
graphics device, virtio gpu in 2D mode could be used to emulate a
simple graphics card and use VNC as the display.

eg: qemu-system-s390x ... -device virtio-gpu-ccw,devno=fe.0.0101
-vnc host_ip_addr:5900

Note, to actually see any display content the guest kernel needs to
support DRM layer, Virtio GPU driver, the Virtual Terminal layer
etc.


Do you have a list of CONFIG options that need to be enabled there?
Are there also any patches to the guest kernel driver required? Or
did that work out of the box once you've enabled the right CONFIG
options?


It required some kernel hacking. You need to enable the VT layer for
S390 to get any kind of graphics displayed.

I experimented on the guest side to enable the VT layer and run a
framebuffer console and also the Xfce desktop :)

Anyway the CONFIG options I used are:

The DRM configs to enable the DRM layer and virtio-gpu. I went with the 
default options for DRM layer.


CONFIG_DRM

CONFIG_DRM_VIRTIO_GPU

We also need to enable configs for the VT layer

CONFIG_VT

CONFIG_DUMMY_CONSOLE

And to display a framebuffer console for the guest

CONFIG_FRAMEBUFFER_CONSOLE




I would appreciate any feedback on these patches, specially the
first patch.


Patches look good to me, but I'm not at all familiar with the
virtio-gpu code, so that likely does not count...

Anyway, thanks a lot for tackling this! It's pretty cool to finally
have a graphics card on s390x, too :-)

Thomas






Re: [Qemu-devel] [PATCH v1 0/2] Virtio GPU for S390

2017-09-14 Thread Gerd Hoffmann
  Hi,

> Do you have a list of CONFIG options that need to be enabled there?
> Are there also any patches to the guest kernel driver required?

guest kernel driver should be fine, it works for ppc64 (big endian)
guests.

cheers,
  Gerd