Re: when enter_hypervisor on rk3568, system reboot without oops

2023-09-05 Thread Zhan Zheng
i tracked the codes, and found out the 'hypervisor/arch/arm64/entry.S: hvc 
#0' turn the machine reboot, can anyone point out the reason for me?
thanks

在2023年9月6日星期三 UTC+8 08:44:46 写道:

>
> %% ./jailhouse-config-check ~/works/jailhouse/configs/arm64/rk3568.cell 
> Reading configuration set:
>   Architecture:  arm64
>   Root cell: RK3568 
> (/home/zyz/works/jailhouse/configs/arm64/rk3568.cell)
> Overlapping memory regions inside cell: None
> Overlapping memory regions with hypervisor: None
> Missing PCI MMCONFIG interceptions: None
> Missing resource interceptions for architecture arm64: None
> 在2023年9月5日星期二 UTC+8 18:26:26 写道:
>
>> Hi, 
>>
>> What does jailhouse config-check report on your system configuration? 
>>
>> Ralf 
>>
>> On 05/09/2023 10:52, Zhan Zheng wrote: 
>> > dmesg in `screen-exchange` 
>> > 
>> > 在2023年9月5日星期二 UTC+8 16:00:57 写道: 
>> > 
>> > hello, everyone. I'm porting jailhouse to rk3568 which running open 
>> > harmony. 
>> > jailhouse.ko, jailhouse.bin, jailhouse were ready, and i wrote a 
>> > basic root cell to test it. 
>> > but when i `jailhouse enable rk3568.cell`, the system reboot. can 
>> > someone help me pls? 
>> > thanks 
>> > 
>> > -- 
>> > 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 jailhouse-de...@googlegroups.com 
>> > . 
>> > To view this discussion on the web visit 
>> > 
>> https://groups.google.com/d/msgid/jailhouse-dev/a5a7147d-750d-4000-87f5-6ca0cc93fcb2n%40googlegroups.com
>>  
>> <
>> https://groups.google.com/d/msgid/jailhouse-dev/a5a7147d-750d-4000-87f5-6ca0cc93fcb2n%40googlegroups.com?utm_medium=email_source=footer>.
>>  
>>
>>
>> -- 
>> Mit freundlichen Grüßen 
>>
>> Dr. Ralf Ramsauer 
>> Labor für Digitalisierung 
>> Fakultät für Informatik und Mathematik 
>>
>> Ostbayerische Technische Hochschule Regensburg 
>> Galgenbergstrasse 32 
>> 93053 Regensburg 
>>
>> Tel.: +49 (0)941 943-9267 <+49%20941%209439267> 
>> E-Mail: ralf.r...@oth-regensburg.de 
>> http://www.oth-regensburg.de 
>>
>

-- 
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 jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/6c49d31b-6f95-4311-a02f-597fa6617c2en%40googlegroups.com.


How to add new system register macro definition in arm64?

2023-09-05 Thread bot crack
Hi

   1. I want to add some register definitions. 
   2. I want to know why #define CNTPCT_EL0 SYSREG_64(0, c14) in arm64 *has 
   only two arguments*, but it can be expanded into assembly "MRS X0, #3, 
   c14, c0, #1"
   3. I didn’t understand the definition in 
   inmates/lib/arm64/include/asm/sysregs.h because I couldn’t find how to 
   expand the macro definition SYSREG_64
   4. For example, I want to add a new CNTVCT_EL0 (op0=0b11, op1=0b011, 
   CRn=0b1110, CRm=0b0, op2=b010) register. How should I do it?


-- 
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 jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/4edd4683-c693-4cad-aca7-53605eef02f3n%40googlegroups.com.


Re: when enter_hypervisor on rk3568, system reboot without oops

2023-09-05 Thread bot crack
Does linux enable CONFIG_VIRTUALIZATION? What about KVM?

On Wednesday, September 6, 2023 at 11:18:25 AM UTC+8 Zhan Zheng wrote:

> i tracked the codes, and found out the 'hypervisor/arch/arm64/entry.S: hvc 
> #0' turn the machine reboot, can anyone point out the reason for me?
> thanks
>
> 在2023年9月6日星期三 UTC+8 08:44:46 写道:
>
>>
>> %% ./jailhouse-config-check ~/works/jailhouse/configs/arm64/rk3568.cell 
>> Reading configuration set:
>>   Architecture:  arm64
>>   Root cell: RK3568 
>> (/home/zyz/works/jailhouse/configs/arm64/rk3568.cell)
>> Overlapping memory regions inside cell: None
>> Overlapping memory regions with hypervisor: None
>> Missing PCI MMCONFIG interceptions: None
>> Missing resource interceptions for architecture arm64: None
>> 在2023年9月5日星期二 UTC+8 18:26:26 写道:
>>
>>> Hi, 
>>>
>>> What does jailhouse config-check report on your system configuration? 
>>>
>>> Ralf 
>>>
>>> On 05/09/2023 10:52, Zhan Zheng wrote: 
>>> > dmesg in `screen-exchange` 
>>> > 
>>> > 在2023年9月5日星期二 UTC+8 16:00:57 写道: 
>>> > 
>>> > hello, everyone. I'm porting jailhouse to rk3568 which running open 
>>> > harmony. 
>>> > jailhouse.ko, jailhouse.bin, jailhouse were ready, and i wrote a 
>>> > basic root cell to test it. 
>>> > but when i `jailhouse enable rk3568.cell`, the system reboot. can 
>>> > someone help me pls? 
>>> > thanks 
>>> > 
>>> > -- 
>>> > 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 jailhouse-de...@googlegroups.com 
>>> > . 
>>> > To view this discussion on the web visit 
>>> > 
>>> https://groups.google.com/d/msgid/jailhouse-dev/a5a7147d-750d-4000-87f5-6ca0cc93fcb2n%40googlegroups.com
>>>  
>>> <
>>> https://groups.google.com/d/msgid/jailhouse-dev/a5a7147d-750d-4000-87f5-6ca0cc93fcb2n%40googlegroups.com?utm_medium=email_source=footer>.
>>>  
>>>
>>>
>>> -- 
>>> Mit freundlichen Grüßen 
>>>
>>> Dr. Ralf Ramsauer 
>>> Labor für Digitalisierung 
>>> Fakultät für Informatik und Mathematik 
>>>
>>> Ostbayerische Technische Hochschule Regensburg 
>>> Galgenbergstrasse 32 
>>> 93053 Regensburg 
>>>
>>> Tel.: +49 (0)941 943-9267 <+49%20941%209439267> 
>>> E-Mail: ralf.r...@oth-regensburg.de 
>>> http://www.oth-regensburg.de 
>>>
>>

-- 
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 jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/30d1fba1-3c8e-4ffd-9740-e5e11b544ff3n%40googlegroups.com.


Re: when enter_hypervisor on rk3568, system reboot without oops

2023-09-05 Thread Zhan Zheng

%% ./jailhouse-config-check ~/works/jailhouse/configs/arm64/rk3568.cell 
Reading configuration set:
  Architecture:  arm64
  Root cell: RK3568 
(/home/zyz/works/jailhouse/configs/arm64/rk3568.cell)
Overlapping memory regions inside cell: None
Overlapping memory regions with hypervisor: None
Missing PCI MMCONFIG interceptions: None
Missing resource interceptions for architecture arm64: None
在2023年9月5日星期二 UTC+8 18:26:26 写道:

> Hi,
>
> What does jailhouse config-check report on your system configuration?
>
> Ralf
>
> On 05/09/2023 10:52, Zhan Zheng wrote:
> > dmesg in `screen-exchange`
> > 
> > 在2023年9月5日星期二 UTC+8 16:00:57 写道:
> > 
> > hello, everyone. I'm porting jailhouse to rk3568 which running open
> > harmony.
> > jailhouse.ko, jailhouse.bin, jailhouse were ready, and i wrote a
> > basic root cell to test it.
> > but when i `jailhouse enable rk3568.cell`, the system reboot. can
> > someone help me pls?
> > thanks
> > 
> > -- 
> > 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 jailhouse-de...@googlegroups.com 
> > .
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/jailhouse-dev/a5a7147d-750d-4000-87f5-6ca0cc93fcb2n%40googlegroups.com
>  
> <
> https://groups.google.com/d/msgid/jailhouse-dev/a5a7147d-750d-4000-87f5-6ca0cc93fcb2n%40googlegroups.com?utm_medium=email_source=footer
> >.
>
> -- 
> Mit freundlichen Grüßen
>
> Dr. Ralf Ramsauer
> Labor für Digitalisierung
> Fakultät für Informatik und Mathematik
>
> Ostbayerische Technische Hochschule Regensburg
> Galgenbergstrasse 32
> 93053 Regensburg
>
> Tel.: +49 (0)941 943-9267 <+49%20941%209439267>
> E-Mail: ralf.r...@oth-regensburg.de
> http://www.oth-regensburg.de
>

-- 
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 jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/c43555c0-b479-43c3-8afc-41208516a92bn%40googlegroups.com.


when enter_hypervisor on rk3568, system reboot without oops

2023-09-05 Thread Zhan Zheng
hello, everyone. I'm porting jailhouse to rk3568 which running open 
harmony. 
jailhouse.ko, jailhouse.bin, jailhouse were ready, and i wrote a basic root 
cell to test it.
but when i `jailhouse enable rk3568.cell`, the system reboot. can someone 
help me pls?
thanks

-- 
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 jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/ca381c51-0921-42cf-ad8f-2b6f6727ce6dn%40googlegroups.com.
#include 
#include 

struct {
	struct jailhouse_system header;
	__u64 cpus[1];
	struct jailhouse_memory mem_regions[4];
	struct jailhouse_irqchip irqchips[1];
	struct jailhouse_pci_device pci_devices[0];
} __attribute__((packed)) config = {
	.header = {
		.signature = JAILHOUSE_SYSTEM_SIGNATURE,
		.architecture = JAILHOUSE_ARM64,
		.revision = JAILHOUSE_CONFIG_REVISION,
		.flags = JAILHOUSE_SYS_VIRTUAL_DEBUG_CONSOLE,

		.hypervisor_memory = {
			.phys_start = 0x7a00,	// reserved
			.size = 0x0100,		// 16M
		},

		.debug_console = {
			.address = 0xfe66, // uart2
			.size = 0x1000,
			.type = JAILHOUSE_CON_TYPE_8250,
			.flags = JAILHOUSE_CON_ACCESS_MMIO |
 JAILHOUSE_CON_REGDIST_4,
		},

		.platform_info = {
			.pci_mmconfig_base = 0xfe28, // PCIe3x2_APB
			.pci_mmconfig_end_bus = 0,
			.pci_is_virtual = 1,
			.pci_domain = 1,
			.arm = {
.gic_version = 3,
.gicd_base = 0xfd40,
.gicr_base = 0xfd46,
.maintenance_irq = 25,
			},
		},

		.root_cell = {
			.name = "RK3568",
			.cpu_set_size = sizeof(config.cpus),
			.num_memory_regions = ARRAY_SIZE(config.mem_regions),
			.num_irqchips = ARRAY_SIZE(config.irqchips),
			.num_pci_devices = ARRAY_SIZE(config.pci_devices),
		},
	},

	.cpus = {
		0b,
	},

	.mem_regions = {
		{
			.phys_start = 0x11,
			.virt_start = 0x11,
			.size = 0xf,
			.flags = JAILHOUSE_MEM_READ	|
 JAILHOUSE_MEM_WRITE	|
 JAILHOUSE_MEM_EXECUTE,
		},

		{
			.phys_start = 0x20,
			.virt_start = 0x20,
			.size = 0x820,
			.flags = JAILHOUSE_MEM_READ	|
 JAILHOUSE_MEM_WRITE	|
 JAILHOUSE_MEM_EXECUTE,
		},

		{
			.phys_start = 0x940,
			.virt_start = 0x940,
			.size = 0x67e0,
			.flags = JAILHOUSE_MEM_READ	|
 JAILHOUSE_MEM_WRITE	|
 JAILHOUSE_MEM_EXECUTE,
		},

		{
			.phys_start = 0xfe66,
			.virt_start = 0xfe66,
			.size = 0x1000,
			.flags = JAILHOUSE_MEM_READ	|
 JAILHOUSE_MEM_WRITE	|
 JAILHOUSE_MEM_IO	|
 JAILHOUSE_MEM_ROOTSHARED,
		},
	},

	.irqchips = {
		{
			.address = 0xfd40,
			.pin_base = 32,
			.pin_bitmap = {
0x, 0x, 0x, 0x,
			},
		},
	},

	.pci_devices = {
	},
};


Re: when enter_hypervisor on rk3568, system reboot without oops

2023-09-05 Thread Zhan Zheng
dmesg in `screen-exchange`

在2023年9月5日星期二 UTC+8 16:00:57 写道:

> hello, everyone. I'm porting jailhouse to rk3568 which running open 
> harmony. 
> jailhouse.ko, jailhouse.bin, jailhouse were ready, and i wrote a basic 
> root cell to test it.
> but when i `jailhouse enable rk3568.cell`, the system reboot. can someone 
> help me pls?
> thanks
>

-- 
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 jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/a5a7147d-750d-4000-87f5-6ca0cc93fcb2n%40googlegroups.com.


screen-exchange
Description: Binary data


Re: when enter_hypervisor on rk3568, system reboot without oops

2023-09-05 Thread Ralf Ramsauer

Hi,

What does jailhouse config-check report on your system configuration?

  Ralf

On 05/09/2023 10:52, Zhan Zheng wrote:

dmesg in `screen-exchange`

在2023年9月5日星期二 UTC+8 16:00:57 写道:

hello, everyone. I'm porting jailhouse to rk3568 which running open
harmony.
jailhouse.ko, jailhouse.bin, jailhouse were ready, and i wrote a
basic root cell to test it.
but when i `jailhouse enable rk3568.cell`, the system reboot. can
someone help me pls?
thanks

--
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 jailhouse-dev+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/a5a7147d-750d-4000-87f5-6ca0cc93fcb2n%40googlegroups.com .


--
Mit freundlichen Grüßen

Dr. Ralf Ramsauer
Labor für Digitalisierung
Fakultät für Informatik und Mathematik

Ostbayerische Technische Hochschule Regensburg
Galgenbergstrasse 32
93053 Regensburg

Tel.: +49 (0)941 943-9267
E-Mail: ralf.ramsa...@oth-regensburg.de
http://www.oth-regensburg.de

--
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 jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/a4c85fc2-4bf4-4c07-830f-67a60a6d40a6%40oth-regensburg.de.