Re: [Qemu-discuss] Booting GUI ubuntu VM on Aarch64

2016-02-19 Thread Alexander Spyridakis
Hello,

Apart from that, should I change something the make QEMU open in graphics
> window instead of monitor  window ?
>

By default QEMU should open a graphics window on vexpress-15, unless you
specify the -nographic option.

In any case before trying anything on KVM make sure to test your ARM guest
on an x86 machine with TCG. Graphics should work there with no hacks at
all. Once you are sure that your kernel/userspace combo is good enough then
you can move to KVM on an ARM device.

Regards.


Re: [Qemu-discuss] Booting GUI ubuntu VM on Aarch64

2016-02-18 Thread Yehuda Yitschak


> From: qemu-discuss-bounces+yehuday=marvell@nongnu.org 
> [mailto:qemu-discuss-bounces+yehuday=marvell@nongnu.org] On Behalf Of 
> Alexander Spyridakis
> Sent: Monday, February 15, 2016 17:08
> To: Yehuda Yitschak
> Cc: Alexander Spyridakis; Jérémy Fanguède; qemu-discuss@nongnu.org; Peter 
> Maydell
> Subject: Re: [Qemu-discuss] Booting GUI ubuntu VM on Aarch64

>> On 15 February 2016 at 15:42, Yehuda Yitschak <yehu...@marvell.com> wrote:
>> I want to use KVM tough it looks like a not a trivial hack for the non QEMU 
>> expert like me :)
>> Would  you mind sharing how you achieved graphics in your demo above ?
>> did you use TCG or did you also go through these workarounds ?
>
> That is an old ARMv7 KVM demo on the vexpress-a15 machine model (instead of 
> virt). For that model you need a kernel with the HDLCD driver (PL111) and 
> also to modify hw/display/framebuffer.c with the hack that I pointed in my 
> previous mail. No PCI devices in the vexpress-a15 model, so you won't have to 
> patch QEMU/KVM with cache coherency workarounds.

Thanks, ill try that out
Apart from that, should I change something the make QEMU open in graphics 
window instead of monitor  window ?

Regards

Yehuda

>  Regards.


Re: [Qemu-discuss] Booting GUI ubuntu VM on Aarch64

2016-02-15 Thread Yehuda Yitschak
Hi Alexander

> From: Alexander Spyridakis [mailto:a.spyrida...@virtualopensystems.com] 
> Sent: Monday, February 15, 2016 15:38
> To: Yehuda Yitschak
> Cc: Peter Maydell; qemu-discuss@nongnu.org; 
> a.spyrida...@virtualopensystems.com; Jérémy Fanguède
> Subject: Re: [Qemu-discuss] Booting GUI ubuntu VM on Aarch64
>
> Hello,
>
> On 15 February 2016 at 12:55, Yehuda Yitschak <yehu...@marvell.com> wrote:
> I just built qemu-2.5 so I can try the virtio-gpu-pci approach.
>
> Btw - I found a demo from virtual open system where they show guest graphics 
> on Exynos based Arndale board.
> It doesn’t show how but maybe it gives a hint
> http://www.virtualopensystems.com/en/solutions/demos/kvm-on-arndale-exynos/
>
>
>
> Are you interested in graphics with TCG or KVM? With TCG the usual command 
> line should work out of the box with the default bochs vga device: "-device 
> VGA -device usb-ehci -device usb-tablet - device usb-kbd". Don't forget to 
> enable the bochs driver in your guest kernel, and depending on your distro 
> you might have to play around with the X configuration to get it right.
>
> With KVM as Peter mentioned, you need some additional patches for device 
> cache coherency. Have a look at two patches from Jeremy Fanguede: "[RFC 0/4] 
> arm/arm64: KVM: Get around cache incoherency" and "[RFC] ARM/ARM64: KVM: 
> Implement KVM_FLUSH_DCACHE_GPA ioctl". These patches are not meant only for 
> the VGA, but also emulated usb devices, without them your mouse and >  
> keyboard won't work.

I want to use KVM tough it looks like a not a trivial hack for the non QEMU 
expert like me :) 
Would  you mind sharing how you achieved graphics in your demo above ?
did you use TCG or did you also go through these workarounds ? 

Thanks a lot 

Yehuda 

> Additionally, with KVM you might need to brute-force the rendering of the VGA 
> device in QEMU by removing the check on memory_region_get_dirty(). This is a 
> very ugly hack but it should work (hw/display/vga.c in vga_draw_graphic), 
> which is similar to this: 
> https://github.com/virtualopensystems/qemu/commit/64dd1b3e3a2353433edb9c63d00271f515bd06fb
Regards.


Re: [Qemu-discuss] Booting GUI ubuntu VM on Aarch64

2016-02-15 Thread Yehuda Yitschak

> -Original Message-
> From: Peter Maydell [mailto:peter.mayd...@linaro.org]
> Sent: Monday, February 15, 2016 13:44
> To: Yehuda Yitschak
> Cc: qemu-discuss@nongnu.org
> Subject: Re: [Qemu-discuss] Booting GUI ubuntu VM on Aarch64
> 
> On 15 February 2016 at 11:10, Yehuda Yitschak <yehu...@marvell.com>
> wrote:
> > That makes sense however I need graphics for demo purposes.
> > How can I overcome this limitation ? should I re-build QEMU with a
> > different configuration, or is this limitation built-in in the QEMU
> > code  ?
> 
> In theory you can add an emulated PCI graphics card to the virt board (via the
> command line). However the problem with this is that due to disagreements
> about whether the framebuffer should be cacheable or not between guest
> and host this will not work properly. (This is hackable around with a patch to
> the guest kernel to make it map the framebuffer as cacheable but that's kind
> of ugly.)
> 
> I'm told that virtio-gpu-pci ought to work (your guest will need to have 
> virtio
> GPU support compiled into its kernel, and you'll need a newer QEMU than
> that 2.2 that you have.)

I just built qemu-2.5 so I can try the virtio-gpu-pci approach.

Btw - I found a demo from virtual open system where they show guest graphics on 
Exynos based Arndale board.
It doesn’t show how but maybe it gives a hint
http://www.virtualopensystems.com/en/solutions/demos/kvm-on-arndale-exynos/

Thanks for the tips 

Yehuda 

> 
> thanks
> -- PMM


Re: [Qemu-discuss] Booting GUI ubuntu VM on Aarch64

2016-02-15 Thread Yehuda Yitschak
Hi Peter

> -Original Message-
> From: Peter Maydell [mailto:peter.mayd...@linaro.org]
> Sent: Monday, February 15, 2016 12:52
> To: Yehuda Yitschak
> Cc: qemu-discuss@nongnu.org
> Subject: Re: [Qemu-discuss] Booting GUI ubuntu VM on Aarch64
> 
> On 15 February 2016 at 10:04, Yehuda Yitschak <yehu...@marvell.com>
> wrote:
> > From what I can gather it looks like QEMU is not generating a screen
> > for the guest to work with. I understood that QEMU uses SDL to start a
> > screen for the guest but I suspect that doesn’t happen for some
> > reason. Also the fact that the Qemu window start in the console instead of
> SDL view looks strange.
> 
> An AArch64 VM will have no graphical display device, only a serial console.
> The QEMU window shows graphics/monitor/serial in that order, so if there's
> no graphics then the next up is monitor.
> 
> The expectation is that these are for server work so no graphics device is
> expected or required typically.

That makes sense however I need graphics for demo purposes.
How can I overcome this limitation ? should I re-build QEMU with a different 
configuration, or is this limitation built-in in the QEMU code  ?

Thanks 

Yehuda

> 
> thanks
> -- PMM


Re: [Qemu-discuss] Booting GUI ubuntu VM on Aarch64

2016-02-15 Thread Peter Maydell
On 15 February 2016 at 10:04, Yehuda Yitschak  wrote:
> From what I can gather it looks like QEMU is not generating a screen for the
> guest to work with. I understood that QEMU uses SDL to start a screen for
> the guest but I suspect that doesn’t happen for some reason. Also the fact
> that the Qemu window start in the console instead of SDL view looks strange.

An AArch64 VM will have no graphical display device, only a serial
console. The QEMU window shows graphics/monitor/serial in that order,
so if there's no graphics then the next up is monitor.

The expectation is that these are for server work so no graphics
device is expected or required typically.

thanks
-- PMM