From: Dor Laor <dlaor@redhat.com>
To: Ky Srinivasan <ksrinivasan@novell.com>
Cc: devel@driverdev.osuosl.org, Virtualization@lists.osdl.org,
Haiyang Zhang <haiyangz@microsoft.com>, Greg KH <gregkh@suse.de>
Subject: Re: [PATCH]: An implementation of HyperV KVP functionality
Date: Sun, 14 Nov 2010 12:46:15 +0200 [thread overview]
Message-ID: <4CDFBDF7.2080701@redhat.com> (raw)
In-Reply-To: <4CDBE98E02000030000902C9@novprvoes0310.provo.novell.com>
On 11/11/2010 10:03 PM, Ky Srinivasan wrote:
> + * An implementation of key value pair (KVP) functionality for Linux.
> + *
> + *
> + * Copyright (C) 2010, Novell, Inc.
> + * Author : K. Y. Srinivasan<ksrinivasan@novell.com>
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License version 2 as published
> + * by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful, but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
> + * NON INFRINGEMENT. See the GNU General Public License for more
> + * details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
> + *
> + */
> +
> +
> +#include<linux/net.h>
> +#include<linux/nls.h>
> +#include<linux/connector.h>
> +
> +#include "logging.h"
> +#include "osd.h"
> +#include "vmbus.h"
> +#include "vmbus_packet_format.h"
> +#include "vmbus_channel_interface.h"
> +#include "version_info.h"
> +#include "channel.h"
> +#include "vmbus_private.h"
> +#include "vmbus_api.h"
> +#include "utils.h"
> +#include "kvp.h"
> +
> +
> +/*
> + *
> + * The following definitions are shared with the user-mode component; do not
> + * change any of this without making the corresponding changes in
> + * the KVP user-mode component.
> + */
> +
> +#define CN_KVP_VAL 0x1 /* This supports queries from the kernel */
> +#define CN_KVP_USER_VAL 0x2 /* This supports queries from the user */
> +
> +
> +/*
> + * KVP protocol: The user mode component first registers with the
Is there a spec that describes all of the possible messages?
For Linux virtio we use it in parallel to the code to make sure all
potential guest OS will follow the same standard.
What about live migration semantics like migrate while transaction is
on? and having the guest aware of the migration so the host data will be
updated?
..
> main(void)
> {
> int fd, len, sock_opt;
> int error;
> struct cn_msg *message;
> struct pollfd pfd;
> struct nlmsghdr *incoming_msg;
> struct cn_msg *incoming_cn_msg;
> char *key_value;
> kvp_key_name_t key_name;
>
> daemon(1, 0);
> openlog("KVP", 0, LOG_USER);
> syslog(LOG_INFO, "KVP starting; pid is:%d", getpid());
> /*
> * Retrieve OS release information.
> */
> kvp_get_os_info();
>
> fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR);
This is nice. One of the first tried for virtio-serial was to use
netlink. We even wanted unix_domain socket for AF_VIRT that will reach
the host but davem nacked it.
prev parent reply other threads:[~2010-11-14 10:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 20:03 [PATCH]: An implementation of HyperV KVP functionality Ky Srinivasan
2010-11-11 20:49 ` Stephen Hemminger
2010-11-12 16:57 ` Ky Srinivasan
2010-11-12 16:57 ` Ky Srinivasan
2010-11-12 16:57 ` Ky Srinivasan
2010-11-11 21:15 ` Greg KH
2010-11-12 18:06 ` Ky Srinivasan
2010-11-12 18:47 ` Greg KH
2010-11-12 20:59 ` Ky Srinivasan
2010-11-12 21:38 ` Greg KH
2010-11-11 21:19 ` Greg KH
2010-11-12 18:29 ` Ky Srinivasan
2010-11-12 19:22 ` Greg KH
2010-11-14 10:46 ` Dor Laor [this message]
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=4CDFBDF7.2080701@redhat.com \
--to=dlaor@redhat.com \
--cc=Virtualization@lists.osdl.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=haiyangz@microsoft.com \
--cc=ksrinivasan@novell.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;
as well as URLs for NNTP newsgroup(s).