From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2 1/2] kvm tools: Fix VHOST_SET_MEM_TABLE failure Date: Thu, 12 Jul 2012 11:19:47 +0300 Message-ID: <4FFE88A3.8010408@redhat.com> References: <1342022894-1034-1-git-send-email-asias.hejun@gmail.com> <4FFDA543.2030304@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Pekka Enberg , Sasha Levin , Ingo Molnar , Cyrill Gorcunov , kvm@vger.kernel.org, "Michael S. Tsirkin" To: Asias He Return-path: Received: from mx1.redhat.com ([209.132.183.28]:19077 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753203Ab2GLIUF (ORCPT ); Thu, 12 Jul 2012 04:20:05 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 07/12/2012 05:46 AM, Asias He wrote: > On Thu, Jul 12, 2012 at 12:09 AM, Avi Kivity wrote: >> On 07/11/2012 07:08 PM, Asias He wrote: >>> VHOST_SET_MEM_TABLE failed: Operation not supported >>> >>> In vhost_set_memory(), We have >>> >>> if (mem.padding) >>> return -EOPNOTSUPP; >>> >>> So, we need to zero struct vhost_memory. >>> >> >> Is this due to a change in vhost? > > Seems we have this bit in the very beginning (commit 3a4d5c94). Okay, so it's a documentation problem. Michael, where is the documentation for vhost-net? Note we have to initialize it with memset(); presumably when we repurpose it the name will change, and anonymous unions are not very portable. -- error compiling committee.c: too many arguments to function