Exemplo n.º 1
0
int arch_cell_create(struct cell *cell)
{
	int err;

	err = vcpu_cell_init(cell);
	if (err)
		return err;

	err = iommu_cell_init(cell);
	if (err)
		goto error_vm_exit;

	err = pci_cell_init(cell);
	if (err)
		goto error_iommu_exit;

	err = ioapic_cell_init(cell);
	if (err)
		goto error_pci_exit;

	cell->comm_page.comm_region.pm_timer_address =
		system_config->platform_info.x86.pm_timer_address;

	return 0;

error_pci_exit:
	pci_cell_exit(cell);
error_iommu_exit:
	iommu_cell_exit(cell);
error_vm_exit:
	vcpu_cell_exit(cell);
	return err;
}
Exemplo n.º 2
0
void arch_cell_destroy(struct cell *cell)
{
	ioapic_cell_exit(cell);
	pci_cell_exit(cell);
	iommu_cell_exit(cell);
	vcpu_cell_exit(cell);
}
Exemplo n.º 3
0
void arch_cell_destroy(struct per_cpu *cpu_data, struct cell *cell)
{
	ioapic_cell_exit(cell);
	pci_cell_exit(cell);
	vtd_cell_exit(cell);
	vmx_cell_exit(cell);
}
Exemplo n.º 4
0
int arch_cell_create(struct cell *cell)
{
	unsigned int cpu;
	int err;

	err = vcpu_cell_init(cell);
	if (err)
		return err;

	err = iommu_cell_init(cell);
	if (err)
		goto error_vm_exit;

	err = pci_cell_init(cell);
	if (err)
		goto error_iommu_exit;

	err = ioapic_cell_init(cell);
	if (err)
		goto error_pci_exit;

	err = cat_cell_init(cell);
	if (err)
		goto error_ioapic_exit;

	cell->comm_page.comm_region.pm_timer_address =
		system_config->platform_info.x86.pm_timer_address;
	cell->comm_page.comm_region.num_cpus = 0;
	for_each_cpu(cpu, cell->cpu_set)
		cell->comm_page.comm_region.num_cpus++;

	return 0;

error_ioapic_exit:
	ioapic_cell_exit(cell);
error_pci_exit:
	pci_cell_exit(cell);
error_iommu_exit:
	iommu_cell_exit(cell);
error_vm_exit:
	vcpu_cell_exit(cell);
	return err;
}