adding handler to Hv's vmbus?

I’m looking into a topic last discussed in 2008 on this list regarding creating inter-partition communication channels using Hv hypercalls. For background, since folks on this list always seem to like background I’m interested in the potential of low-latency communications between guests. Setting up a vlan might work, but creates more user-visible artifacts (a network for one thing) and involves a whole lot of networking and security code that I very likely do not need to be involved.

I can get past the lack of a winhv.sys import lib easily enough, and I’ve figured out a technique to get a interrupt vector allocated for a purely software device so in principle I have what I need to implement both sides of a hypercall port. It appears in this post http://www.osronline.com/showThread.cfm?link=133192 that the op ends with a comment that they got this far, but it was ‘messy’.

However, I was hoping that there was some progress since 2008 on a blessed method of adding a ‘virtualisation service provider’ to vmbus and avoid the need to create yet-another bus device (and months of work).

There’s no published way to do this and no support from Microsoft.
Furthermore, there’s no way to stay in synch with VM state transitions
(which are in the VM worker process.) So your system will most likely crash
the moment a VM is saved, migrated, etc.

Jake Oshins
Hyper-V I/O Architect
Windows Kernel Group

This post implies no warranties and confers no rights.


wrote in message news:xxxxx@ntdev…

I’m looking into a topic last discussed in 2008 on this list regarding
creating inter-partition communication channels using Hv hypercalls. For
background, since folks on this list always seem to like background I’m
interested in the potential of low-latency communications between guests.
Setting up a vlan might work, but creates more user-visible artifacts (a
network for one thing) and involves a whole lot of networking and security
code that I very likely do not need to be involved.

I can get past the lack of a winhv.sys import lib easily enough, and I’ve
figured out a technique to get a interrupt vector allocated for a purely
software device so in principle I have what I need to implement both sides
of a hypercall port. It appears in this post
http://www.osronline.com/showThread.cfm?link=133192 that the op ends with a
comment that they got this far, but it was ‘messy’.

However, I was hoping that there was some progress since 2008 on a blessed
method of adding a ‘virtualisation service provider’ to vmbus and avoid the
need to create yet-another bus device (and months of work).

I understand about not getting notification about state transitions and
have read your comments about crashes in the past. Could you elaborate on
the crash scenario you are warning about? Is this a case of hyper-v
loosing coherency due to guests attempting to make hypercalls on ports
that don’t exist anymore? I had the impression that Hv would simply start
to return error codes in this case. Which seems like something I can trap
and handle in my driver code just fine.

Thanks!

t.

On Fri, 17 Dec 2010, Jake Oshins wrote:

There’s no published way to do this and no support from Microsoft.
Furthermore, there’s no way to stay in synch with VM state transitions (which
are in the VM worker process.) So your system will most likely crash the
moment a VM is saved, migrated, etc.

Jake Oshins
Hyper-V I/O Architect
Windows Kernel Group

This post implies no warranties and confers no rights.


wrote in message news:xxxxx@ntdev…

I’m looking into a topic last discussed in 2008 on this list regarding
creating inter-partition communication channels using Hv hypercalls. For
background, since folks on this list always seem to like background I’m
interested in the potential of low-latency communications between guests.
Setting up a vlan might work, but creates more user-visible artifacts (a
network for one thing) and involves a whole lot of networking and security
code that I very likely do not need to be involved.

I can get past the lack of a winhv.sys import lib easily enough, and I’ve
figured out a technique to get a interrupt vector allocated for a purely
software device so in principle I have what I need to implement both sides of
a hypercall port. It appears in this post
http://www.osronline.com/showThread.cfm?link=133192 that the op ends with a
comment that they got this far, but it was ‘messy’.

However, I was hoping that there was some progress since 2008 on a blessed
method of adding a ‘virtualisation service provider’ to vmbus and avoid the
need to create yet-another bus device (and months of work).


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

>

There’s no published way to do this and no support from Microsoft.
Furthermore, there’s no way to stay in synch with VM state transitions
(which are in the VM worker process.) So your system will most likely
crash
the moment a VM is saved, migrated, etc.

So what would you recommend for someone who wants to do this? I use Xen
which doesn’t have any of these problems (in that it’s open and you can
do whatever you want with it), but I’m curious if there will ever be a
documented API to handle such things under Hyper-V.

James

If all you’re doing is sending datagrams back and forth, that’s not
particularly destructive. The problems come when you try to map memory from
one OS into another. In particular, you can’t know that the memory you
mapped is still valid, and still points to the same thing it did at the
moment you mapped it.

Jake Oshins
Hyper-V I/O Architect
Windows Kernel Group

This post implies no warranties and confers no rights.


“Tracy Camp” wrote in message news:xxxxx@ntdev…

I understand about not getting notification about state transitions and
have read your comments about crashes in the past. Could you elaborate on
the crash scenario you are warning about? Is this a case of hyper-v
loosing coherency due to guests attempting to make hypercalls on ports
that don’t exist anymore? I had the impression that Hv would simply start
to return error codes in this case. Which seems like something I can trap
and handle in my driver code just fine.

Thanks!

t.

On Fri, 17 Dec 2010, Jake Oshins wrote:

There’s no published way to do this and no support from Microsoft.
Furthermore, there’s no way to stay in synch with VM state transitions
(which are in the VM worker process.) So your system will most likely
crash the moment a VM is saved, migrated, etc.

Jake Oshins
Hyper-V I/O Architect
Windows Kernel Group

This post implies no warranties and confers no rights.


wrote in message news:xxxxx@ntdev…

I’m looking into a topic last discussed in 2008 on this list regarding
creating inter-partition communication channels using Hv hypercalls. For
background, since folks on this list always seem to like background I’m
interested in the potential of low-latency communications between guests.
Setting up a vlan might work, but creates more user-visible artifacts (a
network for one thing) and involves a whole lot of networking and security
code that I very likely do not need to be involved.

I can get past the lack of a winhv.sys import lib easily enough, and I’ve
figured out a technique to get a interrupt vector allocated for a purely
software device so in principle I have what I need to implement both sides
of a hypercall port. It appears in this post
http://www.osronline.com/showThread.cfm?link=133192 that the op ends with
a comment that they got this far, but it was ‘messy’.

However, I was hoping that there was some progress since 2008 on a blessed
method of adding a ‘virtualisation service provider’ to vmbus and avoid
the need to create yet-another bus device (and months of work).

NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

I don’t have a recommendation. It’s not a supported scenario.

As for your other question, I can’t comment on future products.

Jake Oshins
Hyper-V I/O Architect
Windows Kernel Group

This post implies no warranties and confers no rights.


“James Harper” wrote in message news:xxxxx@ntdev…

There’s no published way to do this and no support from Microsoft.
Furthermore, there’s no way to stay in synch with VM state transitions
(which are in the VM worker process.) So your system will most likely
crash
the moment a VM is saved, migrated, etc.

So what would you recommend for someone who wants to do this? I use Xen
which doesn’t have any of these problems (in that it’s open and you can
do whatever you want with it), but I’m curious if there will ever be a
documented API to handle such things under Hyper-V.

James

On Fri, 17 Dec 2010, Jake Oshins wrote:

If all you’re doing is sending datagrams back and forth, that’s not
particularly destructive. The problems come when you try to map memory from
one OS into another. In particular, you can’t know that the memory you
mapped is still valid, and still points to the same thing it did at the
moment you mapped it.

Thanks for the hint. I guess I had presumed that if I created a port and
mapped some of the pages from the receiving side of the port into the
sending side of the port, but over a otherwise valid GPA and then only
accessed the page from the receiving side when the port was signalled that
I would effectively have a usable queue. On the sending side the worst
that would happen is that I write to the guest GPA rather than the
sender’s page and I would find out that this (possibly) happened when I
signalled the port and got an error. And further by using pairs of ports
I can build something approximating a socket connection with the more or
less normal disconnection and transmission loss characteristics.

I agree crashes are a possibility if I’m not careful, but I’m not seeing
where they are guaranteed and intractable.

I also appreciate the straight answer that I’m on my own with this, but
that is often the case, yet we still manage somehow. I appreciate your
replies.

Thanks!

t.

Jake Oshins
Hyper-V I/O Architect
Windows Kernel Group

This post implies no warranties and confers no rights.


“Tracy Camp” wrote in message news:xxxxx@ntdev…

I understand about not getting notification about state transitions and
have read your comments about crashes in the past. Could you elaborate on
the crash scenario you are warning about? Is this a case of hyper-v
loosing coherency due to guests attempting to make hypercalls on ports
that don’t exist anymore? I had the impression that Hv would simply start
to return error codes in this case. Which seems like something I can trap
and handle in my driver code just fine.

Thanks!

t.

On Fri, 17 Dec 2010, Jake Oshins wrote:

> There’s no published way to do this and no support from Microsoft.
> Furthermore, there’s no way to stay in synch with VM state transitions
> (which are in the VM worker process.) So your system will most likely
> crash the moment a VM is saved, migrated, etc.
>
>
>
> Jake Oshins
> Hyper-V I/O Architect
> Windows Kernel Group
>
> This post implies no warranties and confers no rights.
>
> --------------------------------------------------------------
> wrote in message news:xxxxx@ntdev…
>
> I’m looking into a topic last discussed in 2008 on this list regarding
> creating inter-partition communication channels using Hv hypercalls. For
> background, since folks on this list always seem to like background I’m
> interested in the potential of low-latency communications between guests.
> Setting up a vlan might work, but creates more user-visible artifacts (a
> network for one thing) and involves a whole lot of networking and security
> code that I very likely do not need to be involved.
>
> I can get past the lack of a winhv.sys import lib easily enough, and I’ve
> figured out a technique to get a interrupt vector allocated for a purely
> software device so in principle I have what I need to implement both sides
> of a hypercall port. It appears in this post
> http://www.osronline.com/showThread.cfm?link=133192 that the op ends with a
> comment that they got this far, but it was ‘messy’.
>
> However, I was hoping that there was some progress since 2008 on a blessed
> method of adding a ‘virtualisation service provider’ to vmbus and avoid the
> need to create yet-another bus device (and months of work).
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer