All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Bader <stefan.bader@canonical.com>
To: Ian Campbell <Ian.Campbell@citrix.com>,
	"Daniel P. Berrange" <berrange@redhat.com>
Cc: libvir-list@redhat.com, Michal Privoznik <mprivozn@redhat.com>,
	xen-devel@lists.xen.org
Subject: Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection
Date: Fri, 04 Apr 2014 15:10:05 +0200	[thread overview]
Message-ID: <533EAF2D.3020009__34707.4683093981$1396617109$gmane$org@canonical.com> (raw)
In-Reply-To: <1396616169.4211.222.camel@kazak.uk.xensource.com>


[-- Attachment #1.1: Type: text/plain, Size: 3973 bytes --]

On 04.04.2014 14:56, Ian Campbell wrote:
> On Fri, 2014-04-04 at 14:51 +0200, Daniel P. Berrange wrote:
>> On Fri, Apr 04, 2014 at 11:34:17AM +0100, Ian Campbell wrote:
>>> On Fri, 2014-04-04 at 12:31 +0200, Stefan Bader wrote:
>>>> On 04.04.2014 11:48, Ian Campbell wrote:
>>>>> On Fri, 2014-04-04 at 11:36 +0200, Stefan Bader wrote:
>>>>>> +    /*
>>>>>> +     * Take the first defined video device (graphics card) to display
>>>>>> +     * on the first graphics device (display).
>>>>>> +     * Right now only type and vram info is used and anything beside
>>>>>> +     * type xen and vga is mapped to cirrus.
>>>>>> +     */
>>>>>> +    if (def->nvideos) {
>>>>>> +        unsigned int min_vram = 8 * 1024;
>>>>>> +
>>>>>> +        switch (def->videos[0]->type) {
>>>>>> +            case VIR_DOMAIN_VIDEO_TYPE_VGA:
>>>>>> +            case VIR_DOMAIN_VIDEO_TYPE_XEN:
>>>>>> +                b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_STD;
>>>>>> +                /*
>>>>>> +                 * Libxl enforces a minimal VRAM size of 8M when using
>>>>>> +                 * LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL or
>>>>>> +                 * 16M for LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN.
>>>>>> +                 * Avoid build failures and go with the minimum if less
>>>>>> +                 * is specified.
>>>>>
>>>>> Build failures? Do you mean "domain build" rather than "libvirt build"?
>>>>>
>>>>> I'm not sure about this fixing up the GIGO from the user side, but
>>>>> that's a libvirt policy decision I suppose? If it were me I would just
>>>>> let libxl provide the error and expect people to fix their domain config
>>>>> rather than silently giving them something other than what they asked
>>>>> for. What if increasing the VRAM causes a cascading failure due e.g. to
>>>>> lack of memory? That's going to be tricky to debug I think!
>>>>
>>>> In the end its a start a domain with such a config. Which seems to be what I
>>>> would end up with in my testing with an admittedly older version of virt-manager
>>>> connecting to a libvirtd running an initial version of this patch without that part.
>>>> The error seen on the front-end was something along the lines of "failed to get
>>>> enough memory to start the guest" (the libxl log on the other side had the
>>>> better error message). And the gui always reduces the memory below the minimum
>>>> for both the options (VGA and "Xen").
>>>> That is the reason I went for "meh, go for the minimum anyways".
>>>
>>> Does the libvirt protocol require the client to provide all the sizes
>>> etc with no provision for asking the server side to pick a sane default?
>>
>> The XML does not have to include the VGA ram size. If it is omitted the
>> we fill in a default value after initial parsing is done.
> 
> I guess the issue is that whatever client Stefan is using is including
> the VGA ram size, with a value which it turns out is not allowed.

Right and the current fixup code is in there because I am too lazy to be
bothered to use virsh to fix up the vram size all the times. And in some way I
expected other users to be of the same mind. Or even not to find out what went
wrong at all.
I am open to let this drop on the upstream side and only carry the delta
locally. Whichever sounds more suitable for the upstream maintainers.

-Stefan
> 
>> That defualt can be hypervisor specific
> 
> Great!
> 
> Ian.
>>>> And btw, it is already confusing enough as with cirrus, I get a 9M by default
>>>> which is passed on to qemu on the command line and then ignored by it and one
>>>> gets 32M in any way...
>>
>> Yeah, we were silently ignoring ram size for cirrus since QEMU doesn't let
>> it be configured. Only QXL and I think stdvga is configurable.
>>
>>
>> Regards,
>> Daniel
> 
> 
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
> 



[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2014-04-04 13:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1395939304-9017-1-git-send-email-stefan.bader@canonical.com>
2014-03-27 16:55 ` [PATCH 1/3] libxl: Use id from virDomainObj inside the driver Stefan Bader
2014-04-03 14:16   ` [libvirt] " Michal Privoznik
2014-03-27 16:55 ` [PATCH 2/3] libxl: Set disk format for empty cdrom device Stefan Bader
2014-04-03 14:16   ` [libvirt] " Michal Privoznik
2014-03-27 16:55 ` [PATCH 3/3] libxl: Implement basic video device selection Stefan Bader
2014-04-03 14:16   ` [libvirt] " Michal Privoznik
2014-03-31 17:14 ` libxl fixes/improvements for libvirt Jim Fehlig
2014-04-03 15:45 ` [libvirt] " Michal Privoznik
     [not found] ` <533D8207.8040402@redhat.com>
2014-04-03 15:49   ` Stefan Bader
2014-04-04  9:36   ` [PATCH v2] libxl: Implement basic video device selection Stefan Bader
     [not found]   ` <1396604199-8198-1-git-send-email-stefan.bader@canonical.com>
2014-04-04  9:48     ` Ian Campbell
     [not found]     ` <1396604917.4211.184.camel@kazak.uk.xensource.com>
2014-04-04 10:31       ` Stefan Bader
     [not found]       ` <533E8A1A.4030904@canonical.com>
2014-04-04 10:34         ` Ian Campbell
2014-04-04 10:34         ` Stefan Bader
     [not found]         ` <1396607657.4211.190.camel@kazak.uk.xensource.com>
2014-04-04 10:52           ` Stefan Bader
2014-04-04 12:51           ` [libvirt] " Daniel P. Berrange
     [not found]           ` <20140404125113.GA13990@redhat.com>
2014-04-04 12:56             ` Ian Campbell
     [not found]             ` <1396616169.4211.222.camel@kazak.uk.xensource.com>
2014-04-04 13:08               ` Daniel P. Berrange
2014-04-04 13:10               ` Stefan Bader [this message]
2014-04-04 13:17     ` Daniel P. Berrange
     [not found]     ` <20140404131711.GD13990@redhat.com>
2014-04-04 13:36       ` Stefan Bader
     [not found]       ` <533EB566.7000903@canonical.com>
2014-04-04 13:51         ` Daniel P. Berrange

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='533EAF2D.3020009__34707.4683093981$1396617109$gmane$org@canonical.com' \
    --to=stefan.bader@canonical.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=berrange@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=mprivozn@redhat.com \
    --cc=xen-devel@lists.xen.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.