Re: [Xen-devel] Criteria / validation proposal: drop Xen

2019-05-14 Thread M A Young
On Tue, 14 May 2019, Steven Haigh wrote:

> The final fix would be figuring out why pygrub currently boots the *second*
> entry in the resulting grub.cfg - unlike how F29 worked. This may be either a
> fix on the grub2-mkconfig or pygrub side - I'm not quite sure yet. This would
> likely restore functionality completely. At least until something else more
> suitable is done?

The answer to why is easy. pygrub just ignores "if" instructions and there 
is a
set default=1
line in an if clause from /etc/grub.d/08_fallback_counting so it 
defaults to the second entry as they are numbered from 0.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Fedora - make BLS configs default - Xen Dom0 boot broken

2019-05-15 Thread M A Young
On Wed, 15 May 2019, Daniel Kiper wrote:

> FYI, another Xen Dom0 boot issue on Fedora...
> 
> Please take a look at [1]. This will break Xen Dom0 boot due to lack of
> support for multiboot, multiboot2, module, and module2 commands. If we
> care then this has to be fixed somehow...

This bit isn't currently a problem for Xen Dom0 because the 
/etc/grub.d/20_linux_xen grub script still generates non-BLS grub 
configuration.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Compiling Xen error on RedHat8.0

2019-05-24 Thread M A Young
On Fri, 24 May 2019, Chen, Farrah wrote:

> Hi,
> 
> I met some python related issues when building Xen on RedHat8.0.
> On RedHat8.0, the default python version is python3, and I found Xen has some 
> python2 codes, so I tried to build xen using python2.
> On RedHat8.0, no "python", just "python2" and "python3":
> 
> ls /usr/bin/python*
> /usr/bin/python2/usr/bin/python2.7-config  /usr/bin/python3
> /usr/bin/python3.6-config  /usr/bin/python3.6m-config 
> /usr/bin/python3-config
> /usr/bin/python2.7  /usr/bin/python2-config/usr/bin/python3.6  
> /usr/bin/python3.6m/usr/bin/python3.6m-x86_64-config
> 
> So I created a soft link "python" to "python2":
> 
> ll /usr/bin/python
> lrwxrwxrwx 1 root root 16 May 24 13:08 /usr/bin/python -> /usr/bin/python2
> 
> Then I tried to build xen:
> 
> cd xen
> ./configure --enable-ovmf
> .
> checking for unistd.h... yes
> checking for python-config... no
> checking Python.h usability... yes
> checking Python.h presence... yes
> checking for Python.h... yes
> checking for PyArg_ParseTuple... no
> configure: error: Unable to find a suitable python development library
> configure: error: ./configure failed for tools
> 
> If I use python3(create a soft link "python" to "python3" ), it reported 
> syntax error.
> 
> checking for unistd.h... yes
> checking for python-config... no
>   File "", line 1
> import distutils.sysconfig; print "-I" + 
> distutils.sysconfig.get_config_var("INCLUDEPY")
>  ^
> SyntaxError: invalid syntax
> checking Python.h usability... no
> checking Python.h presence... no
> checking for Python.h... no
> configure: error: Unable to find Python development headers
> configure: error: ./configure failed for tools
> 
> To resolve "Unable to find a suitable python development library", I 
> installed python2-devel*, python2-lib*, python3-devel*, python3-lib*, 
> python2-six, python3-six, but this error still exists.
> In RedHat7, these packages are called "python-devel*, python-lib*", but in 
> RedHat8, these packages don't exists, RedHat8 has only "python2-devel*, 
> python2-lib*, python3-devel*, python3-lib*", maybe Xen codes cannot identify 
> them.
> 
> Do you have any advice on building Xen on RedHat8? Thanks a lot!

If you want to go down the python3 path there are a bundle of python3 
packages (from the xen master branch) in the Fedora build of xen-4.12.0 at
https://src.fedoraproject.org/rpms/xen/blob/master/f/xen.python3.patch
which might be useful to apply or refer to given that RHEL 8 is loosely 
based on Fedora.

Also RHEL 8 has python36-devel and python2-devel which you might need for 
a python3 or python2 build.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] read grubenv and set default from saved_entry or next_entry

2019-08-15 Thread M A Young
On Thu, 15 Aug 2019, Steven Haigh wrote:

> Having a bit of a look here
> 
> My test system grubenv file has:
> # GRUB Environment Block
> saved_entry=0
> kernelopts=root=UUID=5346b4d9-885f-4673-8aff-04a16bf1971a ro
> rootflags=subvol=root selinux=0 rhgb quiet
> boot_success=1

It looks like the edit

 raise RuntimeError("syntax error: cannot nest 
menuentry
(%d %s)" % (len(img),img))
 img = []
 title = title_match.group(1)
+if title == default_title:
+setattr(self, 'default', img_count)
+img_count += 1
 continue
 
 if l.startswith("submenu"):

also needs a test for default_title == img_count though there may be 
variable types to consider in that comparison.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 0/2] x86: fix build with gcc9

2019-03-07 Thread M A Young
On Thu, 7 Mar 2019, Jan Beulich wrote:

> Several build issues (new warnings, causing the build to fail due to
> -Werror) have been found. The two changes here address the ones
> I can actually repro; there are a few more related to
> -Waddress-of-packed-member which I haven't been able to see
> myself, and hence for now I'm unable to sort out a proper fix /
> workaround for them.

I found issues with -Waddress-of-packed-member in 3 places in Fedora. My 
(possibly flawed) attempt to fix the gcc9 issues (on 4.11) is at 
https://src.fedoraproject.org/rpms/xen/blob/master/f/xen.gcc9.fixes.patch 

I am running an install of xen with the patch applied so it seems 
functional.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] python3 issues

2019-03-26 Thread M A Young
On Tue, 26 Mar 2019, Wei Liu wrote:

> On Tue, Mar 26, 2019 at 01:16:35PM +, Wei Liu wrote:
> > On Mon, Mar 25, 2019 at 10:20:05PM +, YOUNG, MICHAEL A. wrote:
> > >  if ty.init_fn is not None:
> > > --- xen-4.12.0-rc6/tools/pygrub/src/GrubConf.py.orig  2019-03-24 
> > > 22:44:05.502581989 +
> > > +++ xen-4.12.0-rc6/tools/pygrub/src/GrubConf.py   2019-03-24 
> > > 22:49:14.025934786 +
> > > @@ -230,10 +230,10 @@
> > >  def _get_default(self):
> > >  return self._default
> > >  def _set_default(self, val):
> > > -if val == "saved":
> > > +if val == "saved" or not val.isdecimal():
> 
> Your change suggested there could be a non-decimal string that is not
> "saved" -- is this really needed?

It is getting set to ${next_entry} presumably from the clause 

if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

in the grub.cfg file giving the error

  File "/usr/lib64/python3.7/site-packages/grub/GrubConf.py", line 239, in 
_set_default
if self._default < 0:
TypeError: '<' not supported between instances of 'str' and 'int'

I didn't see this with python 2 before the patch so I assume python3 is 
more fussy.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] python3 issues

2019-04-01 Thread M A Young


On Mon, 1 Apr 2019, Wei Liu wrote:

> On Tue, Mar 26, 2019 at 10:06:48PM +0100, Hans van Kranenburg wrote:
> > 
> > Python 3 no longer allows comparing string and int, because it doesn't
> > make sense.
> > 
> > == sorted([1,2,3,'a','b','c'])
> > Traceback (most recent call last):
> >   File "", line 1, in 
> > TypeError: unorderable types: str() < int()
> > 
> > So I guess that if the contents are expected to be "saved" or a number
> > as string like "1", "2", then:
> > 
> > 1. check for "saved"
> > 2. try: int(val) except: blah
> > 3. etc
> > 
> 
> Actually I think you scheme here is better. Relying on string comparison
> seems to be error-prone.
> 
> Wei.

I tested with the patch

--- xen-4.12.0-rc6/tools/pygrub/src/GrubConf.py.orig2019-03-24 
22:44:05.502581989 +
+++ xen-4.12.0-rc6/tools/pygrub/src/GrubConf.py 2019-03-24 
22:49:14.025934786 +
@@ -233,7 +233,10 @@
 if val == "saved":
 self._default = 0
 else:
-self._default = val
+try:
+self._default = int(val)
+except ValueError:
+self._default = 0
 
 if self._default < 0:
 raise ValueError("default must be positive number")

which works for me but should probably have some logging added for debug 
purposes.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] booting domU guest as pvh works in xen-4.11.1 but fails in 4.12

2019-04-16 Thread M A Young
On Mon, 15 Apr 2019, Pry Mar wrote:

> Hello,
> 
> https://paste.debian.net/1077718/
> 
> I get a kernel panic as shown in the paste above no matter how I
> launch pvh, with bootloader (pygrub), kernel direct (4.18+), or
> pvgrub2 (i386-xen_pvh support).
> 
> The dom0 here is ub1804, kernel-4.18, and xen-4.12 with debian
> packages (self built).
> ~$ sudo dpkg -l | grep -P 'xen|qemu' | grep '^ii'
> ii  libxen-4.12:amd64  4.12.0-1+ub18u04.1amd64
>Public libs for Xen
> ii  libxenstore3.0:amd64  4.12.0-1+ub18u04.1amd64
>   Xenstore communications library for Xen
> ii  libxentoolcore1:amd64  4.12.0-1+ub18u04.1amd64
>helper for qemu & libxenstore
> ii  qemuu 3.1.0-1+ub18u04.1 amd64
> qemu-system-i386 (3.1.0/xen-4.12) with 9pfs support
> ii  xen-hypervisor-4.12-amd64 4.12.0-1+ub18u04.1
>  amd64Xen Hypervisor on AMD64
> ii  xen-utils-4.124.12.0-1+ub18u04.1
>  amd64XEN administrative tools
> ii  xen-utils-common  4.12.0-1+ub18u04.1
>  all  Xen administrative tools - common files
> ii  xen-virbr00.1-2
>  all  Setup a virbr0 bridge and dnsmasq on a
> ii  xenstore-utils4.12.0-1+ub18u04.1
>  amd64Xenstore command line utilities for Xen
> 
> The same xl config and grub config works in xen-4.11.1. I've searched
> for any new options in xl.cfg that could influence this, but nothing
> catches my eye.
> 
> I get the same dmesg in other boot methods, but the i386-xen_pvh style
> yields more info at the end. The (fire-missle) grub script is provided
> Hans van Kranenburg .
> 
> Before the initrd unpacks I see many errors (line 201 of paste):
> fuse init modprobe trap invalid opcode ip:7f797dc7bb95
> 
> But later the xen_netfront and xen_blkfront drivers load fine and then
> trouble starts.
> 
> PryMar56,
> ##xen-packaging on Freenode IRC

I have seen a similar crash on Fedora on a F30 guest that works with PV 
but crashes with HVM on 4.12 but not on 4.11.1. I am seeing similar 
behaviour on a Windows 10 HVM guest, though that is harder to diagnose.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] booting domU guest as pvh works in xen-4.11.1 but fails in 4.12

2019-04-16 Thread M A Young
On Tue, 16 Apr 2019, Andrew Cooper wrote:

> From the log:
> 
> traps: modprobe[48] trap invalid opcode ip:7f797dc7bb95 sp:7ffe3099cdb8 erro
> r:0 in ld-2.29.so[7f797dc61000+21000]
> 
> 
> Can you disassemble ld-2.29.so and find out what that instruction is?  It is
> almost certainly a related factor.

I get lines like
[1.384356] traps: modprobe[36] trap invalid opcode ip:7f57448af179 
sp:7fff8fc3a938 error:0 in ld-2.29.so[7f5744895000+2]

I am guessing the right place to look in ld-2.29.so is 
0x7f57448af179-0x7f5744895-2 = 86873 in which case I get
(gdb) x/10i 86873
   0x15359 <_dl_close_worker+3593>: mov(%rsi,%rcx,8),%r8
   0x1535d <_dl_close_worker+3597>: testb  $0x20,0x31d(%r8)
   0x15365 <_dl_close_worker+3605>: jne0x15375 
<_dl_close_worker+3621>
   0x15367 <_dl_close_worker+3607>: cmp%ecx,%edx
   0x15369 <_dl_close_worker+3609>: je 0x15372 
<_dl_close_worker+3618>
   0x1536b <_dl_close_worker+3611>: mov%edx,%r9d
   0x1536e <_dl_close_worker+3614>: mov%r8,(%rsi,%r9,8)
   0x15372 <_dl_close_worker+3618>: add$0x1,%edx
   0x15375 <_dl_close_worker+3621>: add$0x1,%rcx
   0x15379 <_dl_close_worker+3625>: cmp%ecx,%eax

Some more lines like this are
[1.571479] traps: modprobe[41] trap invalid opcode ip:7f3e3628d179 
sp:7ffc86abbe08 error:0 in ld-2.29.so[7f3e36273000+2]
[1.630562] traps: modprobe[43] trap invalid opcode ip:7f227b39a179 
sp:7ffdfd943198 error:0 in ld-2.29.so[7f227b38+2]
which all seem to get to the same place. Is this useful or am I looking in 
the wrong place?

Michael Young___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] /sys/hypervisor entries for Xen (Domain-0, PV, PVH and HVM)

2019-10-09 Thread M A Young
On Wed, 9 Oct 2019, Steven Haigh wrote:

> Hi all,
> 
> I'm working on fixing up the grub packages for Fedora in deducing the new BLS
> logic in Fedora and disabling it in non-compatible environments.
> 
> BZ Report:
> https://bugzilla.redhat.com/show_bug.cgi?id=1703700
> 
> Currently, it seems that we can deduce the following two scenarios:
> 
> in /sys/hypervisor:
> 
> 1) type == xen && uuid == all zeros, then this is BLS safe (the Domain-0).
> 2) type == xen && uuid != all zeros, then this is BLS *unsafe* (covers PV, HVM
> and PVH guests).
> 
> Is there any other variables that come into effect that could cause a
> variation in the above checks as to enable or disable BLS?
> 
> Right now, I'm proposing that we try to disable the new BLS behaviour in
> Fedora for PV, HVM and PVH guests - as pygrub is not up to the task of booting
> them. We included HVM as it may be common for users to switch between HVM and
> PVH configurations for the same installed VM.

I do have a long term plan to try to get pygrub to handle BLS, though I 
don't expect to have it working soon.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] /sys/hypervisor entries for Xen (Domain-0, PV, PVH and HVM)

2019-10-09 Thread M A Young
On Wed, 9 Oct 2019, Steven Haigh wrote:

> For now, the only big issue that remains is that the current pygrub will
> always boot the second image in the list due to pygrub incorrectly parsing the
> failover sections of the Fedora grub.cfg where the failover will set
> 'default=1' causing this behaviour.

I did post a very hacky patch to improve this to xen-devel and should 
have a more acceptable set of patches for this soon.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Xen-4.10 Domain-0 crashes at bootup

2018-04-04 Thread M A Young
On Wed, 4 Apr 2018, Ajay Garg wrote:

> Since I failed to get a single reply on my original issue as per
> https://lists.xenproject.org/archives/html/minios-devel/2018-04/msg4.html,
> so I had no option but to try on a newer xen version.
> 
> So, I created  a  new virtualbox-guest, and followed the steps as per
> https://blog.werk21.de/en/2018/02/08/build-xen-hypervisor-410-and-xen-tools-ubuntu-1604-pvh
> 
> Now, when start the guest with Xen-hypervisor enabled, it does not come up.
> I took serial-logs at bootup time, they are as follows :
> 
> #
>  Xen 4.10.1-pre
> (XEN) Xen version 4.10.1-pre (ajay@) (gcc (Ubuntu
> 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609) debug=n  Wed Apr  4 12:54:58
> IST 2018
> (XEN) Latest ChangeSet: Tue Mar 20 14:23:14 2018 +0100 git:0f92968
> (XEN) Bootloader: GRUB 2.02~beta2-36ubuntu3.17
> (XEN) Command line: placeholder console=com1 com1=115200,8n1
> loglvl=all guest_loglvl=all
> (XEN) Xen image load base address: 0
> (XEN) Video information:
> (XEN)  VGA is text mode 80x25, font 8x16
> (XEN) Disc information:
> (XEN)  Found 1 MBR signatures
> (XEN)  Found 1 EDD information structures
> (XEN) Xen-e820 RAM map:
> (XEN)   - 0009fc00 (usable)
> (XEN)  0009fc00 - 000a (reserved)
> (XEN)  000f - 0010 (reserved)
> (XEN)  0010 - bfff (usable)
> (XEN)  bfff - c000 (ACPI data)
> (XEN)  fec0 - fec01000 (reserved)
> (XEN)  fee0 - fee01000 (reserved)
> (XEN)  fffc - 0001 (reserved)
> (XEN) New Xen image base address: 0xbf80
> (XEN) System RAM: 3071MB (3145276kB)
> (XEN) ACPI: RSDP 000E, 0024 (r2 VBOX  )
> (XEN) ACPI: XSDT BFFF0030, 003C (r1 VBOX   VBOXXSDT1 ASL61)
> (XEN) ACPI: FACP BFFF00F0, 00F4 (r4 VBOX   VBOXFACP1 ASL61)
> (XEN) ACPI: DSDT BFFF0470, 21FF (r2 VBOX   VBOXBIOS2 INTL 20160108)
> (XEN) ACPI: FACS BFFF0200, 0040
> (XEN) ACPI: APIC BFFF0240, 0054 (r2 VBOX   VBOXAPIC1 ASL61)
> (XEN) ACPI: SSDT BFFF02A0, 01CC (r1 VBOX   VBOXCPUT2 INTL 20160108)
> (XEN) No NUMA configuration found
> (XEN) Faking a node at -bfff
> (XEN) Domain heap initialised
> (XEN) CPU Vendor: Intel, Family 6 (0x6), Model 142 (0x8e), Stepping 9
> (raw 000806e9)
> (XEN) found SMP MP-table at 0009fff0
> (XEN) DMI 2.5 present.
> (XEN) Using APIC driver default
> (XEN) ACPI: PM-Timer IO Port: 0x4008 (32 bits)
> (XEN) ACPI: SLEEP INFO: pm1x_cnt[1:4004,1:0], pm1x_evt[1:4000,1:0]
> (XEN) ACPI: wakeup_vec[bfff020c], vec_size[20]
> (XEN) ACPI: Local APIC address 0xfee0
> (XEN) ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
> (XEN) ACPI: IOAPIC (id[0x01] address[0xfec0] gsi_base[0])
> (XEN) IOAPIC[0]: apic_id 1, version 32, address 0xfec0, GSI 0-23
> (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
> (XEN) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
> (XEN) ACPI: IRQ0 used by override.
> (XEN) ACPI: IRQ2 used by override.
> (XEN) ACPI: IRQ9 used by override.
> (XEN) Enabling APIC mode:  Flat.  Using 1 I/O APICs
> (XEN) ERST table was not found
> (XEN) Using ACPI (MADT) for SMP configuration information
> (XEN) SMP: Allowing 1 CPUs (0 hotplug CPUs)
> (XEN) IRQ limits: 24 GSI, 184 MSI/MSI-X
> (XEN) Not enabling x2APIC: depends on iommu_supports_eim.
> (XEN) xstate: size: 0x440 and states: 0x7
> (XEN) CPU0: No MCE banks present. Machine check support disabled
> (XEN) Speculative mitigation facilities:
> (XEN)   Compiled-in support: INDIRECT_THUNK
> (XEN) BTI mitigations: Thunk RETPOLINE, Others: RSB_NATIVE RSB_VMEXIT
> (XEN) Using scheduler: SMP Credit Scheduler (credit)
> (XEN) Platform timer is 3.579MHz ACPI PM Timer
> (XEN) Detected 2712.035 MHz processor.
> (XEN) Initing memory sharing.
> (XEN) alt table 82d080421798 -> 82d080423244
> (XEN) I/O virtualisation disabled
> (XEN) nr_sockets: 1
> (XEN) ENABLING IO-APIC IRQs
> (XEN)  -> Using new ACK method
> (XEN) ..TIMER: vector=0xF0 apic1=0 pin1=2 apic2=-1 pin2=-1
> (XEN) Allocated console ring of 16 KiB.
> (XEN) Brought up 1 CPUs
> (XEN) build-id: 0734050809e0cb9f52e65322a0d3911d082e348b
> (XEN) CPUIDLE: disabled due to no HPET. Force enable with 'cpuidle'.
> (XEN) ACPI sleep modes: S3
> (XEN) VPMU: disabled
> (XEN) xenoprof: Initialization failed. Intel processor family 6 model
> 142 is not supported
> (XEN) Dom0 has maximum 208 PIRQs
> (XEN) NX (Execute Disable) protection active
> (XEN) *** LOADING DOMAIN 0 ***
> (XEN)  Xen  kernel: 64-bit, lsb, compat32
> (XEN)  Dom0 kernel: 64-bit, PAE, lsb, paddr 0x100 -> 0x2957000
> (XEN) PHYSICAL MEMORY ARRANGEMENT:
> (XEN)  Dom0 alloc.:   b400->b800 (715309 pages
> to be allocated)
> (XEN)  Init. ramdisk: bc915000->bf7ffed9
> (XEN) VIRTUAL MEMORY ARRANGEMENT:
> (XEN)  Lo

Re: [Xen-devel] Xen-4.10 Domain-0 crashes at bootup

2018-04-04 Thread M A Young
On Wed, 4 Apr 2018, Ajay Garg wrote:

> Thanks Michael for the reply.
> 
> I want to give this patch a try, as the symptoms look identical.
> However, I see no xen-head.S when I clone the repo from
> git://xenbits.xen.org/xen.git
> 
> What am I missing?

The patch is for the xen code in the kernel. It was accepted in the kernel 
upstream (in 4.15.5 and probably backported to other maintained kernels) 
so you probably just need a kernel less than a month old, but as has 
already been said, the kernel may not be the problem.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] xen crash with 4.17 kernel on Fedora

2018-07-01 Thread M A Young
On Sun, 1 Jul 2018, Andrew Cooper wrote:

> On 01/07/18 17:43, Michael Young wrote:
> > I am seeing crash on boot and DomU (pv) on Fedora with the 4.17 kernel
> > (eg. kernel-4.17.2-200.fc28.x86_64 and kernel-4.17.3-200.fc28.x86_64)
> > which
> > didn't occur with 4.16 kernel (eg. kernel-4.16.16-300.fc28.x86_64)
> >
> > The backtrace for a Dom0 boot of xen-4.10.1-5.fc28.x86_64 running
> > kernel-4.17.2-200.fc28.x86_64 is
> >
> > (XEN) d0v0 Unhandled general protection fault fault/trap [#13, ec=]
> > (XEN) domain_crash_sync called from entry.S: fault at 82d08035557c
> > x86_64/entry.S#create_bounce_frame+0x135/0x159
> > (XEN) Domain 0 (vcpu#0) crashed on cpu#0:
> > (XEN) [ Xen-4.10.1  x86_64  debug=n   Not tainted ]
> > (XEN) CPU:    0
> > (XEN) RIP:    e033:[]
> > (XEN) RFLAGS: 0246   EM: 1   CONTEXT: pv guest (d0v0)
> > (XEN) rax: 0246   rbx:    rcx:
> > 
> > (XEN) rdx:    rsi:    rdi:
> > 
> > (XEN) rbp:    rsp: 82203d90   r8: 
> > 820bb698
> > (XEN) r9:  82203e38   r10:    r11:
> > 
> > (XEN) r12:    r13: 820bb698   r14:
> > 82203e38
> > (XEN) r15:    cr0: 80050033   cr4:
> > 06e0
> > (XEN) cr3: 1aacf000   cr2: 
> > (XEN) fsb:    gsb: 82731000   gss:
> > 
> > (XEN) ds:    es:    fs:    gs:    ss: e02b   cs: e033
> > (XEN) Guest stack trace from rsp=82203d90:
> > (XEN)      
> > 81062330
> > (XEN)    0001e030 00010046 82203dd8
> > e02b
> > (XEN)    0246 8110e019 
> > 0246
> > (XEN)      820a6cd8
> > 82203e88
> > (XEN)    82739000 8061 
> > 
> > (XEN)    8110ecb6 0008 82203e98
> > 82203e58
> > (XEN)      8161
> > 0100
> > (XEN)    feff  
> > 82203ef0
> > (XEN)    810ac990  
> > 
> > (XEN)      8161
> > 0100
> > (XEN)    feff  
> > 02739000
> > (XEN)    0080 8275db62 0001a739
> > 
> > (XEN)      
> > 81037c80
> > (XEN)    007f8275efe7 82739000 81037f18
> > 8102aaf0
> > (XEN)    8275dc8c  
> > 
> > (XEN)      
> > 
> > (XEN)      
> > 
> > (XEN)      
> > 
> > (XEN)      
> > 
> > (XEN)      0f0060c0c748
> > c305
> >
> > where
> > addr2line -f -e vmlinux 81062330
> > gives
> > native_irq_disable
> > /usr/src/debug/kernel-4.17.fc28/linux-4.17.2-200.fc28.x86_64/./arch/x86/include/asm/irqflags.h:44
> >
> >
> > What is the problem or how might it be debugged?
> 
> The guest is executing a native `cli` instruction which is privileged
> and we don't allow (we could trap & emulate, but we can't provide proper
> STI-shadow behaviour, and such a guest might also expect popf to work,
> which is very much doesnt).  In Linux, that codepath should be using a
> pvop, rather than a native op.
> 
> It is either a subsystem which should be skipped when virtualised, or a
> poorly coded subsystem, or a buggy setup path.
> 
> Can you see about trying to boot the old kernel as dom0, and the new
> kernel as a domU with pause on crash configured? 
> /usr/libexec/xen/bin/xenctx should be able to pull a backtrace out of
> the crashed domain state if you pass the appropriate symbol table in.

I get (with kernel-4.17.3-200.fc28.x86_64 which is a bit easier)

rip: 81062330 native_irq_disable
flags: 0246 i z p
rsp: 82203d90
rax: 0246   rcx:    rdx: 
rbx:    rsi:    rdi: 
rbp: r8: 820bb698r9: 82203e38
r10:    r11:    r12: 
r13: 820bb698   r14: 82203e38   r15: 
 cs: e033ss: e02bds: es: 
 fs:  @ 
 gs:  @ 82731000/ __init_begin/
Code (instr addr 81062330)
00 00

Re: [Xen-devel] xen crash with 4.17 kernel on Fedora

2018-07-02 Thread M A Young
On Mon, 2 Jul 2018, Juergen Gross wrote:

> On 01/07/18 18:43, Michael Young wrote:
> > I am seeing crash on boot and DomU (pv) on Fedora with the 4.17 kernel
> > (eg. kernel-4.17.2-200.fc28.x86_64 and kernel-4.17.3-200.fc28.x86_64) which
> > didn't occur with 4.16 kernel (eg. kernel-4.16.16-300.fc28.x86_64)
> 
> Could you please try the attached patches? They apply to either 4.17
> or 4.18-rc.
> 
> The first one should let the kernel survive the WARN_ONCE(), while
> the second will avoid hitting the WARN_ONCE().

Yes, kernel-4.17.3-200.fc28 with these patches applied boots as a DomU and 
I checked dmesg, /var/log/messages and journalctl for pgprot messages and 
didn't find anything.

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Build issues with newer iasl (was: Re: Status of comet-4.10 branch)

2018-06-16 Thread M A Young
On Sat, 16 Jun 2018, Roger Pau Monné wrote:

> On Fri, Jun 15, 2018 at 07:26:14PM +0100, Michael Young wrote:
> > context (this hasn't reached Fedora yet as the build is broken, I think due
> > to updates to Fedora's acpica-tools package which provides iasl).
> 
> I've recently experienced the same on FreeBSD, you might want to try:
> 
> http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=858dbaaeda33b05c1ac80aea0ba9a03924e09005

Thanks for that, though I worked out an inferior version of that fix 
myself since my email. I didn't think to look upstream, which I should 
have done as I now realize my recent test build of xen 4.11 rc6 succeeded 
with the with the updated iasl.

Michael Young___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] broken link to 4.10.0 on website

2017-12-18 Thread M A Young
The link to xen 4.10.0 from 
https://xenproject.org/developers/teams/hypervisor.html is broken. It goes 
to 
https://xenproject.org/downloads/xen-archives/xen-project-410-series/xen-4100.html
but the page is actually
https://xenproject.org/downloads/xen-archives/xen-project-410-series/xen-project-4100.html

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [Xen-users] DomU not starting under pvhv2

2018-01-17 Thread M A Young
On Wed, 17 Jan 2018, Roger Pau Monné wrote:

> On Mon, Jan 08, 2018 at 06:01:57PM +, George Dunlap wrote:
> > Moving to xen-devel, and cc'ing Roger and Boris (who developed PVH)
> > 
> > On Mon, Jan 8, 2018 at 5:24 AM, Peter  wrote:
> > > Hi.
> > >
> > > Running Xen 4.10.0
> > 
> > What version of Linux are you using?
> > 
> > >
> > > A VM is not starting with type = 'pvh'.  The VM starts, but exits prior to
> > > any data being read off the domU disk image.
> 
> Can you append earlyprintk=xen to your guest command line and try with
> a debug build of the hypervisor?
> 
> Is there anything relevant in the hypervisor serial console output?
> (xl dmesg if you don't have the serial console hooked up)

Also are you using qemu-xen or qemu-xen-traditional? If it is the former 
and you have the error
xen emulation not implemented (yet)
in the relevant qemu-dm log file in /var/log/xen then you presumably need 
the patch at
https://lists.xenproject.org/archives/html/xen-devel/2018-01/msg01289.html

Michael Young___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH RFC] ocaml: Fix compile with ocaml 4.06, use unsafe strings

2018-01-26 Thread M A Young
On Fri, 26 Jan 2018, John Thomson wrote:

> Use autoconf to test if ocaml version >= 4.02
> If so, use -unsafe-string for ocamlopt and ocamlc
> 
> Bytes & safe-string were introduced in ocaml 4.02 (2015-07-27)
> 
> With ocaml 4.06, -safe-string is now default
> This separates the types bytes (mutable string) and string

For Fedora Rawhide, which has ocaml 4.06, we came up with a patch to make 
xen ocaml safe-strings compliant (which I haven't got around to submitting 
to this list yet).

The patch is at
https://src.fedoraproject.org/rpms/xen/blob/master/f/xen.ocaml.safe-strings.patch
with the related Fedora bug at
https://bugzilla.redhat.com/show_bug.cgi?id=1526703

Michael Young

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel