Re: [Xen-devel] [Xen-users] 4.5 git: regression in xen systemd shutdown hangs the OS

2014-12-02 Thread Olaf Hering
On Tue, Dec 02, Ian Campbell wrote:

 On Tue, 2014-12-02 at 16:17 +0100, Olaf Hering wrote:
  On Tue, Dec 02, Ian Campbell wrote:
  
   On Mon, 2014-12-01 at 23:41 +, Mark Pryor wrote:
list,
   
   Thanks. If you've identified a buggy changeset then it is fine to post
   to the devel lists. I've added a CC. I've also CCd everyone listed in
   the commit which you've fingered.
   
   Olaf, does this suggested change look correct? If so then can you turn
   it into a patch please.
  
  Yes, something like this (sed -i 's@socket@service@g' *.in):
 
 Can you submit to -devel with a commit log and S-o-b etc please.

Yes, I did already. Looks like git send-email does not process a
Reported-by tag so Mark did not actually got a copy of that submission.
But the actual patch did not change so what I sent him earlier can be
used as is.

Olaf

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


[Xen-devel] xl pci-attach silently fails the first time

2014-12-01 Thread Olaf Hering

I tried to attach a PCI device (IGB Virtual Function) to a HVM guest. 
To actually get it assigned its required to run
pci-attach/pci-detach/pci-attach because it does not show up right away.
Did anyone noticed this bug already, is there a fix? There is no error
reported in dom0 dmesg, xl dmesg or qemu logfiles.

My domU.cfg looks like this:
name=domU
memory=512
builder=hvm
vif=['',]
disk=[ 'file:/SLE-12-Server-DVD-x86_64-GM-DVD1.iso,hda:cdrom' ]
serial=pty

# xl pci-assignable-add 01:10.0
# xl pci-assignable-list
:01:10.0
# xl create -f domU.cfg
# xl console domU
## lspci gives just emulated PCI devices
## detach from domU console
# xl pci-attach domU :01:10.0
# xl pci-list domU
Vdev Device
04.0 :01:10.0

# xl console domU
## lspci gives just emulated PCI devices
## detach from domU console
# xl pci-detach domU :01:10.0
# xl pci-attach domU :01:10.0
# xl pci-list domU
Vdev Device
04.0 :01:10.0
# xl console domU
## lspci shows now also the assigned host device


Olaf

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


Re: [Xen-devel] xl pci-attach silently fails the first time

2014-12-01 Thread Olaf Hering
On Mon, Dec 01, Olaf Hering wrote:

 # xl pci-assignable-add 01:10.0
 # xl pci-assignable-list
 :01:10.0
 # xl create -f domU.cfg
 # xl console domU
 ## lspci gives just emulated PCI devices

ttyS0:Rescue:~ # lspci 
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)
00:03.0 VGA compatible controller: Cirrus Logic GD 5446
00:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. 
RTL-8100/8101L/8139 PCI Fast Ethernet Adapter (rev ff)

 ## detach from domU console
 # xl pci-attach domU :01:10.0
 # xl pci-list domU
 Vdev Device
 04.0 :01:10.0
 
 # xl console domU
 ## lspci gives just emulated PCI devices

ttyS0:Rescue:~ # lspci 
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)
00:03.0 VGA compatible controller: Cirrus Logic GD 5446
00:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. 
RTL-8100/8101L/8139 PCI Fast Ethernet Adapter (rev 01)

 ## detach from domU console
 # xl pci-detach domU :01:10.0
Now lspci shows that the emulated network card is gone.
ttyS0:Rescue:~ # lspci 
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)
00:03.0 VGA compatible controller: Cirrus Logic GD 5446

 # xl pci-attach domU :01:10.0
 # xl pci-list domU
 Vdev Device
 04.0 :01:10.0
 # xl console domU
 ## lspci shows now also the assigned host device


So the actual bug is that the very first time after pci-attach the guests
00:04.0 PCI device is (most likely) replaced with the host PCI device. Just
the guest does not notice that 00:04.0 was actually already gone after unplug.

I wonder why the unplug code in xen_platform.c does just a qdev_free() instead
of a real pci-detach kind of thing. I'm sure this could be done at least for
emulated network cards.

Olaf

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


Re: [Xen-devel] xl pci-attach silently fails the first time

2014-12-01 Thread Olaf Hering
On Mon, Dec 01, Ian Campbell wrote:

 On Mon, 2014-12-01 at 15:34 +0100, Olaf Hering wrote:
  On Mon, Dec 01, Sander Eikelenboom wrote:
   Hmm the wiki also still mentions it: 
   http://wiki.xen.org/wiki/Xen_PCI_Passthrough
   
   It was the ability with xend + qemu-trad to be able to specify the slot 
   to 
   use in the guest for the pci device.
   
   See docs/misc/vtd.txt .. that seems it has never been updated :-)
   
   (together with passing through a multifunction devices as multifunction 
   inside 
   the guest this hasn't got implemented in neither libxl and qemu-xen.)
  So this looks like we a lost feature in libxl.
 See http://bugs.xenproject.org/xen/bug/22 (I think that's what that is)

Yes, the virtual function part is covered by #22. Thanks.

Olaf

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


[Xen-devel] get a handle for the tap device to shut it down

2014-11-28 Thread Olaf Hering

Xen does a shutdown of the emulated PCI network device in
pci_unplug_nics. But this just disables the PCI device. The tap device
for a given emulated card remains active because nothing closes the
file descriptor. 

The cmdline for qemu contains something like -device
rtl8139,id=nic0,netdev=net0,mac=00:16:3e:28:f1:ee -netdev
type=tap,id=net0,ifname=vif1.0-emu,script=no,downscript=no.

I wonder if the missing disable of the tap device is intentional, or
just an oversight, or if its just to complicated to get from a
PCIDevice * to the other end and call the -cleanup function.


Olaf

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


Re: [Xen-devel] [Planning for Xen-4.6] Migration v2

2014-11-26 Thread Olaf Hering
On Tue, Nov 25, Andrew Cooper wrote:

 The purpose of this email is to plan how to progress the migrationv2
 series through to being merged.  I believe I have CC'd everyone with a
 specific interest in this area, but apologies if I have missed anyone.

While you mow that lawn, did you guys think of handling downtime of the
migrated VM? I added some knobs to abort migration in a very libxc
specific way. What I would like to see is a simple user interface for
virsh/xl to control the downtime. See the thread limit downtime during
life migration from xl/virsh:

http://lists.xenproject.org/archives/html/xen-devel/2014-03/msg00785.html


Olaf

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


Re: [Xen-devel] [Planning for Xen-4.6] Migration v2

2014-11-26 Thread Olaf Hering
On Wed, Nov 26, Andrew Cooper wrote:

 It is certainly my hope going forward that different knobs can be
 exposed.  One thing I think would be interesting is some proper
 calculations of the delta in the dirty set, and offering a threshold
 which chooses between pause and complete or abort the migration and
 complain that the VM is too active

The pause and complete step is what causes unexpected time jumps in
the guest. Would be nice if that can be controlled with a knob.

Olaf

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


Re: [Xen-devel] [PATCH v2] INSTALL: correct EXTRA_CFLAGS handling

2014-11-25 Thread Olaf Hering
On Tue, Nov 25, Konrad Rzeszutek Wilk wrote:

 On Tue, Nov 25, 2014 at 05:04:09PM +0100, Olaf Hering wrote:
  +Using additional CFLAGS to build tools running in dom0 is required when
 Why the mention of 'buld tools running in dom0'? It sounds like it is
 required to use dom0 to build tools?

Does it really read like dom0 is required?! But I can change it as you
suggest.

Olaf

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


[Xen-devel] [PATCH] INSTALL: correct EXTRA_CFLAGS handling

2014-11-20 Thread Olaf Hering
The already documented configure patch was not applied.
Adjust documentation to describe existing behaviour.

Signed-off-by: Olaf Hering o...@aepfle.de
---
 INSTALL | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/INSTALL b/INSTALL
index 6bb9d23..656c90a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -128,13 +128,6 @@ original xenstored will be used. Valid names are xenstored 
and
 oxenstored.
   --with-xenstored=name
 
-Using additional CFLAGS to build tools running in dom0 is required when
-building distro packages. This is the option to pass things like
-RPM_OPT_FLAGS.
-  --with-extra-cflags-tools=EXTRA_CFLAGS
-  --with-extra-cflags-qemu-traditional=EXTRA_CFLAGS
-  --with-extra-cflags-qemu-upstream=EXTRA_CFLAGS
-
 Instead of starting the tools in dom0 with sysv runlevel scripts they
 can also be started by systemd. If this option is enabled xenstored will
 receive the communication socked directly from systemd. So starting it
@@ -241,6 +234,12 @@ QEMU_UPSTREAM_URL=
 QEMU_TRADITIONAL_URL=
 SEABIOS_UPSTREAM_URL=
 
+Using additional CFLAGS to build tools running in dom0 is required when
+building distro packages. This can be used to pass RPM_OPT_FLAGS.
+EXTRA_CFLAGS_XEN_TOOLS=
+EXTRA_CFLAGS_QEMU_TRADITIONAL=
+EXTRA_CFLAGS_QEMU_XEN=
+
 This variable can be used to use DIR/include and DIR/lib during build.
 This is the same as PREPEND_LIB and PREPEND_INCLUDES. APPEND_LIB and
 APPEND_INCLUDES= will be appended to the CFLAGS/LDFLAGS variable.
@@ -310,10 +309,10 @@ sudo make install BOOT_DIR=/ood/path/boot 
EFI_DIR=/odd/path/efi
 %build
 export WGET=$(type -P false)
 export GIT=$(type -P false)
+export EXTRA_CFLAGS_XEN_TOOLS=$RPM_OPT_FLAGS
+export EXTRA_CFLAGS_QEMU_TRADITIONAL=$RPM_OPT_FLAGS
+export EXTRA_CFLAGS_QEMU_XEN=$RPM_OPT_FLAGS
 %configure \
---with-extra-cflags-tools=$RPM_OPT_FLAGS \
---with-extra-cflags-qemu-traditional=$RPM_OPT_FLAGS \
---with-extra-cflags-qemu-upstream=$RPM_OPT_FLAGS \
 --with-initddir=%{_initddir}
 unset CFLAGS CXXFLAGS FFLAGS LDFLAGS
 make

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


[Xen-devel] [PATCH v2] xen: use more fixed strings to build the hypervisor

2014-11-20 Thread Olaf Hering
It should be possible to repeatedly build identical sources and get
identical binaries, even on different hosts at different build times.
This fails for xen.gz and xen.efi because current time and buildhost
get included in the binaries.

Provide variables XEN_BUILD_DATE, XEN_BUILD_TIME and XEN_BUILD_HOST
which the build environment can set to fixed strings to get a
reproducible build.

Signed-off-by: Olaf Hering o...@aepfle.de
Cc: Ian Campbell ian.campb...@citrix.com
Cc: Ian Jackson ian.jack...@eu.citrix.com
Cc: Jan Beulich jbeul...@suse.com
Cc: Keir Fraser k...@xen.org
Cc: Tim Deegan t...@xen.org
---

v2: 
 reword commit message.

 xen/Makefile | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index 72c1313..47f003c 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -8,6 +8,9 @@ export XEN_FULLVERSION   = 
$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 
 export XEN_WHOAMI  ?= $(USER)
 export XEN_DOMAIN  ?= $(shell ([ -x /bin/dnsdomainname ]  
/bin/dnsdomainname) || ([ -x /bin/domainname ]  /bin/domainname || echo 
[unknown]))
+export XEN_BUILD_DATE  ?= $(shell LC_ALL=C date)
+export XEN_BUILD_TIME  ?= $(shell LC_ALL=C date +%T)
+export XEN_BUILD_HOST  ?= $(shell hostname)
 
 export BASEDIR := $(CURDIR)
 export XEN_ROOT := $(BASEDIR)/..
@@ -126,11 +129,11 @@ delete-unfresh-files:
 
 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
 include/xen/compile.h: include/xen/compile.h.in .banner
-   @sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
-   -e 's/@@time@@/$(shell LC_ALL=C date +%T)/g' \
+   @sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \
+   -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \
-e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
-e 's/@@domain@@/$(XEN_DOMAIN)/g' \
-   -e 's/@@hostname@@/$(shell hostname)/g' \
+   -e 's/@@hostname@@/$(XEN_BUILD_HOST)/g' \
-e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 21 | head 
-1)!g' \
-e 's/@@version@@/$(XEN_VERSION)/g' \
-e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \

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


[Xen-devel] [PATCH] xen: use more fixed strings to build the hypervisor

2014-11-18 Thread Olaf Hering
It is expected that repeated builds of identical sources results in
identical binaries on different hosts at different build times. This
fails for xen.gz and xen.efi because unstable strings are included in
the binaries.

In addition to existing variables use XEN_BUILD_DATE, XEN_BUILD_TIME and
XEN_BUILD_HOST to specify fixed strings during build.

Signed-off-by: Olaf Hering o...@aepfle.de
Cc: Ian Campbell ian.campb...@citrix.com
Cc: Ian Jackson ian.jack...@eu.citrix.com
Cc: Jan Beulich jbeul...@suse.com
Cc: Keir Fraser k...@xen.org
Cc: Tim Deegan t...@xen.org
---
 xen/Makefile | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index 72c1313..47f003c 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -8,6 +8,9 @@ export XEN_FULLVERSION   = 
$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 
 export XEN_WHOAMI  ?= $(USER)
 export XEN_DOMAIN  ?= $(shell ([ -x /bin/dnsdomainname ]  
/bin/dnsdomainname) || ([ -x /bin/domainname ]  /bin/domainname || echo 
[unknown]))
+export XEN_BUILD_DATE  ?= $(shell LC_ALL=C date)
+export XEN_BUILD_TIME  ?= $(shell LC_ALL=C date +%T)
+export XEN_BUILD_HOST  ?= $(shell hostname)
 
 export BASEDIR := $(CURDIR)
 export XEN_ROOT := $(BASEDIR)/..
@@ -126,11 +129,11 @@ delete-unfresh-files:
 
 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
 include/xen/compile.h: include/xen/compile.h.in .banner
-   @sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
-   -e 's/@@time@@/$(shell LC_ALL=C date +%T)/g' \
+   @sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \
+   -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \
-e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
-e 's/@@domain@@/$(XEN_DOMAIN)/g' \
-   -e 's/@@hostname@@/$(shell hostname)/g' \
+   -e 's/@@hostname@@/$(XEN_BUILD_HOST)/g' \
-e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 21 | head 
-1)!g' \
-e 's/@@version@@/$(XEN_VERSION)/g' \
-e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \

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


Re: [Xen-devel] [PATCH] xen: use more fixed strings to build the hypervisor

2014-11-18 Thread Olaf Hering
On Tue, Nov 18, Ian Jackson wrote:

 How about
 
It should be possible to repeatedly build identical sources
and get identical binaries, even on different hosts at different
build times.  This fails [etc. etc. ...]
 
Provide variables XEN_BUILD_DATE, XEN_BUILD_TIME and XEN_BUILD_HOST
which the build environment can set to fixed strings to get a
reproducible build.
 
 or some such.

Thanks. Do you want me to resend with this updated changelog, or will it
be used while applying?

Olaf

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


<    4   5   6   7   8   9