[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Fwd: Openindiana, using -machine pc, accel=xen in qemu



On Monday, 26 September 2016, 12:32:01 EDT, Anthony PERARD wrote:
> On Thu, Sep 22, 2016 at 10:37:14AM -0400, jim burns wrote:
> > Pls cc me with any replies.
> > 
> > On Thursday, 22 September 2016, 12:22:02 EDT, Anthony PERARD wrote:
> > > On Wed, Sep 21, 2016 at 06:20:16PM -0400, jim burns wrote:
> > > > I didn't get any responses in xen-users, so I'm posting here. My use
> > > > case
> > > > is as below, but the jist of it is is the qemu option -machine
> > > > pc,accel=xen meant to be usable in standalone qemu, or is it only
> > > > available from a guest launched by xl, or libvirtd via libxl? If the
> > > > latter, are there any plans to make it available as a standalone qemu
> > > > option?
> > > 
> > > Hi,
> > > 
> > > -machine pc,accel=xen is to be used by libxl (used by xl or libvirt).
> > > libxl takes care of creating a guest and launch QEMU when needed.
> > 
> > That was quick. Thank you for your response. So there is no way to hook
> > libxl from a standalone qemu option?
> 
> With xl, you can add arguments to the qemu command line via the option:
> device_model_args_hvm = [ "-extra-option", 'example' ]

And you saw me use that, as below. What I was asking is is there an option for 
standalone qemu that will let it connect to libxl?

> > > What is your xen config file for OI ?
> > 
> > name = "osol134"
> > uuid = "f80856df-3180-acc5-931d-32190cfe4062"
> > memory=2048
> > vcpus=4
> > localtime=1
> > on_poweroff = "destroy"
> > on_reboot = "destroy"
> > on_crash = "preserve"
> > #
> > boot="dc"
> > builder="hvm"
> > xen_platform_pci=0  # forces -machine pc,accel=xen
> > device_model_args=[ '-cpu','Haswell-noTSX' ]
> 
> This -cpu would not work, QEMU have no control over the cpu when running
> with Xen.

Well, that may be, but if you do a process list, and grep for the qemu process 
that xl just created, the -cpu option shows up. Also, when I can get a verbose 
boot log from an xl initiated OpenIndiana (OI), the cpuid options listed 
correspond to the cpuid options listed when I run OI with standalone qemu with 
'-cpu Haswell-noTSX', including sse4.n, avx*, and x2apic. Of course, my system 
IS an Haswell Icore-5, so xen may just be passing the host cpu along.

> > ## live cd installer
> > 
> > Disk = [ "file:/home/jimb/Documents/rpms/OI-hipster-
> > gui-20160421.iso,xvdc:cdrom,r", "phy:/dev/dm-2,xvda,w" ]
> 
> Would the guest works if you change xvda and xvdc to respectively hda
> and hdc?
> 
> > vga="qxl"
> > videoram=128
> > #soundhw='all' #causes hvm domain start failure
> > soundhw='sb16,es1370,ac97,adlib,gus,cs4231a'
> 
> You could specify only one sound card, instead of all, and you could use
> 'hda' to start with.
> 
> > usbdevice='mouse'
> 
> Try with a tablet instead of the mouse:
> usbdevice='tablet'
> That is usually the virtual device I use for a mouse.
> You could try also without the usbdevice option, and see if the guest
> boot.

Neither '-soundhw hda' or '-usbdevice tablet' work in standalone qemu OI. OI 
has initialization problems with hda, and I had to use another sound driver. 
That's why I pass all the drivers except hda to standalone qemu. Also, OI 
software is quite old (Gnome 2, gcc 4.9, xorg 1.14, etc.) and they don't 
really have a tablet driver, and passing a tablet to standalone qemu resulted 
in a non functional mouse.

None the less, I tried all three changes to my xen cfg, and commenting out the 
Haswell option, and there was no difference.

To reiterate from my OP, when 'xen_platform_pci=1', I can boot into grub, edit 
the kernel line for verbose booting (-v), and the boot msgs list the decoded 
cpuid flags, then hang on the enumeration of the first pci device. If I pass 
'xen_platform_pci=0', I get the same msgs, but then the domain aborts with a 
null pointer dereference in an OI kernel driver.

My only concern here is getting hardware acceleration for my OI domain, which 
right now is only thru kvm/qemu, which is inconvenient to have to boot bare 
metal, or have a very slow domain under a xen boot. However, I've tried 
numerous variations in my xen cfg, to no avail. If there is no standalone qemu 
option to connect it to libxl, are there any plans to include one down the 
road? (Which was my original question.)

P.S. - I have read with interest your xen-devel posts this month on OVMF (as a 
user, not a developer). I had to re-compile xen with '-enable-ovmf', since 
Fedora (at least) does not deliver it that way, and that was not straight 
forward. That code path needs a little love since -Werror is used a lot. There 
were a couple of source files that gcc choked on for improper indentation, and 
a ton of files in the compile of edk2 that choked on a variable that was set 
but not used, except in an 'assert' statement. I had to add '-Wno-unused-but-
set-variable' to BaseTools/Conf/tools_def.template. Then, in the compile of 
gmp, the configure script couldn't calculate sizeof(unsigned short), 
sizeof(unsigned), etc., and I had to force reasonable values.

I'll be interested to see what OVMF becomes next.

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.