<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10.5pt" ><blockquote data-history-content-modified="1" data-history-expanded="1" dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr; margin-right:0px" > 
<div><br><font size="2" face="Default Monospace,Courier New,Courier,monospace" >Message: 2<br>Date: Fri, 2 Nov 2018 11:14:51 +0800<br>From: "=?ISO-8859-1?B?eGl1emhp?=" <1450335857@qq.com><br>To: "=?ISO-8859-1?B?QXZpLkZpc2htYW4=?=" <Avi.Fishman@nuvoton.com>,<br>"=?ISO-8859-1?B?S1dMSVU=?=" <KWLIU@nuvoton.com>,<br>"=?ISO-8859-1?B?RWRkaWUgSmFtZXM=?=" <eajames@linux.vnet.ibm.com>,<br>"=?ISO-8859-1?B?VGFub3VzLCBFZA==?=" <ed.tanous@intel.com>,<br>"=?ISO-8859-1?B?b3BlbmJtYw==?=" <openbmc@lists.ozlabs.org><br>Subject: Re:RE: Re:RE: KVM Support?<br>Message-ID: <tencent_62DED47F42BD431C4F605928@qq.com><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Hi Avi ,Joseph,<br>   I can't get the host screen after  updating  openbmc source to  to latest version (Oct 31 commit 7baabe48d8a2a30857994f222925505750728e39).<br>The  error of opening the webpage https//xxxx/#kvm   is :<br>Refused to load the image 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAAOklEQVQYV2P8////fwYoYGRkZAQxUcRAHJA4SB2yArgYTAdMAMRH1gA2ElkRlA03DW4nThMIuoGQLwCKQ0b4DNy9fwAAAABJRU5ErkJggg==' because it violates the following Content Security Policy directive: "default-src 'self' wss: 'unsafe-eval' 'unsafe-inline'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback<br>  <br>  Can you give me  advice on how to modify the 0001-Implement-KVM-in-webui.patch ?<br>Best,<br>xiuzhi</font><br><br> </div></blockquote>
<div dir="ltr" > </div>
<div dir="ltr" >We are reviewing a proposed fix to change the Content-Security-Policy directive to: script-src 'self' 'unsafe-eval' 'unsafe-inline'; object-src 'self'</div>
<div dir="ltr" >See: <a href="https://gerrit.openbmc-project.xyz/#/c/openbmc/meta-ibm/+/14800/1/recipes-httpd/nginx/files/nginx.conf">https://gerrit.openbmc-project.xyz/#/c/openbmc/meta-ibm/+/14800/1/recipes-httpd/nginx/files/nginx.conf</a></div>
<div dir="ltr" > </div>
<div dir="ltr" ><div>For a quick workaround, remove the Content-Security-Policy directive from your nginx config file (on the BMC, typically /etc/nginx/nginx.conf) or change it to the setting mentioned above, restart the nginx service: systemctl restart nginx, and then you may need to clear your web browser's cache (for example, Firefox - Preferences - advanced - clear cache).</div></div>
<div dir="ltr" > </div>
<div dir="ltr" >FYA: There are now two different people named "Joseph" on this email chain.</div>
<div dir="ltr" > </div>
<blockquote class="history-quote-1541174930740" data-history-content-modified="1" data-history-expanded="1" dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr; margin-right:0px" ><div> </div>
<div><br><font size="2" face="Default Monospace,Courier New,Courier,monospace" >Hi Avi ,Joseph,<br>   I checked the patches for bmc side, the rest_dbus.py on bmc was not patched sucessfully.<br>The files on bmc are:<br>/run/initramfs/ro/usr/lib/python2.7 /site-packages/obmc/wsgi/apps/rest_dbus.py<br>/usr/lib/python2.7/site-packages/obmc/wsgi/apps/rest_dbus.py<br><br>I patched the file on phosphor-gevent .<br>Now I patched  the   rest_dbus.py on phosphor-rest again,the file of bmc side has updated.<br> <br>Now it works.<br><br><br><br>Thanks,<br>Xiuzhi<br>------------------ Original ------------------<br>From:  "Avi.Fishman";<Avi.Fishman@nuvoton.com>;<br>Date:  Aug 29, 2018<br>To:  "KWLIU"<KWLIU@nuvoton.com>; "xiuzhi"<1450335857@qq.com>; "eajames"<eajames@linux.vnet.ibm.com>; "ed.tanous"<ed.tanous@intel.com>; "openbmc"<openbmc@lists.ozlabs.org>;<br><br>Subject:  RE: Re:RE: KVM Support?<br><br><br><br>  <br>Hi Xiuzhi,<br> <br> <br> <br>Can you take the patches and merge them to your environment?<br> <br> <br> <br>Josef,<br> <br>Maybe you need to give the commit or tag you are that above it you use your patches?<br> <br> <br>  <br>Thanks,<br> <br>Avi<br> <br> <br> <br>  <br>From: openbmc <openbmc-bounces+avifishman70=gmail.com@lists.ozlabs.org> On Behalf Of CS20 KWLiu<br> Sent: Wednesday, August 29, 2018 5:44 AM<br> To: 1450335857@qq.com; eajames@linux.vnet.ibm.com; ed.tanous@intel.com; openbmc@lists.ozlabs.org<br> Subject: RE: Re:RE: KVM Support?<br> <br> <br> <br> <br> <br>Hi Xiuzhi:<br> <br> <br> <br>I think we are using different bases of the openbmc, this patch is really working on my side<br> <br>Sorry for I cannot find the exact error in your message.<br> <br> <br> <br>Thanks,<br> <br>Joseph<br> <br>From: xiuzhi [<a href="mailto:1450335857@qq.com" target="_blank">mailto:1450335857@qq.com</a>]<br> Sent: Tuesday, August 28, 2018 6:57 PM<br> To: Eddie James; Tanous, Ed; CS20 KWLiu; openbmc<br> Subject: Re:RE: KVM Support?<br> <br> <br> <br>Hi Joseph, Ed,<br>    There was an error when I  updated the patches  <a href="https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/commit/140771b7e898dd5ca8f0364290cce669609088ac" target="_blank">https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/commit/140771b7e898dd5ca8f0364290cce669609088ac</a><br> Would you like to give me some suggestions to debug it?<br> When I logged in https://<bmc_ip>/#/kvm, The errors read:<br>"<br>WebSocket on-close event  app.89eaa0b6e5e9417cb602.js:38:675915<br>Failed when connecting: Connection closed (code: 1005)  app.89eaa0b6e5e9417cb602.js:38:685584<br>        RFB.prototype._fail <a href="https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:685584" target="_blank">https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:685584</a><br>        RFB/< <a href="https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:676138" target="_blank">https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:676138</a><br>        Websock.prototype.open/this._websocket.onclose< <a href="https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:778159" target="_blank">https://192.168.120.132/app.89eaa0b6e5e9417cb602.js:38:778159</a><br>New state 'disconnecting', was 'connecting'.  app.89eaa0b6e5e9417cb602.js:38:684301<br>>> RFB.disconnect  app.89eaa0b6e5e9417cb602.js:38:680495<br>>> Keyboard.allKeysUp  app.89eaa0b6e5e9417cb602.js:38:739659<br><< Keyboard.allKeysUp  app.89eaa0b6e5e9417cb602.js:38:739828<br>"<br>The line 38 of app.89eaa0b6e5e9417cb602.js is :<br>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);f<br> rom<len;from++)if(from in array&&array[from]===value)return from;return-1}function inheritParams(currentParams,newParams,$current,$to) ... ...<br><br>Best,<br>Xiuzhi<br>>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. <a href="https://github.com/Nuvoton-Israel/obmc-ikvm" target="_blank">https://github.com/Nuvoton-Israel/obmc-ikvm</a> <a href="https://github.com/Nuvoton-Israel/linux/commit/7e90f572323e56e9425b85aafe86dfa5a35c4e7d" target="_blank">https://github.com/Nuvoton-Israel/linux/commit/7e90f572323e56e9425b85aafe86dfa5a35c4e7d</a>   >I also enabled ED's KVM webui and added kvmws proxy in python web server. <a href="https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/commit/140771b7e898dd5ca8f0364290cce669609088ac" target="_blank">https://github.com/Nuvoton-Israel/meta-openbmc-nuvoton-addon/commit/140771b7e898dd5ca8f0364290cce669609088ac</a>   >If you can spare a few m<br> inutes 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.<br><br> <br> ===========================================================================================<br> 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.<br> <br> <br> <br> ===========================================================================================<br> 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.<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <<a href="http://lists.ozlabs.org/pipermail/openbmc/attachments/20181102/a6129bdf/attachment.html" target="_blank">http://lists.ozlabs.org/pipermail/openbmc/attachments/20181102/a6129bdf/attachment.html</a>></font><br><br> </div></blockquote></div><BR>