On 25.03.19 10:44, Burak Atalay wrote:
Hello Mr. Kiszka,

Sure I can write a patch for this. Meanwhile, did you have a chance to read the 
rest of the e-mail that I sent? Currently Jailhouse fails when I enable it, but 
there are no error messages in the serial output. I am attaching the files 
again.


Sorry, missed that.

I created a sysconfig file with "jailhouse config create sysconfig.c" and when I try to run Jailhouse I get 
the following error message:  "JAILHOUSE_ENABLE: Cannot allocate memory". However, I do not see an error 
message in the serial output. My GRUB parameters inside /etc/default/grub has the following two set: 
"amd_iommu=off memmap=0x5200000\\\$0x3a000000". I am not sure if amd_iommu should be on or off, it was set as 
"on" by default.

Try assigning more memory to the hypervisor first  (.hypervisor_memory.size).
Start with 64M, to be safe. But, when you increase that size manually, make sure
to not overlap with existing assignments, i.e. move them as well.

Ralf (in CC) recently enabled Jailhouse on an AMD box. Maybe this setup is
similar, and he can share some tricks.

Jan


Thanks and best regards,
Burak Atalay

-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Friday, March 22, 2019 12:39 PM
To: Atalay Burak 1CS2 <[email protected]>; Jailhouse 
<[email protected]>
Cc: Haase Heiko 1CS2 <[email protected]>
Subject: *EXT* Re: Jailhouse Hardware Check Error // IndexError: list index out 
of range

On 22.03.19 10:04, Burak Atalay wrote:
Hello Mr. Kiszka,

I have confirmed that we are on commit f743631213a1 without modifications. I went into the source code in the file 
"/usr/local/libexec/jailhouse/jailhouse-hardware-check", inside the "elif cpu_vendor == 'AuthenticAMD':" 
branch, in the last loop I see that there are two variables named "n", one in the outer loop and one in the inner loop. 
Changing the name of the variable "n" in the inner loop fixes the error in the "jailhouse hardware check" 
command. So the following lines:

for n in range(num_filter_regs):
                  smi_freg = mmio.read64(0x60 + (n << 3))

becomes

for nn in range(num_filter_regs):
                  smi_freg = mmio.read64(0x60 + (nn << 3))

After this modification, "jailhouse hardware check" command gives the following 
output:


Good catch! Would you like to write a patch so that this gets fixed for 
everyone?

Thanks in advance,
Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center 
Embedded Linux


--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to