Home
last modified time | relevance | path

Searched refs:lg (Results 1 – 14 of 14) sorted by relevance

/drivers/lguest/
Dlguest_user.c49 map = rcu_dereference(cpu->lg->eventfds); in send_notify_to_eventfd()
90 static int add_eventfd(struct lguest *lg, unsigned long addr, int fd) in add_eventfd() argument
92 struct lg_eventfd_map *new, *old = lg->eventfds; in add_eventfd()
133 rcu_assign_pointer(lg->eventfds, new); in add_eventfd()
153 static int attach_eventfd(struct lguest *lg, const unsigned long __user *input) in attach_eventfd() argument
170 err = add_eventfd(lg, addr, fd); in attach_eventfd()
203 struct lguest *lg = file->private_data; in read() local
208 if (!lg) in read()
212 if (cpu_id >= lg->nr_cpus) in read()
215 cpu = &lg->cpus[cpu_id]; in read()
[all …]
Dpage_tables.c88 return &cpu->lg->pgdirs[i].pgdir[index]; in spgd_addr()
139 return cpu->lg->pgdirs[cpu->cpu_pgd].gpgdir + index * sizeof(pgd_t); in gpgd_addr()
219 base = (unsigned long)cpu->lg->mem_base / PAGE_SIZE; in gpte_to_spte()
256 pte_pfn(gpte) >= cpu->lg->pfn_limit) { in check_gpte()
266 (pgd_pfn(gpgd) >= cpu->lg->pfn_limit)) { in check_gpgd()
277 (pmd_pfn(gpmd) >= cpu->lg->pfn_limit)) { in check_gpmd()
628 static void flush_user_mappings(struct lguest *lg, int idx) in flush_user_mappings() argument
632 for (i = 0; i < pgd_index(lg->kernel_address); i++) in flush_user_mappings()
633 release_pgd(lg->pgdirs[idx].pgdir + i); in flush_user_mappings()
645 flush_user_mappings(cpu->lg, cpu->cpu_pgd); in guest_pagetable_flush_user()
[all …]
Dhypercalls.c72 cpu->lg->dead = ERR_PTR(-ERESTART); in do_hcall()
102 guest_set_pgd(cpu->lg, args->arg1, args->arg2); in do_hcall()
106 guest_set_pmd(cpu->lg, args->arg1, args->arg2); in do_hcall()
145 if (copy_from_user(&st, &cpu->lg->lguest_data->hcall_status, sizeof(st))) in do_async_hcalls()
173 if (copy_from_user(&args, &cpu->lg->lguest_data->hcalls[n], in do_async_hcalls()
183 if (put_user(0xFF, &cpu->lg->lguest_data->hcall_status[n])) { in do_async_hcalls()
213 kill_guest(cpu, "bad guest page %p", cpu->lg->lguest_data); in initialize()
219 if (get_user(cpu->lg->noirq_start, &cpu->lg->lguest_data->noirq_start) in initialize()
220 || get_user(cpu->lg->noirq_end, &cpu->lg->lguest_data->noirq_end)) in initialize()
221 kill_guest(cpu, "bad guest page %p", cpu->lg->lguest_data); in initialize()
[all …]
Dlg.h41 struct lguest *lg; member
122 bool lguest_address_ok(const struct lguest *lg,
174 bool check_syscall_vector(struct lguest *lg);
188 int init_guest_pagetable(struct lguest *lg);
189 void free_guest_pagetable(struct lguest *lg);
191 void guest_set_pgd(struct lguest *lg, unsigned long gpgdir, u32 i);
193 void guest_set_pmd(struct lguest *lg, unsigned long gpgdir, u32 i);
251 if (!(cpu)->lg->dead) { \
252 (cpu)->lg->dead = kasprintf(GFP_ATOMIC, fmt); \
253 if (!(cpu)->lg->dead) \
[all …]
Dcore.c176 bool lguest_address_ok(const struct lguest *lg, in lguest_address_ok() argument
179 return (addr+len) / PAGE_SIZE < lg->pfn_limit && (addr+len >= addr); in lguest_address_ok()
189 if (!lguest_address_ok(cpu->lg, addr, bytes) in __lgread()
190 || copy_from_user(b, cpu->lg->mem_base + addr, bytes) != 0) { in __lgread()
201 if (!lguest_address_ok(cpu->lg, addr, bytes) in __lgwrite()
202 || copy_to_user(cpu->lg->mem_base + addr, b, bytes) != 0) in __lgwrite()
215 while (!cpu->lg->dead) { in run_guest()
264 if (cpu->lg->dead) in run_guest()
301 if (cpu->lg->dead == ERR_PTR(-ERESTART)) in run_guest()
Dinterrupts_and_traps.c116 if (get_user(irq_enable, &cpu->lg->lguest_data->irq_enabled) == 0 in set_guest_interrupt()
147 if (put_user(0, &cpu->lg->lguest_data->irq_enabled)) in set_guest_interrupt()
164 if (!cpu->lg->lguest_data) in interrupt_pending()
171 if (copy_from_user(&blk, cpu->lg->lguest_data->blocked_interrupts, in interrupt_pending()
197 if (cpu->regs->eip >= cpu->lg->noirq_start && in try_deliver_interrupt()
198 (cpu->regs->eip < cpu->lg->noirq_end)) in try_deliver_interrupt()
204 if (put_user(X86_EFLAGS_IF, &cpu->lg->lguest_data->irq_enabled)) in try_deliver_interrupt()
210 if (get_user(irq_enabled, &cpu->lg->lguest_data->irq_enabled)) in try_deliver_interrupt()
215 &cpu->lg->lguest_data->irq_pending); in try_deliver_interrupt()
252 put_user(0, &cpu->lg->lguest_data->irq_pending); in try_deliver_interrupt()
[all …]
DMakefile5 obj-$(CONFIG_LGUEST) += lg.o
6 lg-y = core.o hypercalls.o page_tables.o interrupts_and_traps.o \
9 lg-$(CONFIG_X86_32) += x86/switcher_32.o x86/core.o
/drivers/gpio/
Dgpio-lynxpoint.c103 struct lp_gpio *lg = container_of(chip, struct lp_gpio, chip); in lp_gpio_reg() local
113 return lg->reg_base + reg + reg_offset; in lp_gpio_reg()
118 struct lp_gpio *lg = container_of(chip, struct lp_gpio, chip); in lp_gpio_request() local
123 pm_runtime_get(&lg->pdev->dev); /* should we put if failed */ in lp_gpio_request()
127 dev_err(&lg->pdev->dev, "gpio %d reserved for ACPI\n", offset); in lp_gpio_request()
143 struct lp_gpio *lg = container_of(chip, struct lp_gpio, chip); in lp_gpio_free() local
149 pm_runtime_put(&lg->pdev->dev); in lp_gpio_free()
154 struct lp_gpio *lg = irq_data_get_irq_chip_data(d); in lp_irq_type() local
158 unsigned long reg = lp_gpio_reg(&lg->chip, hwirq, LP_CONFIG1); in lp_irq_type()
160 if (hwirq >= lg->chip.ngpio) in lp_irq_type()
[all …]
/drivers/lguest/x86/
Dcore.c172 : "0"(pages), "1"(__pa(cpu->lg->pgdirs[cpu->cpu_pgd].pgdir)) in run_guest_once()
399 if (cpu->lg->lguest_data && in lguest_arch_handle_trap()
401 &cpu->lg->lguest_data->cr2)) in lguest_arch_handle_trap()
640 if (!lguest_address_ok(cpu->lg, cpu->hcall->arg1, in lguest_arch_init_hypercalls()
641 sizeof(*cpu->lg->lguest_data))) in lguest_arch_init_hypercalls()
651 cpu->lg->lguest_data = cpu->lg->mem_base + cpu->hcall->arg1; in lguest_arch_init_hypercalls()
666 if (put_user(tsc_speed, &cpu->lg->lguest_data->tsc_khz)) in lguest_arch_init_hypercalls()
670 if (!check_syscall_vector(cpu->lg)) in lguest_arch_init_hypercalls()
/drivers/scsi/qla2xxx/
Dqla_mbx.c1814 struct logio_entry_24xx *lg; in qla24xx_login_fabric() local
1830 lg = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); in qla24xx_login_fabric()
1831 if (lg == NULL) { in qla24xx_login_fabric()
1836 memset(lg, 0, sizeof(struct logio_entry_24xx)); in qla24xx_login_fabric()
1838 lg->entry_type = LOGINOUT_PORT_IOCB_TYPE; in qla24xx_login_fabric()
1839 lg->entry_count = 1; in qla24xx_login_fabric()
1840 lg->handle = MAKE_HANDLE(req->id, lg->handle); in qla24xx_login_fabric()
1841 lg->nport_handle = cpu_to_le16(loop_id); in qla24xx_login_fabric()
1842 lg->control_flags = __constant_cpu_to_le16(LCF_COMMAND_PLOGI); in qla24xx_login_fabric()
1844 lg->control_flags |= __constant_cpu_to_le16(LCF_COND_PLOGI); in qla24xx_login_fabric()
[all …]
/drivers/net/ethernet/mellanox/mlx4/
Dfw.c916 int lg; in mlx4_map_cmd() local
936 lg = ffs(mlx4_icm_addr(&iter) | mlx4_icm_size(&iter)) - 1; in mlx4_map_cmd()
937 if (lg < MLX4_ICM_PAGE_SHIFT) { in mlx4_map_cmd()
946 for (i = 0; i < mlx4_icm_size(&iter) >> lg; ++i) { in mlx4_map_cmd()
949 virt += 1 << lg; in mlx4_map_cmd()
953 cpu_to_be64((mlx4_icm_addr(&iter) + (i << lg)) | in mlx4_map_cmd()
954 (lg - MLX4_ICM_PAGE_SHIFT)); in mlx4_map_cmd()
955 ts += 1 << (lg - 10); in mlx4_map_cmd()
1020 u8 lg; in mlx4_QUERY_FW() local
1060 MLX4_GET(lg, outbox, QUERY_FW_PPF_ID); in mlx4_QUERY_FW()
[all …]
/drivers/infiniband/hw/mthca/
Dmthca_cmd.c661 int lg; in mthca_map_cmd() local
681 lg = ffs(mthca_icm_addr(&iter) | mthca_icm_size(&iter)) - 1; in mthca_map_cmd()
682 if (lg < MTHCA_ICM_PAGE_SHIFT) { in mthca_map_cmd()
690 for (i = 0; i < mthca_icm_size(&iter) >> lg; ++i) { in mthca_map_cmd()
693 virt += 1 << lg; in mthca_map_cmd()
697 cpu_to_be64((mthca_icm_addr(&iter) + (i << lg)) | in mthca_map_cmd()
698 (lg - MTHCA_ICM_PAGE_SHIFT)); in mthca_map_cmd()
699 ts += 1 << (lg - 10); in mthca_map_cmd()
782 u8 lg; in mthca_QUERY_FW() local
823 MTHCA_GET(lg, outbox, QUERY_FW_MAX_CMD_OFFSET); in mthca_QUERY_FW()
[all …]
/drivers/net/usb/
DMakefile34 obj-$(CONFIG_USB_VL600) += lg-vl600.o
/drivers/hid/
DMakefile17 hid-logitech-y := hid-lg.o