Little fixes from Rik van Riel and Anthony Liguori.
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
case DOM0_BUILDDOMAIN:
{
struct domain *d = find_domain_by_id(op->u.builddomain.domain);
- ret = -EINVAL;
+ ret = -ESRCH;
if ( d != NULL )
{
ret = final_setup_guest(d, &op->u.builddomain);
if ( d != NULL )
{
ret = -EINVAL;
- if ( test_bit(DF_CONSTRUCTED, &d->d_flags) )
+ if ( (d != current->domain) &&
+ test_bit(DF_CONSTRUCTED, &d->d_flags) )
{
domain_unpause_by_systemcontroller(d);
ret = 0;
gnttab_map_grant_ref_t *uop, unsigned int count)
{
int i, flush = 0;
- unsigned long va;
+ unsigned long va = 0;
for ( i = 0; i < count; i++ )
if ( __gnttab_map_grant_ref(&uop[i], &va) == 0)
if ( flush == 1 )
__flush_tlb_one(va);
- else if ( flush )
+ else if ( flush != 0 )
local_flush_tlb();
+
return 0;
}