Re: How to get the 2nd vCPU running in the Industry scenario?


Tzeng, Tonny <tonny.tzeng@...>
 

Hi Fuzhong,

 

You are right! I just copied this comment line to my kernel command line without noticing it limits the vCPU to 1. Both vCPU are running now, though you may consider to remove this misleading parameter in the sample launch script. ūüėä

 

Regards,

Tonny

 

From: acrn-users@... <acrn-users@...> On Behalf Of Liu, Fuzhong
Sent: Thursday, November 28, 2019 9:12 AM
To: acrn-users@...
Subject: Re: [acrn-users] How to get the 2nd vCPU running in the Industry scenario?

 

Hi Tonny

About the secondary vCPU is in ‚ÄúInit‚ÄĚ mode after I launch ¬†user VM. The HV console indicates:

 

ACRN:\>vcpu_list

 

VM ID    PCPU ID    VCPU ID    VCPU ROLE    VCPU STATE

=====    =======    =======    =========    ==========

  0         0          0       PRIMARY      Running

  2         2          0       PRIMARY      Running

  2         3          1       SECONDARY    Init

 

I think you add maxcpus=1 in your kernel comline; Could you please share the user VM kernel comline?

 

ACRN:\>vcpu_list(without maxcpus=1)

 

VM ID    PCPU ID    VCPU ID    VCPU ROLE    VCPU STATE

=====    =======    =======    =========    ==========

  0         0          0       PRIMARY      Running

  2         2          0       PRIMARY      Running

  2         3          1       SECONDARY    Running

 

ACRN:\>vcpu_list(with maxcpus=1)

 

VM ID    PCPU ID    VCPU ID    VCPU ROLE    VCPU STATE

=====    =======    =======    =========    ==========

  0         0          0       PRIMARY      Running

  2         2          0       PRIMARY      Running

  2         3          1       SECONDARY    Init

 

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of Victor Sun
Sent: Wednesday, November 27, 2019 8:17 PM
To: acrn-users@...
Subject: Re: [acrn-users] How to get the 2nd vCPU running in the Industry scenario?

 

Hi Tonny,

This is a known issue. In current implementation, SOS will offline all vcpus except BSP before launch any user VM(i.e. offline pCPU1/2/3 in your case), and your launched user VM2 only init pCPU2/3 to run, this cause pCPU1 always be offlined until you launch user VM1.

In our new implementation, acrn-config tool will do a modification in launch script, that only pCPUs belong to the launched VM could be offlined, then it will resolve your issue.

or you can modify the launch script by manual:

  for i in `ls -d /sys/devices/system/cpu/cpu[1-99]`; do

+ # do not offline the CPU which not belong to the UOS

+ if [ "i" = "/sys/devices/system/cpu/cpu1" ]; then continue; fi

        online=`cat $i/online`

BR,

Victor

 

On 11/27/2019 5:15 PM, Tzeng, Tonny wrote:

Hi,

 

It looks to me two cores are now assigned to the VM2 in the Industry scenario, but only the primary vCPU is shown in ‚ÄúRunning‚ÄĚ state, the secondary vCPU is in ‚ÄúInit‚ÄĚ mode after I launch my user VM. The HV console indicates:

 

ACRN:\>vcpu_list

 

VM ID    PCPU ID    VCPU ID    VCPU ROLE    VCPU STATE

=====    =======    =======    =========    ==========

  0         0          0       PRIMARY      Running

  2         2          0       PRIMARY      Running

  2         3          1       SECONDARY    Init

 

Is it a bug or how can I move the secondary vCPU to ‚ÄúRunning‚ÄĚ mode? Thanks.

 

Regards,

Tonny

Join acrn-users@lists.projectacrn.org to automatically receive all group messages.