qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Ian Campbell <ijc@hellion.org.uk>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2 1/2] Generalize -machine command line option
Date: Wed, 25 May 2011 10:23:06 +0200	[thread overview]
Message-ID: <4DDCBC6A.1060107@siemens.com> (raw)
In-Reply-To: <1306311214.20576.201.camel@zakaz.uk.xensource.com>

On 2011-05-25 10:13, Ian Campbell wrote:
> On Tue, 2011-05-24 at 18:18 +0200, Jan Kiszka wrote:
>> On 2011-05-24 18:06, Ian Campbell wrote:
>>> On Sun, 2011-05-22 at 13:00 +0200, Jan Kiszka wrote:
>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>> -machine somehow suggests that it selects the machine, but it doesn't.
>>>> Fix that before this command is set in stone.
>>>>
>>>> Actually, -machine should supersede -M and allow to introduce arbitrary
>>>> per-machine options to the command line. That will change the internal
>>>> realization again, but we will be able to keep the user interface
>>>> stable.
>>>>
>>>> CC: Anthony PERARD <anthony.perard@citrix.com>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> "-machine xenfv" doesn't work for me with this patch, it gives:
>>>         Program received signal SIGSEGV, Segmentation fault.
>>>         hypercall_buffer_cache_lock (xch=0x0) at xc_hcall_buf.c:36
>>>         36	xc_hcall_buf.c: No such file or directory.
>>>         	in xc_hcall_buf.c
>>>         (gdb) bt
>>>         #0  hypercall_buffer_cache_lock (xch=0x0) at xc_hcall_buf.c:36
>>>         #1  0xb7d53f1d in hypercall_buffer_cache_alloc (xch=0x0, b=0xbffff77c, nr_pages=1) at xc_hcall_buf.c:52
>>>         #2  xc__hypercall_buffer_alloc_pages (xch=0x0, b=0xbffff77c, nr_pages=1) at xc_hcall_buf.c:128
>>>         #3  0xb7d54028 in xc__hypercall_buffer_alloc (xch=0x0, b=0xbffff77c, size=16) at xc_hcall_buf.c:162
>>>         #4  0xb7d42719 in xc_get_hvm_param (handle=0x0, dom=248, param=5, value=0xbffff810) at xc_domain.c:1078
>>>         #5  0x08252777 in xen_hvm_init () at /home/ianc/devel/qemu.git/xen-all.c:803
>>>         #6  0x082921e9 in pc_xen_hvm_init (ram_size=536870912, boot_device=0xbffffabb "cda", kernel_filename=0x0, kernel_cmdline=0x82d648f "", initrd_filename=0x0, cpu_model=0x0) at /home/ianc/devel/qemu.git/hw/pc_piix.c:246
>>>         #7  0x081e3f0e in main (argc=26, argv=0xbffffba4, envp=0xbffffc10) at /home/ianc/devel/qemu.git/vl.c:3162
>>>
>>> I suspect this is because xen_init() (which sets xch) is never called,
>>> perhaps because it causes the accelerator to always be tcg? If I use
>>> "-machine xenfv,accel=xen" then it works as expected, -M continues to
>>> work too AFAICT.
>>>
>>> It would be nice to retain the behaviour of defaulting to accel=xen for
>>> machine=xenfv. (to be honest I can't quite see where this behaviour came
>>> from, nor what about this patch changes it...)
>>
>> Well, first of all I think this revealed a Xen bug because it crashes
>> when you try to run xenfv with an inappropriate accelerator, no? What is
>> the result of -machine xenfv,accel=tcg or, without my patch, -M xenfv
>> -machine accel=tcg?
> 
> Unsurprisingly it crashed...
> 
> I'm not sure if this is a bug in the xen side of simply a case of
> providing enough rope. I didn't really follow the threads which resulted
> in the accel stuff all that closely so I'm not sure what the intention
> was, it seems to me that the accel option is invalid with certain
> machine types though.
> 
> I suppose in theory -machine xenpv,accel=kvm might result in xenner or
> something, accel=xenpv,tcg I'm less sure about (perhaps xenner too?).
> For -machine xenfv I don't expect anything other than accel=xen makes
> much sense.

The point is that crashing is always a very poor way of reporting a
misconfiguration to the user. I bet you are able to detect and report
that more gracefully, e.g. during xenfv machine init.

> 
>> Then the question is what accel options are actually picked with
>> -machine xenfv, or why the default options are maybe not considered. I
>> don't have any Xen around, but I will check how far I can debug this -
>> or actually try to understand what I coded if nothing helps.
> 
> I saw a follow up patch -- I'll give it a go.

TIA,
Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

  reply	other threads:[~2011-05-25 14:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-20 11:18 [Qemu-devel] [PATCH 1/2] Generalize -machine command line option Jan Kiszka
2011-05-22 11:00 ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2011-05-24 16:06   ` Ian Campbell
2011-05-24 16:18     ` Jan Kiszka
2011-05-25  7:03       ` [Qemu-devel] [PATCH v3 " Jan Kiszka
2011-05-25  8:17         ` Ian Campbell
2011-06-07 15:58         ` Jan Kiszka
2011-05-25  8:13       ` [Qemu-devel] [PATCH v2 " Ian Campbell
2011-05-25  8:23         ` Jan Kiszka [this message]
2011-05-25  8:34           ` Ian Campbell
2011-05-25 10:54         ` Anthony PERARD
2011-05-26  9:04           ` Ian Campbell

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=4DDCBC6A.1060107@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=aliguori@us.ibm.com \
    --cc=anthony.perard@citrix.com \
    --cc=ijc@hellion.org.uk \
    --cc=qemu-devel@nongnu.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 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).