Re: Boot FreeBSD 10 in HVM mode under Xen?

2015-08-06 Thread Karl Pielorz


--On 06 August 2015 13:46 +0200 Roger Pau Monné roger@citrix.com 
wrote:



Hello,

Sorry for the delay, as usual I've been busy with a bunch of other
stuff. You can find the patch against HEAD here:

https://people.freebsd.org/~royger/0001-xen-allow-disabling-PV-disks-and-
nics.patch

The description is self-explanatory I think. I've not tried to apply it
to stable-10, but I don't think there have been many changes in this
area in general. If you need help backporting it ping me and I will
provide a suitable version.


Hi,

Thanks for the patch! - I couldn't apply it automatically (not entirely 
sure what to do with a git diff like that :) - and, the hvm.c part of patch 
wouldn't apply cleanly anyway (too much difference).


*Having said that* - I applied it by hand to my 10.1-R system, and it seems 
to work perfectly. I've put the XENHVM and xenpci back in the kernel, 
re-enabled veridian for that VM, and put 'hw.xen.disable_pv_nics=1' in boot 
loader.


I now have a PV disk, but HVM NIC (re0) based machine - that's agile, and 
works with OpenVPN and inter-VM routing.


I can post the standard 'diff -u' patchset against 10.1 back to the list if 
needed (I know other people had PV NIC issues and were using the same 
non-agile boot as HVM fix for it).


Cheers,

-Karl
___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to freebsd-xen-unsubscr...@freebsd.org

Re: Boot FreeBSD 10 in HVM mode under Xen?

2015-08-06 Thread Roger Pau Monné
El 06/08/15 a les 15.06, Karl Pielorz ha escrit:
 
 --On 06 August 2015 13:46 +0200 Roger Pau Monné roger@citrix.com
 wrote:
 
 Hello,

 Sorry for the delay, as usual I've been busy with a bunch of other
 stuff. You can find the patch against HEAD here:

 https://people.freebsd.org/~royger/0001-xen-allow-disabling-PV-disks-and-
 nics.patch

 The description is self-explanatory I think. I've not tried to apply it
 to stable-10, but I don't think there have been many changes in this
 area in general. If you need help backporting it ping me and I will
 provide a suitable version.
 
 Hi,
 
 Thanks for the patch! - I couldn't apply it automatically (not entirely
 sure what to do with a git diff like that :) - and, the hvm.c part of
 patch wouldn't apply cleanly anyway (too much difference).
 
 *Having said that* - I applied it by hand to my 10.1-R system, and it
 seems to work perfectly. I've put the XENHVM and xenpci back in the
 kernel, re-enabled veridian for that VM, and put
 'hw.xen.disable_pv_nics=1' in boot loader.
 
 I now have a PV disk, but HVM NIC (re0) based machine - that's agile,
 and works with OpenVPN and inter-VM routing.
 
 I can post the standard 'diff -u' patchset against 10.1 back to the list
 if needed (I know other people had PV NIC issues and were using the same
 non-agile boot as HVM fix for it).

I'm going to let the patch sit here for a while so people can
test/comment. Since I'm going on vacations next week, if there are no
complains I'm planning to apply it when I'm back on the 17th.

Roger.

___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to freebsd-xen-unsubscr...@freebsd.org

Re: Boot FreeBSD 10 in HVM mode under Xen?

2015-08-05 Thread Karl Pielorz



--On 31 July 2015 17:01 +0200 Roger Pau Monné roger@citrix.com wrote:


Yes, this is certainly possible. IIRC I posted a patch to the
freebsd-xen mailing list in order to do that. I will try to find/refresh
it and post it again so you can try it. It might have to wait until
Monday however, since I'm quite busy today.


Hi,

I realise you're busy - but did you get a chance to dig out that patch? - 
We're just installing hotfixes here [which reminded me - as we have an 
number of non-agile HVM machines to move around! :(]


Thanks,

-Karl




___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to freebsd-xen-unsubscr...@freebsd.org

Re: Boot FreeBSD 10 in HVM mode under Xen?

2015-07-31 Thread Roger Pau Monné
El 31/07/15 a les 16.59, Karl Pielorz ha escrit:
 
 
 --On 31 July 2015 16:17 +0200 Roger Pau Monné roger@citrix.com wrote:
 
 This is a bug then. You should be able to boot without XENHVM/xenpci,
 and get a pure HVM guest with no PV devices at all.
 
 After removing XENHVM and xenpci - booting a FreeBSD 10.1-p8 AMD64
 kernel under XenServer 6.5 gets the output below (first few lines scroll
 off the console in XenServer).
 
 
 cpuid = 0; apic id = 00
 instruction pointer = 0x20:0x80d96af9
 stack pointer   = 0x28:0x8191bbe0
 frame pointer   = 0x28:0x8191bbf0
 code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
 processor eflags= interrupt enabled, IOPL = 0
 current process = 0 (swapper)
 trap number = 9
 panic: general protection fault
 cpuid = 0
 KDB: strack backtrace:
 #0 0x80946ae0 at kdb_backtrace+0x60
 #1 0x8090bc05 at panic+0x155
 #2 0x80d02aef at trap_fatal+0x38f
 #3 0x80d0274c at trap+0x75c
 #4 0x80ce8432 at calltrap+0x8
 #5 0x80918e1f at tc_init+0x23f
 #6 0x80d967a1 at hv_vmbus_init+0x191
 #7 0x80d9735e at vmbus_bus_init+0x1e
 #8 0x808bad38 at mi_startup+0x108
 #9 0x802d9f0c at btext+0x2c
 

Ouch, I guess this is the Xen HyperV support badly interacting with
FreeBSD again. XenServer enables the viridian extensions by default,
which really messes up with FreeBSD. You should be able to disable the
extensions by hand, as reported in:

https://lists.freebsd.org/pipermail/freebsd-xen/2013-October/001756.html

But we need a proper way to sort this out anyway.

Roger.

___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to freebsd-xen-unsubscr...@freebsd.org

Re: Boot FreeBSD 10 in HVM mode under Xen?

2015-07-31 Thread Roger Pau Monné
El 31/07/15 a les 16.38, Karl Pielorz ha escrit:
 
 
 --On 31 July 2015 16:17 +0200 Roger Pau Monné roger@citrix.com wrote:
 
 This is a bug then. You should be able to boot without XENHVM/xenpci,
 and get a pure HVM guest with no PV devices at all.
 
 I'm just setting up another less critical system to reproduce it. To
 confirm, I just take GENERIC and remove 'XENHVM' and 'xenpci', and it
 should boot without PV.
 
 I'll post the results / panic  exact versions when I get it (though
 some goes off the top of the console = could be interesting).

Could you setup the serial console on FreeBSD following:

https://www.freebsd.org/doc/handbook/serialconsole-setup.html

Then add serial='pty' to your config file and create the domain using
`xl create -c config_file`. This way you can get the full serial output.

 
 Since this seems to be getting quite popular (booting without PV
 devices), I think adding a sysctl to disable PV nics and PV hard drives
 would be interesting. We could still use some of the PV goodies, like
 the timer.
 
 Can you technically have a system that has HVM network (i.e. realtek)
 but still has disk PV, and/or is agile? (i.e. can run xen-tools)?
 
 That'd kind of be a 'perfect' workaround for all our network woes
 (openvpn, routing etc.) at the moment - even if the performance of HVM
 re0 isn't as good as a PV xn0

Yes, this is certainly possible. IIRC I posted a patch to the
freebsd-xen mailing list in order to do that. I will try to find/refresh
it and post it again so you can try it. It might have to wait until
Monday however, since I'm quite busy today.

Roger.

___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to freebsd-xen-unsubscr...@freebsd.org

Re: Boot FreeBSD 10 in HVM mode under Xen?

2015-07-31 Thread Karl Pielorz


--On 31 July 2015 17:01 +0200 Roger Pau Monné roger@citrix.com wrote:


Can you technically have a system that has HVM network (i.e. realtek)
but still has disk PV, and/or is agile? (i.e. can run xen-tools)?


Yes, this is certainly possible. IIRC I posted a patch to the
freebsd-xen mailing list in order to do that. I will try to find/refresh
it and post it again so you can try it. It might have to wait until
Monday however, since I'm quite busy today.


That'd be wonderful if you can sort that at some point - it'd be a much 
better work around than we currently have for a number of machines. Heck we 
could probably get rid of a whole pool of 'have to run non-agile HVM only' 
FBSD machines.


Thanks for your time,

-Karl
___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to freebsd-xen-unsubscr...@freebsd.org

Re: Boot FreeBSD 10 in HVM mode under Xen?

2015-07-31 Thread Karl Pielorz



--On 31 July 2015 16:17 +0200 Roger Pau Monné roger@citrix.com wrote:


This is a bug then. You should be able to boot without XENHVM/xenpci,
and get a pure HVM guest with no PV devices at all.


After removing XENHVM and xenpci - booting a FreeBSD 10.1-p8 AMD64 kernel 
under XenServer 6.5 gets the output below (first few lines scroll off the 
console in XenServer).



cpuid = 0; apic id = 00
instruction pointer = 0x20:0x80d96af9
stack pointer   = 0x28:0x8191bbe0
frame pointer   = 0x28:0x8191bbf0
code segment= base 0x0, limit 0xf, type 0x1b
   = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, IOPL = 0
current process = 0 (swapper)
trap number = 9
panic: general protection fault
cpuid = 0
KDB: strack backtrace:
#0 0x80946ae0 at kdb_backtrace+0x60
#1 0x8090bc05 at panic+0x155
#2 0x80d02aef at trap_fatal+0x38f
#3 0x80d0274c at trap+0x75c
#4 0x80ce8432 at calltrap+0x8
#5 0x80918e1f at tc_init+0x23f
#6 0x80d967a1 at hv_vmbus_init+0x191
#7 0x80d9735e at vmbus_bus_init+0x1e
#8 0x808bad38 at mi_startup+0x108
#9 0x802d9f0c at btext+0x2c



I'll try rebuilding it with debugger support (it's been a while).

Cheers,

-Karl
___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to freebsd-xen-unsubscr...@freebsd.org

Re: Boot FreeBSD 10 in HVM mode under Xen?

2015-07-31 Thread Adam McDougall
On 07/31/2015 11:22, Karl Pielorz wrote:
 
 --On 31 July 2015 17:09 +0200 Roger Pau Monné roger@citrix.com wrote:
 
 Ouch, I guess this is the Xen HyperV support badly interacting with
 FreeBSD again. XenServer enables the viridian extensions by default,
 which really messes up with FreeBSD. You should be able to disable the
 extensions by hand, as reported in:

 https://lists.freebsd.org/pipermail/freebsd-xen/2013-October/001756.html
 
 Fantastic - that works!
 
 Cheers,
 
 -Karl

I'm guessing my kernel boots fine probably because I've disabled hyperv
support in my kernel config.  viridian probably explains why I see this
in dmesg though:
Hypervisor: Origin = Microsoft Hv

___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to freebsd-xen-unsubscr...@freebsd.org

Re: Boot FreeBSD 10 in HVM mode under Xen?

2015-07-31 Thread Karl Pielorz


--On 31 July 2015 17:09 +0200 Roger Pau Monné roger@citrix.com wrote:


Ouch, I guess this is the Xen HyperV support badly interacting with
FreeBSD again. XenServer enables the viridian extensions by default,
which really messes up with FreeBSD. You should be able to disable the
extensions by hand, as reported in:

https://lists.freebsd.org/pipermail/freebsd-xen/2013-October/001756.html


Fantastic - that works!

Cheers,

-Karl
___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to freebsd-xen-unsubscr...@freebsd.org