From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [RFC 7/11] virtio_pci: new, capability-aware driver. Date: Mon, 19 Dec 2011 16:36:38 +1030 Message-ID: <87bor5nlht.fsf@rustcorp.com.au> References: <87pqfzgy6p.fsf@rustcorp.com.au> <87zkf3fiu2.fsf@rustcorp.com.au> <20111211094256.GB11504@redhat.com> <87boreohhs.fsf@rustcorp.com.au> <20111212182533.GB25916@redhat.com> <87liqhtdnj.fsf@rustcorp.com.au> <20111215063004.GA3630@redhat.com> <87zketp9nz.fsf@rustcorp.com.au> <20111218101831.GB30374@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111218101831.GB30374@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: "Michael S. Tsirkin" Cc: Christian Borntraeger , Sasha Levin , Pawel Moll , virtualization List-Id: virtualization@lists.linuxfoundation.org On Sun, 18 Dec 2011 12:18:32 +0200, "Michael S. Tsirkin" wrote: > On Fri, Dec 16, 2011 at 12:20:08PM +1030, Rusty Russell wrote: > > Perhaps a new feature VIRTIO_F_UNSTABLE? Which (unlike other features) > > appears and vanishes around config writes by either side? Kind of a > > hack though... > > Not sure how this can work in such a setup: when would guest > check this bit to avoid races? > A separate registers also seems nicer than a flag. > > Some other possible design choices: > - a flag to signal config accesses in progress by guest > host would need to buffer changes and apply them in one go > when flag is cleared > - a register to make host get/set config in guest memory > - use a control vq for all devices - seqlock-style generation count register(s)? Has the advantage of being a noop if things never change. - continue to ignore it ;) And yes, it's a more general problem than virtio_pci... Cheers, Rusty.