Re: [PATCH] KVM x86: Handle hypercalls for assigned PCI devices

2008-05-01 Thread Amit Shah
On Tuesday 29 April 2008 21:28:51 Amit Shah wrote: > On Tuesday 29 April 2008 20:14:16 Glauber Costa wrote: > > Amit Shah wrote: > > > + if (find_pci_pt_dev(&vcpu->kvm->arch.pci_pt_dev_head, > > > + &pci_pt_info, 0, KVM_PT_SOURCE_ASSIGN)) > > > + r++; /* We have assigne

Re: [PATCH] KVM x86: Handle hypercalls for assigned PCI devices

2008-04-29 Thread Muli Ben-Yehuda
On Wed, Apr 30, 2008 at 01:48:38AM +0300, Avi Kivity wrote: > Amit Shah wrote: >> + if (is_error_page(host_page)) { + printk(KERN_INFO "%s: gfn %p not valid\n", + __func__, (void *)page_gfn); + r = -1; >>> r = -1 is not really infor

Re: [PATCH] KVM x86: Handle hypercalls for assigned PCI devices

2008-04-29 Thread Avi Kivity
Amit Shah wrote: > >>> + if (is_error_page(host_page)) { >>> + printk(KERN_INFO "%s: gfn %p not valid\n", >>> + __func__, (void *)page_gfn); >>> + r = -1; >>> >> r = -1 is not really informative. Better use some meaningful error. >> > > The error's

Re: [PATCH] KVM x86: Handle hypercalls for assigned PCI devices

2008-04-29 Thread Amit Shah
On Tuesday 29 April 2008 20:14:16 Glauber Costa wrote: > Amit Shah wrote: > > +static struct kvm_pv_dma_map* > > +find_pci_pv_dmap(struct list_head *head, dma_addr_t dma) > > +{ > > might be better to prefix those functions with kvm? Even though they are > static, it seems to be the current practi

Re: [PATCH] KVM x86: Handle hypercalls for assigned PCI devices

2008-04-29 Thread Glauber Costa
Amit Shah wrote: > We introduce three hypercalls: > 1. When the guest wants to check if a particular device is an assigned device >(this is done once per device by the guest to enable / disable hypercall- >based translation of addresses) > > 2. map: to convert guest phyical addresses to ho

[PATCH] KVM x86: Handle hypercalls for assigned PCI devices

2008-04-29 Thread Amit Shah
We introduce three hypercalls: 1. When the guest wants to check if a particular device is an assigned device (this is done once per device by the guest to enable / disable hypercall- based translation of addresses) 2. map: to convert guest phyical addresses to host physical address to pass o