From: David Ahern <dsahern@gmail.com>
To: Asias He <asias.hejun@gmail.com>,
Pekka Enberg <penberg@kernel.org>,
Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Prasad Joshi <prasadjoshi124@gmail.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH 1/3] kvm tools: define marcros for virtio device io space size and pci device number
Date: Wed, 06 Apr 2011 21:56:58 -0600 [thread overview]
Message-ID: <4D9D360A.8020905@gmail.com> (raw)
In-Reply-To: <1302228309-6583-1-git-send-email-asias.hejun@gmail.com>
Interesting overload of the kvm mailing list. Intended for changes to
the 'native kvm' (ie., tools/kvm)?
David
On 04/07/11 20:05, Asias He wrote:
> Signed-off-by: Asias He <asias.hejun@gmail.com>
> ---
> tools/kvm/blk-virtio.c | 6 ++++--
> tools/kvm/include/kvm/ioport.h | 7 +++++--
> 2 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/tools/kvm/blk-virtio.c b/tools/kvm/blk-virtio.c
> index 48211b5..9a723cc 100644
> --- a/tools/kvm/blk-virtio.c
> +++ b/tools/kvm/blk-virtio.c
> @@ -278,6 +278,8 @@ static struct pci_device_header blk_virtio_pci_device = {
> .irq_line = VIRTIO_BLK_IRQ,
> };
>
> +#define PCI_VIRTIO_BLK_DEVNUM 1
> +
> void blk_virtio__init(struct kvm *self)
> {
> if (!self->disk_image)
> @@ -285,7 +287,7 @@ void blk_virtio__init(struct kvm *self)
>
> device.blk_config.capacity = self->disk_image->size / SECTOR_SIZE;
>
> - pci__register(&blk_virtio_pci_device, 1);
> + pci__register(&blk_virtio_pci_device, PCI_VIRTIO_BLK_DEVNUM);
>
> - ioport__register(IOPORT_VIRTIO_BLK, &blk_virtio_io_ops, 256);
> + ioport__register(IOPORT_VIRTIO_BLK, &blk_virtio_io_ops, IOPORT_VIRTIO_BLK_SIZE);
> }
> diff --git a/tools/kvm/include/kvm/ioport.h b/tools/kvm/include/kvm/ioport.h
> index 7b6af53..b77f565 100644
> --- a/tools/kvm/include/kvm/ioport.h
> +++ b/tools/kvm/include/kvm/ioport.h
> @@ -5,8 +5,11 @@
> #include <stdint.h>
>
> /* some ports we reserve for own use */
> -#define IOPORT_DBG 0xe0
> -#define IOPORT_VIRTIO_BLK 0xc200 /* Virtio block device */
> +#define IOPORT_DBG 0xe0
> +#define IOPORT_VIRTIO_BLK 0xc200 /* Virtio block device */
> +#define IOPORT_VIRTIO_BLK_SIZE 256
> +#define IOPORT_VIRTIO_CONSOLE 0xd200 /* Virtio console device */
> +#define IOPORT_VIRTIO_CONSOLE_SIZE 256
>
> struct kvm;
>
next prev parent reply other threads:[~2011-04-07 3:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-08 2:05 [PATCH 1/3] kvm tools: define marcros for virtio device io space size and pci device number Asias He
2011-04-07 3:56 ` David Ahern [this message]
2011-04-07 4:40 ` Pekka Enberg
2011-04-07 7:38 ` Avi Kivity
2011-04-08 2:05 ` [PATCH 2/3] kvm tools: add some helper functions for virt_queue Asias He
2011-04-08 2:05 ` [PATCH 3/3] kvm tools: add virtio console support v2 Asias He
2011-04-07 5:50 ` Pekka Enberg
2011-04-08 14:18 ` Asias He
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=4D9D360A.8020905@gmail.com \
--to=dsahern@gmail.com \
--cc=asias.hejun@gmail.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--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