qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Dmitry Fleytman <dmitry@daynix.com>
Cc: qemu-devel@nongnu.org, Xiong Zhang <xiong.y.zhang@intel.com>
Subject: Re: [Qemu-devel] [PATCH] vfio/pci-quirks: Set non-zero GMS memory size for IGD
Date: Tue, 25 Jul 2017 09:31:48 -0600	[thread overview]
Message-ID: <20170725093148.3898b2da@w520.home> (raw)
In-Reply-To: <20170724120729.24350-1-dmitry@daynix.com>

[cc +Zhang, Xiong Y]


Intel, any comments?


On Mon, 24 Jul 2017 15:07:29 +0300
Dmitry Fleytman <dmitry@daynix.com> wrote:

> There is a claim that GMS memory is unused however
> Intel Windows 10 drivers starting from V.4534 (10/7/2016)
> allocate extra ~4G memory when GMS size set to 0.
> 
> This patch fixes this issue by seting IGD GMS memory
> size to minimum by changing default value of x-igd-gms
> device parameter.
> 
> Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
> ---
>  hw/vfio/pci-quirks.c | 13 +++++++++----
>  hw/vfio/pci.c        |  2 +-
>  2 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
> index 349085e..197cb90 100644
> --- a/hw/vfio/pci-quirks.c
> +++ b/hw/vfio/pci-quirks.c
> @@ -1527,10 +1527,15 @@ static void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr)
>      }
>  
>      /*
> -     * Assume we have no GMS memory, but allow it to be overrided by device
> -     * option (experimental).  The spec doesn't actually allow zero GMS when
> -     * when IVD (IGD VGA Disable) is clear, but the claim is that it's unused,
> -     * so let's not waste VM memory for it.
> +     * There is a claim that GMS memory is unused and we want to waste for it
> +     * as less VM memory as possible, however Intel Windows 10 drivers starting
> +     * from V.4534 (10/7/2016) allocate extra ~4G memory when GMS size set to 0.
> +     * The spec as well doesn't actually allow zero GMS when IVD
> +     * (IGD VGA Disable) is clear.
> +     *
> +     * Therefore we set GMS memory size to minimal by default via device
> +     * option x-igd-gms (experimental) and allow further tweaking of this
> +     * parameter.
>       */
>      gmch &= ~((gen < 8 ? 0x1f : 0xff) << (gen < 8 ? 3 : 8));
>  
> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> index d4051cb..bda07b7 100644
> --- a/hw/vfio/pci.c
> +++ b/hw/vfio/pci.c
> @@ -2982,7 +2982,7 @@ static Property vfio_pci_dev_properties[] = {
>                         sub_vendor_id, PCI_ANY_ID),
>      DEFINE_PROP_UINT32("x-pci-sub-device-id", VFIOPCIDevice,
>                         sub_device_id, PCI_ANY_ID),
> -    DEFINE_PROP_UINT32("x-igd-gms", VFIOPCIDevice, igd_gms, 0),
> +    DEFINE_PROP_UINT32("x-igd-gms", VFIOPCIDevice, igd_gms, 1),
>      /*
>       * TODO - support passed fds... is this necessary?
>       * DEFINE_PROP_STRING("vfiofd", VFIOPCIDevice, vfiofd_name),

  parent reply	other threads:[~2017-07-25 15:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24 12:07 [Qemu-devel] [PATCH] vfio/pci-quirks: Set non-zero GMS memory size for IGD Dmitry Fleytman
2017-07-24 12:59 ` Sameeh Jubran
2017-07-25 15:31 ` Alex Williamson [this message]
2017-07-26  5:22   ` Zhang, Xiong Y
2017-07-26  9:40     ` Dmitry Fleytman
2017-07-28  4:51       ` Zhang, Xiong Y
2017-07-28  5:22         ` Dmitry Fleytman
2017-08-01 21:24           ` Alex Williamson
2017-08-02  7:46             ` Dmitry Fleytman

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=20170725093148.3898b2da@w520.home \
    --to=alex.williamson@redhat.com \
    --cc=dmitry@daynix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xiong.y.zhang@intel.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).