<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/xen, branch v3.10.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>xen/tmem: Don't over-write tmem_frontswap_poolid after tmem_frontswap_init set it.</title>
<updated>2013-06-10T14:14:33+00:00</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2013-06-07T19:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b2c75c446ae72387916e2caf6e6dca815b6e5e6e'/>
<id>b2c75c446ae72387916e2caf6e6dca815b6e5e6e</id>
<content type='text'>
Commit 10a7a0771399a57a297fca9615450dbb3f88081a ("xen: tmem: enable Xen
tmem shim to be built/loaded as a module") allows the tmem module
to be loaded any time. For this work the frontswap API had to
be able to asynchronously to call tmem_frontswap_init before
or after the swap image had been set. That was added in git
commit 905cd0e1bf9ffe82d6906a01fd974ea0f70be97a
("mm: frontswap: lazy initialization to allow tmem backends to build/run as modules").

Which means we could do this (The common case):

 modprobe tmem		[so calls frontswap_register_ops, no -&gt;init]
			 modifies tmem_frontswap_poolid = -1
 swapon /dev/xvda1	[__frontswap_init, calls -&gt; init, tmem_frontswap_poolid is
			 &lt; 0 so tmem hypercall done]

Or the failing one:

 swapon /dev/xvda1	[calls __frontswap_init, sets the need_init bitmap]
 modprobe tmem		[calls frontswap_register_ops, --&gt;init calls, finds out
			tmem_frontswap_poolid is 0, does not make a hypercall.
			Later in the module_init, sets tmem_frontswap_poolid=-1]

Which meant that in the failing case we would not call the hypercall
to initialize the pool and never be able to make any frontswap
backend calls.

Moving the frontswap_register_ops after setting the tmem_frontswap_poolid
fixes it.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Reviewed-by: Bob Liu &lt;bob.liu@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 10a7a0771399a57a297fca9615450dbb3f88081a ("xen: tmem: enable Xen
tmem shim to be built/loaded as a module") allows the tmem module
to be loaded any time. For this work the frontswap API had to
be able to asynchronously to call tmem_frontswap_init before
or after the swap image had been set. That was added in git
commit 905cd0e1bf9ffe82d6906a01fd974ea0f70be97a
("mm: frontswap: lazy initialization to allow tmem backends to build/run as modules").

Which means we could do this (The common case):

 modprobe tmem		[so calls frontswap_register_ops, no -&gt;init]
			 modifies tmem_frontswap_poolid = -1
 swapon /dev/xvda1	[__frontswap_init, calls -&gt; init, tmem_frontswap_poolid is
			 &lt; 0 so tmem hypercall done]

Or the failing one:

 swapon /dev/xvda1	[calls __frontswap_init, sets the need_init bitmap]
 modprobe tmem		[calls frontswap_register_ops, --&gt;init calls, finds out
			tmem_frontswap_poolid is 0, does not make a hypercall.
			Later in the module_init, sets tmem_frontswap_poolid=-1]

Which meant that in the failing case we would not call the hypercall
to initialize the pool and never be able to make any frontswap
backend calls.

Moving the frontswap_register_ops after setting the tmem_frontswap_poolid
fixes it.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Reviewed-by: Bob Liu &lt;bob.liu@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xenbus_client.c: correct exit path for xenbus_map_ring_valloc_hvm</title>
<updated>2013-05-29T19:24:55+00:00</updated>
<author>
<name>Wei Liu</name>
<email>wei.liu2@citrix.com</email>
</author>
<published>2013-05-29T16:02:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8d0b8801c9e4c2c6b20cdac74dbab16facce7653'/>
<id>8d0b8801c9e4c2c6b20cdac74dbab16facce7653</id>
<content type='text'>
Apparently we should not free page that has not been allocated.
This is b/c alloc_xenballooned_pages will take care of freeing
the page on its own.

Signed-off-by: Wei Liu &lt;wei.liu2@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apparently we should not free page that has not been allocated.
This is b/c alloc_xenballooned_pages will take care of freeing
the page on its own.

Signed-off-by: Wei Liu &lt;wei.liu2@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-pciback: more uses of cached MSI-X capability offset</title>
<updated>2013-05-29T13:04:22+00:00</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2013-05-29T12:31:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d69c0e3975e4955dd596c162d1628ba1dbb1eb45'/>
<id>d69c0e3975e4955dd596c162d1628ba1dbb1eb45</id>
<content type='text'>
Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xenbus: save xenstore local status for later use</title>
<updated>2013-05-29T13:04:20+00:00</updated>
<author>
<name>Aurelien Chartier</name>
<email>aurelien.chartier@citrix.com</email>
</author>
<published>2013-05-28T17:09:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=33c1174bae3ea8f420abce53cf8aded778987583'/>
<id>33c1174bae3ea8f420abce53cf8aded778987583</id>
<content type='text'>
Save the xenstore local status computed in xenbus_init. It can then be used
later to check if xenstored is running in this domain.

Signed-off-by: Aurelien Chartier &lt;aurelien.chartier@citrix.com&gt;
[Changes in v4:
- Change variable name to xen_store_domain_type]
Reviewed-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Save the xenstore local status computed in xenbus_init. It can then be used
later to check if xenstored is running in this domain.

Signed-off-by: Aurelien Chartier &lt;aurelien.chartier@citrix.com&gt;
[Changes in v4:
- Change variable name to xen_store_domain_type]
Reviewed-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xenbus: delay xenbus frontend resume if xenstored is not running</title>
<updated>2013-05-29T13:04:19+00:00</updated>
<author>
<name>Aurelien Chartier</name>
<email>aurelien.chartier@citrix.com</email>
</author>
<published>2013-05-28T17:09:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2abb274629614bef4044a0b98ada42e977feadfd'/>
<id>2abb274629614bef4044a0b98ada42e977feadfd</id>
<content type='text'>
If the xenbus frontend is located in a domain running xenstored, the device
resume is hanging because it is happening before the process resume. This
patch adds extra logic to the resume code to check if we are the domain
running xenstored and delay the resume if needed.

Signed-off-by: Aurelien Chartier &lt;aurelien.chartier@citrix.com&gt;
[Changes in v2:
- Instead of bypassing the resume, process it in a workqueue]
[Changes in v3:
- Add a struct work in xenbus_device to avoid dynamic allocation
- Several small code fixes]
[Changes in v4:
- Use a dedicated workqueue]
[Changes in v5:
- Move create_workqueue error handling to xenbus_frontend_dev_resume]
Acked-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the xenbus frontend is located in a domain running xenstored, the device
resume is hanging because it is happening before the process resume. This
patch adds extra logic to the resume code to check if we are the domain
running xenstored and delay the resume if needed.

Signed-off-by: Aurelien Chartier &lt;aurelien.chartier@citrix.com&gt;
[Changes in v2:
- Instead of bypassing the resume, process it in a workqueue]
[Changes in v3:
- Add a struct work in xenbus_device to avoid dynamic allocation
- Several small code fixes]
[Changes in v4:
- Use a dedicated workqueue]
[Changes in v5:
- Move create_workqueue error handling to xenbus_frontend_dev_resume]
Acked-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xmem/tmem: fix 'undefined variable' build error.</title>
<updated>2013-05-28T13:54:48+00:00</updated>
<author>
<name>Frederico Cadete</name>
<email>frederico@cadete.eu</email>
</author>
<published>2013-05-25T20:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1d7004f0593f631b78745e4c835d8e09b31f4996'/>
<id>1d7004f0593f631b78745e4c835d8e09b31f4996</id>
<content type='text'>
In the (not so useful) kernel configuration where CONFIG_SWAP
is undefined and CONFIG_XEN_SELFBALLOONING is defined,
xen_tmem_init would use undefined variable 'static bool frontswap'.

Added #else to have #define frontswap (0) in the case where
CONFIG_FRONTSWAP is not defined.

Signed-off-by: Frederico Cadete &lt;frederico@cadete.eu&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the (not so useful) kernel configuration where CONFIG_SWAP
is undefined and CONFIG_XEN_SELFBALLOONING is defined,
xen_tmem_init would use undefined variable 'static bool frontswap'.

Added #else to have #define frontswap (0) in the case where
CONFIG_FRONTSWAP is not defined.

Signed-off-by: Frederico Cadete &lt;frederico@cadete.eu&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen: Fixed assignment error in if statement</title>
<updated>2013-05-20T18:14:48+00:00</updated>
<author>
<name>Lisa Nguyen</name>
<email>lisa@xenapiadmin.com</email>
</author>
<published>2013-05-16T05:59:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fce92683570c2ddcdb82cde67b0b07800106fbd9'/>
<id>fce92683570c2ddcdb82cde67b0b07800106fbd9</id>
<content type='text'>
Fixed assignment error in if statement in balloon.c

Signed-off-by: Lisa Nguyen &lt;lisa@xenapiadmin.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed assignment error in if statement in balloon.c

Signed-off-by: Lisa Nguyen &lt;lisa@xenapiadmin.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen/xenbus: Fixed over 80 character limit issue</title>
<updated>2013-05-20T18:14:47+00:00</updated>
<author>
<name>Lisa Nguyen</name>
<email>lisa@xenapiadmin.com</email>
</author>
<published>2013-05-16T06:48:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3d645b02d9c6254caf51d9d78e6d9caf72990b33'/>
<id>3d645b02d9c6254caf51d9d78e6d9caf72990b33</id>
<content type='text'>
Fixed the format length of the xenbus_backend_ioctl()
function to meet the 80 character limit in
xenbus_dev_backend.c

Signed-off-by: Lisa Nguyen &lt;lisa@xenapiadmin.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed the format length of the xenbus_backend_ioctl()
function to meet the 80 character limit in
xenbus_dev_backend.c

Signed-off-by: Lisa Nguyen &lt;lisa@xenapiadmin.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen/xenbus: Fixed indentation error in switch case</title>
<updated>2013-05-20T18:14:46+00:00</updated>
<author>
<name>Lisa Nguyen</name>
<email>lisa@xenapiadmin.com</email>
</author>
<published>2013-05-16T06:47:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d7e5075044f6c4e85f671cb88f99187509f4a2b0'/>
<id>d7e5075044f6c4e85f671cb88f99187509f4a2b0</id>
<content type='text'>
Fixed the indentation error in the switch case in
xenbus_dev_backend.c

Signed-off-by: Lisa Nguyen &lt;lisa@xenapiadmin.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed the indentation error in the switch case in
xenbus_dev_backend.c

Signed-off-by: Lisa Nguyen &lt;lisa@xenapiadmin.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen/tmem: Don't use self[ballooning|shrinking] if frontswap is off.</title>
<updated>2013-05-15T14:27:50+00:00</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2013-05-14T17:56:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37d46e152e4c71cd772085912f1c7bf06839f739'/>
<id>37d46e152e4c71cd772085912f1c7bf06839f739</id>
<content type='text'>
There is no point. We would just squeeze the guest to put more and
more pages in the swap disk without any purpose.

The only time it makes sense to use the selfballooning and shrinking
is when frontswap is being utilized.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no point. We would just squeeze the guest to put more and
more pages in the swap disk without any purpose.

The only time it makes sense to use the selfballooning and shrinking
is when frontswap is being utilized.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
