Skip to content

Commit

Permalink
Rename client_vm_num to client_num_vm
Browse files Browse the repository at this point in the history
  • Loading branch information
erichchan999 committed May 22, 2024
1 parent 8b5360b commit 57d4a11
Show file tree
Hide file tree
Showing 35 changed files with 86 additions and 86 deletions.
16 changes: 8 additions & 8 deletions examples/virtio-snd/board/odroidc4/virtio-snd.system
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<!-- Sound data regions -->
<memory_region name="snd_data" size="0x200_000" page_size="0x200_000" />

<protection_domain name="CLIENT_VMM_1" priority="90">
<protection_domain name="CLIENT_1_VMM" priority="90">
<program_image path="client_vmm.elf" />
<map mr="client_vm_ram_1" vaddr="0x20000000" perms="rw" setvar_vaddr="guest_ram_vaddr" />

Expand All @@ -69,7 +69,7 @@
</virtual_machine>
</protection_domain>

<protection_domain name="CLIENT_VMM_2" priority="90">
<protection_domain name="CLIENT_2_VMM" priority="90">
<program_image path="client_vmm.elf" />
<map mr="client_vm_ram_2" vaddr="0x20000000" perms="rw" setvar_vaddr="guest_ram_vaddr" />

Expand Down Expand Up @@ -251,12 +251,12 @@
</protection_domain>

<channel>
<end pd="CLIENT_VMM_1" id="1"/>
<end pd="CLIENT_1_VMM" id="1"/>
<end pd="serial_virt_tx" id="1"/>
</channel>

<channel>
<end pd="CLIENT_VMM_2" id="1"/>
<end pd="CLIENT_2_VMM" id="1"/>
<end pd="serial_virt_tx" id="2"/>
</channel>

Expand All @@ -271,12 +271,12 @@
</channel>

<channel>
<end pd="CLIENT_VMM_1" id="2"/>
<end pd="CLIENT_1_VMM" id="2"/>
<end pd="serial_virt_rx" id="1"/>
</channel>

<channel>
<end pd="CLIENT_VMM_2" id="2"/>
<end pd="CLIENT_2_VMM" id="2"/>
<end pd="serial_virt_rx" id="2"/>
</channel>

Expand All @@ -292,12 +292,12 @@

<!-- Sound -->
<channel>
<end pd="CLIENT_VMM_1" id="4"/>
<end pd="CLIENT_1_VMM" id="4"/>
<end pd="sound_virt" id="1"/>
</channel>

<channel>
<end pd="CLIENT_VMM_2" id="4"/>
<end pd="CLIENT_2_VMM" id="4"/>
<end pd="sound_virt" id="2"/>
</channel>

Expand Down
16 changes: 8 additions & 8 deletions examples/virtio-snd/board/qemu_arm_virt/virtio-snd.system
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<!-- Sound data regions -->
<memory_region name="snd_data" size="0x200_000" page_size="0x200_000" />

<protection_domain name="CLIENT_VMM_1" priority="90">
<protection_domain name="CLIENT_1_VMM" priority="90">
<program_image path="client_vmm.elf" />
<map mr="client_vm_ram_1" vaddr="0x40000000" perms="rw" setvar_vaddr="guest_ram_vaddr" />

Expand All @@ -63,7 +63,7 @@
</virtual_machine>
</protection_domain>

<protection_domain name="CLIENT_VMM_2" priority="90">
<protection_domain name="CLIENT_2_VMM" priority="90">
<program_image path="client_vmm.elf" />
<map mr="client_vm_ram_2" vaddr="0x40000000" perms="rw" setvar_vaddr="guest_ram_vaddr" />

Expand Down Expand Up @@ -241,12 +241,12 @@
</protection_domain>

<channel>
<end pd="CLIENT_VMM_1" id="1"/>
<end pd="CLIENT_1_VMM" id="1"/>
<end pd="serial_virt_tx" id="1"/>
</channel>

<channel>
<end pd="CLIENT_VMM_2" id="1"/>
<end pd="CLIENT_2_VMM" id="1"/>
<end pd="serial_virt_tx" id="2"/>
</channel>

Expand All @@ -261,12 +261,12 @@
</channel>

<channel>
<end pd="CLIENT_VMM_1" id="2"/>
<end pd="CLIENT_1_VMM" id="2"/>
<end pd="serial_virt_rx" id="1"/>
</channel>

<channel>
<end pd="CLIENT_VMM_2" id="2"/>
<end pd="CLIENT_2_VMM" id="2"/>
<end pd="serial_virt_rx" id="2"/>
</channel>

Expand All @@ -282,12 +282,12 @@

<!-- Sound -->
<channel>
<end pd="CLIENT_VMM_1" id="4"/>
<end pd="CLIENT_1_VMM" id="4"/>
<end pd="sound_virt" id="1"/>
</channel>

<channel>
<end pd="CLIENT_VMM_2" id="4"/>
<end pd="CLIENT_2_VMM" id="4"/>
<end pd="sound_virt" id="2"/>
</channel>

Expand Down
132 changes: 66 additions & 66 deletions examples/virtio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ BLK_DRIVER_VM_DIR := board/$(BOARD)/blk_driver_vm
BLK_DRIVER_VM_DTS_DIR := $(BLK_DRIVER_VM_DIR)/dts
BLK_DRIVER_VM_ROOTFS_TMP_DIR := $(BUILD_DIR)/blk_driver_vm_rootfs

CLIENT_VM_1_DIR := board/$(BOARD)/client_vm_1
CLIENT_VM_1_DTS_DIR := $(CLIENT_VM_1_DIR)/dts
CLIENT_VM_1_ROOTFS_TMP_DIR := $(BUILD_DIR)/client_vm_1_rootfs
CLIENT_1_VM_DIR := board/$(BOARD)/client_1_vm
CLIENT_1_VM_DTS_DIR := $(CLIENT_1_VM_DIR)/dts
CLIENT_1_VM_ROOTFS_TMP_DIR := $(BUILD_DIR)/client_1_vm_rootfs

CLIENT_VM_2_DIR := board/$(BOARD)/client_vm_2
CLIENT_VM_2_DTS_DIR := $(CLIENT_VM_2_DIR)/dts
CLIENT_VM_2_ROOTFS_TMP_DIR := $(BUILD_DIR)/client_vm_2_rootfs
CLIENT_2_VM_DIR := board/$(BOARD)/client_2_vm
CLIENT_2_VM_DTS_DIR := $(CLIENT_2_VM_DIR)/dts
CLIENT_2_VM_ROOTFS_TMP_DIR := $(BUILD_DIR)/client_2_vm_rootfs


BLK_DRIVER_VM_LINUX := $(BLK_DRIVER_VM_DIR)/linux
Expand All @@ -83,30 +83,30 @@ BLK_DRIVER_VM_DTS_OVERLAYS := ${BLK_DRIVER_VM_DTS_OVERLAYS_${BOARD}}
BLK_DRIVER_VM_DTB := $(BUILD_DIR)/blk_driver_vm.dtb


CLIENT_VM_1_LINUX := $(CLIENT_VM_1_DIR)/linux
CLIENT_VM_1_INITRD := $(CLIENT_VM_1_DIR)/rootfs.cpio.gz
CLIENT_VM_1_INITRD_MODIFIED := $(BUILD_DIR)/client_vm_1_rootfs.cpio.gz
CLIENT_VM_1_BASE_DTS := $(CLIENT_VM_1_DTS_DIR)/linux.dts
CLIENT_VM_1_DTS_OVERLAYS_qemu_arm_virt := $(CLIENT_VM_1_DTS_DIR)/init.dts \
$(CLIENT_VM_1_DTS_DIR)/virtio.dts
CLIENT_VM_1_DTS_OVERLAYS_odroidc4 := $(CLIENT_VM_1_DTS_DIR)/init.dts \
$(CLIENT_VM_1_DTS_DIR)/virtio.dts\
$(CLIENT_VM_1_DTS_DIR)/disable.dts
CLIENT_VM_1_DTS_OVERLAYS := ${CLIENT_VM_1_DTS_OVERLAYS_${BOARD}}
CLIENT_VM_1_DTB := $(BUILD_DIR)/client_vm_1.dtb


CLIENT_VM_2_LINUX := $(CLIENT_VM_2_DIR)/linux
CLIENT_VM_2_INITRD := $(CLIENT_VM_2_DIR)/rootfs.cpio.gz
CLIENT_VM_2_INITRD_MODIFIED := $(BUILD_DIR)/client_vm_2_rootfs.cpio.gz
CLIENT_VM_2_BASE_DTS := $(CLIENT_VM_2_DTS_DIR)/linux.dts
CLIENT_VM_2_DTS_OVERLAYS_qemu_arm_virt := $(CLIENT_VM_2_DTS_DIR)/init.dts \
$(CLIENT_VM_2_DTS_DIR)/virtio.dts
CLIENT_VM_2_DTS_OVERLAYS_odroidc4 := $(CLIENT_VM_2_DTS_DIR)/init.dts \
$(CLIENT_VM_2_DTS_DIR)/virtio.dts \
$(CLIENT_VM_2_DTS_DIR)/disable.dts
CLIENT_VM_2_DTS_OVERLAYS := ${CLIENT_VM_2_DTS_OVERLAYS_${BOARD}}
CLIENT_VM_2_DTB := $(BUILD_DIR)/client_vm_2.dtb
CLIENT_1_VM_LINUX := $(CLIENT_1_VM_DIR)/linux
CLIENT_1_VM_INITRD := $(CLIENT_1_VM_DIR)/rootfs.cpio.gz
CLIENT_1_VM_INITRD_MODIFIED := $(BUILD_DIR)/client_1_vm_rootfs.cpio.gz
CLIENT_1_VM_BASE_DTS := $(CLIENT_1_VM_DTS_DIR)/linux.dts
CLIENT_1_VM_DTS_OVERLAYS_qemu_arm_virt := $(CLIENT_1_VM_DTS_DIR)/init.dts \
$(CLIENT_1_VM_DTS_DIR)/virtio.dts
CLIENT_1_VM_DTS_OVERLAYS_odroidc4 := $(CLIENT_1_VM_DTS_DIR)/init.dts \
$(CLIENT_1_VM_DTS_DIR)/virtio.dts\
$(CLIENT_1_VM_DTS_DIR)/disable.dts
CLIENT_1_VM_DTS_OVERLAYS := ${CLIENT_1_VM_DTS_OVERLAYS_${BOARD}}
CLIENT_1_VM_DTB := $(BUILD_DIR)/client_1_vm.dtb


CLIENT_2_VM_LINUX := $(CLIENT_2_VM_DIR)/linux
CLIENT_2_VM_INITRD := $(CLIENT_2_VM_DIR)/rootfs.cpio.gz
CLIENT_2_VM_INITRD_MODIFIED := $(BUILD_DIR)/client_2_vm_rootfs.cpio.gz
CLIENT_2_VM_BASE_DTS := $(CLIENT_2_VM_DTS_DIR)/linux.dts
CLIENT_2_VM_DTS_OVERLAYS_qemu_arm_virt := $(CLIENT_2_VM_DTS_DIR)/init.dts \
$(CLIENT_2_VM_DTS_DIR)/virtio.dts
CLIENT_2_VM_DTS_OVERLAYS_odroidc4 := $(CLIENT_2_VM_DTS_DIR)/init.dts \
$(CLIENT_2_VM_DTS_DIR)/virtio.dts \
$(CLIENT_2_VM_DTS_DIR)/disable.dts
CLIENT_2_VM_DTS_OVERLAYS := ${CLIENT_2_VM_DTS_OVERLAYS_${BOARD}}
CLIENT_2_VM_DTB := $(BUILD_DIR)/client_2_vm.dtb

SDDF_UTIL := $(SDDF_DIR)/util

Expand All @@ -128,15 +128,15 @@ BLK_DRIVER_VM_USERLEVEL_INIT_qemu_arm_virt := qemu_blk_driver_init
BLK_DRIVER_VM_USERLEVEL_INIT_odroidc4 := blk_driver_init
BLK_DRIVER_VM_USERLEVEL_INIT := ${BLK_DRIVER_VM_USERLEVEL_INIT_${BOARD}}

CLIENT_VM_1_USERLEVEL :=
CLIENT_VM_1_USERLEVEL_INIT_qemu_arm_virt := qemu_blk_client_init
CLIENT_VM_1_USERLEVEL_INIT_odroidc4 := blk_client_init
CLIENT_VM_1_USERLEVEL_INIT := ${CLIENT_VM_1_USERLEVEL_INIT_${BOARD}}
CLIENT_1_VM_USERLEVEL :=
CLIENT_1_VM_USERLEVEL_INIT_qemu_arm_virt := qemu_blk_client_init
CLIENT_1_VM_USERLEVEL_INIT_odroidc4 := blk_client_init
CLIENT_1_VM_USERLEVEL_INIT := ${CLIENT_1_VM_USERLEVEL_INIT_${BOARD}}

CLIENT_VM_2_USERLEVEL :=
CLIENT_VM_2_USERLEVEL_INIT_qemu_arm_virt := qemu_blk_client_init
CLIENT_VM_2_USERLEVEL_INIT_odroidc4 := blk_client_init
CLIENT_VM_2_USERLEVEL_INIT := ${CLIENT_VM_2_USERLEVEL_INIT_${BOARD}}
CLIENT_2_VM_USERLEVEL :=
CLIENT_2_VM_USERLEVEL_INIT_qemu_arm_virt := qemu_blk_client_init
CLIENT_2_VM_USERLEVEL_INIT_odroidc4 := blk_client_init
CLIENT_2_VM_USERLEVEL_INIT := ${CLIENT_2_VM_USERLEVEL_INIT_${BOARD}}

IMAGE_FILE = $(BUILD_DIR)/loader.img
REPORT_FILE = $(BUILD_DIR)/report.txt
Expand All @@ -155,7 +155,7 @@ VMM_OBJS := printf.o \
tcb.o \
vcpu.o

CLIENT_VMM_1_OBJS := $(VMM_OBJS) \
CLIENT_1_VMM_OBJS := $(VMM_OBJS) \
client_images_1.o \
client_vmm.o \
console.o \
Expand All @@ -165,7 +165,7 @@ CLIENT_VMM_1_OBJS := $(VMM_OBJS) \
sddf_blk_fsmalloc.o \
sddf_printf.o sddf_putchar_debug.o \

CLIENT_VMM_2_OBJS := $(VMM_OBJS) \
CLIENT_2_VMM_OBJS := $(VMM_OBJS) \
client_images_2.o \
client_vmm.o \
console.o \
Expand Down Expand Up @@ -259,29 +259,29 @@ $(BLK_DRIVER_VM_INITRD_MODIFIED): $(addprefix $(BUILD_DIR)/, $(BLK_DRIVER_VM_USE
--startup $(addprefix $(BUILD_DIR)/, $(BLK_DRIVER_VM_USERLEVEL_INIT)) \
--home $(addprefix $(BUILD_DIR)/, $(BLK_DRIVER_VM_USERLEVEL))

$(CLIENT_VM_1_INITRD_MODIFIED): $(addprefix $(BUILD_DIR)/, $(CLIENT_VM_1_USERLEVEL)) \
$(addprefix $(BUILD_DIR)/, $(CLIENT_VM_1_USERLEVEL_INIT))
$(VMM_TOOLS)/packrootfs $(CLIENT_VM_1_INITRD) $(CLIENT_VM_1_ROOTFS_TMP_DIR) -o $(CLIENT_VM_1_INITRD_MODIFIED) \
--startup $(addprefix $(BUILD_DIR)/, $(CLIENT_VM_1_USERLEVEL_INIT)) \
--home $(addprefix $(BUILD_DIR)/, $(CLIENT_VM_1_USERLEVEL))
$(CLIENT_1_VM_INITRD_MODIFIED): $(addprefix $(BUILD_DIR)/, $(CLIENT_1_VM_USERLEVEL)) \
$(addprefix $(BUILD_DIR)/, $(CLIENT_1_VM_USERLEVEL_INIT))
$(VMM_TOOLS)/packrootfs $(CLIENT_1_VM_INITRD) $(CLIENT_1_VM_ROOTFS_TMP_DIR) -o $(CLIENT_1_VM_INITRD_MODIFIED) \
--startup $(addprefix $(BUILD_DIR)/, $(CLIENT_1_VM_USERLEVEL_INIT)) \
--home $(addprefix $(BUILD_DIR)/, $(CLIENT_1_VM_USERLEVEL))

$(CLIENT_VM_2_INITRD_MODIFIED): $(addprefix $(BUILD_DIR)/, $(CLIENT_VM_2_USERLEVEL)) \
$(addprefix $(BUILD_DIR)/, $(CLIENT_VM_2_USERLEVEL_INIT))
$(VMM_TOOLS)/packrootfs $(CLIENT_VM_2_INITRD) $(CLIENT_VM_2_ROOTFS_TMP_DIR) -o $(CLIENT_VM_2_INITRD_MODIFIED) \
--startup $(addprefix $(BUILD_DIR)/, $(CLIENT_VM_2_USERLEVEL_INIT)) \
--home $(addprefix $(BUILD_DIR)/, $(CLIENT_VM_2_USERLEVEL))
$(CLIENT_2_VM_INITRD_MODIFIED): $(addprefix $(BUILD_DIR)/, $(CLIENT_2_VM_USERLEVEL)) \
$(addprefix $(BUILD_DIR)/, $(CLIENT_2_VM_USERLEVEL_INIT))
$(VMM_TOOLS)/packrootfs $(CLIENT_2_VM_INITRD) $(CLIENT_2_VM_ROOTFS_TMP_DIR) -o $(CLIENT_2_VM_INITRD_MODIFIED) \
--startup $(addprefix $(BUILD_DIR)/, $(CLIENT_2_VM_USERLEVEL_INIT)) \
--home $(addprefix $(BUILD_DIR)/, $(CLIENT_2_VM_USERLEVEL))

$(BLK_DRIVER_VM_DTB): $(BLK_DRIVER_VM_BASE_DTS) $(BLK_DRIVER_VM_DTS_OVERLAYS)
$(VMM_TOOLS)/dtscat $^ > $(BUILD_DIR)/blk_driver_vm.dts
$(DTC) -q -I dts -O dtb $(BUILD_DIR)/blk_driver_vm.dts > $@

$(CLIENT_VM_1_DTB): $(CLIENT_VM_1_BASE_DTS) $(CLIENT_VM_1_DTS_OVERLAYS)
$(VMM_TOOLS)/dtscat $^ > $(BUILD_DIR)/client_vm_1.dts
$(DTC) -q -I dts -O dtb $(BUILD_DIR)/client_vm_1.dts > $@
$(CLIENT_1_VM_DTB): $(CLIENT_1_VM_BASE_DTS) $(CLIENT_1_VM_DTS_OVERLAYS)
$(VMM_TOOLS)/dtscat $^ > $(BUILD_DIR)/client_1_vm.dts
$(DTC) -q -I dts -O dtb $(BUILD_DIR)/client_1_vm.dts > $@

$(CLIENT_VM_2_DTB): $(CLIENT_VM_2_BASE_DTS) $(CLIENT_VM_2_DTS_OVERLAYS)
$(VMM_TOOLS)/dtscat $^ > $(BUILD_DIR)/client_vm_2.dts
$(DTC) -q -I dts -O dtb $(BUILD_DIR)/client_vm_2.dts > $@
$(CLIENT_2_VM_DTB): $(CLIENT_2_VM_BASE_DTS) $(CLIENT_2_VM_DTS_OVERLAYS)
$(VMM_TOOLS)/dtscat $^ > $(BUILD_DIR)/client_2_vm.dts
$(DTC) -q -I dts -O dtb $(BUILD_DIR)/client_2_vm.dts > $@

$(BUILD_DIR)/blk_driver_images.o: $(VMM_TOOLS)/package_guest_images.S $(BLK_DRIVER_VM_LINUX) $(BLK_DRIVER_VM_DTB) $(BLK_DRIVER_VM_INITRD_MODIFIED)
$(CC) -c -g3 -x assembler-with-cpp \
Expand All @@ -291,19 +291,19 @@ $(BUILD_DIR)/blk_driver_images.o: $(VMM_TOOLS)/package_guest_images.S $(BLK_DRIV
-target aarch64-none-elf \
$< -o $@

$(BUILD_DIR)/client_images_1.o: $(VMM_TOOLS)/package_guest_images.S $(CLIENT_VM_1_LINUX) $(CLIENT_VM_1_DTB) $(CLIENT_VM_1_INITRD_MODIFIED)
$(BUILD_DIR)/client_images_1.o: $(VMM_TOOLS)/package_guest_images.S $(CLIENT_1_VM_LINUX) $(CLIENT_1_VM_DTB) $(CLIENT_1_VM_INITRD_MODIFIED)
$(CC) -c -g3 -x assembler-with-cpp \
-DGUEST_KERNEL_IMAGE_PATH=\"$(CLIENT_VM_1_LINUX)\" \
-DGUEST_DTB_IMAGE_PATH=\"$(CLIENT_VM_1_DTB)\" \
-DGUEST_INITRD_IMAGE_PATH=\"$(CLIENT_VM_1_INITRD_MODIFIED)\" \
-DGUEST_KERNEL_IMAGE_PATH=\"$(CLIENT_1_VM_LINUX)\" \
-DGUEST_DTB_IMAGE_PATH=\"$(CLIENT_1_VM_DTB)\" \
-DGUEST_INITRD_IMAGE_PATH=\"$(CLIENT_1_VM_INITRD_MODIFIED)\" \
-target aarch64-none-elf \
$< -o $@

$(BUILD_DIR)/client_images_2.o: $(VMM_TOOLS)/package_guest_images.S $(CLIENT_VM_2_LINUX) $(CLIENT_VM_2_DTB) $(CLIENT_VM_2_INITRD_MODIFIED)
$(BUILD_DIR)/client_images_2.o: $(VMM_TOOLS)/package_guest_images.S $(CLIENT_2_VM_LINUX) $(CLIENT_2_VM_DTB) $(CLIENT_2_VM_INITRD_MODIFIED)
$(CC) -c -g3 -x assembler-with-cpp \
-DGUEST_KERNEL_IMAGE_PATH=\"$(CLIENT_VM_2_LINUX)\" \
-DGUEST_DTB_IMAGE_PATH=\"$(CLIENT_VM_2_DTB)\" \
-DGUEST_INITRD_IMAGE_PATH=\"$(CLIENT_VM_2_INITRD_MODIFIED)\" \
-DGUEST_KERNEL_IMAGE_PATH=\"$(CLIENT_2_VM_LINUX)\" \
-DGUEST_DTB_IMAGE_PATH=\"$(CLIENT_2_VM_DTB)\" \
-DGUEST_INITRD_IMAGE_PATH=\"$(CLIENT_2_VM_INITRD_MODIFIED)\" \
-target aarch64-none-elf \
$< -o $@

Expand Down Expand Up @@ -340,10 +340,10 @@ $(BUILD_DIR)/sddf_blk_%.o: $(SDDF_BLK_COMPONENTS)/%.c Makefile
$(BUILD_DIR)/sddf_blk_%.o: $(SDDF_BLK_UTIL)/%.c Makefile
$(CC) -c $(CFLAGS) $< -o $@

$(BUILD_DIR)/client_vmm_1.elf: $(addprefix $(BUILD_DIR)/, $(CLIENT_VMM_1_OBJS))
$(BUILD_DIR)/client_1_vmm.elf: $(addprefix $(BUILD_DIR)/, $(CLIENT_1_VMM_OBJS))
$(LD) $(LDFLAGS) $^ $(LIBS) -o $@

$(BUILD_DIR)/client_vmm_2.elf: $(addprefix $(BUILD_DIR)/, $(CLIENT_VMM_2_OBJS))
$(BUILD_DIR)/client_2_vmm.elf: $(addprefix $(BUILD_DIR)/, $(CLIENT_2_VMM_OBJS))
$(LD) $(LDFLAGS) $^ $(LIBS) -o $@

$(BUILD_DIR)/blk_driver_vmm.elf: $(addprefix $(BUILD_DIR)/, $(BLK_DRIVER_VMM_OBJS))
Expand Down
Loading

0 comments on commit 57d4a11

Please sign in to comment.