Skip to contentSkip to conversation

ppc/spapr: Allow VIRTIO_VGA

PATCH In review Benjamin Herrenschmidt 3 participants 7 messages Sep 15, 2015 – Oct 1, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc/spapr: Allow VIRTIO_VGA

It works fine with the Linux driver out of the box

---
 default-configs/ppc64-softmmu.mak | 1 +
 hw/ppc/spapr.c                    | 1 +
 2 files changed, 2 insertions(+)
default-configs/ppc64-softmmu.mak +1 -0
index a11de08..ec3cd8b 100644
@@ -3,6 +3,7 @@
 include pci.mak
 include sound.mak
 include usb.mak
+CONFIG_VIRTIO_VGA=y
 CONFIG_ISA_MMIO=y
 CONFIG_ESCC=y
 CONFIG_M48T59=y
hw/ppc/spapr.c +1 -0
index 4590c30..b47cacd 100644
@@ -1072,6 +1072,7 @@ static int spapr_vga_init(PCIBus *pci_bus)
     case VGA_DEVICE:
         return true;
     case VGA_STD:
+    case VGA_VIRTIO:
         return pci_vga_init(pci_bus) != NULL;
     default:
         fprintf(stderr, "This vga model is not supported,"
#1 lore raw
Quoted 1 line · Benjamin Herrenschmidt

It works fine with the Linux driver out of the box

Do you actually want the vga compatibility bits on pseries?

There also is virtio-gpu-pci (same thing as virtio-vga but without vga compatibility), which should already be enabled on ppc64.

The linux kvm driver certainly doesn't need vga compatibility.

For slof support it might be useful though, the vga compatibility bits in virtio-vga are fully compatible to stdvga, so slof support should be as simple as adding a PCI ID ...

cheers,
Gerd

#2 lore raw
Quoted 4 lines · Gerd Hoffmann
Quoted 1 line · Benjamin Herrenschmidt

It works fine with the Linux driver out of the box

Do you actually want the vga compatibility bits on pseries?

Yes, our firmware SLOF uses them (via MMIO BARs) for the early boot stuff (well, it will use them when the patches I sent are merged).

Quoted 10 lines

There also is virtio-gpu-pci (same thing as virtio-vga but without vga compatibility), which should already be enabled on ppc64.

Thel inux kvm driver certainly doesn't need vga compatibility.

For slof support it might be useful though, the vga compatibility bits
in virtio-vga are fully compatible to stdvga, so slof support should be
as simple as adding a PCI ID ...

Right. Well, I first had to update SLOF to use the MMIO BARs rather than the legacy IO crap, but yes, that's pretty much what I did.

Quoted 3 lines

cheers,
Gerd

#3 lore raw
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 4 lines · Gerd Hoffmann
Quoted 1 line · Benjamin Herrenschmidt

It works fine with the Linux driver out of the box

Do you actually want the vga compatibility bits on pseries?

Yes, our firmware SLOF uses them (via MMIO BARs) for the early boot stuff (well, it will use them when the patches I sent are merged).

Fine then, patch queued up.

thanks,
Gerd

#4 lore raw
Quoted 11 lines · Gerd Hoffmann
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 4 lines · Gerd Hoffmann
Quoted 1 line · Benjamin Herrenschmidt

It works fine with the Linux driver out of the box

Do you actually want the vga compatibility bits on pseries?

Yes, our firmware SLOF uses them (via MMIO BARs) for the early boot stuff (well, it will use them when the patches I sent are merged).

Fine then, patch queued up.

Just to clarify, Gerd,

You've taken this through your tree and I don't need to stage it in spapr-next?

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#5 lore raw
Quoted 11 lines · David Gibson
Quoted 10 lines · Gerd Hoffmann
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 4 lines · Gerd Hoffmann
Quoted 1 line · Benjamin Herrenschmidt

It works fine with the Linux driver out of the box

Do you actually want the vga compatibility bits on pseries?

Yes, our firmware SLOF uses them (via MMIO BARs) for the early boot stuff (well, it will use them when the patches I sent are merged).

Quoted 6 lines
Quoted 1 line

Fine then, patch queued up.

Just to clarify, Gerd,

You've taken this through your tree and I don't need to stage it in spapr-next?

If you prepare a spapr pull req anyway feel free to include it there. Otherwise it'll go in with my next vga pull request, it's sitting in the vga queue (it is the only patch there though ...)

cheers,
Gerd

#6 lore raw
Quoted 14 lines · Gerd Hoffmann
Quoted 13 lines · David Gibson
Quoted 11 lines · Gerd Hoffmann
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 4 lines · Gerd Hoffmann
Quoted 1 line · Benjamin Herrenschmidt

It works fine with the Linux driver out of the box

Do you actually want the vga compatibility bits on pseries?

Yes, our firmware SLOF uses them (via MMIO BARs) for the early boot stuff (well, it will use them when the patches I sent are merged).

Fine then, patch queued up.

Quoted 8 lines
Quoted 4 lines

Just to clarify, Gerd,

You've taken this through your tree and I don't need to stage it in spapr-next?

If you prepare a spapr pull req anyway feel free to include it there. Otherwise it'll go in with my next vga pull request, it's sitting in the vga queue (it is the only patch there though ...)

Ok, I've pulled it into spapr-next. I'm not planning a new pull request in the immediate future, but if yours goes first, I dare say I'll catch it in the rebase and fix up.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson