All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: KY Srinivasan <kys@microsoft.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>
Subject: Re: drivres/hv
Date: Wed, 28 Nov 2012 16:04:34 -0800	[thread overview]
Message-ID: <20121129000434.GA17233@kroah.com> (raw)
In-Reply-To: <426367E2313C2449837CD2DE46E7EAF930E5E514@SN2PRD0310MB382.namprd03.prod.outlook.com>

On Wed, Nov 28, 2012 at 11:32:52PM +0000, KY Srinivasan wrote:
> > > I recently discovered that the Hyper-V host allocates mmio
> > > memory for some synthetic devices like the virtual framebuffer.
> > > We are currently in the process of implementing this virtual
> > > framebuffer device. As part of the offer message from the host
> > > we are given the mmio region size that needs to be allocatted to
> > > the device. I am told in the current implementation of the firmware,
> > > this mmio resource shows up in the PCI space. What is the best way to
> > > allocate this mmio space for this driver.
> > 
> > I don't understand, does the guest os think this really is mmio memory
> > and the host just set up up?  Or is the memory being used to pass data
> > back and forth?  Or something else?
> 
> From what I understand, the host is allocating this memory and presenting
> this to the guest. This memory is to be used for framebuffer. The guest is
> expected to setup appropriate mappings to this region and use that as the 
> framebuffer.

What type of framebuffer?  Linux supports a ton of different ones, have
you looked at drivers/video/ to see if one of the ones there will "just
work" with what hyperv is passing to the guest?

If not, you'll have to write a new driver for this, look at the examples
of other framebuffer drivers in that directory for examples.  Also, I
bet the code there will answer your memory questions.

> > And what do you mean "firmware"?  That usually means UEFI/BIOS to me,
> > not a hyperv host.
> 
> Hyper-V host presents the firmware to the guest (Hyper-V like KVM supports
> full virtualization with selective para-virtualization - PV drivers). As part of the
> BIOS presented to the guest this mmio region is allocated.
> 
> > 
> > And finally, what does the guest os see as far as the PCI resource space
> > shows it?  Shouldn't it just think it is a normal PCI device and access
> > it properly that way?
> 
> This is the crux of the problem. Vmbus and other vmbus based devices are not
> PCI  devices. I have implemented vmbus as an ACPI driver since vmbus is an ACPI
> enumerated device. I have the size information of the mmio region that is to be 
> allocated to the framebuffer device. I am looking at a way to allocate this mmio
> region.

Do you have any "hints" as to where it is, if it even is present, or
anything else?  If so, use them and create a new framebuffer device with
that information.

If not, that seems really strange, but hey, it's hyper-v, it wouldn't be
the first time :)

good luck,

greg k-h

  reply	other threads:[~2012-11-29  0:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28 20:17 drivres/hv K. Y. Srinivasan
2012-11-28 22:43 ` drivres/hv Greg KH
2012-11-28 23:32   ` drivres/hv KY Srinivasan
2012-11-29  0:04     ` Greg KH [this message]
2012-11-29  0:35       ` drivres/hv KY Srinivasan
2012-11-29 10:13         ` drivres/hv Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2015-11-30 21:15 drivres/hv K. Y. Srinivasan
2016-02-08  6:13 ` drivres/hv Greg KH
2015-08-01 19:46 drivres/hv K. Y. Srinivasan
2015-08-01 18:35 ` drivres/hv Greg KH
2015-08-01 18:39   ` drivres/hv KY Srinivasan
2012-11-02 22:11 drivres/hv K. Y. Srinivasan
2012-11-02 23:37 ` drivres/hv Greg KH
2012-11-03 14:13   ` drivres/hv KY Srinivasan
2012-11-15 22:22   ` drivres/hv KY Srinivasan
2012-11-15 22:34     ` drivres/hv Andrew Morton
2012-11-15 22:42       ` drivres/hv Greg KH
     [not found] <1328150891-29752-1-git-send-email-y>
2012-02-02  2:55 ` drivres/hv Greg KH
2012-02-02  2:48 drivres/hv y

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=20121129000434.GA17233@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@linuxdriverproject.org \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.