Overcome Hyper-V graphics adapter limitations by WDDM driver

Hyper-V graphics adapter is very basic, and supports only low resolutions and a single display. Is it possible to write a WDDM driver that will overcome this issue, allowing larger resolutions and rendering into plain memory buffer instead of the VRAM?

I’m thinking about using Windows 8 Display only driver KMDOD sample as a basis, substituting Hyper-V graphics adapters video memory address with a chunk of system memory that I would allocate. Will that work? Thanks

You can share GPUs with Hyper-V VMs. The VMs then run a virtual GPU driver. It’s been in hyper-v for a while, but does not automatically get configured.

Jan

On 10/29/16, 9:20 AM, “xxxxx@lists.osr.com on behalf of xxxxx@gmail.com” wrote:

Hyper-V graphics adapter is very basic, and supports only low resolutions and a single display. Is it possible to write a WDDM driver that will overcome this issue, allowing larger resolutions and rendering into plain memory buffer instead of the VRAM?

I’m thinking about using Windows 8 Display only driver KMDOD sample as a basis, substituting Hyper-V graphics adapters video memory address with a chunk of system memory that I would allocate. Will that work? Thanks

Thanks Jan, but that’s not an option. I have only Hyper-V adapter to deal with.

I’ve done similar tasks in the past. I can tell that your approach is
definitely feasible.

I was implementing a virtual WDDM driver that runs in Win7 Guest Machine,
and a host virtual graphics driver running in QEMU host process.
I am able to get 1920x1080 resolution, as the basic part of the
implementation.

The challenges are how much functionality do you want in your virtual
graphics driver.
If you want D3D support, it is very challenging, and you need to translate
D3D9/D3D10/D3D11/D3D12 requests into host OpenGL requests. This is very
skill demanding. Oracle VBox graphics driver has done the D3D9 AERO
handling, and the driver source is opened, and it is good for your
reference.

In your case, you are running MS HyperV environment, thing could be
different. I’m not sure if you could do virtual graphics driver like I did
in QEMU host process.

Good Luck.

2016-10-30 0:20 GMT+08:00 :

> Hyper-V graphics adapter is very basic, and supports only low resolutions
> and a single display. Is it possible to write a WDDM driver that will
> overcome this issue, allowing larger resolutions and rendering into plain
> memory buffer instead of the VRAM?
>
> I’m thinking about using Windows 8 Display only driver KMDOD sample as a
> basis, substituting Hyper-V graphics adapters video memory address with a
> chunk of system memory that I would allocate. Will that work? Thanks
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:> showlists.cfm?list=ntdev>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:></http:>

Thanks JiaBang! I don’t need any 3D acceleration support.

My main question is - can you overcome the limitation of VRAM size set by the graphics adapter? I’m not sure how much VRAM your QEMU graphics adapter had, but Hyper-V has only 8 MB AFAIK, and there’s no way to get more than a single monitor with 1920x1080 resolution out of it. And I need multiple monitors - thus significantly higher VRAM size.

So you think it’s possible to substitute the real VRAM that the adapter has by a chunk of memory allocated by my custom driver? Thanks

Hi ,
I don’t know about HyperV environment. If you could implement your virtual
display device like I did with QEMU, then you could do anything.

2016-10-30 23:13 GMT+08:00 :

> Thanks JiaBang! I don’t need any 3D acceleration support.
>
> My main question is - can you overcome the limitation of VRAM size set by
> the graphics adapter? I’m not sure how much VRAM your QEMU graphics adapter
> had, but Hyper-V has only 8 MB AFAIK, and there’s no way to get more than a
> single monitor with 1920x1080 resolution out of it. And I need multiple
> monitors - thus significantly higher VRAM size.
>
> So you think it’s possible to substitute the real VRAM that the adapter
> has by a chunk of memory allocated by my custom driver? Thanks
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:> showlists.cfm?list=ntdev>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:></http:>

Thanks JiaBang,

Two last questions:

  1. Did you use video card memory or you rendered to the system memory?
  2. Did you implement it based on KMDOD sample, or you used some other code?

Thanks

  1. My implementation used VRAM exposed by the virtual display adapter for
    simplicity. The VRAM is actually system memory allocated by QEMU process.
  2. I implemented a full WDDM (KMD + UMD) driver on Win7. There is no KMDOD
    on Win7.

2016-10-31 13:28 GMT+08:00 :

> Thanks JiaBang,
>
> Two last questions:
> 1. Did you use video card memory or you rendered to the system memory?
> 2. Did you implement it based on KMDOD sample, or you used some other code?
>
> Thanks
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:> showlists.cfm?list=ntdev>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;
></http:></http:>

Thanks JiaBang. I’ll proceed then.

Is someone else has any insight on substituting VRAM by system memory in KMDOD driver, I’d be happy to hear it.