public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: penberg@kernel.org
Cc: mingo@elte.hu, asias.hejun@gmail.com, prasadjoshi124@gmail.com,
	kvm@vger.kernel.org, levinsasha928@gmail.com
Subject: Re: [patch 1/2] kvm tools: Gather Virtio-PCI constants into one place
Date: Fri, 06 May 2011 00:09:33 +0400	[thread overview]
Message-ID: <4DC303FD.3080103@gmail.com> (raw)
In-Reply-To: <20110505190733.367888565@gmail.com>

On 05/05/2011 11:06 PM, Cyrill Gorcunov wrote:
> It's better than have them sprinkled in.c files. Note
> that pin for ring device is changed so it no longer shared
> with block device (it is done in a sake of simplicity).
> 
> Also comment style if a bit tuned up in virtio-pci.h
> just to be consistent.
> 
> Reported-by: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
...
> +
> +enum {
> +	VIRTIO_BLK_PIN				= 1,
> +	VIRTIO_CONSOLE_PIN			= 2,
> +	VIRTIO_NET_PIN				= 3,
> +	VIRTIO_RNG_PIN				= 4,
> +};
> +

Btw, probably the better way would be to make it like that

enum {
	PCI_INTA				= 1,
	PCI_INTB				= 2,
	PCI_INTC				= 3,
	PCI_INTD				= 4,
};

enum {
	VIRTIO_BLK_PIN				= PCI_INTA,
	VIRTIO_CONSOLE_PIN			= PCI_INTB,
	VIRTIO_NET_PIN				= PCI_INTC,
	VIRTIO_RNG_PIN				= PCI_INTD,
};

So we would know the connection way and pin shares if needed.

-- 
Thanks,
  Cyrill

  parent reply	other threads:[~2011-05-05 20:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05 19:06 [patch 0/2] kvm-tools -- cleanup Cyrill Gorcunov
2011-05-05 19:06 ` [patch 1/2] kvm tools: Gather Virtio-PCI constants into one place Cyrill Gorcunov
2011-05-05 19:11   ` Cyrill Gorcunov
2011-05-05 20:09   ` Cyrill Gorcunov [this message]
2011-05-05 19:06 ` [patch 2/2] kvm tools - Cleanup IRQs definitions for virtio pci devices Cyrill Gorcunov
2011-05-05 20:14   ` Pekka Enberg
2011-05-05 20:15     ` Cyrill Gorcunov
2011-05-05 20:16       ` Pekka Enberg
2011-05-05 20:19         ` Cyrill Gorcunov
2011-05-05 20:24           ` Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DC303FD.3080103@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=asias.hejun@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=mingo@elte.hu \
    --cc=penberg@kernel.org \
    --cc=prasadjoshi124@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox