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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Amit Shah <amit.shah@...>
Cc: <kvm-devel@...>, <virtualization@...>, <muli@...>, <BENAMI@...>, <chrisw@...>, <dor.laor@...>, <allen.m.kay@...>, <avi@...>, <linux-kernel@...>
Date: Tuesday, April 29, 2008 - 10:44 am

Amit Shah wrote:
might be better to prefix those functions with kvm? Even though they are 
static, it seems to be the current practice.

you need mmap_sem held for read to use gfn_to_page.

care for locking here too.

those backwards goto are very clumsy. Might be better to give it a 
further attention in order to avoid id.

that's ugly.

it's better to keep the free function with free-like semantics: just a 
void function that plainly returns if !dmap, and check in the caller.

locking
r = -1 is not really informative. Better use some meaningful error.

We can return here, and avoid this goto if we always increment the 
hypercall counter in the beginning of the function. But this is nitpicking.

better use atomic mappings here.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
PV DMA for PCI passthrough devices for KVM, Amit Shah, (Tue Apr 29, 6:37 am)
Re: PV DMA for PCI passthrough devices for KVM, Andi Kleen, (Tue Apr 29, 9:15 am)
Re: [PATCH] KVM x86: Handle hypercalls for assigned PCI devi..., Glauber Costa, (Tue Apr 29, 10:44 am)
[PATCH] KVM PV Guest: Implement paravirtualized DMA, Amit Shah, (Tue Apr 29, 6:37 am)