nuttx.c

#include <jailhouse/types.h>
#include <jailhouse/cell-config.h>

struct {
struct jailhouse_cell_desc cell;
__u64 cpus[1];
struct jailhouse_memory mem_regions[9];
struct jailhouse_cache cache_regions[1];
struct jailhouse_irqchip irqchips[3];
struct jailhouse_pio pio_regions[3];
struct jailhouse_pci_device pci_devices[2];
struct jailhouse_pci_capability pci_caps[0];

} __attribute__((packed)) config = {
.cell = {
.signature = JAILHOUSE_CELL_DESC_SIGNATURE,
.revision = JAILHOUSE_CONFIG_REVISION,
.name = "nuttx",
.flags = JAILHOUSE_CELL_PASSIVE_COMMREG,
.cpu_set_size = sizeof(config.cpus),
.num_memory_regions = ARRAY_SIZE(config.mem_regions),
.num_cache_regions = ARRAY_SIZE(config.cache_regions),
.num_irqchips = ARRAY_SIZE(config.irqchips),
.num_pio_regions = ARRAY_SIZE(config.pio_regions),
.num_pci_devices = ARRAY_SIZE(config.pci_devices),
.num_pci_caps = ARRAY_SIZE(config.pci_caps),
.console = {
.type = JAILHOUSE_CON_TYPE_8250,
.flags = JAILHOUSE_CON_ACCESS_PIO,
.address = 0x3f8,
},
},

.cpus = {
0x8,
},

.mem_regions = {
/* MemRegion: 57a000000-5d9ffffff : JAILHOUSE Inmate Memory */
{
.phys_start = 0x57a000000,
.virt_start = 0x57a000000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED,
},
{
.phys_start = 0x57a001000,
.virt_start = 0,
.size = 0x40000000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE |
JAILHOUSE_MEM_ROOTSHARED,
},
{
.phys_start = 0x5ba001000,
.virt_start = 0x5ba001000,
.size = 0x4000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED,
},
{
.phys_start = 0x5ba005000,
.virt_start = 0x5ba005000,
.size = 0x4000,
.flags = JAILHOUSE_MEM_READ| JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_ROOTSHARED,
},
/* communication region */ {
.virt_start = 0x5ba010000,
.size = 0x00001000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_COMM_REGION,
},
JAILHOUSE_SHMEM_NET_REGIONS(0x5ba205000, 1),
},

.cache_regions = {
{
.start = 0,
.size = 2,
.type = JAILHOUSE_CACHE_L3,
},
},

.irqchips = {
/* IOAPIC 0, GSI base 0 */
{
.address = 0xfec00000,
.id = 0x100ff,
.pin_bitmap = {
0x000001
},
},
/* IOAPIC 2, GSI base 24 */
{
.address = 0xfec01000,
.id = 0x1002c,
.pin_bitmap = {
0x000000
},
},
/* IOAPIC 3, GSI base 48 */
{
.address = 0xfec40000,
.id = 0x802c,
.pin_bitmap = {
0x000000
},
},
},

.pio_regions = {
/* Port I/O: 0020-0021 : pic1 */
PIO_RANGE(0x20, 0x2),
/* Port I/O: 00a0-00a1 : pic2 */
PIO_RANGE(0xa0, 0x2),
/* Port I/O: 03f8-03ff : serial */
PIO_RANGE(0x3f8, 0x8),
},
.pci_devices = {
{ 
.type = JAILHOUSE_PCI_TYPE_IVSHMEM,
.iommu = 1,
.domain = 0x0,
.bdf = 0x17 << 3,
.bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_MSIX,
.num_msix_vectors = 16,
.shmem_regions_start = 0,
.shmem_dev_id = 1,
.shmem_peers = 2,
.shmem_protocol = 0x0002,
},
{ 
.type = JAILHOUSE_PCI_TYPE_IVSHMEM,
.iommu = 1,
.domain = 0x0,
.bdf = 0x18 << 3,
.bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_MSIX,
.num_msix_vectors = 2,
.shmem_regions_start = 5,
.shmem_dev_id = 1,
.shmem_peers = 2,
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH,
},
},

.pci_caps = {
},
};

在2021年12月22日星期三 UTC+8 21:39:52<jiajun huang> 写道:

> Dear Jailhouse community,
> This bug occurred when I tried to start nuttx on a none-root cell on the 
> server. I added two ivshmem devices for nuttx. Below is my configuration 
> file. I am not sure if there is a problem with the mmio area in the 
> configuration file. What is the communication area? In addition, if 
> jailhouse runs in QEMU, can two virtual machines communicate with each 
> other through ivshmem-net?
>
> Below is my root-cell , nuttx configuration and log output from the port.
>
> Best regards,
>
> Jiajun Huang
>
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/667ecb2b-daa0-400f-a92c-8fbc3facf672n%40googlegroups.com.

Reply via email to