openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* KVM Support?
@ 2018-07-16  6:34 AKASH G J
  2018-07-16 11:15 ` Avi Fishman
  2018-07-16 14:02 ` Eddie James
  0 siblings, 2 replies; 26+ messages in thread
From: AKASH G J @ 2018-07-16  6:34 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

Hi Team,

Please someone share whether Keyboard Video Mouse (KVM) over IP
implementation available in OpenBMC ?



Thanks and Regards,

Akash

[-- Attachment #2: Type: text/html, Size: 279 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-07-16  6:34 KVM Support? AKASH G J
@ 2018-07-16 11:15 ` Avi Fishman
  2018-07-16 11:35   ` Luke Chen
  2018-07-16 14:02 ` Eddie James
  1 sibling, 1 reply; 26+ messages in thread
From: Avi Fishman @ 2018-07-16 11:15 UTC (permalink / raw)
  To: akashgj91; +Cc: OpenBMC Maillist, uri.trichter, eyal.cohen

Hi Akash,

We have for Nuvoton a KVM for our npcm750 chip, it is a vncserver
working under VNC RFB protocol.
We didn't yet put it in OpenBMC, but we are going to do so.

Regards,
Avi Fishman
On Mon, Jul 16, 2018 at 9:35 AM AKASH G J <akashgj91@gmail.com> wrote:
>
> Hi Team,
>
> Please someone share whether Keyboard Video Mouse (KVM) over IP implementation available in OpenBMC ?
>
>
>
> Thanks and Regards,
>
> Akash

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-07-16 11:15 ` Avi Fishman
@ 2018-07-16 11:35   ` Luke Chen
  0 siblings, 0 replies; 26+ messages in thread
From: Luke Chen @ 2018-07-16 11:35 UTC (permalink / raw)
  To: Avi Fishman; +Cc: akashgj91, OpenBMC Maillist, eyal.cohen, uri.trichter

Dear Alash

ASPEED is working with OpenBMC team for the KVMoIP implementation.

Thanks.

從我的 iPhone 傳送

> Avi Fishman <avifishman70@gmail.com> 於 2018年7月16日 19:17 寫道:
> 
> Hi Akash,
> 
> We have for Nuvoton a KVM for our npcm750 chip, it is a vncserver
> working under VNC RFB protocol.
> We didn't yet put it in OpenBMC, but we are going to do so.
> 
> Regards,
> Avi Fishman
>> On Mon, Jul 16, 2018 at 9:35 AM AKASH G J <akashgj91@gmail.com> wrote:
>> 
>> Hi Team,
>> 
>> Please someone share whether Keyboard Video Mouse (KVM) over IP implementation available in OpenBMC ?
>> 
>> 
>> 
>> Thanks and Regards,
>> 
>> Akash

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-07-16  6:34 KVM Support? AKASH G J
  2018-07-16 11:15 ` Avi Fishman
@ 2018-07-16 14:02 ` Eddie James
  2018-07-16 15:01   ` Avi Fishman
  1 sibling, 1 reply; 26+ messages in thread
From: Eddie James @ 2018-07-16 14:02 UTC (permalink / raw)
  To: AKASH G J, openbmc



On 07/16/2018 01:34 AM, AKASH G J wrote:
> Hi Team,
>
> Please someone share whether Keyboard Video Mouse (KVM) over IP 
> implementation available in OpenBMC ?

Hi Akash,

It's in development... If you want to help, let me know! I'll be 
updating the mailing list with drivers, etc, when it's more functional.

Thanks,
Eddie

>
>
>
> Thanks and Regards,
>
> Akash

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-07-16 14:02 ` Eddie James
@ 2018-07-16 15:01   ` Avi Fishman
  2018-07-16 15:39     ` Eddie James
  0 siblings, 1 reply; 26+ messages in thread
From: Avi Fishman @ 2018-07-16 15:01 UTC (permalink / raw)
  To: eajames; +Cc: akashgj91, OpenBMC Maillist, uri.trichter, eyal.cohen

Hi Eddie,

Is it based on V4L or also VNC?
Does it have HW compression or SW only?

Thanks,
Avi
On Mon, Jul 16, 2018 at 5:03 PM Eddie James <eajames@linux.vnet.ibm.com> wrote:
>
>
>
> On 07/16/2018 01:34 AM, AKASH G J wrote:
> > Hi Team,
> >
> > Please someone share whether Keyboard Video Mouse (KVM) over IP
> > implementation available in OpenBMC ?
>
> Hi Akash,
>
> It's in development... If you want to help, let me know! I'll be
> updating the mailing list with drivers, etc, when it's more functional.
>
> Thanks,
> Eddie
>
> >
> >
> >
> > Thanks and Regards,
> >
> > Akash
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-07-16 15:01   ` Avi Fishman
@ 2018-07-16 15:39     ` Eddie James
  2018-07-17  8:56       ` Avi.Fishman
  0 siblings, 1 reply; 26+ messages in thread
From: Eddie James @ 2018-07-16 15:39 UTC (permalink / raw)
  To: Avi Fishman; +Cc: akashgj91, OpenBMC Maillist, uri.trichter, eyal.cohen



On 07/16/2018 10:01 AM, Avi Fishman wrote:
> Hi Eddie,
>
> Is it based on V4L or also VNC?
> Does it have HW compression or SW only?

Hi,

The driver interface is V4L2, though I am just using read() calls rather 
than the streaming interface.
The network interface is VNC, directly sending JPEGs to the clients 
rather than using the normal VNC framebuffer update methods.

Compression is done in HW, and then decompression at the client. So CPU 
usage on the BMC is kept low, though bandwidth usage is pretty high 
because it sends the whole frame every time. Seems to work with any VNC 
client that supports JPEG compression.

I'm currently working through some input latency problems; seems the 
bandwidth usage for the frames causes huge delays for sending the input 
events from the client to the server. Other than that it's working well.

Thanks,
Eddie

>
> Thanks,
> Avi
> On Mon, Jul 16, 2018 at 5:03 PM Eddie James <eajames@linux.vnet.ibm.com> wrote:
>>
>>
>> On 07/16/2018 01:34 AM, AKASH G J wrote:
>>> Hi Team,
>>>
>>> Please someone share whether Keyboard Video Mouse (KVM) over IP
>>> implementation available in OpenBMC ?
>> Hi Akash,
>>
>> It's in development... If you want to help, let me know! I'll be
>> updating the mailing list with drivers, etc, when it's more functional.
>>
>> Thanks,
>> Eddie
>>
>>>
>>>
>>> Thanks and Regards,
>>>
>>> Akash

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: KVM Support?
  2018-07-16 15:39     ` Eddie James
@ 2018-07-17  8:56       ` Avi.Fishman
  2018-07-17 14:06         ` Eddie James
  0 siblings, 1 reply; 26+ messages in thread
From: Avi.Fishman @ 2018-07-17  8:56 UTC (permalink / raw)
  To: eajames, avifishman70
  Cc: akashgj91, openbmc, Uri.Trichter, Eyal.Cohen, LCCHEN, KWLIU

Hi Eddie,

1. Where is the JPEG HW compression is done?
a. Is it in the V4L driver; the V4L reads the frame buffer compress it and send it via read()?
b. Or the V4L reads the frame buffer send it via read() and another driver compress it for the VNC server?
2. Since VNC RFB supports also other compression protocols, can we use other protocol than JPEG? Hextile for example.
3. Can we see this driver and application code so we can adopt to our HW?

Regards,
Avi


-----Original Message-----
From: Eddie James [mailto:eajames@linux.vnet.ibm.com]
Sent: Monday, July 16, 2018 6:39 PM
To: Avi Fishman
Cc: akashgj91@gmail.com; OpenBMC Maillist; IV00 Uri Trichter; IS20 Eyal Cohen
Subject: Re: KVM Support?



On 07/16/2018 10:01 AM, Avi Fishman wrote:
> Hi Eddie,
>
> Is it based on V4L or also VNC?
> Does it have HW compression or SW only?

Hi,

The driver interface is V4L2, though I am just using read() calls rather
than the streaming interface.
The network interface is VNC, directly sending JPEGs to the clients
rather than using the normal VNC framebuffer update methods.

Compression is done in HW, and then decompression at the client. So CPU
usage on the BMC is kept low, though bandwidth usage is pretty high
because it sends the whole frame every time. Seems to work with any VNC
client that supports JPEG compression.

I'm currently working through some input latency problems; seems the
bandwidth usage for the frames causes huge delays for sending the input
events from the client to the server. Other than that it's working well.

Thanks,
Eddie

>
> Thanks,
> Avi
> On Mon, Jul 16, 2018 at 5:03 PM Eddie James <eajames@linux.vnet.ibm.com> wrote:
>>
>>
>> On 07/16/2018 01:34 AM, AKASH G J wrote:
>>> Hi Team,
>>>
>>> Please someone share whether Keyboard Video Mouse (KVM) over IP
>>> implementation available in OpenBMC ?
>> Hi Akash,
>>
>> It's in development... If you want to help, let me know! I'll be
>> updating the mailing list with drivers, etc, when it's more functional.
>>
>> Thanks,
>> Eddie
>>
>>>
>>>
>>> Thanks and Regards,
>>>
>>> Akash



===========================================================================================
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-07-17  8:56       ` Avi.Fishman
@ 2018-07-17 14:06         ` Eddie James
  0 siblings, 0 replies; 26+ messages in thread
From: Eddie James @ 2018-07-17 14:06 UTC (permalink / raw)
  To: Avi.Fishman, avifishman70
  Cc: akashgj91, openbmc, Uri.Trichter, Eyal.Cohen, LCCHEN, KWLIU



On 07/17/2018 03:56 AM, Avi.Fishman@nuvoton.com wrote:
> Hi Eddie,
>
> 1. Where is the JPEG HW compression is done?

It is done in the AST2500 hardware, there is a video engine that 
captures and compresses the video data from the host. The V4L2 
application reads /dev/video0 (which is created by the driver for that 
video engine) to grab the JPEG, and sends it after that.

> a. Is it in the V4L driver; the V4L reads the frame buffer compress it and send it via read()?
> b. Or the V4L reads the frame buffer send it via read() and another driver compress it for the VNC server?
> 2. Since VNC RFB supports also other compression protocols, can we use other protocol than JPEG? Hextile for example.

Yes, although I had to submit a patch to libvncserver project to be able 
to send JPEGs directly (normally libvncserver can only take RGB 
framebuffer, then compress, then send). It may require similar changes 
to send already-compressed Hextile data.

> 3. Can we see this driver and application code so we can adopt to our HW?

Sure. Everything necessary is here: 
https://gerrit.openbmc-project.xyz/#/c/openbmc/openbmc/+/11500/ The 
linux-aspeed and obmc-ikvm recipes point to the kernel driver additions 
and application, respectively.

I will be sending the driver for RFC to the list soon.

Thanks,
Eddie

>
> Regards,
> Avi
>
>
> -----Original Message-----
> From: Eddie James [mailto:eajames@linux.vnet.ibm.com]
> Sent: Monday, July 16, 2018 6:39 PM
> To: Avi Fishman
> Cc: akashgj91@gmail.com; OpenBMC Maillist; IV00 Uri Trichter; IS20 Eyal Cohen
> Subject: Re: KVM Support?
>
>
>
> On 07/16/2018 10:01 AM, Avi Fishman wrote:
>> Hi Eddie,
>>
>> Is it based on V4L or also VNC?
>> Does it have HW compression or SW only?
> Hi,
>
> The driver interface is V4L2, though I am just using read() calls rather
> than the streaming interface.
> The network interface is VNC, directly sending JPEGs to the clients
> rather than using the normal VNC framebuffer update methods.
>
> Compression is done in HW, and then decompression at the client. So CPU
> usage on the BMC is kept low, though bandwidth usage is pretty high
> because it sends the whole frame every time. Seems to work with any VNC
> client that supports JPEG compression.
>
> I'm currently working through some input latency problems; seems the
> bandwidth usage for the frames causes huge delays for sending the input
> events from the client to the server. Other than that it's working well.
>
> Thanks,
> Eddie
>
>> Thanks,
>> Avi
>> On Mon, Jul 16, 2018 at 5:03 PM Eddie James <eajames@linux.vnet.ibm.com> wrote:
>>>
>>> On 07/16/2018 01:34 AM, AKASH G J wrote:
>>>> Hi Team,
>>>>
>>>> Please someone share whether Keyboard Video Mouse (KVM) over IP
>>>> implementation available in OpenBMC ?
>>> Hi Akash,
>>>
>>> It's in development... If you want to help, let me know! I'll be
>>> updating the mailing list with drivers, etc, when it's more functional.
>>>
>>> Thanks,
>>> Eddie
>>>
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Akash
>
>
> ===========================================================================================
> The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re:  KVM Support?
@ 2018-10-17  6:42 =?gb18030?B?eGl1emhp?=
  0 siblings, 0 replies; 26+ messages in thread
From: =?gb18030?B?eGl1emhp?= @ 2018-10-17  6:42 UTC (permalink / raw)
  To: =?gb18030?B?RWRkaWUgSmFtZXM=?=,
	=?gb18030?B?QWxleGFuZGVyIEEuIEZpbGlwcG92?=,
	=?gb18030?B?b3BlbmJtYw==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 26961 bytes --]

Hi Eddie,
  The ikvm video can see by vncviewer, but the mouse and keyboard didn't work on AST2500 
The kernel error log: 
[   99.326586] configfs-gadget gadget: high-speed config #1: c 
[   99.403704] aspeed_vhub 1e6a0000.usb-vhub: status direction mismatch         
[   99.492831] aspeed_vhub 1e6a0000.usb-vhub: status direction mismatch 
The kernel version is : video-dev5,
commit 2acbc35adcfe15971b701770e1105276a18da9f7


How to debug it?
xiuzhi
Hi Eddie,
  Thanks, it works now after increasing the reserved memory size.
But the mouse and keyboard didn't work.
The log is:
root@romulus:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0                                                
11/10/2018 08:05:09 Listening for VNC connections on TCP port 5900                                    
11/10/2018 08:05:09 Listening for VNC connections on TCP6 port 5900                                   
11/10/2018 08:05:26 Got connection from client 192.168.120.59                                         
11/10/2018 08:05:26   other clients:                                                                  
11/10/2018 08:05:26 Normal socket connection                                                          
11/10/2018 08:05:26 Client Protocol Version 3.8                                                       
11/10/2018 08:05:26 Protocol version sent 3.8, using 3.8                                              
11/10/2018 08:05:26 rfbProcessClientSecurityType: executing handler for type 1                        
11/10/2018 08:05:26 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 8
11/10/2018 08:05:26 Pixel format for client 192.168.120.59:                                           
11/10/2018 08:05:26   32 bpp, depth 24, little endian                                                 
11/10/2018 08:05:26   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0                          
11/10/2018 08:05:26 Using compression level 1 for client 192.168.120.59                               
11/10/2018 08:05:26 Using image quality level 6 for client 192.168.120.59                             
11/10/2018 08:05:26 Using JPEG subsampling 0, Q79 for client 192.168.120.59                           
11/10/2018 08:05:26 Enabling X-style cursor updates for client 192.168.120.59                         
11/10/2018 08:05:26 Enabling full-color cursor updates for client 192.168.120.59                      
11/10/2018 08:05:26 Enabling cursor position updates for client 192.168.120.59                        
11/10/2018 08:05:26 Enabling LastRect protocol extension for client 192.168.120.59                    
11/10/2018 08:05:26 Using tight encoding for client 192.168.120.59                                    
[  843.023930] configfs-gadget gadget: usb_ep_queue error on int endpoint -108                        
failed to write ptr report: 108 Cannot send after transport endpoint shutdown                         
[  843.039086] configfs-gadget gadget: usb_ep_queue error on int endpoint -108                        
failed to write [  843.048251] configfs-gadget gadget: usb_ep_queue error on int endpoint -108        
ptr report: 108 Cannot send after transport endpoint shutdown                                         
[  843.060797] configfs-gadget gadget: usb_ep_queue error on int endpoint -108                        
failed to write ptr report: 108 Cannot send after transport endpoint shutdown                         
[  843.081398] configfs-gadget gadget: usb_ep_queue error on int endpoint -108                        
failed to write ptr report: 108 [  843.091217] configfs-gadget gadget: usb_ep_queue error on int endp8
Cannot send afte[  843.099655] configfs-gadget gadget: usb_ep_queue error on int endpoint -108        
r transport endpoint shutdown                                                                  

...
a[  843.747250] configfs-gadget gadget: usb_ep_queue error on int endpoint -108                      
iled to write ptr report: 108 Cannot send after transport endpoi[  843.760110] configfs-gadget gadget8
nt shutdown                                                                                           
failed to write ptr report: 108 Cannot send after transport endpoint shutdown                         
failed to write ptr report: 108 Cannot send after transport endpoint shutdown                         
... ...

Why?
Xiuzhi


------------------ Original ------------------
From:  "Eddie James";<eajames@linux.vnet.ibm.com>;
Send time: Friday, Oct 12, 2018 1:32 AM
To: "xiuzhi"<1450335857@qq.com>; "Alexander A. Filippov"<a.filippov@yadro.com>; "openbmc"<openbmc@lists.ozlabs.org>; 

Subject:  Re: KVM Support?





On 10/11/2018 05:51 AM, xiuzhi wrote:
> Hi Eddie,
>  An error occured when I tested the ikvm on AST2500 now.
> root@romulus:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> [  192.679314] cma: cma_alloc: alloc failed, req-size: 2304 pages, 
> ret: -12
> [  192.686061] aspeed-video 1e700000.video: Failed to allocate source 
> buffer 1, size[900000]
> [  192.696715] aspeed-video 1e700000.video: Failed to start video engine
> The .dts file:
>                vga_memory: framebuffer@9f000000 {
>                         no-map;
>                         reg = <0x9f000000 0x01000000>; /* 16M */
>                 };
>                 gfx_memory: framebuffer {
>                         size = <0x01000000>;

Hi,

You may have to increase the size of the reserved memory. I believe I 
bumped ours up to 0x04000000.

If you use the latest version of the driver it will initially allocate 
the largest buffer for size detection, but then will free unnecessary 
memory once the size is detected. That may help you.

Thanks,
Eddie

>                         alignment = <0x01000000>;
>                         compatible = "shared-dma-pool";
>                         reusable;
>                 };
>
> &gfx {
>      status = "okay";
>      memory-region = <&gfx_memory>;
> };
>
> &video {
>         status = "okay";
>         memory-region = <&gfx_memory>;
> };
>
> &vhub {
>         status = "okay";
> };
>
> How to debug it?
> Best,
> Xiuzhi
>
> ------------------ Original ------------------
> *From: * "Eddie James";<eajames@linux.vnet.ibm.com>;
> *Send time:* Friday, Aug 24, 2018 10:46 PM
> *To:* "xiuzhi"<1450335857@qq.com>; "Alexander A. 
> Filippov"<a.filippov@yadro.com>; "openbmc"<openbmc@lists.ozlabs.org>;
> *Subject: * Re: KVM Support?
>
>
>
> On 08/23/2018 08:06 PM, xiuzhi wrote:
> > Hi Eddie,
> > Is there a schedule for integrating one vnc viewer to phosphor webui ?
>
> Hi Xiuzhi,
>
> Well, the VNC server (and Video Engine driver) integration is targeted
> for the OpenBMC release in February 2019. Hopefully in master before
> then. There is currently no plan or work being done to integrate a
> viewer into the BMC webui. But patches are certainly welcome in this
> area! It could be as simple as dropping in a noVNC html file... not sure.
>
> And thanks for the help on AST2400!
>
> Eddie
>
> > Best,
> > Xiuzhi
> >
> >
> >
> > On 08/14/2018 01:39 AM, xiuzhi wrote:
> > > Hi Eddie,
> > >    The video-dev2 can work on AST2400, the tightvnc connect to BMC
> > > vncserver stably when the host cpu run centos GUI.
> > > Two issues was found in testing process .
> > > 1, The obmc-ikvm will stop connection when host server window flush
> > > from one to next  on BIOS or kernel booting process.
> > > The error log on AST2400 is :
> > > 18/07/2018 13:37:32 Listening for VNC connections on TCP port 5900
> > > 18/07/2018 13:37:32 Listening for VNC connections on TCP6 port 5900
> > > [11704.151172] aspeed-video 1e700000.video: resolution changed;
> > resetting
> > > [11704.888188] aspeed-video 1e700000.video: resolution changed;
> > resetting
> > > [11705.613868] aspeed-video 1e700000.video: invalid resolution 
> detected
> > > [11705.620421] aspeed-video 1e700000.video: resolution changed;
> > > couldn't get new resolution
> >
> > OK, I noticed a similar issue on AST2500 when immediately detecting
> > resolution after mode change. I added a delay, but it probably needs to
> > be longer on AST2400... Also, most client's don't handle server-side
> > resize, so usually the window will close and you'll have to re-open
> > anyway I think, if the size is changing.
> >
> > Thanks,
> > Eddie
> >
> > >
> > >
> > > 2, The VNC Viewer can not connect to bmc server.
> > > The error on VNC Viewer client is :
> > > "   Attempting to reconnect to VNC Server ...
> > >    RFB protocol error:unknown rect encoding 7
> > > "
> > >
> > > The error log  on BMC is :
> > > 18/07/2018 14:03:18 Got connection from client 192.168.120.58
> > > 18/07/2018 14:03:18   other clients:
> > > 18/07/2018 14:03:18 Normal socket connection
> > > 18/07/2018 14:03:18 Client Protocol Version 3.8
> > > 18/07/2018 14:03:18 Protocol version sent 3.8, using 3.8
> > > 18/07/2018 14:03:18 rfbProcessClientSecurityType: executing handler
> > > for type 1
> > > 18/07/2018 14:03:18 rfbProcessClientSecurityType: returning
> > > securityResult for client rfb version >= 3.8
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000018)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000016)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000015)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x0000000F)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0xFFFFFEC6)
> > > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Using ZRLE encoding for client 192.168.120.58
> > > 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> > > 18/07/2018 14:03:18   8 bpp, depth 6
> > > 18/07/2018 14:03:18   true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000018)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000016)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000015)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x0000000F)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0xFFFFFEC6)
> > > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Switching from ZRLE to raw Encoding for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000018)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000016)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000015)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x0000000F)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0xFFFFFEC6)
> > > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Switching from raw to ZRLE Encoding for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> > > 18/07/2018 14:03:18   32 bpp, depth 24, little endian
> > > 18/07/2018 14:03:18   true colour: max r 255 g 255 b 255, shift r 16 g
> > > 8 b 0
> > > 18/07/2018 14:03:19 rfbProcessClientNormalMessage: read: Connection
> > > reset by peer
> > > 18/07/2018 14:03:19 Client 192.168.120.58 gone
> > > 18/07/2018 14:03:19 Statistics             events Transmit/ RawEquiv (
> > > saved)
> > > 18/07/2018 14:03:19  FramebufferUpdate   :      3 |  0/     0 (  0.0%)
> > > 18/07/2018 14:03:19  tight               :      1 |  33807/  3145740 (
> > > 98.9%)
> > > 18/07/2018 14:03:19  raw                 :      1 |  16396/    16396
> > > (  0.0%)
> > > 18/07/2018 14:03:19  ZRLE                :      2 | 62/ 3932160 
> (100.0%)
> > > 18/07/2018 14:03:19  RichCursor          :      3 |  429/     429 (
> > > 0.0%)
> > > 18/07/2018 14:03:19  TOTALS              :     10 |  50694/  7094725 (
> > > 99.3%)
> > > 18/07/2018 14:03:19 Statistics             events Received/ RawEquiv (
> > > saved)
> > > 18/07/2018 14:03:19  FramebufferUpdate   :      4 | 40/    40 (  0.0%)
> > > 18/07/2018 14:03:19  SetPixelFormat      :      2 | 40/    40 (  0.0%)
> > > 18/07/2018 14:03:19  SetEncodings        :      3 |  168/     168 (
> > > 0.0%)
> > > 18/07/2018 14:03:19  TOTALS              :      9 |  248/     248 (
> > > 0.0%)
> > >
> > > Best,
> > > Xiuzhi
> > > Hi Eddie,
> > >    Very good work!
> > >   The video-dev2 works on AST2400 now, I will do more test.
> > > Thanks,
> > > Xiuzhi
> > > On 08/10/2018 10:00 AM, Eddie James wrote:
> > > >
> > > >
> > > > On 08/10/2018 06:14 AM, xiuzhi wrote:
> > > >> Hi Eddie,
> > > >>    I tested the new update source of video-dev on AST2400 and
> > > >> AST2500. It works on AST2500.
> > > >>  On AST2400£¬the vncviewer can connect vncserver sucessful, but its
> > > >> window was blank,  not shown any information of the host screen .
> > > >> Would you like to give me some advice or instruments on how to 
>  debug
> > > >> this issue?
> > >
> > > Hey, I also just pushed a new branch to my github with some
> > > simplifications to the driver... It no longer uses the auto mode 
> and may
> > > work better on AST2400... I don't have any AST2400 to test on, but let
> > > me know if you have any luck:
> > >
> > > https://github.com/eddiejames/linux/commits/video-dev2
> > >
> > > Thanks,
> > > Eddie
> > >
> > > >
> > > > Hi,
> > > >
> > > > You could try enabling the debug tracing, if dynamic debug is 
> enabled
> > > > on your kernel. (CONFIG_DYNAMIC_DEBUG)
> > > >
> > > > echo file aspeed-video.c +p > 
> /sys/kernel/debug/dynamic_debug/control
> > > >
> > > > That should print every register access, as well as some other info.
> > > >
> > > > Thanks,
> > > > Eddie
> > > >
> > > >> Hi,
> > > >>
> > > >> There are some differences with the video engine between the
> > > AST2400 and
> > > >> AST2500 that I haven't addressed yet, so probably the driver is not
> > > >> working correctly on the AST2400 yet. Some registers have
> > different bit
> > > >> mapping, and things like that. Sorry about that... thanks for
> > trying it
> > > >> out! I'll look at the changes needed for AST2400 next.
> > > >>
> > > >> Thanks,
> > > >>
> > > >> Eddie
> > > >>
> > > >>
> > > >> On 08/01/2018 03:47 AM, xiuzhi wrote:
> > > >> > Hi Eddie,
> > > >> >   Now It works, but the vncviewer can not connect the BMC server
> > > >> > successful.
> > > >> > When I use vncviewer connect to the BMC the error read:
> > > >> > "RFB protocol error: bad desktop size 0x1"
> > > >> > "RFB protocol error: unknow rect encoding 7"
> > > >> > The information on BMC are :
> > > >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > > >> > frame buffer size: 3145728
> > > >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP port 
> 5900
> > > >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP6 
> port 5900
> > > >> >
> > > >> > 19/07/2018 08:52:08 Got connection from client 192.168.120.58
> > > >> > 19/07/2018 08:52:08   other clients:
> > > >> > 19/07/2018 08:52:08 Normal socket connection
> > > >> > 19/07/2018 08:52:08 Client Protocol Version 3.8
> > > >> > 19/07/2018 08:52:08 Protocol version sent 3.8, using 3.8
> > > >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: executing 
> handler
> > > >> > for type 1
> > > >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: returning
> > > >> > securityResult for client rfb version >= 3.8
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000018)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000016)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000015)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x0000000F)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for
> > client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Using ZRLE encoding for client 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> > > >> > 19/07/2018 08:52:08   8 bpp, depth 6
> > > >> > 19/07/2018 08:52:08   true colour: max r 3 g 3 b 3, shift r 4 g
> > 2 b 0
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000018)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000016)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000015)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x0000000F)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for
> > client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Switching from ZRLE to raw Encoding for 
> client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000018)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000016)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000015)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x0000000F)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for
> > client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Switching from raw to ZRLE Encoding for 
> client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> > > >> > 19/07/2018 08:52:08   32 bpp, depth 24, little endian
> > > >> > 19/07/2018 08:52:08   true colour: max r 255 g 255 b 255, shift r
> > > 16 g
> > > >> > 8 b 0
> > > >> > [ 6928.751385] aspeed-video 1e700000.video: disabling comp
> > ready irq,
> > > >> > seq_ctrl[000500a8]
> > > >> > 19/07/2018 08:52:09 rfbProcessClientNormalMessage: read: 
> Connection
> > > >> > reset by peer
> > > >> > 19/07/2018 08:52:09 Client 192.168.120.58 gone
> > > >> > 19/07/2018 08:52:09 Statistics events Transmit/
> > > >> > RawEquiv ( saved)
> > > >> > 19/07/2018 08:52:09  FramebufferUpdate :   3 | 0/        0 (
> > > >> 0.0%)
> > > >> > 19/07/2018 08:52:09  tight :   1 | 30991/ 3145740
> > > >> > ( 99.0%)
> > > >> > 19/07/2018 08:52:09  raw :   1 | 16396/ 16396
> > > >> > (  0.0%)
> > > >> > 19/07/2018 08:52:09  ZRLE :   2 | 62/ 3932160
> > > >> > (100.0%)
> > > >> > 19/07/2018 08:52:09  RichCursor :   3 | 429/      429
> > > >> (  0.0%)
> > > >> > 19/07/2018 08:52:09  TOTALS :   10 | 47878/ 7094725
> > > >> > ( 99.3%)
> > > >> > 19/07/2018 08:52:09 Statistics events Received/
> > > >> > RawEquiv ( saved)
> > > >> > 19/07/2018 08:52:09  FramebufferUpdate :   4 | 40/       40 (
> > > >> 0.0%)
> > > >> > 19/07/2018 08:52:09  SetPixelFormat :   2 | 40/       40 (
> > > >> 0.0%)
> > > >> > 19/07/2018 08:52:09  SetEncodings :   3 | 168/      168
> > > >> (  0.0%)
> > > >> > 19/07/2018 08:52:09  TOTALS :   9 | 248/      248
> > > >> (  0.0%)
> > > >> >
> > > >> > What wrong with it?
> > > >> > BTW, vncview download from
> > > >> > https://www.realvnc.com/en/connect/download/viewer/linux/
> > > >> > I also got the same error using Tightvnc viewer
> > > >> > Thanks,
> > > >> > xiuzhi
> > > >> > Hi Eddie,
> > > >> >    My bmc is AST2400, I modified the aspeed-g4.dtsi(adding gfx:
> > > >> > display@1e6e6000  and  video: video@1e700000)
> > > >> >  and the aspeed-bmc-opp-xxx.dts (adding &video &vhub) .
> > > >> > An error occured when I executed the following instructions:
> > > >> >
> > > >> > root@zhaoxinc:~# create_usbhid.sh
> > > >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > > >> > [  125.586061] aspeed-video 1e700000.video: timed out on 1st mode
> > > >> detect
> > > >> > [  125.602732] aspeed-video 1e700000.video: Failed to start video
> > > >> engine
> > > >> > failed to open /dev/video0: 62 Timer expired
> > > >> > Need I modify drivers/media/platform/aspeed-video.c or any other
> > > >> files?
> > > >> >
> > > >> >  Thanks ,
> > > >> > Xiuzhi
> > > >> > On 07/31/2018 01:52 AM, xiuzhi wrote:
> > > >> > > Hi Alexander ,Eddie,
> > > >> > >   I merged the source from
> > > >> > >
> > https://gerrit.openbmc-project.xyz/#/c/openbmc/openbmc/+/11500/,and
> > > >> > > kernel branch video-dev.
> > > >> > > How to test the video kvm feature by phosphor-webui or command
> > > line?
> > > >> >
> > > >> > Hi,
> > > >> >
> > > >> > You need to make sure the video device is enabled in your
> > device-tree
> > > >> > for the machine you use... My kernel patch enabled it for our
> > AST2500
> > > >> > witherspoon system. If you're using AST2500 as well, then you 
> just
> > > >> need
> > > >> > something like:
> > > >> >
> > > >> > &video {
> > > >> >      status = "okay";
> > > >> >      memory-region = <&gfx_memory>;
> > > >> > };
> > > >> >
> > > >> > And the virtual USB hub:
> > > >> > &vhub {
> > > >> >      status = "okay";
> > > >> > };
> > > >> >
> > > >> > If you're not using AST2500, you'll need more changes to
> > device-tree.
> > > >> >
> > > >> > Then on the BMC command line:
> > > >> > create_usbhid.sh
> > > >> > obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > > >> > And connect with any VNC client to port 0 of your BMC IP.
> > > >> >
> > > >> > Thanks,
> > > >> > Eddie
> > > >> >
> > > >> > > Best,
> > > >> > > xiuzhi
> > > >> > >
> > > >> > >
> > > >> > > ------------------ ԭʼÓʼþ ------------------
> > > >> > > *·¢¼þÈË:* "Alexander A. Filippov"<a.filippov@yadro.com>;
> > > >> > > *·¢ËÍʱ¼ä:* 2018Äê7ÔÂ25ÈÕ(ÐÇÆÚÈý) ÏÂÎç4:56
> > > >> > > *ÊÕ¼þÈË:*
> > > >> > "openbmc"<openbmc@lists.ozlabs.org>;"xiuzhi"<1450335857@qq.com>;
> > > >> > > *Ö÷Ìâ:* Re: KVM Support?
> > > >> > >
> > > >> > > Hello everybody,
> > > >> > >
> > > >> > > Could you check the size of
> > > >> > >
> > > >> >
> > > >>
> > >
> > 
> `build/tmp/deploy/image/<platformname>/fitImage-openbmc-phosphor-initramfs-*.bin`?
> > > >> > > If it exceeds 4456448 (0x440000) bytes, this is the problem
> > > >> described
> > > >> > > at https://github.com/openbmc/openbmc/issues/3314
> > > >> > >
> > > >> > >
> > > >> > > In this case you should modify flash partitions layout or
> > trying to
> > > >> > > decrease kernel size.
> > > >> > >
> > > >> > > --
> > > >> > > Alexander
> > > >> > >
> > > >> > > On Wed, Jul 25, 2018 at 03:48:04PM +0800, xiuzhi wrote:
> > > >> > > > Hi Eddie,
> > > >> > > >
> > > >> > > >
> > > >> > > >   I read your KVM Support email on mailinglist.
> > > >> > > >
> > > >> > > >
> > > >> > > > I am going to port the BMC kvm to ast2400 . The u-boot 
> can not
> > > >> load
> > > >> > > kernel ,the error message read:
> > > >> > > >
> > > >> > > >
> > > >> > > > ""U-Boot 2016.07 (Jul 23 2018 - 11:11:50 +0000)
> > > >> > > >
> > > >> > > >
> > > >> > > > DRAM:  240 MiB
> > > >> > > > WARNING: Caches not enabled
> > > >> > > > Flash: 32 MiB
> > > >> > > > *** Warning - bad CRC, using default environment
> > > >> > > >
> > > >> > > >
> > > >> > > > In:    serial
> > > >> > > > Out:   serial
> > > >> > > > Err:   serial
> > > >> > > > Net:   aspeednic#0
> > > >> > > > Error: aspeednic#0 address not set.
> > > >> > > >
> > > >> > > >
> > > >> > > > Hit any key to stop autoboot: 0
> > > >> > > > ## Loading kernel from FIT Image at 20080000 ...
> > > >> > > > Bad FIT kernel image format!
> > > >> > > > ERROR: can't get kernel image!
> > > >> > > > ast#
> > > >> > > >
> > > >> > > >
> > > >> > > > I added  config options to defconfig of ast2400 as follows:
> > > >> > > >
> > > >> > > >
> > > >> > > > CONFIG_MEDIA_SUPPORT=y
> > > >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> > > >> > > > CONFIG_MEDIA_SUPPORT=y
> > > >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> > > >> > > > # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_RADIO_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_SDR_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_CEC_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_CONTROLLER is not set
> > > >> > > > CONFIG_RATIONAL=y
> > > >> > > > CONFIG_VIDEO_DEV=y
> > > >> > > > CONFIG_VIDEO_V4L2=y
> > > >> > > > CONFIG_V4L_PLATFORM_DRIVERS=y
> > > >> > > > CONFIG_VIDEO_ASPEED=y
> > > >> > > > CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
> > > >> > > >
> > > >> > > >
> > > >> > > > Need I modify the aspeed-bmc-opp-palmetto.dts and
> > aspeed-g4.dtsi?
> > > >> > > >
> > > >> > > >
> > > >> > > > Can you give me the file list need to modify?
> > > >> > > >
> > > >> > > >
> > > >> > > > Thanks,
> > > >> > > >
> > > >> > > >
> > > >> > > > xiuzhi
> > > >

[-- Attachment #2: Type: text/html, Size: 41217 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re:  KVM Support?
  2018-10-11 17:32         ` Eddie James
@ 2018-10-12  1:26           ` =?gb18030?B?eGl1emhp?=
  0 siblings, 0 replies; 26+ messages in thread
From: =?gb18030?B?eGl1emhp?= @ 2018-10-12  1:26 UTC (permalink / raw)
  To: =?gb18030?B?RWRkaWUgSmFtZXM=?=,
	=?gb18030?B?QWxleGFuZGVyIEEuIEZpbGlwcG92?=,
	=?gb18030?B?b3BlbmJtYw==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 26498 bytes --]

Hi Eddie,
  Thanks, it works now after increasing the reserved memory size.
But the mouse and keyboard didn't work.
The log is:
root@romulus:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0                                                
11/10/2018 08:05:09 Listening for VNC connections on TCP port 5900                                    
11/10/2018 08:05:09 Listening for VNC connections on TCP6 port 5900                                   
11/10/2018 08:05:26 Got connection from client 192.168.120.59                                         
11/10/2018 08:05:26   other clients:                                                                  
11/10/2018 08:05:26 Normal socket connection                                                          
11/10/2018 08:05:26 Client Protocol Version 3.8                                                       
11/10/2018 08:05:26 Protocol version sent 3.8, using 3.8                                              
11/10/2018 08:05:26 rfbProcessClientSecurityType: executing handler for type 1                        
11/10/2018 08:05:26 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 8
11/10/2018 08:05:26 Pixel format for client 192.168.120.59:                                           
11/10/2018 08:05:26   32 bpp, depth 24, little endian                                                 
11/10/2018 08:05:26   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0                          
11/10/2018 08:05:26 Using compression level 1 for client 192.168.120.59                               
11/10/2018 08:05:26 Using image quality level 6 for client 192.168.120.59                             
11/10/2018 08:05:26 Using JPEG subsampling 0, Q79 for client 192.168.120.59                           
11/10/2018 08:05:26 Enabling X-style cursor updates for client 192.168.120.59                         
11/10/2018 08:05:26 Enabling full-color cursor updates for client 192.168.120.59                      
11/10/2018 08:05:26 Enabling cursor position updates for client 192.168.120.59                        
11/10/2018 08:05:26 Enabling LastRect protocol extension for client 192.168.120.59                    
11/10/2018 08:05:26 Using tight encoding for client 192.168.120.59                                    
[  843.023930] configfs-gadget gadget: usb_ep_queue error on int endpoint -108                        
failed to write ptr report: 108 Cannot send after transport endpoint shutdown                         
[  843.039086] configfs-gadget gadget: usb_ep_queue error on int endpoint -108                        
failed to write [  843.048251] configfs-gadget gadget: usb_ep_queue error on int endpoint -108        
ptr report: 108 Cannot send after transport endpoint shutdown                                         
[  843.060797] configfs-gadget gadget: usb_ep_queue error on int endpoint -108                        
failed to write ptr report: 108 Cannot send after transport endpoint shutdown                         
[  843.081398] configfs-gadget gadget: usb_ep_queue error on int endpoint -108                        
failed to write ptr report: 108 [  843.091217] configfs-gadget gadget: usb_ep_queue error on int endp8
Cannot send afte[  843.099655] configfs-gadget gadget: usb_ep_queue error on int endpoint -108        
r transport endpoint shutdown                                                                  

...
a[  843.747250] configfs-gadget gadget: usb_ep_queue error on int endpoint -108                      
iled to write ptr report: 108 Cannot send after transport endpoi[  843.760110] configfs-gadget gadget8
nt shutdown                                                                                           
failed to write ptr report: 108 Cannot send after transport endpoint shutdown                         
failed to write ptr report: 108 Cannot send after transport endpoint shutdown                         
... ...

Why?
Xiuzhi


------------------ Original ------------------
From:  "Eddie James";<eajames@linux.vnet.ibm.com>;
Send time: Friday, Oct 12, 2018 1:32 AM
To: "xiuzhi"<1450335857@qq.com>; "Alexander A. Filippov"<a.filippov@yadro.com>; "openbmc"<openbmc@lists.ozlabs.org>; 

Subject:  Re: KVM Support?





On 10/11/2018 05:51 AM, xiuzhi wrote:
> Hi Eddie,
>  An error occured when I tested the ikvm on AST2500 now.
> root@romulus:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> [  192.679314] cma: cma_alloc: alloc failed, req-size: 2304 pages, 
> ret: -12
> [  192.686061] aspeed-video 1e700000.video: Failed to allocate source 
> buffer 1, size[900000]
> [  192.696715] aspeed-video 1e700000.video: Failed to start video engine
> The .dts file:
>                vga_memory: framebuffer@9f000000 {
>                         no-map;
>                         reg = <0x9f000000 0x01000000>; /* 16M */
>                 };
>                 gfx_memory: framebuffer {
>                         size = <0x01000000>;

Hi,

You may have to increase the size of the reserved memory. I believe I 
bumped ours up to 0x04000000.

If you use the latest version of the driver it will initially allocate 
the largest buffer for size detection, but then will free unnecessary 
memory once the size is detected. That may help you.

Thanks,
Eddie

>                         alignment = <0x01000000>;
>                         compatible = "shared-dma-pool";
>                         reusable;
>                 };
>
> &gfx {
>      status = "okay";
>      memory-region = <&gfx_memory>;
> };
>
> &video {
>         status = "okay";
>         memory-region = <&gfx_memory>;
> };
>
> &vhub {
>         status = "okay";
> };
>
> How to debug it?
> Best,
> Xiuzhi
>
> ------------------ Original ------------------
> *From: * "Eddie James";<eajames@linux.vnet.ibm.com>;
> *Send time:* Friday, Aug 24, 2018 10:46 PM
> *To:* "xiuzhi"<1450335857@qq.com>; "Alexander A. 
> Filippov"<a.filippov@yadro.com>; "openbmc"<openbmc@lists.ozlabs.org>;
> *Subject: * Re: KVM Support?
>
>
>
> On 08/23/2018 08:06 PM, xiuzhi wrote:
> > Hi Eddie,
> > Is there a schedule for integrating one vnc viewer to phosphor webui ?
>
> Hi Xiuzhi,
>
> Well, the VNC server (and Video Engine driver) integration is targeted
> for the OpenBMC release in February 2019. Hopefully in master before
> then. There is currently no plan or work being done to integrate a
> viewer into the BMC webui. But patches are certainly welcome in this
> area! It could be as simple as dropping in a noVNC html file... not sure.
>
> And thanks for the help on AST2400!
>
> Eddie
>
> > Best,
> > Xiuzhi
> >
> >
> >
> > On 08/14/2018 01:39 AM, xiuzhi wrote:
> > > Hi Eddie,
> > >    The video-dev2 can work on AST2400, the tightvnc connect to BMC
> > > vncserver stably when the host cpu run centos GUI.
> > > Two issues was found in testing process .
> > > 1, The obmc-ikvm will stop connection when host server window flush
> > > from one to next  on BIOS or kernel booting process.
> > > The error log on AST2400 is :
> > > 18/07/2018 13:37:32 Listening for VNC connections on TCP port 5900
> > > 18/07/2018 13:37:32 Listening for VNC connections on TCP6 port 5900
> > > [11704.151172] aspeed-video 1e700000.video: resolution changed;
> > resetting
> > > [11704.888188] aspeed-video 1e700000.video: resolution changed;
> > resetting
> > > [11705.613868] aspeed-video 1e700000.video: invalid resolution 
> detected
> > > [11705.620421] aspeed-video 1e700000.video: resolution changed;
> > > couldn't get new resolution
> >
> > OK, I noticed a similar issue on AST2500 when immediately detecting
> > resolution after mode change. I added a delay, but it probably needs to
> > be longer on AST2400... Also, most client's don't handle server-side
> > resize, so usually the window will close and you'll have to re-open
> > anyway I think, if the size is changing.
> >
> > Thanks,
> > Eddie
> >
> > >
> > >
> > > 2, The VNC Viewer can not connect to bmc server.
> > > The error on VNC Viewer client is :
> > > "   Attempting to reconnect to VNC Server ...
> > >    RFB protocol error:unknown rect encoding 7
> > > "
> > >
> > > The error log  on BMC is :
> > > 18/07/2018 14:03:18 Got connection from client 192.168.120.58
> > > 18/07/2018 14:03:18   other clients:
> > > 18/07/2018 14:03:18 Normal socket connection
> > > 18/07/2018 14:03:18 Client Protocol Version 3.8
> > > 18/07/2018 14:03:18 Protocol version sent 3.8, using 3.8
> > > 18/07/2018 14:03:18 rfbProcessClientSecurityType: executing handler
> > > for type 1
> > > 18/07/2018 14:03:18 rfbProcessClientSecurityType: returning
> > > securityResult for client rfb version >= 3.8
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000018)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000016)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000015)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x0000000F)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0xFFFFFEC6)
> > > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Using ZRLE encoding for client 192.168.120.58
> > > 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> > > 18/07/2018 14:03:18   8 bpp, depth 6
> > > 18/07/2018 14:03:18   true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000018)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000016)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000015)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x0000000F)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0xFFFFFEC6)
> > > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Switching from ZRLE to raw Encoding for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000018)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000016)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000015)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x0000000F)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0xFFFFFEC6)
> > > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Switching from raw to ZRLE Encoding for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> > > 18/07/2018 14:03:18   32 bpp, depth 24, little endian
> > > 18/07/2018 14:03:18   true colour: max r 255 g 255 b 255, shift r 16 g
> > > 8 b 0
> > > 18/07/2018 14:03:19 rfbProcessClientNormalMessage: read: Connection
> > > reset by peer
> > > 18/07/2018 14:03:19 Client 192.168.120.58 gone
> > > 18/07/2018 14:03:19 Statistics             events Transmit/ RawEquiv (
> > > saved)
> > > 18/07/2018 14:03:19  FramebufferUpdate   :      3 |  0/     0 (  0.0%)
> > > 18/07/2018 14:03:19  tight               :      1 |  33807/  3145740 (
> > > 98.9%)
> > > 18/07/2018 14:03:19  raw                 :      1 |  16396/    16396
> > > (  0.0%)
> > > 18/07/2018 14:03:19  ZRLE                :      2 | 62/ 3932160 
> (100.0%)
> > > 18/07/2018 14:03:19  RichCursor          :      3 |  429/     429 (
> > > 0.0%)
> > > 18/07/2018 14:03:19  TOTALS              :     10 |  50694/  7094725 (
> > > 99.3%)
> > > 18/07/2018 14:03:19 Statistics             events Received/ RawEquiv (
> > > saved)
> > > 18/07/2018 14:03:19  FramebufferUpdate   :      4 | 40/    40 (  0.0%)
> > > 18/07/2018 14:03:19  SetPixelFormat      :      2 | 40/    40 (  0.0%)
> > > 18/07/2018 14:03:19  SetEncodings        :      3 |  168/     168 (
> > > 0.0%)
> > > 18/07/2018 14:03:19  TOTALS              :      9 |  248/     248 (
> > > 0.0%)
> > >
> > > Best,
> > > Xiuzhi
> > > Hi Eddie,
> > >    Very good work!
> > >   The video-dev2 works on AST2400 now, I will do more test.
> > > Thanks,
> > > Xiuzhi
> > > On 08/10/2018 10:00 AM, Eddie James wrote:
> > > >
> > > >
> > > > On 08/10/2018 06:14 AM, xiuzhi wrote:
> > > >> Hi Eddie,
> > > >>    I tested the new update source of video-dev on AST2400 and
> > > >> AST2500. It works on AST2500.
> > > >>  On AST2400£¬the vncviewer can connect vncserver sucessful, but its
> > > >> window was blank,  not shown any information of the host screen .
> > > >> Would you like to give me some advice or instruments on how to 
>  debug
> > > >> this issue?
> > >
> > > Hey, I also just pushed a new branch to my github with some
> > > simplifications to the driver... It no longer uses the auto mode 
> and may
> > > work better on AST2400... I don't have any AST2400 to test on, but let
> > > me know if you have any luck:
> > >
> > > https://github.com/eddiejames/linux/commits/video-dev2
> > >
> > > Thanks,
> > > Eddie
> > >
> > > >
> > > > Hi,
> > > >
> > > > You could try enabling the debug tracing, if dynamic debug is 
> enabled
> > > > on your kernel. (CONFIG_DYNAMIC_DEBUG)
> > > >
> > > > echo file aspeed-video.c +p > 
> /sys/kernel/debug/dynamic_debug/control
> > > >
> > > > That should print every register access, as well as some other info.
> > > >
> > > > Thanks,
> > > > Eddie
> > > >
> > > >> Hi,
> > > >>
> > > >> There are some differences with the video engine between the
> > > AST2400 and
> > > >> AST2500 that I haven't addressed yet, so probably the driver is not
> > > >> working correctly on the AST2400 yet. Some registers have
> > different bit
> > > >> mapping, and things like that. Sorry about that... thanks for
> > trying it
> > > >> out! I'll look at the changes needed for AST2400 next.
> > > >>
> > > >> Thanks,
> > > >>
> > > >> Eddie
> > > >>
> > > >>
> > > >> On 08/01/2018 03:47 AM, xiuzhi wrote:
> > > >> > Hi Eddie,
> > > >> >   Now It works, but the vncviewer can not connect the BMC server
> > > >> > successful.
> > > >> > When I use vncviewer connect to the BMC the error read:
> > > >> > "RFB protocol error: bad desktop size 0x1"
> > > >> > "RFB protocol error: unknow rect encoding 7"
> > > >> > The information on BMC are :
> > > >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > > >> > frame buffer size: 3145728
> > > >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP port 
> 5900
> > > >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP6 
> port 5900
> > > >> >
> > > >> > 19/07/2018 08:52:08 Got connection from client 192.168.120.58
> > > >> > 19/07/2018 08:52:08   other clients:
> > > >> > 19/07/2018 08:52:08 Normal socket connection
> > > >> > 19/07/2018 08:52:08 Client Protocol Version 3.8
> > > >> > 19/07/2018 08:52:08 Protocol version sent 3.8, using 3.8
> > > >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: executing 
> handler
> > > >> > for type 1
> > > >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: returning
> > > >> > securityResult for client rfb version >= 3.8
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000018)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000016)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000015)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x0000000F)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for
> > client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Using ZRLE encoding for client 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> > > >> > 19/07/2018 08:52:08   8 bpp, depth 6
> > > >> > 19/07/2018 08:52:08   true colour: max r 3 g 3 b 3, shift r 4 g
> > 2 b 0
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000018)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000016)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000015)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x0000000F)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for
> > client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Switching from ZRLE to raw Encoding for 
> client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000018)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000016)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000015)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x0000000F)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for
> > client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Switching from raw to ZRLE Encoding for 
> client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> > > >> > 19/07/2018 08:52:08   32 bpp, depth 24, little endian
> > > >> > 19/07/2018 08:52:08   true colour: max r 255 g 255 b 255, shift r
> > > 16 g
> > > >> > 8 b 0
> > > >> > [ 6928.751385] aspeed-video 1e700000.video: disabling comp
> > ready irq,
> > > >> > seq_ctrl[000500a8]
> > > >> > 19/07/2018 08:52:09 rfbProcessClientNormalMessage: read: 
> Connection
> > > >> > reset by peer
> > > >> > 19/07/2018 08:52:09 Client 192.168.120.58 gone
> > > >> > 19/07/2018 08:52:09 Statistics events Transmit/
> > > >> > RawEquiv ( saved)
> > > >> > 19/07/2018 08:52:09  FramebufferUpdate :   3 | 0/        0 (
> > > >> 0.0%)
> > > >> > 19/07/2018 08:52:09  tight :   1 | 30991/ 3145740
> > > >> > ( 99.0%)
> > > >> > 19/07/2018 08:52:09  raw :   1 | 16396/ 16396
> > > >> > (  0.0%)
> > > >> > 19/07/2018 08:52:09  ZRLE :   2 | 62/ 3932160
> > > >> > (100.0%)
> > > >> > 19/07/2018 08:52:09  RichCursor :   3 | 429/      429
> > > >> (  0.0%)
> > > >> > 19/07/2018 08:52:09  TOTALS :   10 | 47878/ 7094725
> > > >> > ( 99.3%)
> > > >> > 19/07/2018 08:52:09 Statistics events Received/
> > > >> > RawEquiv ( saved)
> > > >> > 19/07/2018 08:52:09  FramebufferUpdate :   4 | 40/       40 (
> > > >> 0.0%)
> > > >> > 19/07/2018 08:52:09  SetPixelFormat :   2 | 40/       40 (
> > > >> 0.0%)
> > > >> > 19/07/2018 08:52:09  SetEncodings :   3 | 168/      168
> > > >> (  0.0%)
> > > >> > 19/07/2018 08:52:09  TOTALS :   9 | 248/      248
> > > >> (  0.0%)
> > > >> >
> > > >> > What wrong with it?
> > > >> > BTW, vncview download from
> > > >> > https://www.realvnc.com/en/connect/download/viewer/linux/
> > > >> > I also got the same error using Tightvnc viewer
> > > >> > Thanks,
> > > >> > xiuzhi
> > > >> > Hi Eddie,
> > > >> >    My bmc is AST2400, I modified the aspeed-g4.dtsi(adding gfx:
> > > >> > display@1e6e6000  and  video: video@1e700000)
> > > >> >  and the aspeed-bmc-opp-xxx.dts (adding &video &vhub) .
> > > >> > An error occured when I executed the following instructions:
> > > >> >
> > > >> > root@zhaoxinc:~# create_usbhid.sh
> > > >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > > >> > [  125.586061] aspeed-video 1e700000.video: timed out on 1st mode
> > > >> detect
> > > >> > [  125.602732] aspeed-video 1e700000.video: Failed to start video
> > > >> engine
> > > >> > failed to open /dev/video0: 62 Timer expired
> > > >> > Need I modify drivers/media/platform/aspeed-video.c or any other
> > > >> files?
> > > >> >
> > > >> >  Thanks ,
> > > >> > Xiuzhi
> > > >> > On 07/31/2018 01:52 AM, xiuzhi wrote:
> > > >> > > Hi Alexander ,Eddie,
> > > >> > >   I merged the source from
> > > >> > >
> > https://gerrit.openbmc-project.xyz/#/c/openbmc/openbmc/+/11500/,and
> > > >> > > kernel branch video-dev.
> > > >> > > How to test the video kvm feature by phosphor-webui or command
> > > line?
> > > >> >
> > > >> > Hi,
> > > >> >
> > > >> > You need to make sure the video device is enabled in your
> > device-tree
> > > >> > for the machine you use... My kernel patch enabled it for our
> > AST2500
> > > >> > witherspoon system. If you're using AST2500 as well, then you 
> just
> > > >> need
> > > >> > something like:
> > > >> >
> > > >> > &video {
> > > >> >      status = "okay";
> > > >> >      memory-region = <&gfx_memory>;
> > > >> > };
> > > >> >
> > > >> > And the virtual USB hub:
> > > >> > &vhub {
> > > >> >      status = "okay";
> > > >> > };
> > > >> >
> > > >> > If you're not using AST2500, you'll need more changes to
> > device-tree.
> > > >> >
> > > >> > Then on the BMC command line:
> > > >> > create_usbhid.sh
> > > >> > obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > > >> > And connect with any VNC client to port 0 of your BMC IP.
> > > >> >
> > > >> > Thanks,
> > > >> > Eddie
> > > >> >
> > > >> > > Best,
> > > >> > > xiuzhi
> > > >> > >
> > > >> > >
> > > >> > > ------------------ ԭʼÓʼþ ------------------
> > > >> > > *·¢¼þÈË:* "Alexander A. Filippov"<a.filippov@yadro.com>;
> > > >> > > *·¢ËÍʱ¼ä:* 2018Äê7ÔÂ25ÈÕ(ÐÇÆÚÈý) ÏÂÎç4:56
> > > >> > > *ÊÕ¼þÈË:*
> > > >> > "openbmc"<openbmc@lists.ozlabs.org>;"xiuzhi"<1450335857@qq.com>;
> > > >> > > *Ö÷Ìâ:* Re: KVM Support?
> > > >> > >
> > > >> > > Hello everybody,
> > > >> > >
> > > >> > > Could you check the size of
> > > >> > >
> > > >> >
> > > >>
> > >
> > 
> `build/tmp/deploy/image/<platformname>/fitImage-openbmc-phosphor-initramfs-*.bin`?
> > > >> > > If it exceeds 4456448 (0x440000) bytes, this is the problem
> > > >> described
> > > >> > > at https://github.com/openbmc/openbmc/issues/3314
> > > >> > >
> > > >> > >
> > > >> > > In this case you should modify flash partitions layout or
> > trying to
> > > >> > > decrease kernel size.
> > > >> > >
> > > >> > > --
> > > >> > > Alexander
> > > >> > >
> > > >> > > On Wed, Jul 25, 2018 at 03:48:04PM +0800, xiuzhi wrote:
> > > >> > > > Hi Eddie,
> > > >> > > >
> > > >> > > >
> > > >> > > >   I read your KVM Support email on mailinglist.
> > > >> > > >
> > > >> > > >
> > > >> > > > I am going to port the BMC kvm to ast2400 . The u-boot 
> can not
> > > >> load
> > > >> > > kernel ,the error message read:
> > > >> > > >
> > > >> > > >
> > > >> > > > ""U-Boot 2016.07 (Jul 23 2018 - 11:11:50 +0000)
> > > >> > > >
> > > >> > > >
> > > >> > > > DRAM:  240 MiB
> > > >> > > > WARNING: Caches not enabled
> > > >> > > > Flash: 32 MiB
> > > >> > > > *** Warning - bad CRC, using default environment
> > > >> > > >
> > > >> > > >
> > > >> > > > In:    serial
> > > >> > > > Out:   serial
> > > >> > > > Err:   serial
> > > >> > > > Net:   aspeednic#0
> > > >> > > > Error: aspeednic#0 address not set.
> > > >> > > >
> > > >> > > >
> > > >> > > > Hit any key to stop autoboot: 0
> > > >> > > > ## Loading kernel from FIT Image at 20080000 ...
> > > >> > > > Bad FIT kernel image format!
> > > >> > > > ERROR: can't get kernel image!
> > > >> > > > ast#
> > > >> > > >
> > > >> > > >
> > > >> > > > I added  config options to defconfig of ast2400 as follows:
> > > >> > > >
> > > >> > > >
> > > >> > > > CONFIG_MEDIA_SUPPORT=y
> > > >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> > > >> > > > CONFIG_MEDIA_SUPPORT=y
> > > >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> > > >> > > > # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_RADIO_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_SDR_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_CEC_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_CONTROLLER is not set
> > > >> > > > CONFIG_RATIONAL=y
> > > >> > > > CONFIG_VIDEO_DEV=y
> > > >> > > > CONFIG_VIDEO_V4L2=y
> > > >> > > > CONFIG_V4L_PLATFORM_DRIVERS=y
> > > >> > > > CONFIG_VIDEO_ASPEED=y
> > > >> > > > CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
> > > >> > > >
> > > >> > > >
> > > >> > > > Need I modify the aspeed-bmc-opp-palmetto.dts and
> > aspeed-g4.dtsi?
> > > >> > > >
> > > >> > > >
> > > >> > > > Can you give me the file list need to modify?
> > > >> > > >
> > > >> > > >
> > > >> > > > Thanks,
> > > >> > > >
> > > >> > > >
> > > >> > > > xiuzhi
> > > >

[-- Attachment #2: Type: text/html, Size: 40738 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-10-11 10:51       ` =?gb18030?B?eGl1emhp?=
@ 2018-10-11 17:32         ` Eddie James
  2018-10-12  1:26           ` =?gb18030?B?eGl1emhp?=
  0 siblings, 1 reply; 26+ messages in thread
From: Eddie James @ 2018-10-11 17:32 UTC (permalink / raw)
  To: xiuzhi, Alexander A. Filippov, openbmc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030; format=flowed, Size: 22775 bytes --]



On 10/11/2018 05:51 AM, xiuzhi wrote:
> Hi Eddie,
> 0„2An error occured when I tested the ikvm on AST2500 now.
> root@romulus:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> [0„2 192.679314] cma: cma_alloc: alloc failed, req-size: 2304 pages, 
> ret: -12
> [0„2 192.686061] aspeed-video 1e700000.video: Failed to allocate source 
> buffer 1, size[900000]
> [0„2 192.696715] aspeed-video 1e700000.video: Failed to start video engine
> The .dts file:
> 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2vga_memory: framebuffer@9f000000 {
> 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 no-map;
> 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 reg = <0x9f000000 0x01000000>; /* 16M */
> 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 };
> 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 gfx_memory: framebuffer {
> 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 size = <0x01000000>;

Hi,

You may have to increase the size of the reserved memory. I believe I 
bumped ours up to 0x04000000.

If you use the latest version of the driver it will initially allocate 
the largest buffer for size detection, but then will free unnecessary 
memory once the size is detected. That may help you.

Thanks,
Eddie

> 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 alignment = <0x01000000>;
> 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 compatible = "shared-dma-pool";
> 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 reusable;
> 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 };
>
> &gfx {
> 0„2 0„2 0„2status = "okay";
> 0„2 0„2 0„2memory-region = <&gfx_memory>;
> };
>
> &video {
> 0„2 0„2 0„2 0„2 status = "okay";
> 0„2 0„2 0„2 0„2 memory-region = <&gfx_memory>;
> };
>
> &vhub {
> 0„2 0„2 0„2 0„2 status = "okay";
> };
>
> How to debug it?
> Best,
> Xiuzhi
>
> ------------------0„2Original0„2------------------
> *From: *0„2"Eddie James";<eajames@linux.vnet.ibm.com>;
> *Send time:*0„2Friday, Aug 24, 2018 10:46 PM
> *To:*0„2"xiuzhi"<1450335857@qq.com>; "Alexander A. 
> Filippov"<a.filippov@yadro.com>; "openbmc"<openbmc@lists.ozlabs.org>;
> *Subject: *0„2Re: KVM Support?
>
>
>
> On 08/23/2018 08:06 PM, xiuzhi wrote:
> > Hi Eddie,
> > Is there a schedule for integrating one vnc viewer to phosphor webui ?
>
> Hi Xiuzhi,
>
> Well, the VNC server (and Video Engine driver) integration is targeted
> for the OpenBMC release in February 2019. Hopefully in master before
> then. There is currently no plan or work being done to integrate a
> viewer into the BMC webui. But patches are certainly welcome in this
> area! It could be as simple as dropping in a noVNC html file... not sure.
>
> And thanks for the help on AST2400!
>
> Eddie
>
> > Best,
> > Xiuzhi
> >
> >
> >
> > On 08/14/2018 01:39 AM, xiuzhi wrote:
> > > Hi Eddie,
> > > 0„2 0„2The video-dev2 can work on AST2400, the tightvnc connect to BMC
> > > vncserver stably when the host cpu run centos GUI.
> > > Two issues was found in testing process .
> > > 1, The obmc-ikvm will stop connection when host server window flush
> > > from one to next0„2 on BIOS or kernel booting process.
> > > The error log on AST2400 is :
> > > 18/07/2018 13:37:32 Listening for VNC connections on TCP port 5900
> > > 18/07/2018 13:37:32 Listening for VNC connections on TCP6 port 5900
> > > [11704.151172] aspeed-video 1e700000.video: resolution changed;
> > resetting
> > > [11704.888188] aspeed-video 1e700000.video: resolution changed;
> > resetting
> > > [11705.613868] aspeed-video 1e700000.video: invalid resolution 
> detected
> > > [11705.620421] aspeed-video 1e700000.video: resolution changed;
> > > couldn't get new resolution
> >
> > OK, I noticed a similar issue on AST2500 when immediately detecting
> > resolution after mode change. I added a delay, but it probably needs to
> > be longer on AST2400... Also, most client's don't handle server-side
> > resize, so usually the window will close and you'll have to re-open
> > anyway I think, if the size is changing.
> >
> > Thanks,
> > Eddie
> >
> > >
> > >
> > > 2, The VNC Viewer can not connect to bmc server.
> > > The error on VNC Viewer client is :
> > > "0„2 0„2Attempting to reconnect to VNC Server ...
> > > 0„2 0„2RFB protocol error:unknown rect encoding 7
> > > "
> > >
> > > The error log0„2 on BMC is :
> > > 18/07/2018 14:03:18 Got connection from client 192.168.120.58
> > > 18/07/2018 14:03:180„2 0„2other clients:
> > > 18/07/2018 14:03:18 Normal socket connection
> > > 18/07/2018 14:03:18 Client Protocol Version 3.8
> > > 18/07/2018 14:03:18 Protocol version sent 3.8, using 3.8
> > > 18/07/2018 14:03:18 rfbProcessClientSecurityType: executing handler
> > > for type 1
> > > 18/07/2018 14:03:18 rfbProcessClientSecurityType: returning
> > > securityResult for client rfb version >= 3.8
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000018)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000016)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000015)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x0000000F)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0xFFFFFEC6)
> > > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Using ZRLE encoding for client 192.168.120.58
> > > 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> > > 18/07/2018 14:03:180„2 0„28 bpp, depth 6
> > > 18/07/2018 14:03:180„2 0„2true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000018)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000016)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000015)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x0000000F)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0xFFFFFEC6)
> > > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Switching from ZRLE to raw Encoding for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000018)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000016)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x00000015)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0x0000000F)
> > > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > > unsupported encoding type Enc(0xFFFFFEC6)
> > > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Switching from raw to ZRLE Encoding for client
> > > 192.168.120.58
> > > 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> > > 18/07/2018 14:03:180„2 0„232 bpp, depth 24, little endian
> > > 18/07/2018 14:03:180„2 0„2true colour: max r 255 g 255 b 255, shift r 16 g
> > > 8 b 0
> > > 18/07/2018 14:03:19 rfbProcessClientNormalMessage: read: Connection
> > > reset by peer
> > > 18/07/2018 14:03:19 Client 192.168.120.58 gone
> > > 18/07/2018 14:03:19 Statistics0„2 0„2 0„2 0„2 0„2 0„2 0„2events Transmit/ RawEquiv (
> > > saved)
> > > 18/07/2018 14:03:190„2 FramebufferUpdate0„2 0„2:0„2 0„2 0„2 3 | 0„20/ 0„2 0„2 0 (0„2 0.0%)
> > > 18/07/2018 14:03:190„2 tight0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2:0„2 0„2 0„2 1 | 0„233807/0„2 3145740 (
> > > 98.9%)
> > > 18/07/2018 14:03:190„2 raw0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2:0„2 0„2 0„2 1 | 0„216396/0„2 0„2 16396
> > > (0„2 0.0%)
> > > 18/07/2018 14:03:190„2 ZRLE0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 :0„2 0„2 0„2 2 | 62/ 3932160 
> (100.0%)
> > > 18/07/2018 14:03:190„2 RichCursor0„2 0„2 0„2 0„2 0„2 :0„2 0„2 0„2 3 | 0„2429/ 0„2 0„2 429 (
> > > 0.0%)
> > > 18/07/2018 14:03:190„2 TOTALS0„2 0„2 0„2 0„2 0„2 0„2 0„2 :0„2 0„2 0„210 | 0„250694/0„2 7094725 (
> > > 99.3%)
> > > 18/07/2018 14:03:19 Statistics0„2 0„2 0„2 0„2 0„2 0„2 0„2events Received/ RawEquiv (
> > > saved)
> > > 18/07/2018 14:03:190„2 FramebufferUpdate0„2 0„2:0„2 0„2 0„2 4 | 40/ 0„2 0„240 (0„2 0.0%)
> > > 18/07/2018 14:03:190„2 SetPixelFormat0„2 0„2 0„2 :0„2 0„2 0„2 2 | 40/ 0„2 0„240 (0„2 0.0%)
> > > 18/07/2018 14:03:190„2 SetEncodings0„2 0„2 0„2 0„2 :0„2 0„2 0„2 3 | 0„2168/ 0„2 0„2 168 (
> > > 0.0%)
> > > 18/07/2018 14:03:190„2 TOTALS0„2 0„2 0„2 0„2 0„2 0„2 0„2 :0„2 0„2 0„2 9 | 0„2248/ 0„2 0„2 248 (
> > > 0.0%)
> > >
> > > Best,
> > > Xiuzhi
> > > Hi Eddie,
> > > 0„2 0„2Very good work!
> > > 0„2 The video-dev2 works on AST2400 now, I will do more test.
> > > Thanks,
> > > Xiuzhi
> > > On 08/10/2018 10:00 AM, Eddie James wrote:
> > > >
> > > >
> > > > On 08/10/2018 06:14 AM, xiuzhi wrote:
> > > >> Hi Eddie,
> > > >> 0„2 0„2I tested the new update source of video-dev on AST2400 and
> > > >> AST2500. It works on AST2500.
> > > >> 0„2On AST2400£¬the vncviewer can connect vncserver sucessful, but its
> > > >> window was blank,0„2 not shown any information of the host screen .
> > > >> Would you like to give me some advice or instruments on how to 
> 0„2debug
> > > >> this issue?
> > >
> > > Hey, I also just pushed a new branch to my github with some
> > > simplifications to the driver... It no longer uses the auto mode 
> and may
> > > work better on AST2400... I don't have any AST2400 to test on, but let
> > > me know if you have any luck:
> > >
> > > https://github.com/eddiejames/linux/commits/video-dev2
> > >
> > > Thanks,
> > > Eddie
> > >
> > > >
> > > > Hi,
> > > >
> > > > You could try enabling the debug tracing, if dynamic debug is 
> enabled
> > > > on your kernel. (CONFIG_DYNAMIC_DEBUG)
> > > >
> > > > echo file aspeed-video.c +p > 
> /sys/kernel/debug/dynamic_debug/control
> > > >
> > > > That should print every register access, as well as some other info.
> > > >
> > > > Thanks,
> > > > Eddie
> > > >
> > > >> Hi,
> > > >>
> > > >> There are some differences with the video engine between the
> > > AST2400 and
> > > >> AST2500 that I haven't addressed yet, so probably the driver is not
> > > >> working correctly on the AST2400 yet. Some registers have
> > different bit
> > > >> mapping, and things like that. Sorry about that... thanks for
> > trying it
> > > >> out! I'll look at the changes needed for AST2400 next.
> > > >>
> > > >> Thanks,
> > > >>
> > > >> Eddie
> > > >>
> > > >>
> > > >> On 08/01/2018 03:47 AM, xiuzhi wrote:
> > > >> > Hi Eddie,
> > > >> > 0„2 Now It works, but the vncviewer can not connect the BMC server
> > > >> > successful.
> > > >> > When I use vncviewer connect to the BMC the error read:
> > > >> > "RFB protocol error: bad desktop size 0x1"
> > > >> > "RFB protocol error: unknow rect encoding 7"
> > > >> > The information on BMC are :
> > > >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > > >> > frame buffer size: 3145728
> > > >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP port 
> 5900
> > > >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP6 
> port 5900
> > > >> >
> > > >> > 19/07/2018 08:52:08 Got connection from client 192.168.120.58
> > > >> > 19/07/2018 08:52:08 0„2 other clients:
> > > >> > 19/07/2018 08:52:08 Normal socket connection
> > > >> > 19/07/2018 08:52:08 Client Protocol Version 3.8
> > > >> > 19/07/2018 08:52:08 Protocol version sent 3.8, using 3.8
> > > >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: executing 
> handler
> > > >> > for type 1
> > > >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: returning
> > > >> > securityResult for client rfb version >= 3.8
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000018)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000016)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000015)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x0000000F)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for
> > client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Using ZRLE encoding for client 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> > > >> > 19/07/2018 08:52:08 0„2 8 bpp, depth 6
> > > >> > 19/07/2018 08:52:08 0„2 true colour: max r 3 g 3 b 3, shift r 4 g
> > 2 b 0
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000018)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000016)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000015)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x0000000F)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for
> > client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Switching from ZRLE to raw Encoding for 
> client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000018)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000016)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x00000015)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0x0000000F)
> > > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for
> > client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Switching from raw to ZRLE Encoding for 
> client
> > > >> > 192.168.120.58
> > > >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> > > >> > 19/07/2018 08:52:08 0„2 32 bpp, depth 24, little endian
> > > >> > 19/07/2018 08:52:08 0„2 true colour: max r 255 g 255 b 255, shift r
> > > 16 g
> > > >> > 8 b 0
> > > >> > [ 6928.751385] aspeed-video 1e700000.video: disabling comp
> > ready irq,
> > > >> > seq_ctrl[000500a8]
> > > >> > 19/07/2018 08:52:09 rfbProcessClientNormalMessage: read: 
> Connection
> > > >> > reset by peer
> > > >> > 19/07/2018 08:52:09 Client 192.168.120.58 gone
> > > >> > 19/07/2018 08:52:09 Statistics events Transmit/
> > > >> > RawEquiv ( saved)
> > > >> > 19/07/2018 08:52:090„2 FramebufferUpdate : 0„2 3 | 0/0„20„20„20„20„2 0„2 0 (
> > > >> 0.0%)
> > > >> > 19/07/2018 08:52:090„2 tight : 0„2 1 | 30991/ 3145740
> > > >> > ( 99.0%)
> > > >> > 19/07/2018 08:52:090„2 raw : 0„2 1 | 16396/ 16396
> > > >> > (0„2 0.0%)
> > > >> > 19/07/2018 08:52:090„2 ZRLE : 0„2 2 | 62/ 3932160
> > > >> > (100.0%)
> > > >> > 19/07/2018 08:52:090„2 RichCursor : 0„2 3 | 429/0„20„20„2 0„2 429
> > > >> (0„2 0.0%)
> > > >> > 19/07/2018 08:52:090„2 TOTALS : 0„2 10 | 47878/ 7094725
> > > >> > ( 99.3%)
> > > >> > 19/07/2018 08:52:09 Statistics events Received/
> > > >> > RawEquiv ( saved)
> > > >> > 19/07/2018 08:52:090„2 FramebufferUpdate : 0„2 4 | 40/0„20„20„20„2 0„2 40 (
> > > >> 0.0%)
> > > >> > 19/07/2018 08:52:090„2 SetPixelFormat : 0„2 2 | 40/0„20„20„20„2 0„2 40 (
> > > >> 0.0%)
> > > >> > 19/07/2018 08:52:090„2 SetEncodings : 0„2 3 | 168/0„20„20„2 0„2 168
> > > >> (0„2 0.0%)
> > > >> > 19/07/2018 08:52:090„2 TOTALS : 0„2 9 | 248/0„20„20„2 0„2 248
> > > >> (0„2 0.0%)
> > > >> >
> > > >> > What wrong with it?
> > > >> > BTW, vncview download from
> > > >> > https://www.realvnc.com/en/connect/download/viewer/linux/
> > > >> > I also got the same error using Tightvnc viewer
> > > >> > Thanks,
> > > >> > xiuzhi
> > > >> > Hi Eddie,
> > > >> > 0„20„2 My bmc is AST2400, I modified the aspeed-g4.dtsi(adding gfx:
> > > >> > display@1e6e60000„2 and0„2 video: video@1e700000)
> > > >> > 0„2and the aspeed-bmc-opp-xxx.dts (adding &video &vhub) .
> > > >> > An error occured when I executed the following instructions:
> > > >> >
> > > >> > root@zhaoxinc:~# create_usbhid.sh
> > > >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > > >> > [0„2 125.586061] aspeed-video 1e700000.video: timed out on 1st mode
> > > >> detect
> > > >> > [0„2 125.602732] aspeed-video 1e700000.video: Failed to start video
> > > >> engine
> > > >> > failed to open /dev/video0: 62 Timer expired
> > > >> > Need I modify drivers/media/platform/aspeed-video.c or any other
> > > >> files?
> > > >> >
> > > >> > 0„2Thanks ,
> > > >> > Xiuzhi
> > > >> > On 07/31/2018 01:52 AM, xiuzhi wrote:
> > > >> > > Hi Alexander ,Eddie,
> > > >> > > 0„2 I merged the source from
> > > >> > >
> > https://gerrit.openbmc-project.xyz/#/c/openbmc/openbmc/+/11500/,and
> > > >> > > kernel branch video-dev.
> > > >> > > How to test the video kvm feature by phosphor-webui or command
> > > line?
> > > >> >
> > > >> > Hi,
> > > >> >
> > > >> > You need to make sure the video device is enabled in your
> > device-tree
> > > >> > for the machine you use... My kernel patch enabled it for our
> > AST2500
> > > >> > witherspoon system. If you're using AST2500 as well, then you 
> just
> > > >> need
> > > >> > something like:
> > > >> >
> > > >> > &video {
> > > >> > 0„20„2 0„2 status = "okay";
> > > >> > 0„20„2 0„2 memory-region = <&gfx_memory>;
> > > >> > };
> > > >> >
> > > >> > And the virtual USB hub:
> > > >> > &vhub {
> > > >> > 0„20„2 0„2 status = "okay";
> > > >> > };
> > > >> >
> > > >> > If you're not using AST2500, you'll need more changes to
> > device-tree.
> > > >> >
> > > >> > Then on the BMC command line:
> > > >> > create_usbhid.sh
> > > >> > obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > > >> > And connect with any VNC client to port 0 of your BMC IP.
> > > >> >
> > > >> > Thanks,
> > > >> > Eddie
> > > >> >
> > > >> > > Best,
> > > >> > > xiuzhi
> > > >> > >
> > > >> > >
> > > >> > > ------------------ ԭʼÓʼþ ------------------
> > > >> > > *·¢¼þÈË:* "Alexander A. Filippov"<a.filippov@yadro.com>;
> > > >> > > *·¢ËÍʱ¼ä:* 2018Äê7ÔÂ25ÈÕ(ÐÇÆÚÈý) ÏÂÎç4:56
> > > >> > > *ÊÕ¼þÈË:*
> > > >> > "openbmc"<openbmc@lists.ozlabs.org>;"xiuzhi"<1450335857@qq.com>;
> > > >> > > *Ö÷Ìâ:* Re: KVM Support?
> > > >> > >
> > > >> > > Hello everybody,
> > > >> > >
> > > >> > > Could you check the size of
> > > >> > >
> > > >> >
> > > >>
> > >
> > 
> `build/tmp/deploy/image/<platformname>/fitImage-openbmc-phosphor-initramfs-*.bin`?
> > > >> > > If it exceeds 4456448 (0x440000) bytes, this is the problem
> > > >> described
> > > >> > > at https://github.com/openbmc/openbmc/issues/3314
> > > >> > >
> > > >> > >
> > > >> > > In this case you should modify flash partitions layout or
> > trying to
> > > >> > > decrease kernel size.
> > > >> > >
> > > >> > > --
> > > >> > > Alexander
> > > >> > >
> > > >> > > On Wed, Jul 25, 2018 at 03:48:04PM +0800, xiuzhi wrote:
> > > >> > > > Hi Eddie,
> > > >> > > >
> > > >> > > >
> > > >> > > > 0„2 I read your KVM Support email on mailinglist.
> > > >> > > >
> > > >> > > >
> > > >> > > > I am going to port the BMC kvm to ast2400 . The u-boot 
> can not
> > > >> load
> > > >> > > kernel ,the error message read:
> > > >> > > >
> > > >> > > >
> > > >> > > > ""U-Boot 2016.07 (Jul 23 2018 - 11:11:50 +0000)
> > > >> > > >
> > > >> > > >
> > > >> > > > DRAM:0„2 240 MiB
> > > >> > > > WARNING: Caches not enabled
> > > >> > > > Flash: 32 MiB
> > > >> > > > *** Warning - bad CRC, using default environment
> > > >> > > >
> > > >> > > >
> > > >> > > > In:0„2 0„2 serial
> > > >> > > > Out: 0„2 serial
> > > >> > > > Err: 0„2 serial
> > > >> > > > Net: 0„2 aspeednic#0
> > > >> > > > Error: aspeednic#0 address not set.
> > > >> > > >
> > > >> > > >
> > > >> > > > Hit any key to stop autoboot: 0
> > > >> > > > ## Loading kernel from FIT Image at 20080000 ...
> > > >> > > > Bad FIT kernel image format!
> > > >> > > > ERROR: can't get kernel image!
> > > >> > > > ast#
> > > >> > > >
> > > >> > > >
> > > >> > > > I added0„2 config options to defconfig of ast2400 as follows:
> > > >> > > >
> > > >> > > >
> > > >> > > > CONFIG_MEDIA_SUPPORT=y
> > > >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> > > >> > > > CONFIG_MEDIA_SUPPORT=y
> > > >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> > > >> > > > # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_RADIO_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_SDR_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_CEC_SUPPORT is not set
> > > >> > > > # CONFIG_MEDIA_CONTROLLER is not set
> > > >> > > > CONFIG_RATIONAL=y
> > > >> > > > CONFIG_VIDEO_DEV=y
> > > >> > > > CONFIG_VIDEO_V4L2=y
> > > >> > > > CONFIG_V4L_PLATFORM_DRIVERS=y
> > > >> > > > CONFIG_VIDEO_ASPEED=y
> > > >> > > > CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
> > > >> > > >
> > > >> > > >
> > > >> > > > Need I modify the aspeed-bmc-opp-palmetto.dts and
> > aspeed-g4.dtsi?
> > > >> > > >
> > > >> > > >
> > > >> > > > Can you give me the file list need to modify?
> > > >> > > >
> > > >> > > >
> > > >> > > > Thanks,
> > > >> > > >
> > > >> > > >
> > > >> > > > xiuzhi
> > > >

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re:  KVM Support?
  2018-08-24 14:46     ` Eddie James
  2018-08-24 19:04       ` Tanous, Ed
@ 2018-10-11 10:51       ` =?gb18030?B?eGl1emhp?=
  2018-10-11 17:32         ` Eddie James
  1 sibling, 1 reply; 26+ messages in thread
From: =?gb18030?B?eGl1emhp?= @ 2018-10-11 10:51 UTC (permalink / raw)
  To: =?gb18030?B?RWRkaWUgSmFtZXM=?=,
	=?gb18030?B?QWxleGFuZGVyIEEuIEZpbGlwcG92?=,
	=?gb18030?B?b3BlbmJtYw==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 20935 bytes --]

Hi Eddie,
 An error occured when I tested the ikvm on AST2500 now. 
root@romulus:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0                                                
[  192.679314] cma: cma_alloc: alloc failed, req-size: 2304 pages, ret: -12                           
[  192.686061] aspeed-video 1e700000.video: Failed to allocate source buffer 1, size[900000]          
[  192.696715] aspeed-video 1e700000.video: Failed to start video engine

The .dts file:
               vga_memory: framebuffer@9f000000 {
                        no-map;
                        reg = <0x9f000000 0x01000000>; /* 16M */
                };
                gfx_memory: framebuffer {
                        size = <0x01000000>;
                        alignment = <0x01000000>;
                        compatible = "shared-dma-pool";
                        reusable;
                };



&gfx {
     status = "okay";
     memory-region = <&gfx_memory>;
};


&video {
        status = "okay";
        memory-region = <&gfx_memory>;
};


&vhub {
        status = "okay";
};



How to debug it?
Best,
Xiuzhi


------------------ Original ------------------
From:  "Eddie James";<eajames@linux.vnet.ibm.com>;
Send time: Friday, Aug 24, 2018 10:46 PM
To: "xiuzhi"<1450335857@qq.com>; "Alexander A. Filippov"<a.filippov@yadro.com>; "openbmc"<openbmc@lists.ozlabs.org>; 

Subject:  Re: KVM Support?





On 08/23/2018 08:06 PM, xiuzhi wrote:
> Hi Eddie,
> Is there a schedule for integrating one vnc viewer to phosphor webui ?

Hi Xiuzhi,

Well, the VNC server (and Video Engine driver) integration is targeted 
for the OpenBMC release in February 2019. Hopefully in master before 
then. There is currently no plan or work being done to integrate a 
viewer into the BMC webui. But patches are certainly welcome in this 
area! It could be as simple as dropping in a noVNC html file... not sure.

And thanks for the help on AST2400!

Eddie

> Best,
> Xiuzhi
>
>
>
> On 08/14/2018 01:39 AM, xiuzhi wrote:
> > Hi Eddie,
> >    The video-dev2 can work on AST2400, the tightvnc connect to BMC
> > vncserver stably when the host cpu run centos GUI.
> > Two issues was found in testing process .
> > 1, The obmc-ikvm will stop connection when host server window flush
> > from one to next  on BIOS or kernel booting process.
> > The error log on AST2400 is :
> > 18/07/2018 13:37:32 Listening for VNC connections on TCP port 5900
> > 18/07/2018 13:37:32 Listening for VNC connections on TCP6 port 5900
> > [11704.151172] aspeed-video 1e700000.video: resolution changed; 
> resetting
> > [11704.888188] aspeed-video 1e700000.video: resolution changed; 
> resetting
> > [11705.613868] aspeed-video 1e700000.video: invalid resolution detected
> > [11705.620421] aspeed-video 1e700000.video: resolution changed;
> > couldn't get new resolution
>
> OK, I noticed a similar issue on AST2500 when immediately detecting
> resolution after mode change. I added a delay, but it probably needs to
> be longer on AST2400... Also, most client's don't handle server-side
> resize, so usually the window will close and you'll have to re-open
> anyway I think, if the size is changing.
>
> Thanks,
> Eddie
>
> >
> >
> > 2, The VNC Viewer can not connect to bmc server.
> > The error on VNC Viewer client is :
> > "   Attempting to reconnect to VNC Server ...
> >    RFB protocol error:unknown rect encoding 7
> > "
> >
> > The error log  on BMC is :
> > 18/07/2018 14:03:18 Got connection from client 192.168.120.58
> > 18/07/2018 14:03:18   other clients:
> > 18/07/2018 14:03:18 Normal socket connection
> > 18/07/2018 14:03:18 Client Protocol Version 3.8
> > 18/07/2018 14:03:18 Protocol version sent 3.8, using 3.8
> > 18/07/2018 14:03:18 rfbProcessClientSecurityType: executing handler
> > for type 1
> > 18/07/2018 14:03:18 rfbProcessClientSecurityType: returning
> > securityResult for client rfb version >= 3.8
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000018)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000016)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000015)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x0000000F)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0xFFFFFEC6)
> > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Using ZRLE encoding for client 192.168.120.58
> > 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> > 18/07/2018 14:03:18   8 bpp, depth 6
> > 18/07/2018 14:03:18   true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000018)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000016)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000015)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x0000000F)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0xFFFFFEC6)
> > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Switching from ZRLE to raw Encoding for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000018)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000016)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000015)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x0000000F)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0xFFFFFEC6)
> > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Switching from raw to ZRLE Encoding for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> > 18/07/2018 14:03:18   32 bpp, depth 24, little endian
> > 18/07/2018 14:03:18   true colour: max r 255 g 255 b 255, shift r 16 g
> > 8 b 0
> > 18/07/2018 14:03:19 rfbProcessClientNormalMessage: read: Connection
> > reset by peer
> > 18/07/2018 14:03:19 Client 192.168.120.58 gone
> > 18/07/2018 14:03:19 Statistics             events Transmit/ RawEquiv (
> > saved)
> > 18/07/2018 14:03:19  FramebufferUpdate   :      3 |  0/     0 (  0.0%)
> > 18/07/2018 14:03:19  tight               :      1 |  33807/  3145740 (
> > 98.9%)
> > 18/07/2018 14:03:19  raw                 :      1 |  16396/    16396
> > (  0.0%)
> > 18/07/2018 14:03:19  ZRLE                :      2 | 62/ 3932160 (100.0%)
> > 18/07/2018 14:03:19  RichCursor          :      3 |  429/     429 (
> > 0.0%)
> > 18/07/2018 14:03:19  TOTALS              :     10 |  50694/  7094725 (
> > 99.3%)
> > 18/07/2018 14:03:19 Statistics             events Received/ RawEquiv (
> > saved)
> > 18/07/2018 14:03:19  FramebufferUpdate   :      4 | 40/    40 (  0.0%)
> > 18/07/2018 14:03:19  SetPixelFormat      :      2 | 40/    40 (  0.0%)
> > 18/07/2018 14:03:19  SetEncodings        :      3 |  168/     168 (
> > 0.0%)
> > 18/07/2018 14:03:19  TOTALS              :      9 |  248/     248 (
> > 0.0%)
> >
> > Best,
> > Xiuzhi
> > Hi Eddie,
> >    Very good work!
> >   The video-dev2 works on AST2400 now, I will do more test.
> > Thanks,
> > Xiuzhi
> > On 08/10/2018 10:00 AM, Eddie James wrote:
> > >
> > >
> > > On 08/10/2018 06:14 AM, xiuzhi wrote:
> > >> Hi Eddie,
> > >>    I tested the new update source of video-dev on AST2400 and
> > >> AST2500. It works on AST2500.
> > >>  On AST2400£¬the vncviewer can connect vncserver sucessful, but its
> > >> window was blank,  not shown any information of the host screen .
> > >> Would you like to give me some advice or instruments on how to  debug
> > >> this issue?
> >
> > Hey, I also just pushed a new branch to my github with some
> > simplifications to the driver... It no longer uses the auto mode and may
> > work better on AST2400... I don't have any AST2400 to test on, but let
> > me know if you have any luck:
> >
> > https://github.com/eddiejames/linux/commits/video-dev2
> >
> > Thanks,
> > Eddie
> >
> > >
> > > Hi,
> > >
> > > You could try enabling the debug tracing, if dynamic debug is enabled
> > > on your kernel. (CONFIG_DYNAMIC_DEBUG)
> > >
> > > echo file aspeed-video.c +p > /sys/kernel/debug/dynamic_debug/control
> > >
> > > That should print every register access, as well as some other info.
> > >
> > > Thanks,
> > > Eddie
> > >
> > >> Hi,
> > >>
> > >> There are some differences with the video engine between the
> > AST2400 and
> > >> AST2500 that I haven't addressed yet, so probably the driver is not
> > >> working correctly on the AST2400 yet. Some registers have 
> different bit
> > >> mapping, and things like that. Sorry about that... thanks for 
> trying it
> > >> out! I'll look at the changes needed for AST2400 next.
> > >>
> > >> Thanks,
> > >>
> > >> Eddie
> > >>
> > >>
> > >> On 08/01/2018 03:47 AM, xiuzhi wrote:
> > >> > Hi Eddie,
> > >> >   Now It works, but the vncviewer can not connect the BMC server
> > >> > successful.
> > >> > When I use vncviewer connect to the BMC the error read:
> > >> > "RFB protocol error: bad desktop size 0x1"
> > >> > "RFB protocol error: unknow rect encoding 7"
> > >> > The information on BMC are :
> > >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > >> > frame buffer size: 3145728
> > >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP port 5900
> > >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP6 port 5900
> > >> >
> > >> > 19/07/2018 08:52:08 Got connection from client 192.168.120.58
> > >> > 19/07/2018 08:52:08   other clients:
> > >> > 19/07/2018 08:52:08 Normal socket connection
> > >> > 19/07/2018 08:52:08 Client Protocol Version 3.8
> > >> > 19/07/2018 08:52:08 Protocol version sent 3.8, using 3.8
> > >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: executing handler
> > >> > for type 1
> > >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: returning
> > >> > securityResult for client rfb version >= 3.8
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000018)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000016)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000015)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x0000000F)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for 
> client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Using ZRLE encoding for client 192.168.120.58
> > >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> > >> > 19/07/2018 08:52:08   8 bpp, depth 6
> > >> > 19/07/2018 08:52:08   true colour: max r 3 g 3 b 3, shift r 4 g 
> 2 b 0
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000018)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000016)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000015)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x0000000F)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for 
> client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Switching from ZRLE to raw Encoding for client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000018)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000016)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000015)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x0000000F)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for 
> client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Switching from raw to ZRLE Encoding for client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> > >> > 19/07/2018 08:52:08   32 bpp, depth 24, little endian
> > >> > 19/07/2018 08:52:08   true colour: max r 255 g 255 b 255, shift r
> > 16 g
> > >> > 8 b 0
> > >> > [ 6928.751385] aspeed-video 1e700000.video: disabling comp 
> ready irq,
> > >> > seq_ctrl[000500a8]
> > >> > 19/07/2018 08:52:09 rfbProcessClientNormalMessage: read: Connection
> > >> > reset by peer
> > >> > 19/07/2018 08:52:09 Client 192.168.120.58 gone
> > >> > 19/07/2018 08:52:09 Statistics events Transmit/
> > >> > RawEquiv ( saved)
> > >> > 19/07/2018 08:52:09  FramebufferUpdate   :   3 | 0/        0 (
> > >> 0.0%)
> > >> > 19/07/2018 08:52:09  tight               :   1 | 30991/ 3145740
> > >> > ( 99.0%)
> > >> > 19/07/2018 08:52:09  raw                 :   1 | 16396/ 16396
> > >> > (  0.0%)
> > >> > 19/07/2018 08:52:09  ZRLE                :   2 | 62/ 3932160
> > >> > (100.0%)
> > >> > 19/07/2018 08:52:09  RichCursor          :   3 | 429/      429
> > >> (  0.0%)
> > >> > 19/07/2018 08:52:09  TOTALS              :   10 | 47878/ 7094725
> > >> > ( 99.3%)
> > >> > 19/07/2018 08:52:09 Statistics events Received/
> > >> > RawEquiv ( saved)
> > >> > 19/07/2018 08:52:09  FramebufferUpdate   :   4 | 40/       40 (
> > >> 0.0%)
> > >> > 19/07/2018 08:52:09  SetPixelFormat      :   2 | 40/       40 (
> > >> 0.0%)
> > >> > 19/07/2018 08:52:09  SetEncodings        :   3 | 168/      168
> > >> (  0.0%)
> > >> > 19/07/2018 08:52:09  TOTALS              :   9 | 248/      248
> > >> (  0.0%)
> > >> >
> > >> > What wrong with it?
> > >> > BTW, vncview download from
> > >> > https://www.realvnc.com/en/connect/download/viewer/linux/
> > >> > I also got the same error using Tightvnc viewer
> > >> > Thanks,
> > >> > xiuzhi
> > >> > Hi Eddie,
> > >> >    My bmc is AST2400, I modified the aspeed-g4.dtsi(adding gfx:
> > >> > display@1e6e6000  and  video: video@1e700000)
> > >> >  and the aspeed-bmc-opp-xxx.dts (adding &video &vhub) .
> > >> > An error occured when I executed the following instructions:
> > >> >
> > >> > root@zhaoxinc:~# create_usbhid.sh
> > >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > >> > [  125.586061] aspeed-video 1e700000.video: timed out on 1st mode
> > >> detect
> > >> > [  125.602732] aspeed-video 1e700000.video: Failed to start video
> > >> engine
> > >> > failed to open /dev/video0: 62 Timer expired
> > >> > Need I modify drivers/media/platform/aspeed-video.c or any other
> > >> files?
> > >> >
> > >> >  Thanks ,
> > >> > Xiuzhi
> > >> > On 07/31/2018 01:52 AM, xiuzhi wrote:
> > >> > > Hi Alexander ,Eddie,
> > >> > >   I merged the source from
> > >> > > 
> https://gerrit.openbmc-project.xyz/#/c/openbmc/openbmc/+/11500/,and
> > >> > > kernel branch video-dev.
> > >> > > How to test the video kvm feature by phosphor-webui or command
> > line?
> > >> >
> > >> > Hi,
> > >> >
> > >> > You need to make sure the video device is enabled in your 
> device-tree
> > >> > for the machine you use... My kernel patch enabled it for our 
> AST2500
> > >> > witherspoon system. If you're using AST2500 as well, then you just
> > >> need
> > >> > something like:
> > >> >
> > >> > &video {
> > >> >      status = "okay";
> > >> >      memory-region = <&gfx_memory>;
> > >> > };
> > >> >
> > >> > And the virtual USB hub:
> > >> > &vhub {
> > >> >      status = "okay";
> > >> > };
> > >> >
> > >> > If you're not using AST2500, you'll need more changes to 
> device-tree.
> > >> >
> > >> > Then on the BMC command line:
> > >> > create_usbhid.sh
> > >> > obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > >> > And connect with any VNC client to port 0 of your BMC IP.
> > >> >
> > >> > Thanks,
> > >> > Eddie
> > >> >
> > >> > > Best,
> > >> > > xiuzhi
> > >> > >
> > >> > >
> > >> > > ------------------ ԭʼÓʼþ ------------------
> > >> > > *·¢¼þÈË:* "Alexander A. Filippov"<a.filippov@yadro.com>;
> > >> > > *·¢ËÍʱ¼ä:* 2018Äê7ÔÂ25ÈÕ(ÐÇÆÚÈý) ÏÂÎç4:56
> > >> > > *ÊÕ¼þÈË:*
> > >> > "openbmc"<openbmc@lists.ozlabs.org>;"xiuzhi"<1450335857@qq.com>;
> > >> > > *Ö÷Ìâ:* Re: KVM Support?
> > >> > >
> > >> > > Hello everybody,
> > >> > >
> > >> > > Could you check the size of
> > >> > >
> > >> >
> > >>
> > 
> `build/tmp/deploy/image/<platformname>/fitImage-openbmc-phosphor-initramfs-*.bin`?
> > >> > > If it exceeds 4456448 (0x440000) bytes, this is the problem
> > >> described
> > >> > > at https://github.com/openbmc/openbmc/issues/3314
> > >> > >
> > >> > >
> > >> > > In this case you should modify flash partitions layout or 
> trying to
> > >> > > decrease kernel size.
> > >> > >
> > >> > > --
> > >> > > Alexander
> > >> > >
> > >> > > On Wed, Jul 25, 2018 at 03:48:04PM +0800, xiuzhi wrote:
> > >> > > > Hi Eddie,
> > >> > > >
> > >> > > >
> > >> > > >   I read your KVM Support email on mailinglist.
> > >> > > >
> > >> > > >
> > >> > > > I am going to port the BMC kvm to ast2400 . The u-boot can not
> > >> load
> > >> > > kernel ,the error message read:
> > >> > > >
> > >> > > >
> > >> > > > ""U-Boot 2016.07 (Jul 23 2018 - 11:11:50 +0000)
> > >> > > >
> > >> > > >
> > >> > > > DRAM:  240 MiB
> > >> > > > WARNING: Caches not enabled
> > >> > > > Flash: 32 MiB
> > >> > > > *** Warning - bad CRC, using default environment
> > >> > > >
> > >> > > >
> > >> > > > In:    serial
> > >> > > > Out:   serial
> > >> > > > Err:   serial
> > >> > > > Net:   aspeednic#0
> > >> > > > Error: aspeednic#0 address not set.
> > >> > > >
> > >> > > >
> > >> > > > Hit any key to stop autoboot:  0
> > >> > > > ## Loading kernel from FIT Image at 20080000 ...
> > >> > > > Bad FIT kernel image format!
> > >> > > > ERROR: can't get kernel image!
> > >> > > > ast#
> > >> > > >
> > >> > > >
> > >> > > > I added  config options to defconfig of ast2400 as follows:
> > >> > > >
> > >> > > >
> > >> > > > CONFIG_MEDIA_SUPPORT=y
> > >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> > >> > > > CONFIG_MEDIA_SUPPORT=y
> > >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> > >> > > > # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
> > >> > > > # CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
> > >> > > > # CONFIG_MEDIA_RADIO_SUPPORT is not set
> > >> > > > # CONFIG_MEDIA_SDR_SUPPORT is not set
> > >> > > > # CONFIG_MEDIA_CEC_SUPPORT is not set
> > >> > > > # CONFIG_MEDIA_CONTROLLER is not set
> > >> > > > CONFIG_RATIONAL=y
> > >> > > > CONFIG_VIDEO_DEV=y
> > >> > > > CONFIG_VIDEO_V4L2=y
> > >> > > > CONFIG_V4L_PLATFORM_DRIVERS=y
> > >> > > > CONFIG_VIDEO_ASPEED=y
> > >> > > > CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
> > >> > > >
> > >> > > >
> > >> > > > Need I modify the aspeed-bmc-opp-palmetto.dts and 
> aspeed-g4.dtsi?
> > >> > > >
> > >> > > >
> > >> > > > Can you give me the file list need to modify?
> > >> > > >
> > >> > > >
> > >> > > > Thanks,
> > >> > > >
> > >> > > >
> > >> > > > xiuzhi
> > >

[-- Attachment #2: Type: text/html, Size: 30796 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
@ 2018-09-07  7:31 =?gb18030?B?eGl1emhp?=
  0 siblings, 0 replies; 26+ messages in thread
From: =?gb18030?B?eGl1emhp?= @ 2018-09-07  7:31 UTC (permalink / raw)
  To: =?gb18030?B?RWRkaWUgSmFtZXM=?=, =?gb18030?B?S1dMSVU=?=,
	=?gb18030?B?QXZpLkZpc2htYW4=?=, =?gb18030?B?VGFub3VzLCBFZA==?=,
	=?gb18030?B?b3BlbmJtYw==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 15094 bytes --]

Hi Eddie,Joseph,
  Thanks for your reply.
 The new obmc-ikvm.c with "wait_next" code snippet  did work when the screen resolution changed during  the BIOS and OS   startup process. 
But two new issues are raised:
1, The user can't choose the which OS to run if there are several operating systems on grub menu,eg, one is Fedora19,one is Centos7,and the other is Ubuntu16.04, because the webui ikvm screen can't get the OS booting information in screen resolution changing process.
2, The obmc-ikvm will dead-locked and has no response if the user would click the button "Refresh" on web page https://xxx.xxx.xxx.xxx/#/kvm, when the host screen resolution changing.
 In this case, I must restart the obmc-ikvm.service ,sometimes must restart phosphor-gevent.service  because the rest_debus python process will occupy the CPU more than 95%.
The good one, 
1)When I clicked the "Refresh" button on web page after the OS finish the startup.  top result on BMC side:
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
 1118     1 root     S    33784  14%  16% python /usr/sbin/phosphor-gevent rest_
 1132     1 root     S    20316   9%   3% /usr/bin/obmc-ikvm -v /dev/video0 -i /
  499     1 root     S    13288   6%   1% /lib/systemd/systemd-journald
  815     1 messageb S     4424   2%   1% /usr/bin/dbus-daemon --system --addres
  797     1 root     S    14924   6%   1% python /usr/sbin/phosphor-mapper --pat
 1141  1137 root     R     3180   1%   0% top


2)When I clicked the "Refresh" button on web page after I saw the host grub menu to get the host screen. top result on BMC side:
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
 1118     1 root     R    33792  14%  98% python /usr/sbin/phosphor-gevent rest_
 1141  1137 root     R     3180   1%   1% top
  819     1 root     S     1892   1%   0% obmc-console-server --config /etc/obmc
 1123     2 root     IW       0   0%   0% [kworker/u2:3]
    1     0 root     S    25304  11%   0% {systemd} /sbin/init
  810     1 root     S     1756   1%   0% /usr/sbin/rngd -f
 1090     2 root     IW       0   0%   0% [kworker/u2:0]
  897     1 root     S    33768  14%   0% power_control.exe 3000 10




Best,
xiuzhi  
On 09/05/2018 02:43 AM, KWLIU@nuvoton.com wrote:
>
> Hi Xiuzhi:
>
> From your system log, I think the problem is on the Aspeed video 
> driver(apsedd-video.c).
>
> But I don¡¯t have any Aspeed platforms at hand and can¡¯t really help 
> you to debug this issue,
>
> maybe you can increase timeout value of mode detection or wait for 
> Eddie¡¯s comments.
>

That is correct, it seems to take quite some time for the host 
resolution change to actually take effect. In my latest upstream version 
I have 1 retry on the mode detection as well as a longer timeout, so you 
could pull that in from the linux-kernel list, or wait for integration 
into openbmc/linux.

You have to restart the obmc-ikvm application in this case.

Thanks,
Eddie

> If you want to auto start/restart obmc-ikvm, you must add a service 
> file for systemd service.
>
> You can refer to below links.
>
> 1.https://github.com/openbmc/openbmc/blob/master/meta-phosphor/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service 
>
>
> 2.https://github.com/openbmc/openbmc/blob/master/meta-phosphor/common/recipes-phosphor/interfaces/phosphor-gevent.bb
>
> 3.https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/blob/openbmc-master/recipes-graphics/obmc-ikvm/obmc-ikvm/obmc-ikvm.service
>
> 4.https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/blob/openbmc-master/recipes-graphics/obmc-ikvm/obmc-ikvm.bb
>
> Thanks,
>
> Joseph
>
> *From:*xiuzhi [mailto:1450335857@qq.com]
> *Sent:* Wednesday, September 05, 2018 1:48 PM
> *To:* IS20 Avi Fishman; CS20 KWLiu; Eddie James; Tanous, Ed; openbmc
> *Subject:* Re:RE: Re:RE: KVM Support?
>
> Hi  Eddie,Joseph,
>
>     The webui can't get ikvm video when the host resolution changed .
>
> I must kill the process :python /usr/sbin/phosphor-gevent rest_dbus.py
>
> and restart obmc-ikvm -v /dev/video0 -i /dev/hidg0
>
> Then the kvm on webui can get the host video image .
>
> The system log is:
>
>   [ 9052.912683] aspeed-video 1e700000.video: resolution changed; 
> resetting
>
> [ 9054.406876] aspeed-video 1e700000.video: timed out on 1st mode detect
>
> [ 9054.413380] aspeed-video 1e700000.video: resolution changed; 
> couldn't get new resolution
>
> Do you have any idea to auto restart the obmc-ikvm and ?rest_dbus.py
>
> xiuzhi
>
> ------------------ Original ------------------
>
> *From: * "Avi.Fishman";<Avi.Fishman@nuvoton.com 
> <mailto:Avi.Fishman@nuvoton.com>>;
>
> *Date: * Aug 29, 2018
>
> *To: * "KWLIU"<KWLIU@nuvoton.com <mailto:KWLIU@nuvoton.com>>; 
> "xiuzhi"<1450335857@qq.com <mailto:1450335857@qq.com>>; 
> "eajames"<eajames@linux.vnet.ibm.com 
> <mailto:eajames@linux.vnet.ibm.com>>; "ed.tanous"<ed.tanous@intel.com 
> <mailto:ed.tanous@intel.com>>; "openbmc"<openbmc@lists.ozlabs.org 
> <mailto:openbmc@lists.ozlabs.org>>;
>
> *Subject: * RE: Re:RE: KVM Support?
>
> Hi Xiuzhi,
>
> Can you take the patches and merge them to your environment?
>
> Josef,
>
> Maybe you need to give the commit or tag you are that above it you use 
> your patches?
>
> Thanks,
>
> Avi
>
> *From:*openbmc 
> <openbmc-bounces+avifishman70=gmail.com@lists.ozlabs.org 
> <mailto:openbmc-bounces+avifishman70=gmail.com@lists.ozlabs.org>> *On 
> Behalf Of *CS20 KWLiu
> *Sent:* Wednesday, August 29, 2018 5:44 AM
> *To:* 1450335857@qq.com <mailto:1450335857@qq.com>; 
> eajames@linux.vnet.ibm.com <mailto:eajames@linux.vnet.ibm.com>; 
> ed.tanous@intel.com <mailto:ed.tanous@intel.com>; 
> openbmc@lists.ozlabs.org <mailto:openbmc@lists.ozlabs.org>
> *Subject:* RE: Re:RE: KVM Support?
>
> Hi Xiuzhi:
>
> I think we are using different bases of the openbmc, this patch is 
> really working on my side
>
> Sorry for I cannot find the exact error in your message.
>
> Thanks,
>
> Joseph
>
> *From:*xiuzhi [mailto:1450335857@qq.com]
> *Sent:* Tuesday, August 28, 2018 6:57 PM
> *To:* Eddie James; Tanous, Ed; CS20 KWLiu; openbmc
> *Subject:* Re:RE: KVM Support?
>
> Hi Joseph, Ed,
>   There was an error when I  updated the patches 
> https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/commit/140771b7e898dd5ca8f0364290cce669609088ac 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_meta-2Dopenbmc-2Dnuvoton-2Daddon_commit_140771b7e898dd5ca8f0364290cce669609088ac&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=8SWpZ_B0Z9GOpECKSppJKXXbMTo-hNO0HuXocMRt5n0&e=>
>
> Would you like to give me some suggestions to debug it?  When I logged 
> in https://<bmc_ip>/#/kvm 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__-253cbmc-5Fip-253e_-23_kvm&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=2J0BHCud5wpV8zxnLKS_sDp79AfVxVQvJ5Vk3r8dhTc&e=>, 
> The errors read: " WebSocket on-close event  
> app.89eaa0b6e5e9417cb602.js:38:675915 Failed when connecting: 
> Connection closed (code: 1005)  app.89eaa0b6e5e9417cb602.js:38:685584 
>         RFB.prototype._fail 
> https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:685584 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__192.168.120.132_app.89eaa0b6e5e9417cb602.js-3A38-3A685584&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=EgJDf5jL_gme8t1tF_wjg1-08xZxvqptSjoW3a8zohU&e=> 
>         RFB/< 
> https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:676138 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__192.168.120.132_app.89eaa0b6e5e9417cb602.js-3A38-3A676138&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=dIWffzOhDWjQl-iTTJj_38z606ai7gLJSynBqbAZXW8&e=> 
>         Websock.prototype.open/this._websocket.onclose< 
> https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:778159 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__192.168.120.132_app.89eaa0b6e5e9417cb602.js-3A38-3A778159&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=oJ5yHA_oCl5ihumZXKGL7rDbby1iZ0j2J4hWMLB-hEY&e=> 
> New state 'disconnecting', was 'connecting'.  
> app.89eaa0b6e5e9417cb602.js:38:684301 >> RFB.disconnect  
> app.89eaa0b6e5e9417cb602.js:38:680495 >> Keyboard.allKeysUp  
> app.89eaa0b6e5e9417cb602.js:38:739659 << Keyboard.allKeysUp  
> app.89eaa0b6e5e9417cb602.js:38:739828 " The line 38 of 
> app.89eaa0b6e5e9417cb602.js is : void 0!==module&&void 
> 0!==exports&&module.exports===exports&&(module.exports="ui.router"),function(window,angular,undefined){"use 
> strict";var 
> $$UMFP,isDefined=angular.isDefined,isFunction=angular.isFunction,isString=angular.isString,isObject=angular.isObject,isArray=angular.isArray,forEach=angular.forEach,extend=angular.extend,copy=angular.copy,toJson=angular.toJson;function 
> inherit(parent,extra){return 
> extend(new(extend(function(){},{prototype:parent})),extra)}function 
> merge(dst){return 
> forEach(arguments,function(obj){obj!==dst&&forEach(obj,function(value,key){dst.hasOwnProperty(key)||(dst[key]=value)})}),dst}function 
> objectKeys(object){if(Object.keys)return Object.keys(object);var 
> result=[];return 
> forEach(object,function(val,key){result.push(key)}),result}function 
> indexOf(array,value){if(Array.prototype.indexOf)return 
> array.indexOf(value,Number(arguments[2])||0);var 
> len=array.length>>>0,from=Number(arguments[2])||0;for((from=from<0?Math.ceil(from):Math.floor(from))<0&&(from+=len);from<len;from++)if(from 
> in array&&array[from]===value)return from;return-1}function 
> inheritParams(currentParams,newParams,$current,$to) ... ... Best, 
> Xiuzhi >Hi Eddie & Ed:
> >Do you have any plan to support non-jpeg video stream in obmc-iKVM?
> >It is possible some platforms don't have hardware JPEG engine, instead have the RGB video stream.
> >If possible to support RGB video stream, I think it would be better if you can add the video frame differentiation in obmc-iKVM because we don't need to send the full screen >to VNC client on every request, it can reduce the buffer size at least. (libvncserver already has the video frame differentiation)
> >Also, I have implemented a KVM application for our platform(nuvoton evb-npcm750) which has hardware video frame differentiation and hardware hextile engine.
> https://github.com/Nuvoton-Israel/obmc-ikvm 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_obmc-2Dikvm&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=92D29zgWEhIBYgHR9Q7lkZzREnMSwnqyhl1nEMyqXFM&e=>
> https://github.com/Nuvoton-Israel/linux/commit/7e90f572323e56e9425b85aafe86dfa5a35c4e7d 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_linux_commit_7e90f572323e56e9425b85aafe86dfa5a35c4e7d&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=1JBlTPOERz49VFrLgiw014ZnBqab0r8xdRIe6Fee1JA&e=>
> >I also enabled ED's KVM webui and added kvmws proxy in python web server.
> https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/commit/140771b7e898dd5ca8f0364290cce669609088ac 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_meta-2Dopenbmc-2Dnuvoton-2Daddon_commit_140771b7e898dd5ca8f0364290cce669609088ac&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=8SWpZ_B0Z9GOpECKSppJKXXbMTo-hNO0HuXocMRt5n0&e=>
> >If you can spare a few minutes to review my implementation is my pleasure.
> >Currently, my video driver is not v4l2, so I am going to redesign it to fit v4l2 and your obmc-iKVM, then I will try to add the RGB format support in your obmc-ikvm.
> >Regarding the larger binary size, I think we need to review all configurations of libvncserver and check which functions should be disabled.
> >Thanks,
> >Joseph Liu.
>
>
>
> ===========================================================================================
> The privileged confidential information contained in this email is 
> intended for use only by the addressees as indicated by the original 
> sender of this email. If you are not the addressee indicated in this 
> email or are not responsible for delivery of the email to such a 
> person, please kindly reply to the sender indicating this fact and 
> delete all copies of it from your computer and network server 
> immediately. Your cooperation is highly appreciated. It is advised 
> that any unauthorized use of confidential information of Nuvoton is 
> strictly prohibited; and any information in this email irrelevant to 
> the official business of Nuvoton shall be deemed as neither given nor 
> endorsed by Nuvoton.
>
>
>
> ===========================================================================================
> The privileged confidential information contained in this email is 
> intended for use only by the addressees as indicated by the original 
> sender of this email. If you are not the addressee indicated in this 
> email or are not responsible for delivery of the email to such a 
> person, please kindly reply to the sender indicating this fact and 
> delete all copies of it from your computer and network server 
> immediately. Your cooperation is highly appreciated. It is advised 
> that any unauthorized use of confidential information of Nuvoton is 
> strictly prohibited; and any information in this email irrelevant to 
> the official business of Nuvoton shall be deemed as neither given nor 
> endorsed by Nuvoton.
>
>
>
> ===========================================================================================
> The privileged confidential information contained in this email is 
> intended for use only by the addressees as indicated by the original 
> sender of this email. If you are not the addressee indicated in this 
> email or are not responsible for delivery of the email to such a 
> person, please kindly reply to the sender indicating this fact and 
> delete all copies of it from your computer and network server 
> immediately. Your cooperation is highly appreciated. It is advised 
> that any unauthorized use of confidential information of Nuvoton is 
> strictly prohibited; and any information in this email irrelevant to 
> the official business of Nuvoton shall be deemed as neither given nor 
> endorsed by Nuvoton.

[-- Attachment #2: Type: text/html, Size: 18222 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-09-05  7:43 KWLIU
@ 2018-09-05 14:32 ` Eddie James
  0 siblings, 0 replies; 26+ messages in thread
From: Eddie James @ 2018-09-05 14:32 UTC (permalink / raw)
  To: KWLIU, 1450335857, Avi.Fishman, ed.tanous, openbmc



On 09/05/2018 02:43 AM, KWLIU@nuvoton.com wrote:
>
> Hi Xiuzhi:
>
> From your system log, I think the problem is on the Aspeed video 
> driver(apsedd-video.c).
>
> But I don’t have any Aspeed platforms at hand and can’t really help 
> you to debug this issue,
>
> maybe you can increase timeout value of mode detection or wait for 
> Eddie’s comments.
>

That is correct, it seems to take quite some time for the host 
resolution change to actually take effect. In my latest upstream version 
I have 1 retry on the mode detection as well as a longer timeout, so you 
could pull that in from the linux-kernel list, or wait for integration 
into openbmc/linux.

You have to restart the obmc-ikvm application in this case.

Thanks,
Eddie

> If you want to auto start/restart obmc-ikvm, you must add a service 
> file for systemd service.
>
> You can refer to below links.
>
> 1.https://github.com/openbmc/openbmc/blob/master/meta-phosphor/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service 
>
>
> 2.https://github.com/openbmc/openbmc/blob/master/meta-phosphor/common/recipes-phosphor/interfaces/phosphor-gevent.bb
>
> 3.https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/blob/openbmc-master/recipes-graphics/obmc-ikvm/obmc-ikvm/obmc-ikvm.service
>
> 4.https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/blob/openbmc-master/recipes-graphics/obmc-ikvm/obmc-ikvm.bb
>
> Thanks,
>
> Joseph
>
> *From:*xiuzhi [mailto:1450335857@qq.com]
> *Sent:* Wednesday, September 05, 2018 1:48 PM
> *To:* IS20 Avi Fishman; CS20 KWLiu; Eddie James; Tanous, Ed; openbmc
> *Subject:* Re:RE: Re:RE: KVM Support?
>
> Hi  Eddie,Joseph,
>
>     The webui can't get ikvm video when the host resolution changed .
>
> I must kill the process :python /usr/sbin/phosphor-gevent rest_dbus.py
>
> and restart obmc-ikvm -v /dev/video0 -i /dev/hidg0
>
> Then the kvm on webui can get the host video image .
>
> The system log is:
>
>   [ 9052.912683] aspeed-video 1e700000.video: resolution changed; 
> resetting
>
> [ 9054.406876] aspeed-video 1e700000.video: timed out on 1st mode detect
>
> [ 9054.413380] aspeed-video 1e700000.video: resolution changed; 
> couldn't get new resolution
>
> Do you have any idea to auto restart the obmc-ikvm and ?rest_dbus.py
>
> xiuzhi
>
> ------------------ Original ------------------
>
> *From: * "Avi.Fishman";<Avi.Fishman@nuvoton.com 
> <mailto:Avi.Fishman@nuvoton.com>>;
>
> *Date: * Aug 29, 2018
>
> *To: * "KWLIU"<KWLIU@nuvoton.com <mailto:KWLIU@nuvoton.com>>; 
> "xiuzhi"<1450335857@qq.com <mailto:1450335857@qq.com>>; 
> "eajames"<eajames@linux.vnet.ibm.com 
> <mailto:eajames@linux.vnet.ibm.com>>; "ed.tanous"<ed.tanous@intel.com 
> <mailto:ed.tanous@intel.com>>; "openbmc"<openbmc@lists.ozlabs.org 
> <mailto:openbmc@lists.ozlabs.org>>;
>
> *Subject: * RE: Re:RE: KVM Support?
>
> Hi Xiuzhi,
>
> Can you take the patches and merge them to your environment?
>
> Josef,
>
> Maybe you need to give the commit or tag you are that above it you use 
> your patches?
>
> Thanks,
>
> Avi
>
> *From:*openbmc 
> <openbmc-bounces+avifishman70=gmail.com@lists.ozlabs.org 
> <mailto:openbmc-bounces+avifishman70=gmail.com@lists.ozlabs.org>> *On 
> Behalf Of *CS20 KWLiu
> *Sent:* Wednesday, August 29, 2018 5:44 AM
> *To:* 1450335857@qq.com <mailto:1450335857@qq.com>; 
> eajames@linux.vnet.ibm.com <mailto:eajames@linux.vnet.ibm.com>; 
> ed.tanous@intel.com <mailto:ed.tanous@intel.com>; 
> openbmc@lists.ozlabs.org <mailto:openbmc@lists.ozlabs.org>
> *Subject:* RE: Re:RE: KVM Support?
>
> Hi Xiuzhi:
>
> I think we are using different bases of the openbmc, this patch is 
> really working on my side
>
> Sorry for I cannot find the exact error in your message.
>
> Thanks,
>
> Joseph
>
> *From:*xiuzhi [mailto:1450335857@qq.com]
> *Sent:* Tuesday, August 28, 2018 6:57 PM
> *To:* Eddie James; Tanous, Ed; CS20 KWLiu; openbmc
> *Subject:* Re:RE: KVM Support?
>
> Hi Joseph, Ed,
>   There was an error when I  updated the patches 
> https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/commit/140771b7e898dd5ca8f0364290cce669609088ac 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_meta-2Dopenbmc-2Dnuvoton-2Daddon_commit_140771b7e898dd5ca8f0364290cce669609088ac&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=8SWpZ_B0Z9GOpECKSppJKXXbMTo-hNO0HuXocMRt5n0&e=>
>
> Would you like to give me some suggestions to debug it?  When I logged 
> in https://<bmc_ip>/#/kvm 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__-253cbmc-5Fip-253e_-23_kvm&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=2J0BHCud5wpV8zxnLKS_sDp79AfVxVQvJ5Vk3r8dhTc&e=>, 
> The errors read: " WebSocket on-close event  
> app.89eaa0b6e5e9417cb602.js:38:675915 Failed when connecting: 
> Connection closed (code: 1005)  app.89eaa0b6e5e9417cb602.js:38:685584 
>         RFB.prototype._fail 
> https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:685584 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__192.168.120.132_app.89eaa0b6e5e9417cb602.js-3A38-3A685584&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=EgJDf5jL_gme8t1tF_wjg1-08xZxvqptSjoW3a8zohU&e=> 
>         RFB/< 
> https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:676138 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__192.168.120.132_app.89eaa0b6e5e9417cb602.js-3A38-3A676138&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=dIWffzOhDWjQl-iTTJj_38z606ai7gLJSynBqbAZXW8&e=> 
>         Websock.prototype.open/this._websocket.onclose< 
> https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:778159 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__192.168.120.132_app.89eaa0b6e5e9417cb602.js-3A38-3A778159&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=oJ5yHA_oCl5ihumZXKGL7rDbby1iZ0j2J4hWMLB-hEY&e=> 
> New state 'disconnecting', was 'connecting'.  
> app.89eaa0b6e5e9417cb602.js:38:684301 >> RFB.disconnect  
> app.89eaa0b6e5e9417cb602.js:38:680495 >> Keyboard.allKeysUp  
> app.89eaa0b6e5e9417cb602.js:38:739659 << Keyboard.allKeysUp  
> app.89eaa0b6e5e9417cb602.js:38:739828 " The line 38 of 
> app.89eaa0b6e5e9417cb602.js is : void 0!==module&&void 
> 0!==exports&&module.exports===exports&&(module.exports="ui.router"),function(window,angular,undefined){"use 
> strict";var 
> $$UMFP,isDefined=angular.isDefined,isFunction=angular.isFunction,isString=angular.isString,isObject=angular.isObject,isArray=angular.isArray,forEach=angular.forEach,extend=angular.extend,copy=angular.copy,toJson=angular.toJson;function 
> inherit(parent,extra){return 
> extend(new(extend(function(){},{prototype:parent})),extra)}function 
> merge(dst){return 
> forEach(arguments,function(obj){obj!==dst&&forEach(obj,function(value,key){dst.hasOwnProperty(key)||(dst[key]=value)})}),dst}function 
> objectKeys(object){if(Object.keys)return Object.keys(object);var 
> result=[];return 
> forEach(object,function(val,key){result.push(key)}),result}function 
> indexOf(array,value){if(Array.prototype.indexOf)return 
> array.indexOf(value,Number(arguments[2])||0);var 
> len=array.length>>>0,from=Number(arguments[2])||0;for((from=from<0?Math.ceil(from):Math.floor(from))<0&&(from+=len);from<len;from++)if(from 
> in array&&array[from]===value)return from;return-1}function 
> inheritParams(currentParams,newParams,$current,$to) ... ... Best, 
> Xiuzhi >Hi Eddie & Ed:
> >Do you have any plan to support non-jpeg video stream in obmc-iKVM?
> >It is possible some platforms don't have hardware JPEG engine, instead have the RGB video stream.
> >If possible to support RGB video stream, I think it would be better if you can add the video frame differentiation in obmc-iKVM because we don't need to send the full screen >to VNC client on every request, it can reduce the buffer size at least. (libvncserver already has the video frame differentiation)
> >Also, I have implemented a KVM application for our platform(nuvoton evb-npcm750) which has hardware video frame differentiation and hardware hextile engine.
> https://github.com/Nuvoton-Israel/obmc-ikvm 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_obmc-2Dikvm&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=92D29zgWEhIBYgHR9Q7lkZzREnMSwnqyhl1nEMyqXFM&e=>
> https://github.com/Nuvoton-Israel/linux/commit/7e90f572323e56e9425b85aafe86dfa5a35c4e7d 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_linux_commit_7e90f572323e56e9425b85aafe86dfa5a35c4e7d&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=1JBlTPOERz49VFrLgiw014ZnBqab0r8xdRIe6Fee1JA&e=>
> >I also enabled ED's KVM webui and added kvmws proxy in python web server.
> https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/commit/140771b7e898dd5ca8f0364290cce669609088ac 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_meta-2Dopenbmc-2Dnuvoton-2Daddon_commit_140771b7e898dd5ca8f0364290cce669609088ac&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=8SWpZ_B0Z9GOpECKSppJKXXbMTo-hNO0HuXocMRt5n0&e=>
> >If you can spare a few minutes to review my implementation is my pleasure.
> >Currently, my video driver is not v4l2, so I am going to redesign it to fit v4l2 and your obmc-iKVM, then I will try to add the RGB format support in your obmc-ikvm.
> >Regarding the larger binary size, I think we need to review all configurations of libvncserver and check which functions should be disabled.
> >Thanks,
> >Joseph Liu.
>
>
>
> ===========================================================================================
> The privileged confidential information contained in this email is 
> intended for use only by the addressees as indicated by the original 
> sender of this email. If you are not the addressee indicated in this 
> email or are not responsible for delivery of the email to such a 
> person, please kindly reply to the sender indicating this fact and 
> delete all copies of it from your computer and network server 
> immediately. Your cooperation is highly appreciated. It is advised 
> that any unauthorized use of confidential information of Nuvoton is 
> strictly prohibited; and any information in this email irrelevant to 
> the official business of Nuvoton shall be deemed as neither given nor 
> endorsed by Nuvoton.
>
>
>
> ===========================================================================================
> The privileged confidential information contained in this email is 
> intended for use only by the addressees as indicated by the original 
> sender of this email. If you are not the addressee indicated in this 
> email or are not responsible for delivery of the email to such a 
> person, please kindly reply to the sender indicating this fact and 
> delete all copies of it from your computer and network server 
> immediately. Your cooperation is highly appreciated. It is advised 
> that any unauthorized use of confidential information of Nuvoton is 
> strictly prohibited; and any information in this email irrelevant to 
> the official business of Nuvoton shall be deemed as neither given nor 
> endorsed by Nuvoton.
>
>
>
> ===========================================================================================
> The privileged confidential information contained in this email is 
> intended for use only by the addressees as indicated by the original 
> sender of this email. If you are not the addressee indicated in this 
> email or are not responsible for delivery of the email to such a 
> person, please kindly reply to the sender indicating this fact and 
> delete all copies of it from your computer and network server 
> immediately. Your cooperation is highly appreciated. It is advised 
> that any unauthorized use of confidential information of Nuvoton is 
> strictly prohibited; and any information in this email irrelevant to 
> the official business of Nuvoton shall be deemed as neither given nor 
> endorsed by Nuvoton.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: KVM Support?
@ 2018-09-05  7:43 KWLIU
  2018-09-05 14:32 ` Eddie James
  0 siblings, 1 reply; 26+ messages in thread
From: KWLIU @ 2018-09-05  7:43 UTC (permalink / raw)
  To: 1450335857, Avi.Fishman, eajames, ed.tanous, openbmc

[-- Attachment #1: Type: text/plain, Size: 11880 bytes --]

Hi Xiuzhi:

From your system log, I think the problem is on the Aspeed video driver(apsedd-video.c).

But I don't have any Aspeed platforms at hand and can't really help you to debug this issue,
maybe you can increase timeout value of mode detection or wait for Eddie's comments.

If you want to auto start/restart obmc-ikvm, you must add a service file for systemd service.
You can refer to below links.

1.       https://github.com/openbmc/openbmc/blob/master/meta-phosphor/common/recipes-phosphor/interfaces/phosphor-gevent/phosphor-gevent.service

2.       https://github.com/openbmc/openbmc/blob/master/meta-phosphor/common/recipes-phosphor/interfaces/phosphor-gevent.bb

3.       https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/blob/openbmc-master/recipes-graphics/obmc-ikvm/obmc-ikvm/obmc-ikvm.service

4.       https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/blob/openbmc-master/recipes-graphics/obmc-ikvm/obmc-ikvm.bb


Thanks,
Joseph
From: xiuzhi [mailto:1450335857@qq.com]
Sent: Wednesday, September 05, 2018 1:48 PM
To: IS20 Avi Fishman; CS20 KWLiu; Eddie James; Tanous, Ed; openbmc
Subject: Re:RE: Re:RE: KVM Support?

Hi  Eddie,Joseph,
    The webui can't get ikvm video when the host resolution changed .
I must kill the process :python /usr/sbin/phosphor-gevent rest_dbus.py
and restart obmc-ikvm -v /dev/video0 -i /dev/hidg0
Then the kvm on webui can get the host video image .
The system log is:
  [ 9052.912683] aspeed-video 1e700000.video: resolution changed; resetting
[ 9054.406876] aspeed-video 1e700000.video: timed out on 1st mode detect
[ 9054.413380] aspeed-video 1e700000.video: resolution changed; couldn't get new resolution

Do you have any idea to auto restart the obmc-ikvm and ?rest_dbus.py
xiuzhi
------------------ Original ------------------
From:  "Avi.Fishman";<Avi.Fishman@nuvoton.com<mailto:Avi.Fishman@nuvoton.com>>;
Date:  Aug 29, 2018
To:  "KWLIU"<KWLIU@nuvoton.com<mailto:KWLIU@nuvoton.com>>; "xiuzhi"<1450335857@qq.com<mailto:1450335857@qq.com>>; "eajames"<eajames@linux.vnet.ibm.com<mailto:eajames@linux.vnet.ibm.com>>; "ed.tanous"<ed.tanous@intel.com<mailto:ed.tanous@intel.com>>; "openbmc"<openbmc@lists.ozlabs.org<mailto:openbmc@lists.ozlabs.org>>;
Subject:  RE: Re:RE: KVM Support?

Hi Xiuzhi,

Can you take the patches and merge them to your environment?

Josef,
Maybe you need to give the commit or tag you are that above it you use your patches?

Thanks,
Avi

From: openbmc <openbmc-bounces+avifishman70=gmail.com@lists.ozlabs.org<mailto:openbmc-bounces+avifishman70=gmail.com@lists.ozlabs.org>> On Behalf Of CS20 KWLiu
Sent: Wednesday, August 29, 2018 5:44 AM
To: 1450335857@qq.com<mailto:1450335857@qq.com>; eajames@linux.vnet.ibm.com<mailto:eajames@linux.vnet.ibm.com>; ed.tanous@intel.com<mailto:ed.tanous@intel.com>; openbmc@lists.ozlabs.org<mailto:openbmc@lists.ozlabs.org>
Subject: RE: Re:RE: KVM Support?

Hi Xiuzhi:

I think we are using different bases of the openbmc, this patch is really working on my side
Sorry for I cannot find the exact error in your message.

Thanks,
Joseph
From: xiuzhi [mailto:1450335857@qq.com]
Sent: Tuesday, August 28, 2018 6:57 PM
To: Eddie James; Tanous, Ed; CS20 KWLiu; openbmc
Subject: Re:RE: KVM Support?

Hi Joseph, Ed,
  There was an error when I  updated the patches https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/commit/140771b7e898dd5ca8f0364290cce669609088ac<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_meta-2Dopenbmc-2Dnuvoton-2Daddon_commit_140771b7e898dd5ca8f0364290cce669609088ac&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=8SWpZ_B0Z9GOpECKSppJKXXbMTo-hNO0HuXocMRt5n0&e=>

Would you like to give me some suggestions to debug it?
 When I logged in https://<bmc_ip>/#/kvm<https://urldefense.proofpoint.com/v2/url?u=https-3A__-253cbmc-5Fip-253e_-23_kvm&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=2J0BHCud5wpV8zxnLKS_sDp79AfVxVQvJ5Vk3r8dhTc&e=>, The errors read:
"
WebSocket on-close event  app.89eaa0b6e5e9417cb602.js:38:675915
Failed when connecting: Connection closed (code: 1005)  app.89eaa0b6e5e9417cb602.js:38:685584
        RFB.prototype._fail https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:685584<https://urldefense.proofpoint.com/v2/url?u=https-3A__192.168.120.132_app.89eaa0b6e5e9417cb602.js-3A38-3A685584&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=EgJDf5jL_gme8t1tF_wjg1-08xZxvqptSjoW3a8zohU&e=>
        RFB/< https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:676138<https://urldefense.proofpoint.com/v2/url?u=https-3A__192.168.120.132_app.89eaa0b6e5e9417cb602.js-3A38-3A676138&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=dIWffzOhDWjQl-iTTJj_38z606ai7gLJSynBqbAZXW8&e=>
        Websock.prototype.open/this._websocket.onclose< https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:778159<https://urldefense.proofpoint.com/v2/url?u=https-3A__192.168.120.132_app.89eaa0b6e5e9417cb602.js-3A38-3A778159&d=DwMFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kNeU5gwNy2cOhaTMIUoFhUPAXV51uTneHprahPM6I78&m=xFjehOYoJW0EsYnLWkBOLeUtOCSyAFs6UdQuMvfM7y4&s=oJ5yHA_oCl5ihumZXKGL7rDbby1iZ0j2J4hWMLB-hEY&e=>
New state 'disconnecting', was 'connecting'.  app.89eaa0b6e5e9417cb602.js:38:684301
>> RFB.disconnect  app.89eaa0b6e5e9417cb602.js:38:680495
>> Keyboard.allKeysUp  app.89eaa0b6e5e9417cb602.js:38:739659
<< Keyboard.allKeysUp  app.89eaa0b6e5e9417cb602.js:38:739828
"
The line 38 of app.89eaa0b6e5e9417cb602.js is :
void 0!==module&&void 0!==exports&&module.exports===exports&&(module.exports="ui.router"),function(window,angular,undefined){"use strict";var $$UMFP,isDefined=angular.isDefined,isFunction=angular.isFunction,isString=angular.isString,isObject=angular.isObject,isArray=angular.isArray,forEach=angular.forEach,extend=angular.extend,copy=angular.copy,toJson=angular.toJson;function inherit(parent,extra){return extend(new(extend(function(){},{prototype:parent})),extra)}function merge(dst){return forEach(arguments,function(obj){obj!==dst&&forEach(obj,function(value,key){dst.hasOwnProperty(key)||(dst[key]=value)})}),dst}function objectKeys(object){if(Object.keys)return Object.keys(object);var result=[];return forEach(object,function(val,key){result.push(key)}),result}function indexOf(array,value){if(Array.prototype.indexOf)return array.indexOf(value,Number(arguments[2])||0);var len=array.length>>>0,from=Number(arguments[2])||0;for((from=from<0?Math.ceil(from):Math.floor(from))<0&&(from+=len);from<len;from++)if(from in array&&array[from]===value)return from;return-1}function inheritParams(currentParams,newParams,$current,$to) ... ...

Best,
Xiuzhi
>Hi Eddie & Ed:



>Do you have any plan to support non-jpeg video stream in obmc-iKVM?

>It is possible some platforms don't have hardware JPEG engine, instead have the RGB video stream.

>If possible to support RGB video stream, I think it would be better if you can add the video frame differentiation in obmc-iKVM because we don't need to send the full screen >to VNC client on every request, it can reduce the buffer size at least. (libvncserver already has the video frame differentiation)



>Also, I have implemented a KVM application for our platform(nuvoton evb-npcm750) which has hardware video frame differentiation and hardware hextile engine.

https://github.com/Nuvoton-Israel/obmc-ikvm<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_obmc-2Dikvm&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=92D29zgWEhIBYgHR9Q7lkZzREnMSwnqyhl1nEMyqXFM&e=>

https://github.com/Nuvoton-Israel/linux/commit/7e90f572323e56e9425b85aafe86dfa5a35c4e7d<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_linux_commit_7e90f572323e56e9425b85aafe86dfa5a35c4e7d&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=1JBlTPOERz49VFrLgiw014ZnBqab0r8xdRIe6Fee1JA&e=>



>I also enabled ED's KVM webui and added kvmws proxy in python web server.

https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/commit/140771b7e898dd5ca8f0364290cce669609088ac<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Nuvoton-2DIsrael_meta-2Dopenbmc-2Dnuvoton-2Daddon_commit_140771b7e898dd5ca8f0364290cce669609088ac&d=DwMGAw&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=Zir4Lw7xIZbwLjRk7ILcjDyeLfFVQzWjscAv2ZyvXXY&s=8SWpZ_B0Z9GOpECKSppJKXXbMTo-hNO0HuXocMRt5n0&e=>



>If you can spare a few minutes to review my implementation is my pleasure.



>Currently, my video driver is not v4l2, so I am going to redesign it to fit v4l2 and your obmc-iKVM, then I will try to add the RGB format support in your obmc-ikvm.



>Regarding the larger binary size, I think we need to review all configurations of libvncserver and check which functions should be disabled.



>Thanks,

>Joseph Liu.


===========================================================================================
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.


===========================================================================================
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.


===========================================================================================
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

[-- Attachment #2: Type: text/html, Size: 29935 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-08-27 16:24             ` Eddie James
@ 2018-08-30 10:59               ` Avi Fishman
  0 siblings, 0 replies; 26+ messages in thread
From: Avi Fishman @ 2018-08-30 10:59 UTC (permalink / raw)
  To: eajames; +Cc: Ed Tanous, KWLIU, OpenBMC Maillist, uri.trichter, eyal.cohen

On Mon, Aug 27, 2018 at 7:24 PM Eddie James <eajames@linux.vnet.ibm.com> wrote:
>
>
>
> On 08/27/2018 10:59 AM, Tanous, Ed wrote:
> >> Do you have any plan to support non-jpeg video stream in obmc-iKVM?
> > I'm not sure about Eddie, but I don't think we have  a need for non-jpeg kvm.  With that said, everything is just running RFB underneath, so basically anything should be possible that's possible over VNC.
>
> Right, we also don't have any need for non-jpeg at the moment.

note that Nuvoton HW support Hextile compression so this should stay
on the table.

>
> >
> >> It is possible some platforms don't have hardware JPEG engine, instead have
> >> the RGB video stream.
> >> If possible to support RGB video stream, I think it would be better if you can
> >> add the video frame differentiation in obmc-iKVM because we don't need to
> >> send the full screen to VNC client on every request, it can reduce the buffer
> >> size at least. (libvncserver already has the video frame differentiation)
> > While I agree it would be nice, I don't think it's a priority 1 for implementation (at least for us).  Our current AST2500 products send full buffer updates for every frame, and while in theory it's less efficient, we haven't really gotten any complaints.  With that said, if differential mode is available and works well, I'm sure we'd use it.
>
> The problem with differential compression is that you have to do that
> decoding work on the BMC so that you update the right part of the
> framebuffer. I didn't get that working but might be some performance
> concerns there... So same for us, it's not a priority right now.
>
Nuvoton chip does support tiles differerential by HW so for us it
doesn't have a performance effect nor high CPU utilization, so again
this should option should remain.

> >
> >> Also, I have implemented a KVM application for our platform(nuvoton evb-
> >> npcm750) which has hardware video frame differentiation and hardware
> >> hextile engine.
> >> https://github.com/Nuvoton-Israel/obmc-ikvm
> >> https://github.com/Nuvoton-
> >> Israel/linux/commit/7e90f572323e56e9425b85aafe86dfa5a35c4e7d
> >>
> > Cool.
> >
> >> I also enabled ED's KVM webui and added kvmws proxy in python web
> >> server.
> >> https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-
> >> addon/commit/140771b7e898dd5ca8f0364290cce669609088ac
> >>
> > I've got patches for bmcweb as well that I can get posted today.  I was really hoping to have a discussion around how we want to implement the web portion beforehand, but it looks like you've already done a lot of work, which is great.
> >
> >> Regarding the larger binary size, I think we need to review all configurations
> >> of libvncserver and check which functions should be disabled.
> >>
> > I think the most important question here is how small of a binary we can get out of libvncserver, and whether or not we can afford to have an unauthenticated socket open with full control of the host system.
>
> All good points. These aspects haven't been a priority for me yet, and
> I'm really not an expert with security or bmcweb, but definitely worth
> some discussion.

From our point of view it is OK to remove some libvncserver features
like security or so as long as the hextile compression and frames
differential for video stays to be used by our HW acceleration.

>
> Thanks!
> Eddie
>
> >
>


-- 
Regards,
Avi

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-08-24 19:04       ` Tanous, Ed
  2018-08-27  7:09         ` KWLIU
@ 2018-08-27 21:00         ` Eddie James
  1 sibling, 0 replies; 26+ messages in thread
From: Eddie James @ 2018-08-27 21:00 UTC (permalink / raw)
  To: Tanous, Ed, xiuzhi, Alexander A. Filippov, openbmc



On 08/24/2018 02:04 PM, Tanous, Ed wrote:
>> Well, the VNC server (and Video Engine driver) integration is targeted for the
>> OpenBMC release in February 2019. Hopefully in master before then. There
>> is currently no plan or work being done to integrate a viewer into the BMC
>> webui. But patches are certainly welcome in this area! It could be as simple as
>> dropping in a noVNC html file... not sure.
>>
> Not to disagree with you, but there's some work here:

Yep, sorry, was totally lost in IBM timelines. Definitely some good work 
there.

> https://gerrit.openbmc-project.xyz/#/c/openbmc/phosphor-webui/+/10268/
>
> The webui side of it was just a matter of dropping novnc into the webui and routing the websocket back to the BMC.  The BMC side of it, implementing appropriate security on the websocket, and some other cleanup is on my back burner.  I'm at a bit of a crossroads, and I have two thoughts on how to proceed.
>
> 1. Rejigger the existing VNC kvm websocket implementation here to update to the new driver API, and delete all the JPEG to bitmap decoding code.  This solution essentially runs a websocket-only VNC server inside bmcweb.https://github.com/openbmc/bmcweb/blob/master/include/web_kvm.hpp
> Pros:
> A. Smaller overall binary size.  Libvncserver supports a lot of things that I suspect openbmc will never need to.  For example, the password authentication mechanisms for VNC/RFB protocol are woefully out of date by modern standards, so I suspect there's no sense in having that code at all.
> B. Better security.  There is no VNC port that could be abused/ported to get access to the KVM session.  The websocket authentication and authorization infrastructure uses the same mechanisms as the rest of the webserver, so it reduces the attack surface.  Said another way, it's unlikely an attack on bmcweb would be able to target the VNC server specifically.
> C. Fewer framebuffer copies compared to a websocket proxy (at least in theory).  It is one fewer trip of the large framebuffers through userspace, which should save us some copies.  At some point in the future if we got the Linux TLS subsystem going, we could likely build a no-copy, or single copy framebuffer solution, which should net us some performance by essentially keeping the buffers in the kernel.
>
> Cons:
> A. It needs to be written.  Hopefully the changes should be mostly deletes, and regiggering to pull framebuffers from the driver.  Keyboard and mouse would need to be hooked up to the gadget driver using the example from obmc-kvm.
> B. It is a specific solution for openbmc, so it's unlikely to have much utility outside of the project.  Contributing to libvncserver "gives back" more to the open source community.
>
> 2. Use bmcweb as a websocket proxy to obmc-kvm server in a very similar way to how we proxy to obmc-console.
> Pros:
> A. Gives us full compatibility with standard socket VNC, which could be useful for debugging purposes.  I wouldn't recommend enabling it in practice without some other kind of authentication and encryption pipeline ahead of it.
> B. The work to do this should be relatively minimal.  It should be essentially a copy-paste of the obmc-console socket code, a little debugging, and it should be mostly good to go.
>
> Cons:
> A. Larger binary size.  I need to get more exact numbers here, but adding a relatively large library (libvncserver) and another application (obmc-kvm) seems unlikely to be good for our flash usage.  As is, we're already pushing the limits of a 32MB flash.
> b. Extra framebuffer copies.  Driver -> obmc-kvm -> bmcweb(with TLS)  -> browser  in theory is at least one extra copy.  It would be interesting to set up both in practice.
> 	
> 3. Some other option that I'm missing?

Well, I created an openbmc/obmc-ikvm repo today and got the source on 
gerrit, as a standalone VNC server that uses libvncserver.

https://gerrit.openbmc-project.xyz/#/c/openbmc/obmc-ikvm/+/12126/

Wrote all that last week before this thread popped up... certainly open 
to changing directions. After hearing more about image size issues 
lately, option (1) sounds nice...

One possibility would be to extend obmc-ikvm to be able to be built as a 
shared library, and then can link that from bmcweb, possibly with or 
without libvncserver if only the video/input parts are built I suppose. 
Of course it could be built standalone as well for people who want that.

Thanks,
Eddie

>
> I'm very interested in what the community thinks here.  Is there a use case for having the standalone vncserver?
>
> -Ed
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-08-27 15:59           ` Tanous, Ed
@ 2018-08-27 16:24             ` Eddie James
  2018-08-30 10:59               ` Avi Fishman
  0 siblings, 1 reply; 26+ messages in thread
From: Eddie James @ 2018-08-27 16:24 UTC (permalink / raw)
  To: Tanous, Ed, KWLIU, openbmc



On 08/27/2018 10:59 AM, Tanous, Ed wrote:
>> Do you have any plan to support non-jpeg video stream in obmc-iKVM?	
> I'm not sure about Eddie, but I don't think we have  a need for non-jpeg kvm.  With that said, everything is just running RFB underneath, so basically anything should be possible that's possible over VNC.

Right, we also don't have any need for non-jpeg at the moment.

>
>> It is possible some platforms don't have hardware JPEG engine, instead have
>> the RGB video stream.
>> If possible to support RGB video stream, I think it would be better if you can
>> add the video frame differentiation in obmc-iKVM because we don't need to
>> send the full screen to VNC client on every request, it can reduce the buffer
>> size at least. (libvncserver already has the video frame differentiation)
> While I agree it would be nice, I don't think it's a priority 1 for implementation (at least for us).  Our current AST2500 products send full buffer updates for every frame, and while in theory it's less efficient, we haven't really gotten any complaints.  With that said, if differential mode is available and works well, I'm sure we'd use it.

The problem with differential compression is that you have to do that 
decoding work on the BMC so that you update the right part of the 
framebuffer. I didn't get that working but might be some performance 
concerns there... So same for us, it's not a priority right now.

>
>> Also, I have implemented a KVM application for our platform(nuvoton evb-
>> npcm750) which has hardware video frame differentiation and hardware
>> hextile engine.
>> https://github.com/Nuvoton-Israel/obmc-ikvm
>> https://github.com/Nuvoton-
>> Israel/linux/commit/7e90f572323e56e9425b85aafe86dfa5a35c4e7d
>>
> Cool.
>
>> I also enabled ED's KVM webui and added kvmws proxy in python web
>> server.
>> https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-
>> addon/commit/140771b7e898dd5ca8f0364290cce669609088ac
>>
> I've got patches for bmcweb as well that I can get posted today.  I was really hoping to have a discussion around how we want to implement the web portion beforehand, but it looks like you've already done a lot of work, which is great.
>
>> Regarding the larger binary size, I think we need to review all configurations
>> of libvncserver and check which functions should be disabled.
>>
> I think the most important question here is how small of a binary we can get out of libvncserver, and whether or not we can afford to have an unauthenticated socket open with full control of the host system.

All good points. These aspects haven't been a priority for me yet, and 
I'm really not an expert with security or bmcweb, but definitely worth 
some discussion.

Thanks!
Eddie

>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: KVM Support?
  2018-08-27  7:09         ` KWLIU
@ 2018-08-27 15:59           ` Tanous, Ed
  2018-08-27 16:24             ` Eddie James
  0 siblings, 1 reply; 26+ messages in thread
From: Tanous, Ed @ 2018-08-27 15:59 UTC (permalink / raw)
  To: KWLIU, eajames, openbmc

> 
> Do you have any plan to support non-jpeg video stream in obmc-iKVM?	
I'm not sure about Eddie, but I don't think we have  a need for non-jpeg kvm.  With that said, everything is just running RFB underneath, so basically anything should be possible that's possible over VNC.

> It is possible some platforms don't have hardware JPEG engine, instead have
> the RGB video stream.
> If possible to support RGB video stream, I think it would be better if you can
> add the video frame differentiation in obmc-iKVM because we don't need to
> send the full screen to VNC client on every request, it can reduce the buffer
> size at least. (libvncserver already has the video frame differentiation)

While I agree it would be nice, I don't think it's a priority 1 for implementation (at least for us).  Our current AST2500 products send full buffer updates for every frame, and while in theory it's less efficient, we haven't really gotten any complaints.  With that said, if differential mode is available and works well, I'm sure we'd use it.

> 
> Also, I have implemented a KVM application for our platform(nuvoton evb-
> npcm750) which has hardware video frame differentiation and hardware
> hextile engine.
> https://github.com/Nuvoton-Israel/obmc-ikvm
> https://github.com/Nuvoton-
> Israel/linux/commit/7e90f572323e56e9425b85aafe86dfa5a35c4e7d
> 
Cool.

> I also enabled ED's KVM webui and added kvmws proxy in python web
> server.
> https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-
> addon/commit/140771b7e898dd5ca8f0364290cce669609088ac
> 

I've got patches for bmcweb as well that I can get posted today.  I was really hoping to have a discussion around how we want to implement the web portion beforehand, but it looks like you've already done a lot of work, which is great.

> 
> Regarding the larger binary size, I think we need to review all configurations
> of libvncserver and check which functions should be disabled.
> 
I think the most important question here is how small of a binary we can get out of libvncserver, and whether or not we can afford to have an unauthenticated socket open with full control of the host system.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: KVM Support?
  2018-08-24 19:04       ` Tanous, Ed
@ 2018-08-27  7:09         ` KWLIU
  2018-08-27 15:59           ` Tanous, Ed
  2018-08-27 21:00         ` Eddie James
  1 sibling, 1 reply; 26+ messages in thread
From: KWLIU @ 2018-08-27  7:09 UTC (permalink / raw)
  To: ed.tanous, eajames, openbmc

Hi Eddie & Ed:

Do you have any plan to support non-jpeg video stream in obmc-iKVM?
It is possible some platforms don't have hardware JPEG engine, instead have the RGB video stream.
If possible to support RGB video stream, I think it would be better if you can add the video frame differentiation in obmc-iKVM because we don't need to send the full screen to VNC client on every request, it can reduce the buffer size at least. (libvncserver already has the video frame differentiation)

Also, I have implemented a KVM application for our platform(nuvoton evb-npcm750) which has hardware video frame differentiation and hardware hextile engine.
https://github.com/Nuvoton-Israel/obmc-ikvm
https://github.com/Nuvoton-Israel/linux/commit/7e90f572323e56e9425b85aafe86dfa5a35c4e7d

I also enabled ED's KVM webui and added kvmws proxy in python web server.
https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/commit/140771b7e898dd5ca8f0364290cce669609088ac

If you can spare a few minutes to review my implementation is my pleasure.

Currently, my video driver is not v4l2, so I am going to redesign it to fit v4l2 and your obmc-iKVM, then I will try to add the RGB format support in your obmc-ikvm.

Regarding the larger binary size, I think we need to review all configurations of libvncserver and check which functions should be disabled.

Thanks,
Joseph Liu.
-----Original Message-----
From: openbmc [mailto:openbmc-bounces+kwliu=nuvoton.com@lists.ozlabs.org] On Behalf Of Tanous, Ed
Sent: Saturday, August 25, 2018 3:04 AM
To: Eddie James; xiuzhi; Alexander A. Filippov; openbmc
Subject: RE: KVM Support?

>
> Well, the VNC server (and Video Engine driver) integration is targeted
> for the OpenBMC release in February 2019. Hopefully in master before
> then. There is currently no plan or work being done to integrate a
> viewer into the BMC webui. But patches are certainly welcome in this
> area! It could be as simple as dropping in a noVNC html file... not sure.
>

Not to disagree with you, but there's some work here:

https://urldefense.proofpoint.com/v2/url?u=https-3A__gerrit.openbmc-2Dproject.xyz_-23_c_openbmc_phosphor-2Dwebui_-2B_10268_&d=DwIFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=uAK69sfPRejBDLMlDDz55S4bZYC4CDdn36duJicj1Ng&s=D17B6-0jST399fiaUbHLhWtx-Igita5vNYzRA-bGBmA&e=

The webui side of it was just a matter of dropping novnc into the webui and routing the websocket back to the BMC.  The BMC side of it, implementing appropriate security on the websocket, and some other cleanup is on my back burner.  I'm at a bit of a crossroads, and I have two thoughts on how to proceed.

1. Rejigger the existing VNC kvm websocket implementation here to update to the new driver API, and delete all the JPEG to bitmap decoding code.  This solution essentially runs a websocket-only VNC server inside bmcweb. https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openbmc_bmcweb_blob_master_include_web-5Fkvm.hpp&d=DwIFAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=7g2D1XDc1ET3CnY1ySnaWQXPxPxfpLww1MiDbLW4v8Q&m=uAK69sfPRejBDLMlDDz55S4bZYC4CDdn36duJicj1Ng&s=xlRipubKg7lXeC_KC_BlSZlCzxEljFoG1AL8mGRzQig&e=
Pros:
A. Smaller overall binary size.  Libvncserver supports a lot of things that I suspect openbmc will never need to.  For example, the password authentication mechanisms for VNC/RFB protocol are woefully out of date by modern standards, so I suspect there's no sense in having that code at all.
B. Better security.  There is no VNC port that could be abused/ported to get access to the KVM session.  The websocket authentication and authorization infrastructure uses the same mechanisms as the rest of the webserver, so it reduces the attack surface.  Said another way, it's unlikely an attack on bmcweb would be able to target the VNC server specifically.
C. Fewer framebuffer copies compared to a websocket proxy (at least in theory).  It is one fewer trip of the large framebuffers through userspace, which should save us some copies.  At some point in the future if we got the Linux TLS subsystem going, we could likely build a no-copy, or single copy framebuffer solution, which should net us some performance by essentially keeping the buffers in the kernel.

Cons:
A. It needs to be written.  Hopefully the changes should be mostly deletes, and regiggering to pull framebuffers from the driver.  Keyboard and mouse would need to be hooked up to the gadget driver using the example from obmc-kvm.
B. It is a specific solution for openbmc, so it's unlikely to have much utility outside of the project.  Contributing to libvncserver "gives back" more to the open source community.

2. Use bmcweb as a websocket proxy to obmc-kvm server in a very similar way to how we proxy to obmc-console.
Pros:
A. Gives us full compatibility with standard socket VNC, which could be useful for debugging purposes.  I wouldn't recommend enabling it in practice without some other kind of authentication and encryption pipeline ahead of it.
B. The work to do this should be relatively minimal.  It should be essentially a copy-paste of the obmc-console socket code, a little debugging, and it should be mostly good to go.

Cons:
A. Larger binary size.  I need to get more exact numbers here, but adding a relatively large library (libvncserver) and another application (obmc-kvm) seems unlikely to be good for our flash usage.  As is, we're already pushing the limits of a 32MB flash.
b. Extra framebuffer copies.  Driver -> obmc-kvm -> bmcweb(with TLS)  -> browser  in theory is at least one extra copy.  It would be interesting to set up both in practice.

3. Some other option that I'm missing?

I'm very interested in what the community thinks here.  Is there a use case for having the standalone vncserver?

-Ed


===========================================================================================
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: KVM Support?
  2018-08-24 14:46     ` Eddie James
@ 2018-08-24 19:04       ` Tanous, Ed
  2018-08-27  7:09         ` KWLIU
  2018-08-27 21:00         ` Eddie James
  2018-10-11 10:51       ` =?gb18030?B?eGl1emhp?=
  1 sibling, 2 replies; 26+ messages in thread
From: Tanous, Ed @ 2018-08-24 19:04 UTC (permalink / raw)
  To: Eddie James, xiuzhi, Alexander A. Filippov, openbmc

> 
> Well, the VNC server (and Video Engine driver) integration is targeted for the
> OpenBMC release in February 2019. Hopefully in master before then. There
> is currently no plan or work being done to integrate a viewer into the BMC
> webui. But patches are certainly welcome in this area! It could be as simple as
> dropping in a noVNC html file... not sure.
> 

Not to disagree with you, but there's some work here:

https://gerrit.openbmc-project.xyz/#/c/openbmc/phosphor-webui/+/10268/

The webui side of it was just a matter of dropping novnc into the webui and routing the websocket back to the BMC.  The BMC side of it, implementing appropriate security on the websocket, and some other cleanup is on my back burner.  I'm at a bit of a crossroads, and I have two thoughts on how to proceed.

1. Rejigger the existing VNC kvm websocket implementation here to update to the new driver API, and delete all the JPEG to bitmap decoding code.  This solution essentially runs a websocket-only VNC server inside bmcweb. https://github.com/openbmc/bmcweb/blob/master/include/web_kvm.hpp
Pros:
A. Smaller overall binary size.  Libvncserver supports a lot of things that I suspect openbmc will never need to.  For example, the password authentication mechanisms for VNC/RFB protocol are woefully out of date by modern standards, so I suspect there's no sense in having that code at all.
B. Better security.  There is no VNC port that could be abused/ported to get access to the KVM session.  The websocket authentication and authorization infrastructure uses the same mechanisms as the rest of the webserver, so it reduces the attack surface.  Said another way, it's unlikely an attack on bmcweb would be able to target the VNC server specifically.
C. Fewer framebuffer copies compared to a websocket proxy (at least in theory).  It is one fewer trip of the large framebuffers through userspace, which should save us some copies.  At some point in the future if we got the Linux TLS subsystem going, we could likely build a no-copy, or single copy framebuffer solution, which should net us some performance by essentially keeping the buffers in the kernel.

Cons:
A. It needs to be written.  Hopefully the changes should be mostly deletes, and regiggering to pull framebuffers from the driver.  Keyboard and mouse would need to be hooked up to the gadget driver using the example from obmc-kvm.
B. It is a specific solution for openbmc, so it's unlikely to have much utility outside of the project.  Contributing to libvncserver "gives back" more to the open source community.

2. Use bmcweb as a websocket proxy to obmc-kvm server in a very similar way to how we proxy to obmc-console.
Pros:
A. Gives us full compatibility with standard socket VNC, which could be useful for debugging purposes.  I wouldn't recommend enabling it in practice without some other kind of authentication and encryption pipeline ahead of it.
B. The work to do this should be relatively minimal.  It should be essentially a copy-paste of the obmc-console socket code, a little debugging, and it should be mostly good to go.

Cons:
A. Larger binary size.  I need to get more exact numbers here, but adding a relatively large library (libvncserver) and another application (obmc-kvm) seems unlikely to be good for our flash usage.  As is, we're already pushing the limits of a 32MB flash.
b. Extra framebuffer copies.  Driver -> obmc-kvm -> bmcweb(with TLS)  -> browser  in theory is at least one extra copy.  It would be interesting to set up both in practice.
	
3. Some other option that I'm missing?

I'm very interested in what the community thinks here.  Is there a use case for having the standalone vncserver?

-Ed

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-08-24  1:06   ` =?gb18030?B?eGl1emhp?=
@ 2018-08-24 14:46     ` Eddie James
  2018-08-24 19:04       ` Tanous, Ed
  2018-10-11 10:51       ` =?gb18030?B?eGl1emhp?=
  0 siblings, 2 replies; 26+ messages in thread
From: Eddie James @ 2018-08-24 14:46 UTC (permalink / raw)
  To: xiuzhi, Alexander A. Filippov, openbmc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030; format=flowed, Size: 20016 bytes --]



On 08/23/2018 08:06 PM, xiuzhi wrote:
> Hi Eddie,
> Is there a schedule for integrating one vnc viewer to phosphor webui ?

Hi Xiuzhi,

Well, the VNC server (and Video Engine driver) integration is targeted 
for the OpenBMC release in February 2019. Hopefully in master before 
then. There is currently no plan or work being done to integrate a 
viewer into the BMC webui. But patches are certainly welcome in this 
area! It could be as simple as dropping in a noVNC html file... not sure.

And thanks for the help on AST2400!

Eddie

> Best,
> Xiuzhi
>
>
>
> On 08/14/2018 01:39 AM, xiuzhi wrote:
> > Hi Eddie,
> > 0„2 0„2The video-dev2 can work on AST2400, the tightvnc connect to BMC
> > vncserver stably when the host cpu run centos GUI.
> > Two issues was found in testing process .
> > 1, The obmc-ikvm will stop connection when host server window flush
> > from one to next0„2 on BIOS or kernel booting process.
> > The error log on AST2400 is :
> > 18/07/2018 13:37:32 Listening for VNC connections on TCP port 5900
> > 18/07/2018 13:37:32 Listening for VNC connections on TCP6 port 5900
> > [11704.151172] aspeed-video 1e700000.video: resolution changed; 
> resetting
> > [11704.888188] aspeed-video 1e700000.video: resolution changed; 
> resetting
> > [11705.613868] aspeed-video 1e700000.video: invalid resolution detected
> > [11705.620421] aspeed-video 1e700000.video: resolution changed;
> > couldn't get new resolution
>
> OK, I noticed a similar issue on AST2500 when immediately detecting
> resolution after mode change. I added a delay, but it probably needs to
> be longer on AST2400... Also, most client's don't handle server-side
> resize, so usually the window will close and you'll have to re-open
> anyway I think, if the size is changing.
>
> Thanks,
> Eddie
>
> >
> >
> > 2, The VNC Viewer can not connect to bmc server.
> > The error on VNC Viewer client is :
> > "0„2 0„2Attempting to reconnect to VNC Server ...
> > 0„2 0„2RFB protocol error:unknown rect encoding 7
> > "
> >
> > The error log0„2 on BMC is :
> > 18/07/2018 14:03:18 Got connection from client 192.168.120.58
> > 18/07/2018 14:03:180„2 0„2other clients:
> > 18/07/2018 14:03:18 Normal socket connection
> > 18/07/2018 14:03:18 Client Protocol Version 3.8
> > 18/07/2018 14:03:18 Protocol version sent 3.8, using 3.8
> > 18/07/2018 14:03:18 rfbProcessClientSecurityType: executing handler
> > for type 1
> > 18/07/2018 14:03:18 rfbProcessClientSecurityType: returning
> > securityResult for client rfb version >= 3.8
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000018)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000016)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000015)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x0000000F)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0xFFFFFEC6)
> > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Using ZRLE encoding for client 192.168.120.58
> > 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> > 18/07/2018 14:03:180„2 0„28 bpp, depth 6
> > 18/07/2018 14:03:180„2 0„2true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000018)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000016)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000015)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x0000000F)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0xFFFFFEC6)
> > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Switching from ZRLE to raw Encoding for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000018)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000016)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x00000015)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0x0000000F)
> > 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring
> > unsupported encoding type Enc(0xFFFFFEC6)
> > 18/07/2018 14:03:18 Enabling full-color cursor updates for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Switching from raw to ZRLE Encoding for client
> > 192.168.120.58
> > 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> > 18/07/2018 14:03:180„2 0„232 bpp, depth 24, little endian
> > 18/07/2018 14:03:180„2 0„2true colour: max r 255 g 255 b 255, shift r 16 g
> > 8 b 0
> > 18/07/2018 14:03:19 rfbProcessClientNormalMessage: read: Connection
> > reset by peer
> > 18/07/2018 14:03:19 Client 192.168.120.58 gone
> > 18/07/2018 14:03:19 Statistics0„2 0„2 0„2 0„2 0„2 0„2 0„2events Transmit/ RawEquiv (
> > saved)
> > 18/07/2018 14:03:190„2 FramebufferUpdate0„2 0„2:0„2 0„2 0„2 3 | 0„20/ 0„2 0„2 0 (0„2 0.0%)
> > 18/07/2018 14:03:190„2 tight0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2:0„2 0„2 0„2 1 | 0„233807/0„2 3145740 (
> > 98.9%)
> > 18/07/2018 14:03:190„2 raw0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2:0„2 0„2 0„2 1 | 0„216396/0„2 0„2 16396
> > (0„2 0.0%)
> > 18/07/2018 14:03:190„2 ZRLE0„2 0„2 0„2 0„2 0„2 0„2 0„2 0„2 :0„2 0„2 0„2 2 | 62/ 3932160 (100.0%)
> > 18/07/2018 14:03:190„2 RichCursor0„2 0„2 0„2 0„2 0„2 :0„2 0„2 0„2 3 | 0„2429/ 0„2 0„2 429 (
> > 0.0%)
> > 18/07/2018 14:03:190„2 TOTALS0„2 0„2 0„2 0„2 0„2 0„2 0„2 :0„2 0„2 0„210 | 0„250694/0„2 7094725 (
> > 99.3%)
> > 18/07/2018 14:03:19 Statistics0„2 0„2 0„2 0„2 0„2 0„2 0„2events Received/ RawEquiv (
> > saved)
> > 18/07/2018 14:03:190„2 FramebufferUpdate0„2 0„2:0„2 0„2 0„2 4 | 40/ 0„2 0„240 (0„2 0.0%)
> > 18/07/2018 14:03:190„2 SetPixelFormat0„2 0„2 0„2 :0„2 0„2 0„2 2 | 40/ 0„2 0„240 (0„2 0.0%)
> > 18/07/2018 14:03:190„2 SetEncodings0„2 0„2 0„2 0„2 :0„2 0„2 0„2 3 | 0„2168/ 0„2 0„2 168 (
> > 0.0%)
> > 18/07/2018 14:03:190„2 TOTALS0„2 0„2 0„2 0„2 0„2 0„2 0„2 :0„2 0„2 0„2 9 | 0„2248/ 0„2 0„2 248 (
> > 0.0%)
> >
> > Best,
> > Xiuzhi
> > Hi Eddie,
> > 0„2 0„2Very good work!
> > 0„2 The video-dev2 works on AST2400 now, I will do more test.
> > Thanks,
> > Xiuzhi
> > On 08/10/2018 10:00 AM, Eddie James wrote:
> > >
> > >
> > > On 08/10/2018 06:14 AM, xiuzhi wrote:
> > >> Hi Eddie,
> > >> 0„2 0„2I tested the new update source of video-dev on AST2400 and
> > >> AST2500. It works on AST2500.
> > >> 0„2On AST2400£¬the vncviewer can connect vncserver sucessful, but its
> > >> window was blank,0„2 not shown any information of the host screen .
> > >> Would you like to give me some advice or instruments on how to 0„2debug
> > >> this issue?
> >
> > Hey, I also just pushed a new branch to my github with some
> > simplifications to the driver... It no longer uses the auto mode and may
> > work better on AST2400... I don't have any AST2400 to test on, but let
> > me know if you have any luck:
> >
> > https://github.com/eddiejames/linux/commits/video-dev2
> >
> > Thanks,
> > Eddie
> >
> > >
> > > Hi,
> > >
> > > You could try enabling the debug tracing, if dynamic debug is enabled
> > > on your kernel. (CONFIG_DYNAMIC_DEBUG)
> > >
> > > echo file aspeed-video.c +p > /sys/kernel/debug/dynamic_debug/control
> > >
> > > That should print every register access, as well as some other info.
> > >
> > > Thanks,
> > > Eddie
> > >
> > >> Hi,
> > >>
> > >> There are some differences with the video engine between the
> > AST2400 and
> > >> AST2500 that I haven't addressed yet, so probably the driver is not
> > >> working correctly on the AST2400 yet. Some registers have 
> different bit
> > >> mapping, and things like that. Sorry about that... thanks for 
> trying it
> > >> out! I'll look at the changes needed for AST2400 next.
> > >>
> > >> Thanks,
> > >>
> > >> Eddie
> > >>
> > >>
> > >> On 08/01/2018 03:47 AM, xiuzhi wrote:
> > >> > Hi Eddie,
> > >> > 0„2 Now It works, but the vncviewer can not connect the BMC server
> > >> > successful.
> > >> > When I use vncviewer connect to the BMC the error read:
> > >> > "RFB protocol error: bad desktop size 0x1"
> > >> > "RFB protocol error: unknow rect encoding 7"
> > >> > The information on BMC are :
> > >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > >> > frame buffer size: 3145728
> > >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP port 5900
> > >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP6 port 5900
> > >> >
> > >> > 19/07/2018 08:52:08 Got connection from client 192.168.120.58
> > >> > 19/07/2018 08:52:08 0„2 other clients:
> > >> > 19/07/2018 08:52:08 Normal socket connection
> > >> > 19/07/2018 08:52:08 Client Protocol Version 3.8
> > >> > 19/07/2018 08:52:08 Protocol version sent 3.8, using 3.8
> > >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: executing handler
> > >> > for type 1
> > >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: returning
> > >> > securityResult for client rfb version >= 3.8
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000018)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000016)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000015)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x0000000F)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for 
> client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Using ZRLE encoding for client 192.168.120.58
> > >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> > >> > 19/07/2018 08:52:08 0„2 8 bpp, depth 6
> > >> > 19/07/2018 08:52:08 0„2 true colour: max r 3 g 3 b 3, shift r 4 g 
> 2 b 0
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000018)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000016)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000015)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x0000000F)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for 
> client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Switching from ZRLE to raw Encoding for client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000018)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000016)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x00000015)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0x0000000F)
> > >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> > >> > unsupported encoding type Enc(0xFFFFFEC6)
> > >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for 
> client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Switching from raw to ZRLE Encoding for client
> > >> > 192.168.120.58
> > >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> > >> > 19/07/2018 08:52:08 0„2 32 bpp, depth 24, little endian
> > >> > 19/07/2018 08:52:08 0„2 true colour: max r 255 g 255 b 255, shift r
> > 16 g
> > >> > 8 b 0
> > >> > [ 6928.751385] aspeed-video 1e700000.video: disabling comp 
> ready irq,
> > >> > seq_ctrl[000500a8]
> > >> > 19/07/2018 08:52:09 rfbProcessClientNormalMessage: read: Connection
> > >> > reset by peer
> > >> > 19/07/2018 08:52:09 Client 192.168.120.58 gone
> > >> > 19/07/2018 08:52:09 Statistics events Transmit/
> > >> > RawEquiv ( saved)
> > >> > 19/07/2018 08:52:090„2 FramebufferUpdate 0„2 : 0„2 3 | 0/0„20„20„20„20„2 0„2 0 (
> > >> 0.0%)
> > >> > 19/07/2018 08:52:090„2 tight0„20„20„20„20„20„20„20„20„20„20„20„2 0„2 : 0„2 1 | 30991/ 3145740
> > >> > ( 99.0%)
> > >> > 19/07/2018 08:52:090„2 raw0„20„20„20„20„20„20„20„20„20„20„20„20„20„2 0„2 : 0„2 1 | 16396/ 16396
> > >> > (0„2 0.0%)
> > >> > 19/07/2018 08:52:090„2 ZRLE0„20„20„20„20„20„20„20„20„20„20„20„20„2 0„2 : 0„2 2 | 62/ 3932160
> > >> > (100.0%)
> > >> > 19/07/2018 08:52:090„2 RichCursor0„20„20„20„20„20„20„2 0„2 : 0„2 3 | 429/0„20„20„2 0„2 429
> > >> (0„2 0.0%)
> > >> > 19/07/2018 08:52:090„2 TOTALS0„20„20„20„20„20„20„20„20„20„20„2 0„2 : 0„2 10 | 47878/ 7094725
> > >> > ( 99.3%)
> > >> > 19/07/2018 08:52:09 Statistics events Received/
> > >> > RawEquiv ( saved)
> > >> > 19/07/2018 08:52:090„2 FramebufferUpdate 0„2 : 0„2 4 | 40/0„20„20„20„2 0„2 40 (
> > >> 0.0%)
> > >> > 19/07/2018 08:52:090„2 SetPixelFormat0„20„20„2 0„2 : 0„2 2 | 40/0„20„20„20„2 0„2 40 (
> > >> 0.0%)
> > >> > 19/07/2018 08:52:090„2 SetEncodings0„20„20„20„20„2 0„2 : 0„2 3 | 168/0„20„20„2 0„2 168
> > >> (0„2 0.0%)
> > >> > 19/07/2018 08:52:090„2 TOTALS0„20„20„20„20„20„20„20„20„20„20„2 0„2 : 0„2 9 | 248/0„20„20„2 0„2 248
> > >> (0„2 0.0%)
> > >> >
> > >> > What wrong with it?
> > >> > BTW, vncview download from
> > >> > https://www.realvnc.com/en/connect/download/viewer/linux/
> > >> > I also got the same error using Tightvnc viewer
> > >> > Thanks,
> > >> > xiuzhi
> > >> > Hi Eddie,
> > >> > 0„20„2 My bmc is AST2400, I modified the aspeed-g4.dtsi(adding gfx:
> > >> > display@1e6e60000„2 and0„2 video: video@1e700000)
> > >> > 0„2and the aspeed-bmc-opp-xxx.dts (adding &video &vhub) .
> > >> > An error occured when I executed the following instructions:
> > >> >
> > >> > root@zhaoxinc:~# create_usbhid.sh
> > >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > >> > [0„2 125.586061] aspeed-video 1e700000.video: timed out on 1st mode
> > >> detect
> > >> > [0„2 125.602732] aspeed-video 1e700000.video: Failed to start video
> > >> engine
> > >> > failed to open /dev/video0: 62 Timer expired
> > >> > Need I modify drivers/media/platform/aspeed-video.c or any other
> > >> files?
> > >> >
> > >> > 0„2Thanks ,
> > >> > Xiuzhi
> > >> > On 07/31/2018 01:52 AM, xiuzhi wrote:
> > >> > > Hi Alexander ,Eddie,
> > >> > > 0„2 I merged the source from
> > >> > > 
> https://gerrit.openbmc-project.xyz/#/c/openbmc/openbmc/+/11500/,and
> > >> > > kernel branch video-dev.
> > >> > > How to test the video kvm feature by phosphor-webui or command
> > line?
> > >> >
> > >> > Hi,
> > >> >
> > >> > You need to make sure the video device is enabled in your 
> device-tree
> > >> > for the machine you use... My kernel patch enabled it for our 
> AST2500
> > >> > witherspoon system. If you're using AST2500 as well, then you just
> > >> need
> > >> > something like:
> > >> >
> > >> > &video {
> > >> > 0„20„2 0„2 status = "okay";
> > >> > 0„20„2 0„2 memory-region = <&gfx_memory>;
> > >> > };
> > >> >
> > >> > And the virtual USB hub:
> > >> > &vhub {
> > >> > 0„20„2 0„2 status = "okay";
> > >> > };
> > >> >
> > >> > If you're not using AST2500, you'll need more changes to 
> device-tree.
> > >> >
> > >> > Then on the BMC command line:
> > >> > create_usbhid.sh
> > >> > obmc-ikvm -v /dev/video0 -i /dev/hidg0
> > >> > And connect with any VNC client to port 0 of your BMC IP.
> > >> >
> > >> > Thanks,
> > >> > Eddie
> > >> >
> > >> > > Best,
> > >> > > xiuzhi
> > >> > >
> > >> > >
> > >> > > ------------------ ԭʼÓʼþ ------------------
> > >> > > *·¢¼þÈË:* "Alexander A. Filippov"<a.filippov@yadro.com>;
> > >> > > *·¢ËÍʱ¼ä:* 2018Äê7ÔÂ25ÈÕ(ÐÇÆÚÈý) ÏÂÎç4:56
> > >> > > *ÊÕ¼þÈË:*
> > >> > "openbmc"<openbmc@lists.ozlabs.org>;"xiuzhi"<1450335857@qq.com>;
> > >> > > *Ö÷Ìâ:* Re: KVM Support?
> > >> > >
> > >> > > Hello everybody,
> > >> > >
> > >> > > Could you check the size of
> > >> > >
> > >> >
> > >>
> > 
> `build/tmp/deploy/image/<platformname>/fitImage-openbmc-phosphor-initramfs-*.bin`?
> > >> > > If it exceeds 4456448 (0x440000) bytes, this is the problem
> > >> described
> > >> > > at https://github.com/openbmc/openbmc/issues/3314
> > >> > >
> > >> > >
> > >> > > In this case you should modify flash partitions layout or 
> trying to
> > >> > > decrease kernel size.
> > >> > >
> > >> > > --
> > >> > > Alexander
> > >> > >
> > >> > > On Wed, Jul 25, 2018 at 03:48:04PM +0800, xiuzhi wrote:
> > >> > > > Hi Eddie,
> > >> > > >
> > >> > > >
> > >> > > > 0„2 I read your KVM Support email on mailinglist.
> > >> > > >
> > >> > > >
> > >> > > > I am going to port the BMC kvm to ast2400 . The u-boot can not
> > >> load
> > >> > > kernel ,the error message read:
> > >> > > >
> > >> > > >
> > >> > > > ""U-Boot 2016.07 (Jul 23 2018 - 11:11:50 +0000)
> > >> > > >
> > >> > > >
> > >> > > > DRAM:0„2 240 MiB
> > >> > > > WARNING: Caches not enabled
> > >> > > > Flash: 32 MiB
> > >> > > > *** Warning - bad CRC, using default environment
> > >> > > >
> > >> > > >
> > >> > > > In:0„2 0„2 serial
> > >> > > > Out: 0„2 serial
> > >> > > > Err: 0„2 serial
> > >> > > > Net: 0„2 aspeednic#0
> > >> > > > Error: aspeednic#0 address not set.
> > >> > > >
> > >> > > >
> > >> > > > Hit any key to stop autoboot:0„2 0
> > >> > > > ## Loading kernel from FIT Image at 20080000 ...
> > >> > > > Bad FIT kernel image format!
> > >> > > > ERROR: can't get kernel image!
> > >> > > > ast#
> > >> > > >
> > >> > > >
> > >> > > > I added0„2 config options to defconfig of ast2400 as follows:
> > >> > > >
> > >> > > >
> > >> > > > CONFIG_MEDIA_SUPPORT=y
> > >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> > >> > > > CONFIG_MEDIA_SUPPORT=y
> > >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> > >> > > > # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
> > >> > > > # CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
> > >> > > > # CONFIG_MEDIA_RADIO_SUPPORT is not set
> > >> > > > # CONFIG_MEDIA_SDR_SUPPORT is not set
> > >> > > > # CONFIG_MEDIA_CEC_SUPPORT is not set
> > >> > > > # CONFIG_MEDIA_CONTROLLER is not set
> > >> > > > CONFIG_RATIONAL=y
> > >> > > > CONFIG_VIDEO_DEV=y
> > >> > > > CONFIG_VIDEO_V4L2=y
> > >> > > > CONFIG_V4L_PLATFORM_DRIVERS=y
> > >> > > > CONFIG_VIDEO_ASPEED=y
> > >> > > > CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
> > >> > > >
> > >> > > >
> > >> > > > Need I modify the aspeed-bmc-opp-palmetto.dts and 
> aspeed-g4.dtsi?
> > >> > > >
> > >> > > >
> > >> > > > Can you give me the file list need to modify?
> > >> > > >
> > >> > > >
> > >> > > > Thanks,
> > >> > > >
> > >> > > >
> > >> > > > xiuzhi
> > >

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re:  KVM Support?
  2018-08-15 13:05 ` 回复: 回复: 回复: 回复: KVM Support? Eddie James
@ 2018-08-24  1:06   ` =?gb18030?B?eGl1emhp?=
  2018-08-24 14:46     ` Eddie James
  0 siblings, 1 reply; 26+ messages in thread
From: =?gb18030?B?eGl1emhp?= @ 2018-08-24  1:06 UTC (permalink / raw)
  To: =?gb18030?B?RWRkaWUgSmFtZXM=?=,
	=?gb18030?B?QWxleGFuZGVyIEEuIEZpbGlwcG92?=,
	=?gb18030?B?b3BlbmJtYw==?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 18197 bytes --]

Hi Eddie,
    Is there a schedule for integrating one vnc viewer to phosphor webui ? 
Best,
Xiuzhi




On 08/14/2018 01:39 AM, xiuzhi wrote:
> Hi Eddie,
>    The video-dev2 can work on AST2400, the tightvnc  connect to BMC 
> vncserver stably when the host cpu run centos GUI.
> Two issues was found in testing process .
> 1, The obmc-ikvm will stop connection when host server window flush 
> from one to next  on BIOS or kernel booting process.
> The error log on AST2400 is :
> 18/07/2018 13:37:32 Listening for VNC connections on TCP port 5900
> 18/07/2018 13:37:32 Listening for VNC connections on TCP6 port 5900
> [11704.151172] aspeed-video 1e700000.video: resolution changed; resetting
> [11704.888188] aspeed-video 1e700000.video: resolution changed; resetting
> [11705.613868] aspeed-video 1e700000.video: invalid resolution detected
> [11705.620421] aspeed-video 1e700000.video: resolution changed; 
> couldn't get new resolution

OK, I noticed a similar issue on AST2500 when immediately detecting 
resolution after mode change. I added a delay, but it probably needs to 
be longer on AST2400... Also, most client's don't handle server-side 
resize, so usually the window will close and you'll have to re-open 
anyway I think, if the size is changing.

Thanks,
Eddie

>
>
> 2, The VNC Viewer can not connect to bmc server.
> The error on VNC Viewer client is :
> "   Attempting to reconnect to VNC Server ...
>    RFB protocol error:unknown rect encoding 7
> "
>
> The error log  on BMC is :
> 18/07/2018 14:03:18 Got connection from client 192.168.120.58
> 18/07/2018 14:03:18   other clients:
> 18/07/2018 14:03:18 Normal socket connection
> 18/07/2018 14:03:18 Client Protocol Version 3.8
> 18/07/2018 14:03:18 Protocol version sent 3.8, using 3.8
> 18/07/2018 14:03:18 rfbProcessClientSecurityType: executing handler 
> for type 1
> 18/07/2018 14:03:18 rfbProcessClientSecurityType: returning 
> securityResult for client rfb version >= 3.8
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x00000018)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x00000016)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x00000015)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x0000000F)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0xFFFFFEC6)
> 18/07/2018 14:03:18 Enabling full-color cursor updates for client 
> 192.168.120.58
> 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client 
> 192.168.120.58
> 18/07/2018 14:03:18 Using ZRLE encoding for client 192.168.120.58
> 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> 18/07/2018 14:03:18   8 bpp, depth 6
> 18/07/2018 14:03:18   true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x00000018)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x00000016)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x00000015)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x0000000F)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0xFFFFFEC6)
> 18/07/2018 14:03:18 Enabling full-color cursor updates for client 
> 192.168.120.58
> 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client 
> 192.168.120.58
> 18/07/2018 14:03:18 Switching from ZRLE to raw Encoding for client 
> 192.168.120.58
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x00000018)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x00000016)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x00000015)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0x0000000F)
> 18/07/2018 14:03:18 rfbProcessClientNormalMessage: ignoring 
> unsupported encoding type Enc(0xFFFFFEC6)
> 18/07/2018 14:03:18 Enabling full-color cursor updates for client 
> 192.168.120.58
> 18/07/2018 14:03:18 Enabling NewFBSize protocol extension for client 
> 192.168.120.58
> 18/07/2018 14:03:18 Switching from raw to ZRLE Encoding for client 
> 192.168.120.58
> 18/07/2018 14:03:18 Pixel format for client 192.168.120.58:
> 18/07/2018 14:03:18   32 bpp, depth 24, little endian
> 18/07/2018 14:03:18   true colour: max r 255 g 255 b 255, shift r 16 g 
> 8 b 0
> 18/07/2018 14:03:19 rfbProcessClientNormalMessage: read: Connection 
> reset by peer
> 18/07/2018 14:03:19 Client 192.168.120.58 gone
> 18/07/2018 14:03:19 Statistics             events Transmit/ RawEquiv ( 
> saved)
> 18/07/2018 14:03:19  FramebufferUpdate   :      3 |  0/        0 (  0.0%)
> 18/07/2018 14:03:19  tight               :      1 |  33807/  3145740 ( 
> 98.9%)
> 18/07/2018 14:03:19  raw                 :      1 |  16396/    16396 
> (  0.0%)
> 18/07/2018 14:03:19  ZRLE                :      2 | 62/  3932160 (100.0%)
> 18/07/2018 14:03:19  RichCursor          :      3 |  429/      429 (  
> 0.0%)
> 18/07/2018 14:03:19  TOTALS              :     10 |  50694/  7094725 ( 
> 99.3%)
> 18/07/2018 14:03:19 Statistics             events Received/ RawEquiv ( 
> saved)
> 18/07/2018 14:03:19  FramebufferUpdate   :      4 | 40/       40 (  0.0%)
> 18/07/2018 14:03:19  SetPixelFormat      :      2 | 40/       40 (  0.0%)
> 18/07/2018 14:03:19  SetEncodings        :      3 |  168/      168 (  
> 0.0%)
> 18/07/2018 14:03:19  TOTALS              :      9 |  248/      248 (  
> 0.0%)
>
> Best,
> Xiuzhi
> Hi Eddie,
>    Very good work!
>   The video-dev2 works on AST2400 now, I will do more test.
> Thanks,
> Xiuzhi
> On 08/10/2018 10:00 AM, Eddie James wrote:
> >
> >
> > On 08/10/2018 06:14 AM, xiuzhi wrote:
> >> Hi Eddie,
> >>    I tested the new update source of video-dev on AST2400 and
> >> AST2500. It works on AST2500.
> >>  On AST2400£¬the vncviewer can connect vncserver sucessful, but its
> >> window was blank,  not shown any information of the host screen .
> >> Would you like to give me some advice or instruments on how to  debug
> >> this issue?
>
> Hey, I also just pushed a new branch to my github with some
> simplifications to the driver... It no longer uses the auto mode and may
> work better on AST2400... I don't have any AST2400 to test on, but let
> me know if you have any luck:
>
> https://github.com/eddiejames/linux/commits/video-dev2
>
> Thanks,
> Eddie
>
> >
> > Hi,
> >
> > You could try enabling the debug tracing, if dynamic debug is enabled
> > on your kernel. (CONFIG_DYNAMIC_DEBUG)
> >
> > echo file aspeed-video.c +p > /sys/kernel/debug/dynamic_debug/control
> >
> > That should print every register access, as well as some other info.
> >
> > Thanks,
> > Eddie
> >
> >> Hi,
> >>
> >> There are some differences with the video engine between the 
> AST2400 and
> >> AST2500 that I haven't addressed yet, so probably the driver is not
> >> working correctly on the AST2400 yet. Some registers have different bit
> >> mapping, and things like that. Sorry about that... thanks for trying it
> >> out! I'll look at the changes needed for AST2400 next.
> >>
> >> Thanks,
> >>
> >> Eddie
> >>
> >>
> >> On 08/01/2018 03:47 AM, xiuzhi wrote:
> >> > Hi Eddie,
> >> >   Now It works, but the vncviewer can not connect the BMC server
> >> > successful.
> >> > When I use vncviewer connect to the BMC the error read:
> >> > "RFB protocol error: bad desktop size 0x1"
> >> > "RFB protocol error: unknow rect encoding 7"
> >> > The information on BMC are :
> >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> >> > frame buffer size: 3145728
> >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP port 5900
> >> > 19/07/2018 08:20:57 Listening for VNC connections on TCP6 port 5900
> >> >
> >> > 19/07/2018 08:52:08 Got connection from client 192.168.120.58
> >> > 19/07/2018 08:52:08   other clients:
> >> > 19/07/2018 08:52:08 Normal socket connection
> >> > 19/07/2018 08:52:08 Client Protocol Version 3.8
> >> > 19/07/2018 08:52:08 Protocol version sent 3.8, using 3.8
> >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: executing handler
> >> > for type 1
> >> > 19/07/2018 08:52:08 rfbProcessClientSecurityType: returning
> >> > securityResult for client rfb version >= 3.8
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x00000018)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x00000016)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x00000015)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x0000000F)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0xFFFFFEC6)
> >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> >> > 192.168.120.58
> >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for client
> >> > 192.168.120.58
> >> > 19/07/2018 08:52:08 Using ZRLE encoding for client 192.168.120.58
> >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> >> > 19/07/2018 08:52:08   8 bpp, depth 6
> >> > 19/07/2018 08:52:08   true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x00000018)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x00000016)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x00000015)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x0000000F)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0xFFFFFEC6)
> >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> >> > 192.168.120.58
> >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for client
> >> > 192.168.120.58
> >> > 19/07/2018 08:52:08 Switching from ZRLE to raw Encoding for client
> >> > 192.168.120.58
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x00000018)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x00000016)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x00000015)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0x0000000F)
> >> > 19/07/2018 08:52:08 rfbProcessClientNormalMessage: ignoring
> >> > unsupported encoding type Enc(0xFFFFFEC6)
> >> > 19/07/2018 08:52:08 Enabling full-color cursor updates for client
> >> > 192.168.120.58
> >> > 19/07/2018 08:52:08 Enabling NewFBSize protocol extension for client
> >> > 192.168.120.58
> >> > 19/07/2018 08:52:08 Switching from raw to ZRLE Encoding for client
> >> > 192.168.120.58
> >> > 19/07/2018 08:52:08 Pixel format for client 192.168.120.58:
> >> > 19/07/2018 08:52:08   32 bpp, depth 24, little endian
> >> > 19/07/2018 08:52:08   true colour: max r 255 g 255 b 255, shift r 
> 16 g
> >> > 8 b 0
> >> > [ 6928.751385] aspeed-video 1e700000.video: disabling comp ready irq,
> >> > seq_ctrl[000500a8]
> >> > 19/07/2018 08:52:09 rfbProcessClientNormalMessage: read: Connection
> >> > reset by peer
> >> > 19/07/2018 08:52:09 Client 192.168.120.58 gone
> >> > 19/07/2018 08:52:09 Statistics             events Transmit/
> >> > RawEquiv ( saved)
> >> > 19/07/2018 08:52:09  FramebufferUpdate   :      3 | 0/        0 (
> >> 0.0%)
> >> > 19/07/2018 08:52:09  tight               :      1 | 30991/ 3145740
> >> > ( 99.0%)
> >> > 19/07/2018 08:52:09  raw                 :      1 | 16396/ 16396
> >> > (  0.0%)
> >> > 19/07/2018 08:52:09  ZRLE                :      2 | 62/ 3932160
> >> > (100.0%)
> >> > 19/07/2018 08:52:09  RichCursor          :      3 | 429/      429
> >> (  0.0%)
> >> > 19/07/2018 08:52:09  TOTALS              :     10 | 47878/ 7094725
> >> > ( 99.3%)
> >> > 19/07/2018 08:52:09 Statistics             events Received/
> >> > RawEquiv ( saved)
> >> > 19/07/2018 08:52:09  FramebufferUpdate   :      4 | 40/       40 (
> >> 0.0%)
> >> > 19/07/2018 08:52:09  SetPixelFormat      :      2 | 40/       40 (
> >> 0.0%)
> >> > 19/07/2018 08:52:09  SetEncodings        :      3 | 168/      168
> >> (  0.0%)
> >> > 19/07/2018 08:52:09  TOTALS              :      9 | 248/      248
> >> (  0.0%)
> >> >
> >> > What wrong with it?
> >> > BTW, vncview download from
> >> > https://www.realvnc.com/en/connect/download/viewer/linux/
> >> > I also got the same error using Tightvnc viewer
> >> > Thanks,
> >> > xiuzhi
> >> > Hi Eddie,
> >> >    My bmc is AST2400, I modified the aspeed-g4.dtsi(adding gfx:
> >> > display@1e6e6000  and  video: video@1e700000)
> >> >  and the aspeed-bmc-opp-xxx.dts (adding &video &vhub) .
> >> > An error occured when I executed the following instructions:
> >> >
> >> > root@zhaoxinc:~# create_usbhid.sh
> >> > root@zhaoxinc:~# obmc-ikvm -v /dev/video0 -i /dev/hidg0
> >> > [  125.586061] aspeed-video 1e700000.video: timed out on 1st mode
> >> detect
> >> > [  125.602732] aspeed-video 1e700000.video: Failed to start video
> >> engine
> >> > failed to open /dev/video0: 62 Timer expired
> >> > Need I modify drivers/media/platform/aspeed-video.c or any other
> >> files?
> >> >
> >> >  Thanks ,
> >> > Xiuzhi
> >> > On 07/31/2018 01:52 AM, xiuzhi wrote:
> >> > > Hi Alexander ,Eddie,
> >> > >   I merged the source from
> >> > > https://gerrit.openbmc-project.xyz/#/c/openbmc/openbmc/+/11500/,and
> >> > > kernel branch video-dev.
> >> > > How to test the video kvm feature by phosphor-webui or command 
> line?
> >> >
> >> > Hi,
> >> >
> >> > You need to make sure the video device is enabled in your device-tree
> >> > for the machine you use... My kernel patch enabled it for our AST2500
> >> > witherspoon system. If you're using AST2500 as well, then you just
> >> need
> >> > something like:
> >> >
> >> > &video {
> >> >      status = "okay";
> >> >      memory-region = <&gfx_memory>;
> >> > };
> >> >
> >> > And the virtual USB hub:
> >> > &vhub {
> >> >      status = "okay";
> >> > };
> >> >
> >> > If you're not using AST2500, you'll need more changes to device-tree.
> >> >
> >> > Then on the BMC command line:
> >> > create_usbhid.sh
> >> > obmc-ikvm -v /dev/video0 -i /dev/hidg0
> >> > And connect with any VNC client to port 0 of your BMC IP.
> >> >
> >> > Thanks,
> >> > Eddie
> >> >
> >> > > Best,
> >> > > xiuzhi
> >> > >
> >> > >
> >> > > ------------------ ԭʼÓʼþ ------------------
> >> > > *·¢¼þÈË:* "Alexander A. Filippov"<a.filippov@yadro.com>;
> >> > > *·¢ËÍʱ¼ä:* 2018Äê7ÔÂ25ÈÕ(ÐÇÆÚÈý) ÏÂÎç4:56
> >> > > *ÊÕ¼þÈË:*
> >> > "openbmc"<openbmc@lists.ozlabs.org>;"xiuzhi"<1450335857@qq.com>;
> >> > > *Ö÷Ìâ:* Re: KVM Support?
> >> > >
> >> > > Hello everybody,
> >> > >
> >> > > Could you check the size of
> >> > >
> >> >
> >> 
> `build/tmp/deploy/image/<platformname>/fitImage-openbmc-phosphor-initramfs-*.bin`?
> >> > > If it exceeds 4456448 (0x440000) bytes, this is the problem
> >> described
> >> > > at https://github.com/openbmc/openbmc/issues/3314
> >> > >
> >> > >
> >> > > In this case you should modify flash partitions layout or trying to
> >> > > decrease kernel size.
> >> > >
> >> > > --
> >> > > Alexander
> >> > >
> >> > > On Wed, Jul 25, 2018 at 03:48:04PM +0800, xiuzhi wrote:
> >> > > > Hi Eddie,
> >> > > >
> >> > > >
> >> > > >   I read your KVM Support email on mailinglist.
> >> > > >
> >> > > >
> >> > > > I am going to port the BMC kvm to ast2400 . The u-boot can not
> >> load
> >> > > kernel ,the error message read:
> >> > > >
> >> > > >
> >> > > > ""U-Boot 2016.07 (Jul 23 2018 - 11:11:50 +0000)
> >> > > >
> >> > > >
> >> > > > DRAM:  240 MiB
> >> > > > WARNING: Caches not enabled
> >> > > > Flash: 32 MiB
> >> > > > *** Warning - bad CRC, using default environment
> >> > > >
> >> > > >
> >> > > > In:    serial
> >> > > > Out:   serial
> >> > > > Err:   serial
> >> > > > Net:   aspeednic#0
> >> > > > Error: aspeednic#0 address not set.
> >> > > >
> >> > > >
> >> > > > Hit any key to stop autoboot:  0
> >> > > > ## Loading kernel from FIT Image at 20080000 ...
> >> > > > Bad FIT kernel image format!
> >> > > > ERROR: can't get kernel image!
> >> > > > ast#
> >> > > >
> >> > > >
> >> > > > I added  config options to defconfig of ast2400 as follows:
> >> > > >
> >> > > >
> >> > > > CONFIG_MEDIA_SUPPORT=y
> >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> >> > > > CONFIG_MEDIA_SUPPORT=y
> >> > > > CONFIG_MEDIA_CAMERA_SUPPORT=y
> >> > > > # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
> >> > > > # CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
> >> > > > # CONFIG_MEDIA_RADIO_SUPPORT is not set
> >> > > > # CONFIG_MEDIA_SDR_SUPPORT is not set
> >> > > > # CONFIG_MEDIA_CEC_SUPPORT is not set
> >> > > > # CONFIG_MEDIA_CONTROLLER is not set
> >> > > > CONFIG_RATIONAL=y
> >> > > > CONFIG_VIDEO_DEV=y
> >> > > > CONFIG_VIDEO_V4L2=y
> >> > > > CONFIG_V4L_PLATFORM_DRIVERS=y
> >> > > > CONFIG_VIDEO_ASPEED=y
> >> > > > CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
> >> > > >
> >> > > >
> >> > > > Need I modify the aspeed-bmc-opp-palmetto.dts and aspeed-g4.dtsi?
> >> > > >
> >> > > >
> >> > > > Can you give me the file list need to modify?
> >> > > >
> >> > > >
> >> > > > Thanks,
> >> > > >
> >> > > >
> >> > > > xiuzhi
> >

[-- Attachment #2: Type: text/html, Size: 25565 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re:  KVM Support?
  2018-07-25  8:56 ` Alexander A. Filippov
@ 2018-07-25  9:12   ` xiuzhi
  0 siblings, 0 replies; 26+ messages in thread
From: xiuzhi @ 2018-07-25  9:12 UTC (permalink / raw)
  To: Alexander A. Filippov, openbmc

[-- Attachment #1: Type: text/plain, Size: 2290 bytes --]

Hi Alexander,
  The fitImage-openbmc-phosphor-initramfs-*.bin did exceed the 4456448 (0x440000) bytes, I will try to decrease kernel size.
Thanks.
xiuzhi




------------------ Original ------------------
From:  "Alexander A. Filippov";<a.filippov@yadro.com>;
Send time: Wednesday, Jul 25, 2018 4:56 PM
To: "openbmc"<openbmc@lists.ozlabs.org>; "xiuzhi"<1450335857@qq.com>; 

Subject:  Re: KVM Support?



Hello everybody,

Could you check the size of `build/tmp/deploy/image/<platformname>/fitImage-openbmc-phosphor-initramfs-*.bin`?
If it exceeds 4456448 (0x440000) bytes, this is the problem described at https://github.com/openbmc/openbmc/issues/3314


In this case you should modify flash partitions layout or trying to decrease kernel size.

--
Alexander

On Wed, Jul 25, 2018 at 03:48:04PM +0800, xiuzhi wrote:
> Hi Eddie,
> 
> 
>   I read your KVM Support email on mailinglist.
> 
> 
> I am going to port the BMC kvm to ast2400 . The u-boot can not load kernel ,the error message read:
> 
> 
> ""U-Boot 2016.07 (Jul 23 2018 - 11:11:50 +0000)
> 
> 
> DRAM:  240 MiB
> WARNING: Caches not enabled
> Flash: 32 MiB
> *** Warning - bad CRC, using default environment
> 
> 
> In:    serial
> Out:   serial
> Err:   serial
> Net:   aspeednic#0
> Error: aspeednic#0 address not set.
> 
> 
> Hit any key to stop autoboot:  0
> ## Loading kernel from FIT Image at 20080000 ...
> Bad FIT kernel image format!
> ERROR: can't get kernel image!
> ast#
> 
> 
> I added  config options to defconfig of ast2400 as follows:
> 
> 
> CONFIG_MEDIA_SUPPORT=y
> CONFIG_MEDIA_CAMERA_SUPPORT=y
> CONFIG_MEDIA_SUPPORT=y
> CONFIG_MEDIA_CAMERA_SUPPORT=y
> # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
> # CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
> # CONFIG_MEDIA_RADIO_SUPPORT is not set
> # CONFIG_MEDIA_SDR_SUPPORT is not set
> # CONFIG_MEDIA_CEC_SUPPORT is not set
> # CONFIG_MEDIA_CONTROLLER is not set
> CONFIG_RATIONAL=y
> CONFIG_VIDEO_DEV=y
> CONFIG_VIDEO_V4L2=y
> CONFIG_V4L_PLATFORM_DRIVERS=y
> CONFIG_VIDEO_ASPEED=y
> CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
> 
> 
> Need I modify the aspeed-bmc-opp-palmetto.dts and aspeed-g4.dtsi?
> 
> 
> Can you give me the file list need to modify?
> 
> 
> Thanks,
> 
> 
> xiuzhi

[-- Attachment #2: Type: text/html, Size: 3073 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
  2018-07-25  7:48 xiuzhi
@ 2018-07-25  8:56 ` Alexander A. Filippov
  2018-07-25  9:12   ` xiuzhi
  0 siblings, 1 reply; 26+ messages in thread
From: Alexander A. Filippov @ 2018-07-25  8:56 UTC (permalink / raw)
  To: openbmc, xiuzhi

Hello everybody,

Could you check the size of `build/tmp/deploy/image/<platformname>/fitImage-openbmc-phosphor-initramfs-*.bin`?
If it exceeds 4456448 (0x440000) bytes, this is the problem described at https://github.com/openbmc/openbmc/issues/3314


In this case you should modify flash partitions layout or trying to decrease kernel size.

--
Alexander

On Wed, Jul 25, 2018 at 03:48:04PM +0800, xiuzhi wrote:
> Hi Eddie,
> 
> 
>   I read your KVM Support email on mailinglist.
> 
> 
> I am going to port the BMC kvm to ast2400 . The u-boot can not load kernel ,the error message read:
> 
> 
> ""U-Boot 2016.07 (Jul 23 2018 - 11:11:50 +0000)
> 
> 
> DRAM:  240 MiB
> WARNING: Caches not enabled
> Flash: 32 MiB
> *** Warning - bad CRC, using default environment
> 
> 
> In:    serial
> Out:   serial
> Err:   serial
> Net:   aspeednic#0
> Error: aspeednic#0 address not set.
> 
> 
> Hit any key to stop autoboot:  0
> ## Loading kernel from FIT Image at 20080000 ...
> Bad FIT kernel image format!
> ERROR: can't get kernel image!
> ast#
> 
> 
> I added  config options to defconfig of ast2400 as follows:
> 
> 
> CONFIG_MEDIA_SUPPORT=y
> CONFIG_MEDIA_CAMERA_SUPPORT=y
> CONFIG_MEDIA_SUPPORT=y
> CONFIG_MEDIA_CAMERA_SUPPORT=y
> # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
> # CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
> # CONFIG_MEDIA_RADIO_SUPPORT is not set
> # CONFIG_MEDIA_SDR_SUPPORT is not set
> # CONFIG_MEDIA_CEC_SUPPORT is not set
> # CONFIG_MEDIA_CONTROLLER is not set
> CONFIG_RATIONAL=y
> CONFIG_VIDEO_DEV=y
> CONFIG_VIDEO_V4L2=y
> CONFIG_V4L_PLATFORM_DRIVERS=y
> CONFIG_VIDEO_ASPEED=y
> CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
> 
> 
> Need I modify the aspeed-bmc-opp-palmetto.dts and aspeed-g4.dtsi?
> 
> 
> Can you give me the file list need to modify?
> 
> 
> Thanks,
> 
> 
> xiuzhi

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: KVM Support?
@ 2018-07-25  7:48 xiuzhi
  2018-07-25  8:56 ` Alexander A. Filippov
  0 siblings, 1 reply; 26+ messages in thread
From: xiuzhi @ 2018-07-25  7:48 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/plain, Size: 1318 bytes --]

Hi Eddie,


  I read your KVM Support email on mailinglist.


I am going to port the BMC kvm to ast2400 . The u-boot can not load kernel ,the error message read:


""U-Boot 2016.07 (Jul 23 2018 - 11:11:50 +0000)


DRAM:  240 MiB
WARNING: Caches not enabled
Flash: 32 MiB
*** Warning - bad CRC, using default environment


In:    serial
Out:   serial
Err:   serial
Net:   aspeednic#0
Error: aspeednic#0 address not set.


Hit any key to stop autoboot:  0
## Loading kernel from FIT Image at 20080000 ...
Bad FIT kernel image format!
ERROR: can't get kernel image!
ast#


I added  config options to defconfig of ast2400 as follows:


CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
# CONFIG_MEDIA_RADIO_SUPPORT is not set
# CONFIG_MEDIA_SDR_SUPPORT is not set
# CONFIG_MEDIA_CEC_SUPPORT is not set
# CONFIG_MEDIA_CONTROLLER is not set
CONFIG_RATIONAL=y
CONFIG_VIDEO_DEV=y
CONFIG_VIDEO_V4L2=y
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_VIDEO_ASPEED=y
CONFIG_MEDIA_SUBDRV_AUTOSELECT=y


Need I modify the aspeed-bmc-opp-palmetto.dts and aspeed-g4.dtsi?


Can you give me the file list need to modify?


Thanks,


xiuzhi

[-- Attachment #2: Type: text/html, Size: 1874 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2018-10-17  6:50 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-16  6:34 KVM Support? AKASH G J
2018-07-16 11:15 ` Avi Fishman
2018-07-16 11:35   ` Luke Chen
2018-07-16 14:02 ` Eddie James
2018-07-16 15:01   ` Avi Fishman
2018-07-16 15:39     ` Eddie James
2018-07-17  8:56       ` Avi.Fishman
2018-07-17 14:06         ` Eddie James
2018-07-25  7:48 xiuzhi
2018-07-25  8:56 ` Alexander A. Filippov
2018-07-25  9:12   ` xiuzhi
2018-08-14  6:39 =?gb18030?B?u9i4tKO6ILvYuLSjuiC72Li0o7ogu9i4tKO6IEtWTSBTdXBwb3J0Pw==?= =?gb18030?B?eGl1emhp?=
2018-08-15 13:05 ` 回复: 回复: 回复: 回复: KVM Support? Eddie James
2018-08-24  1:06   ` =?gb18030?B?eGl1emhp?=
2018-08-24 14:46     ` Eddie James
2018-08-24 19:04       ` Tanous, Ed
2018-08-27  7:09         ` KWLIU
2018-08-27 15:59           ` Tanous, Ed
2018-08-27 16:24             ` Eddie James
2018-08-30 10:59               ` Avi Fishman
2018-08-27 21:00         ` Eddie James
2018-10-11 10:51       ` =?gb18030?B?eGl1emhp?=
2018-10-11 17:32         ` Eddie James
2018-10-12  1:26           ` =?gb18030?B?eGl1emhp?=
2018-09-05  7:43 KWLIU
2018-09-05 14:32 ` Eddie James
2018-09-07  7:31 =?gb18030?B?eGl1emhp?=
2018-10-17  6:42 =?gb18030?B?eGl1emhp?=

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).