search for: lhcall_bind_dma

Displaying 20 results from an estimated 34 matches for "lhcall_bind_dma".

2007 May 08
1
[PATCH] lguest: two net bugfixes
...= dev->priv; /* Clear all trace: others might deliver packets, we'll ignore it. */ - memset(&info->peer[info->me], 0xFF, sizeof(info->peer[info->me])); + memset(&info->peer[info->me], 0, sizeof(info->peer[info->me])); /* Deregister sg lists. */ hcall(LHCALL_BIND_DMA, peer_key(info, info->me), __pa(info->dma), 0);
2007 May 08
1
[PATCH] lguest: two net bugfixes
...= dev->priv; /* Clear all trace: others might deliver packets, we'll ignore it. */ - memset(&info->peer[info->me], 0xFF, sizeof(info->peer[info->me])); + memset(&info->peer[info->me], 0, sizeof(info->peer[info->me])); /* Deregister sg lists. */ hcall(LHCALL_BIND_DMA, peer_key(info, info->me), __pa(info->dma), 0);
2007 May 10
4
[PATCH 0/5] lguest feedback tidyups
Hi all, Gratefully-received recent feedback from CC'd was applied to excellent effect (and the advice from Matt Mackall about my personal appearance is best unrequited). The patch is split in 5 parts to correspond with the 9 parts Andrew sent out before, but here's the summary: 1) Sparse (thanks Christoph Hellwig): - lguest_const can be static now - lguest.c should include
2007 May 10
4
[PATCH 0/5] lguest feedback tidyups
Hi all, Gratefully-received recent feedback from CC'd was applied to excellent effect (and the advice from Matt Mackall about my personal appearance is best unrequited). The patch is split in 5 parts to correspond with the 9 parts Andrew sent out before, but here's the summary: 1) Sparse (thanks Christoph Hellwig): - lguest_const can be static now - lguest.c should include
2007 Jul 22
0
[PATCH] Fix lguest clock when jiffies not available
...lguest/hypercalls.c Sun Jul 22 20:49:12 2007 +1000 @@ -44,12 +44,6 @@ static void do_hcall(struct lguest *lg, else guest_pagetable_flush_user(lg); break; - case LHCALL_GET_WALLCLOCK: { - struct timespec ts; - ktime_get_real_ts(&ts); - regs->eax = ts.tv_sec; - break; - } case LHCALL_BIND_DMA: regs->eax = bind_dma(lg, regs->edx, regs->ebx, regs->ecx >> 8, regs->ecx & 0xFF); @@ -160,6 +154,8 @@ static void initialize(struct lguest *lg || put_user(lg->guestid, &lg->lguest_data->guestid)) kill_guest(lg, "bad guest page %p&quo...
2007 Jul 22
0
[PATCH] Fix lguest clock when jiffies not available
...lguest/hypercalls.c Sun Jul 22 20:49:12 2007 +1000 @@ -44,12 +44,6 @@ static void do_hcall(struct lguest *lg, else guest_pagetable_flush_user(lg); break; - case LHCALL_GET_WALLCLOCK: { - struct timespec ts; - ktime_get_real_ts(&ts); - regs->eax = ts.tv_sec; - break; - } case LHCALL_BIND_DMA: regs->eax = bind_dma(lg, regs->edx, regs->ebx, regs->ecx >> 8, regs->ecx & 0xFF); @@ -160,6 +154,8 @@ static void initialize(struct lguest *lg || put_user(lg->guestid, &lg->lguest_data->guestid)) kill_guest(lg, "bad guest page %p&quo...
2007 May 09
0
[patch 6/9] lguest: the console driver
...vc_instantiate(0, 0, &lguest_cons); +} +console_initcall(cons_init); + +static int lguestcons_probe(struct lguest_device *lgdev) +{ + lgdev->private = hvc_alloc(0, lgdev->index+1, &lguest_cons, 256); + if (IS_ERR(lgdev->private)) + return PTR_ERR(lgdev->private); + + if (!hcall(LHCALL_BIND_DMA, LGUEST_CONSOLE_DMA_KEY, __pa(&cons_input), + (1<<8) + lgdev->index+1)) + printk("lguest console: failed to bind buffer.\n"); + return 0; +} + +static struct lguest_driver lguestcons_drv = { + .name = "lguestcons", + .owner = THIS_MODULE, + .device_type = LGUES...
2007 May 09
0
[patch 6/9] lguest: the console driver
...vc_instantiate(0, 0, &lguest_cons); +} +console_initcall(cons_init); + +static int lguestcons_probe(struct lguest_device *lgdev) +{ + lgdev->private = hvc_alloc(0, lgdev->index+1, &lguest_cons, 256); + if (IS_ERR(lgdev->private)) + return PTR_ERR(lgdev->private); + + if (!hcall(LHCALL_BIND_DMA, LGUEST_CONSOLE_DMA_KEY, __pa(&cons_input), + (1<<8) + lgdev->index+1)) + printk("lguest console: failed to bind buffer.\n"); + return 0; +} + +static struct lguest_driver lguestcons_drv = { + .name = "lguestcons", + .owner = THIS_MODULE, + .device_type = LGUES...
2007 May 09
3
[patch 7/9] lguest: the net driver
...; + + /* Set up our MAC address */ + memcpy(info->peer[info->me].mac, dev->dev_addr, ETH_ALEN); + + /* Turn on promisc mode if needed */ + lguestnet_set_multicast(dev); + + for (i = 0; i < ARRAY_SIZE(info->dma); i++) { + if (fill_slot(dev, i) != 0) + goto cleanup; + } + if (!hcall(LHCALL_BIND_DMA, peer_key(info, info->me), __pa(info->dma), + (NUM_SKBS << 8) | dev->irq)) + goto cleanup; + return 0; + +cleanup: + while (--i >= 0) + dev_kfree_skb(info->skb[i]); + return -ENOMEM; +} + +static int lguestnet_close(struct net_device *dev) +{ + unsigned int i; + struct lg...
2007 May 09
3
[patch 7/9] lguest: the net driver
...; + + /* Set up our MAC address */ + memcpy(info->peer[info->me].mac, dev->dev_addr, ETH_ALEN); + + /* Turn on promisc mode if needed */ + lguestnet_set_multicast(dev); + + for (i = 0; i < ARRAY_SIZE(info->dma); i++) { + if (fill_slot(dev, i) != 0) + goto cleanup; + } + if (!hcall(LHCALL_BIND_DMA, peer_key(info, info->me), __pa(info->dma), + (NUM_SKBS << 8) | dev->irq)) + goto cleanup; + return 0; + +cleanup: + while (--i >= 0) + dev_kfree_skb(info->skb[i]); + return -ENOMEM; +} + +static int lguestnet_close(struct net_device *dev) +{ + unsigned int i; + struct lg...
2007 May 09
3
[patch 8/9] lguest: the block driver
...t;disk_name, "lgb%c", next_block_index++); + if (lguest_devices[lgdev->index].features & LGUEST_DEVICE_F_RANDOMNESS) + irqflags |= IRQF_SAMPLE_RANDOM; + err = request_irq(bd->irq, lgb_irq, irqflags, bd->disk->disk_name, bd); + if (err) + goto out_cleanup_queue; + + hcall(LHCALL_BIND_DMA, bd->phys_addr, __pa(&bd->dma), (1<<8)+bd->irq); + + bd->disk->major = bd->major; + bd->disk->first_minor = 0; + bd->disk->private_data = bd; + bd->disk->fops = &lguestblk_fops; + /* This is initialized to the disk size by the other end. */ + set_ca...
2007 May 09
3
[patch 8/9] lguest: the block driver
...t;disk_name, "lgb%c", next_block_index++); + if (lguest_devices[lgdev->index].features & LGUEST_DEVICE_F_RANDOMNESS) + irqflags |= IRQF_SAMPLE_RANDOM; + err = request_irq(bd->irq, lgb_irq, irqflags, bd->disk->disk_name, bd); + if (err) + goto out_cleanup_queue; + + hcall(LHCALL_BIND_DMA, bd->phys_addr, __pa(&bd->dma), (1<<8)+bd->irq); + + bd->disk->major = bd->major; + bd->disk->first_minor = 0; + bd->disk->private_data = bd; + bd->disk->fops = &lguestblk_fops; + /* This is initialized to the disk size by the other end. */ + set_ca...
2007 May 09
2
[PATCH 0/2 v05] lguest: TSC & hrtimers
The following patches are the latest update of the TSC and hrtimer patches I posted on 29/03. Rusty's original TSC patch has been resynced to the latest lguest repo, as has the hrtimer patch, which also incorporates feedback from Jeremy & Rusty: - Change clock event hrtimer to absolute time. 'now' is captured in the host during the hypercall. - Propagate -ETIME back to the
2007 May 09
2
[PATCH 0/2 v05] lguest: TSC & hrtimers
The following patches are the latest update of the TSC and hrtimer patches I posted on 29/03. Rusty's original TSC patch has been resynced to the latest lguest repo, as has the hrtimer patch, which also incorporates feedback from Jeremy & Rusty: - Change clock event hrtimer to absolute time. 'now' is captured in the host during the hypercall. - Propagate -ETIME back to the
2007 May 09
1
[patch 2/9] lguest: the guest code
...ST_INIT 1 +#define LHCALL_CRASH 2 +#define LHCALL_LOAD_GDT 3 +#define LHCALL_NEW_PGTABLE 4 +#define LHCALL_FLUSH_TLB 5 +#define LHCALL_LOAD_IDT_ENTRY 6 +#define LHCALL_SET_STACK 7 +#define LHCALL_TS 8 +#define LHCALL_TIMER_READ 9 +#define LHCALL_HALT 10 +#define LHCALL_GET_WALLCLOCK 11 +#define LHCALL_BIND_DMA 12 +#define LHCALL_SEND_DMA 13 +#define LHCALL_SET_PTE 14 +#define LHCALL_SET_PMD 15 +#define LHCALL_LOAD_TLS 16 + +#define LGUEST_TRAP_ENTRY 0x1F + +static inline unsigned long +hcall(unsigned long call, + unsigned long arg1, unsigned long arg2, unsigned long arg3) +{ + asm volatile(&quo...
2007 May 09
1
[patch 2/9] lguest: the guest code
...ST_INIT 1 +#define LHCALL_CRASH 2 +#define LHCALL_LOAD_GDT 3 +#define LHCALL_NEW_PGTABLE 4 +#define LHCALL_FLUSH_TLB 5 +#define LHCALL_LOAD_IDT_ENTRY 6 +#define LHCALL_SET_STACK 7 +#define LHCALL_TS 8 +#define LHCALL_TIMER_READ 9 +#define LHCALL_HALT 10 +#define LHCALL_GET_WALLCLOCK 11 +#define LHCALL_BIND_DMA 12 +#define LHCALL_SEND_DMA 13 +#define LHCALL_SET_PTE 14 +#define LHCALL_SET_PMD 15 +#define LHCALL_LOAD_TLS 16 + +#define LGUEST_TRAP_ENTRY 0x1F + +static inline unsigned long +hcall(unsigned long call, + unsigned long arg1, unsigned long arg2, unsigned long arg3) +{ + asm volatile(&quo...
2007 Apr 18
1
[PATCH 0/8] lguest
As promised to Andrew, and with much thanks to Andi Kleen for feedback, this is the new series of lguest patches. Main change is the move to drivers/lguest (for future non-i386 expansion), but lots of cleanups driven by Andi's feedback and the documentation effort (which made me examine every line of code). It's not perfect, but it's definitely useful. Cheers, Rusty. List of
2007 Apr 18
1
[PATCH 0/8] lguest
As promised to Andrew, and with much thanks to Andi Kleen for feedback, this is the new series of lguest patches. Main change is the move to drivers/lguest (for future non-i386 expansion), but lots of cleanups driven by Andi's feedback and the documentation effort (which made me examine every line of code). It's not perfect, but it's definitely useful. Cheers, Rusty. List of
2007 Jul 20
2
[PATCH 1/7] lguest: documentation pt I: Preparation
The netfilter code had very good documentation: the Netfilter Hacking HOWTO. Noone ever read it. So this time I'm trying something different, using a bit of Knuthiness. Start with drivers/lguest/README. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- Documentation/lguest/extract | 58 +++++++++++++++++++++++++++++++++ Documentation/lguest/lguest.c | 9
2007 Jul 20
2
[PATCH 1/7] lguest: documentation pt I: Preparation
The netfilter code had very good documentation: the Netfilter Hacking HOWTO. Noone ever read it. So this time I'm trying something different, using a bit of Knuthiness. Start with drivers/lguest/README. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- Documentation/lguest/extract | 58 +++++++++++++++++++++++++++++++++ Documentation/lguest/lguest.c | 9