Re: [Xen-devel] [PATCH v3] xen/balloon: don't online new memory initially

2017-07-18 Thread Juergen Gross
On 18/07/17 18:08, Boris Ostrovsky wrote: > On 07/10/2017 04:10 AM, Juergen Gross wrote: >> When setting up the Xenstore watch for the memory target size the new >> watch will fire at once. Don't try to reach the configured target size >> by onlining new memory in this case,

Re: [Xen-devel] [PATCH][xen-next] xen/pvcalls: fix null pointer reference on sock_release call

2017-07-18 Thread Juergen Gross
On 11/07/17 21:41, Colin King wrote: > From: Colin Ian King > > Currently a sock_release on map->sock will result in a null pointer > deference on map when map is null. Instead, the sock_relase sould > be on sock and not map->sock. > > Detected by CoverityScan,

Re: [Xen-devel] [PATCH v1] xen/grant-table: log the lack of grants

2017-07-18 Thread Juergen Gross
On 07/07/17 20:23, Wengang Wang wrote: > log a message when we enter this situation: > 1) we already allocated the max number of available grants from hypervisor > and > 2) we still need more (but the request fails because of 1)). > > Sometimes the lack of grants causes IO hangs in xen_blkfront

Re: [Xen-devel] [PATCH] xen/x86: Don't BUG on CPU0 offlining

2017-07-18 Thread Juergen Gross
On 26/06/17 18:39, Vitaly Kuznetsov wrote: > CONFIG_BOOTPARAM_HOTPLUG_CPU0 allows to offline CPU0 but Xen HVM guests > BUG() in xen_teardown_timer(). Remove the BUG_ON(), this is probably a > leftover from ancient times when CPU0 hotplug was impossible, it works > just fine for HVM. > >

Re: [Xen-devel] [PATCH v1] xen/grant-table: log the lack of grants

2017-07-18 Thread Juergen Gross
gs in xen_blkfront devices. > Adding this log would help debuging. > > Signed-off-by: Wengang Wang <wen.gang.w...@oracle.com> > Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> > Reviewed-by: Junxiao Bi <junxiao...@oracle.com> Reviewed-by:

Re: [Xen-devel] [PATCH] xen/pvcalls: NULL dereference in error handling

2017-07-18 Thread Juergen Gross
On 12/07/17 09:25, Dan Carpenter wrote: > We accidentally dereference "map" when it's NULL. > > Fixes: b535e2b9b78a ("xen/pvcalls: implement connect command") > Signed-off-by: Dan Carpenter The patch is okay, but the very same one has already been sent before. I'll

[Xen-devel] [PATCH 2/2] xen: dont fiddle with event channel masking in suspend/resume

2017-07-17 Thread Juergen Gross
Instead of fiddling with masking the event channels during suspend and resume handling let do the irq subsystem do its job. It will do the mask and unmask operations as needed. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/xen/events/events_base.c | 13 +++-- 1 file c

[Xen-devel] [PATCH 1/2] irq: adjust state of irq in resume_irq() when IRQF_FORCE_RESUME set

2017-07-17 Thread Juergen Gross
An irq pretending it got disabled should have its state set accordingly. Otherwise a potential unmask later won't succeed. Signed-off-by: Juergen Gross <jgr...@suse.com> --- kernel/irq/chip.c | 10 -- kernel/irq/internals.h | 10 ++ kernel/irq/pm.c| 2 ++ 3

[Xen-devel] [PATCH 0/2] irq, xen: fix event channel masking on suspend/resume

2017-07-17 Thread Juergen Gross
ect states in irq and remove the masking from Xen. Juergen Gross (2): irq: adjust state of irq in resume_irq() when IRQF_FORCE_RESUME set xen: dont fiddle with event channel masking in suspend/resume drivers/xen/events/events_base.c | 13 +++-- kernel/irq/chip.c

Re: [Xen-devel] A document for Xen release management

2017-07-17 Thread Juergen Gross
On 17/07/17 17:09, Wei Liu wrote: > It is agreed during the summit we should write down such document. Here > is my attempt of doing so. > > We should probably commit something like this into xen.git so that it > gets updated regularly. > > Comments are welcome. > > - > > % Xen Release

[Xen-devel] [XenSummit 2017] Notes from the 5-level-paging session

2017-07-17 Thread Juergen Gross
Hey, I took a few notes at the 5-level-paging session at the summit. I hope there isn't any major stuff missing... Participants (at least naming the active ones): Andrew Cooper, Jan Beulich, Yu Zhang and myself (the list is just from my memory). The following topics have been discussed in the

Re: [Xen-devel] [XenSummit 2017] Notes from the PVH performance session

2017-07-17 Thread Juergen Gross
On 17/07/17 12:15, Andrew Cooper wrote: > On 17/07/17 11:09, Juergen Gross wrote: >> Hey, >> >> I took a few notes at the PVH performance session at the summit. >> I hope there isn't any major stuff missing... >> >> Participants (at least naming the acti

[Xen-devel] [XenSummit 2017] Notes from the PVH performance session

2017-07-17 Thread Juergen Gross
Hey, I took a few notes at the PVH performance session at the summit. I hope there isn't any major stuff missing... Participants (at least naming the active ones): Andrew Cooper, Jan Beulich, Paul Durrant, Roger Pau Monné and myself (the list is just from my memory). Following performance

[Xen-devel] [PATCH v3] xen/balloon: don't online new memory initially

2017-07-10 Thread Juergen Gross
balloon.c and xen-balloon.c init calls do the xen-balloon.c initialization from balloon.c. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/xen/balloon.c | 3 +++ drivers/xen/xen-balloon.c | 22 -- include/xen/balloon.h | 8 3 files chang

Re: [Xen-devel] Problem with commit bf22ff45bed664aefb5c4e43029057a199b7070c

2017-07-10 Thread Juergen Gross
On 07/07/17 19:11, Thomas Gleixner wrote: > On Fri, 7 Jul 2017, Thomas Gleixner wrote: > >> On Fri, 7 Jul 2017, Juergen Gross wrote: >> >>> Commit bf22ff45bed664aefb5c4e43029057a199b7070c ("genirq: Avoid >>> unnecessary low level irq function calls&quo

Re: [Xen-devel] maybe revert commit c275a57f5ec3 "xen/balloon: Set balloon's initial state to number of existing RAM pages"

2017-07-09 Thread Juergen Gross
On 08/07/17 02:59, Konrad Rzeszutek Wilk wrote: > On Tue, Mar 28, 2017 at 05:30:24PM +0200, Juergen Gross wrote: >> On 28/03/17 16:27, Boris Ostrovsky wrote: >>> On 03/28/2017 04:08 AM, Jan Beulich wrote: >>>>>>> On 28.03.17 at 03:57, <boris.

Re: [Xen-devel] Problem with commit bf22ff45bed664aefb5c4e43029057a199b7070c

2017-07-07 Thread Juergen Gross
On 07/07/17 18:41, Thomas Gleixner wrote: > On Fri, 7 Jul 2017, Juergen Gross wrote: > >> Commit bf22ff45bed664aefb5c4e43029057a199b7070c ("genirq: Avoid >> unnecessary low level irq function calls") breaks Xen guest >> save/restore handling. >> >>

[Xen-devel] Problem with commit bf22ff45bed664aefb5c4e43029057a199b7070c

2017-07-07 Thread Juergen Gross
Commit bf22ff45bed664aefb5c4e43029057a199b7070c ("genirq: Avoid unnecessary low level irq function calls") breaks Xen guest save/restore handling. The main problem are the PV devices using Xen event channels as interrupt sources which are represented as an "irq chip" in the kernel. When saving

Re: [Xen-devel] [PATCH v7 15/18] xen/pvcalls: implement the ioworker functions

2017-07-06 Thread Juergen Gross
> > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> > Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v7 14/18] xen/pvcalls: disconnect and module_exit

2017-07-06 Thread Juergen Gross
igned-off-by: Stefano Stabellini <stef...@aporeto.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v7 09/18] xen/pvcalls: implement bind command

2017-07-06 Thread Juergen Gross
added later. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v7 08/18] xen/pvcalls: implement connect command

2017-07-06 Thread Juergen Gross
e implemented later. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v7 06/18] xen/pvcalls: handle commands from the frontend

2017-07-06 Thread Juergen Gross
read and write to it. The functions implementing the > commands are empty stubs for now. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___ Xen-devel mailin

Re: [Xen-devel] [PATCH v7 05/18] xen/pvcalls: connect to a frontend

2017-07-06 Thread Juergen Gross
frontends. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> > Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v7 04/18] xen/pvcalls: xenbus state handling

2017-07-06 Thread Juergen Gross
> Introduce stub functions for disconnecting/connecting to a frontend. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> > Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen _

[Xen-devel] [GIT PULL] xen: features and fixes for 4.13-rc1

2017-07-06 Thread Juergen Gross
1): x86: xen: remove unnecessary variable in xen_foreach_remap_area() Juergen Gross (7): xen: don't print error message in case of missing Xenstore entry doc,xen: document hypervisor sysfs nodes for xen xen: add sysfs node for guest type xen: sync include/xen/interface/v

[Xen-devel] [PATCH v2] xen/balloon: don't online new memory initially

2017-07-05 Thread Juergen Gross
balloon.c and xen-balloon.c init calls do the xen-balloon.c initialization from balloon.c. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/xen/balloon.c | 3 +++ drivers/xen/xen-balloon.c | 22 -- include/xen/balloon.h | 8 3 files chang

[Xen-devel] [PATCH] xen/x86: fix cpu hotplug

2017-07-05 Thread Juergen Gross
returning at the end of xen_play_dead() do_idle() would be entered again and again. Don't use cpu_startup_entry(), but cpuhp_online_idle() instead allowing to return from xen_play_dead(). Cc: <sta...@vger.kernel.org> # 4.12 Signed-off-by: Juergen Gross <jgr...@suse.com> ---

Re: [Xen-devel] Question about "xen: Revert commits da72ff5bfcb0 and 72a9b186292d"

2017-07-04 Thread Juergen Gross
On 04/07/17 14:44, Jean-Louis Dupond wrote: > Hi Juergen, > > We run Xen as dom0 with Windows domU's. > > Now with older 4.9.x kernels, we had BSOD's when we booted a domU with > old Xen drivers in it. > With the newest kernel (4.9.34), this seems to be resolved. > > I was wondering what caused

Re: [Xen-devel] Question about "xen: Revert commits da72ff5bfcb0 and 72a9b186292d"

2017-07-04 Thread Juergen Gross
On 04/07/17 13:54, Jean-Louis Dupond wrote: > Hi All, > > We had some issues with BSOD's on Windows at startup when using some old > Xen drivers inside Windows. > Now when we upgrade to the most recent 4.9.x kernel. The issue seems to > be resolved. > > Could it be that the following commit

Re: [Xen-devel] [PATCH v6 01/18] xen: introduce the pvcalls interface header

2017-07-04 Thread Juergen Gross
..@oracle.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v6 03/18] xen/pvcalls: initialize the module and register the xenbus backend

2017-07-04 Thread Juergen Gross
On 03/07/17 23:08, Stefano Stabellini wrote: > Keep a list of connected frontends. Use a semaphore to protect list > accesses. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> > Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Reviewed-by: Jue

Re: [Xen-devel] [PATCH v6 02/18] xen/pvcalls: introduce the pvcalls xenbus backend

2017-07-04 Thread Juergen Gross
igned-off-by: Stefano Stabellini <stef...@aporeto.com> > Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v6 04/18] xen/pvcalls: xenbus state handling

2017-07-04 Thread Juergen Gross
On 03/07/17 23:08, Stefano Stabellini wrote: > Introduce the code to handle xenbus state changes. > > Implement the probe function for the pvcalls backend. Write the > supported versions, max-page-order and function-calls nodes to xenstore, > as required by the protocol. > > Introduce stub

Re: [Xen-devel] [PATCH v6 07/18] xen/pvcalls: implement socket command

2017-07-04 Thread Juergen Gross
..@oracle.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v6 10/18] xen/pvcalls: implement listen command

2017-07-04 Thread Juergen Gross
On 03/07/17 23:08, Stefano Stabellini wrote: > Call inet_listen to implement the listen command. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> > Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Reviewed-by: Juergen Gross <jgr...@s

Re: [Xen-devel] [PATCH v6 18/18] xen: introduce a Kconfig option to enable the pvcalls backend

2017-07-04 Thread Juergen Gross
On 03/07/17 23:08, Stefano Stabellini wrote: > Also add pvcalls-back to the Makefile. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___ Xen-devel m

Re: [Xen-devel] [PATCH v6 17/18] xen/pvcalls: implement write

2017-07-04 Thread Juergen Gross
from > the data ring, writing it to the socket by calling inet_sendmsg. > > Set out_error on error. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen __

Re: [Xen-devel] [PATCH v6 15/18] xen/pvcalls: implement the ioworker functions

2017-07-04 Thread Juergen Gross
On 03/07/17 23:08, Stefano Stabellini wrote: > We have one ioworker per socket. Each ioworker goes through the list of > outstanding read/write requests. Once all requests have been dealt with, > it returns. > > We use one atomic counter per socket for "read" operations and one > for "write"

Re: [Xen-devel] [PATCH v6 16/18] xen/pvcalls: implement read

2017-07-04 Thread Juergen Gross
rror. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v6 14/18] xen/pvcalls: disconnect and module_exit

2017-07-04 Thread Juergen Gross
On 03/07/17 23:08, Stefano Stabellini wrote: > Implement backend_disconnect. Call pvcalls_back_release_active on active > sockets and pvcalls_back_release_passive on passive sockets. > > Implement module_exit by calling backend_disconnect on frontend > connections. > > Signed-off-by: Stefano

Re: [Xen-devel] [PATCH v6 13/18] xen/pvcalls: implement release command

2017-07-04 Thread Juergen Gross
that the socket will be released soon, then wait until the > ioworker finishes (flush_work). > > Unmap indexes pages and data rings. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Thanks, Juergen ___

Re: [Xen-devel] [PATCH v6 12/18] xen/pvcalls: implement poll command

2017-07-04 Thread Juergen Gross
> should just wait for events and check the indexes on the indexes page. > > Only support one outstanding poll (or accept) request for every passive > socket at any given time. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> Reviewed-by: Juergen

Re: [Xen-devel] [PATCH v6 11/18] xen/pvcalls: implement accept command

2017-07-04 Thread Juergen Gross
tstanding blocking accept request for every socket at > any time. > > Add a field to sock_mapping to remember the passive socket from which an > active socket was created. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> Review

Re: [Xen-devel] [PATCH v6 09/18] xen/pvcalls: implement bind command

2017-07-04 Thread Juergen Gross
On 03/07/17 23:08, Stefano Stabellini wrote: > Allocate a socket. Track the allocated passive sockets with a new data > structure named sockpass_mapping. It contains an unbound workqueue to > schedule delayed work for the accept and poll commands. It also has a > reqcopy field to be used to store

Re: [Xen-devel] [PATCH v6 08/18] xen/pvcalls: implement connect command

2017-07-04 Thread Juergen Gross
On 03/07/17 23:08, Stefano Stabellini wrote: > Allocate a socket. Keep track of socket <-> ring mappings with a new data > structure, called sock_mapping. Implement the connect command by calling > inet_stream_connect, and mapping the new indexes page and data ring. > Allocate a workqueue and a

Re: [Xen-devel] [PATCH v6 05/18] xen/pvcalls: connect to a frontend

2017-07-04 Thread Juergen Gross
On 03/07/17 23:08, Stefano Stabellini wrote: > Introduce a per-frontend data structure named pvcalls_fedata. It > contains pointers to the command ring, its event channel, a list of > active sockets and a tree of passive sockets (passing sockets need to be > looked up from the id on listen, accept

Re: [Xen-devel] [PATCH v6 06/18] xen/pvcalls: handle commands from the frontend

2017-07-04 Thread Juergen Gross
On 03/07/17 23:08, Stefano Stabellini wrote: > When the other end notifies us that there are commands to be read > (pvcalls_back_event), wake up the backend thread to parse the command. > > The command ring works like most other Xen rings, so use the usual > ring macros to read and write to it.

Re: [Xen-devel] [PATCH] xen/balloon: don't online new memory initially

2017-07-03 Thread Juergen Gross
On 03/07/17 20:44, Igor Druzhinin wrote: > On 03/07/17 16:40, Juergen Gross wrote: >> When setting up the Xenstore watch for the memory target size the new >> watch will fire at once. Don't try to reach the configured target size >> by onlining new memory in this case, as th

Re: [Xen-devel] [PATCH] xen/balloon: don't online new memory initially

2017-07-03 Thread Juergen Gross
On 03/07/17 18:11, Jan Beulich wrote: On 03.07.17 at 17:40, wrote: >> --- a/drivers/xen/xen-balloon.c >> +++ b/drivers/xen/xen-balloon.c >> @@ -59,6 +59,8 @@ static void watch_target(struct xenbus_watch *watch, >> { >> unsigned long long new_target; >> int err; >>

[Xen-devel] [PATCH] xen/balloon: don't online new memory initially

2017-07-03 Thread Juergen Gross
balloon.c and xen-balloon.c init calls do the xen-balloon.c initialization from balloon.c. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/xen/balloon.c | 3 +++ drivers/xen/xen-balloon.c | 20 include/xen/balloon.h | 8 3 files changed, 23 inse

Re: [Xen-devel] [PATCH v2] x86/xen: allow userspace access during hypercalls

2017-07-03 Thread Juergen Gross
On 26/06/17 14:49, Marek Marczykowski-Górecki wrote: > Userspace application can do a hypercall through /dev/xen/privcmd, and > some for some hypercalls argument is a pointers to user-provided > structure. When SMAP is supported and enabled, hypervisor can't access. > So, lets allow it. > > The

Re: [Xen-devel] [PATCH] x86: xen: remove unnecessary variable in xen_foreach_remap_area()

2017-07-03 Thread Juergen Gross
On 24/06/17 00:01, Gustavo A. R. Silva wrote: > Remove unnecessary variable mfn in function xen_foreach_remap_area() and, > refactor the code. > > Variable mfn at line 518:mfn = xen_remap_buf.mfns[i]; > is only being used to store a value to be passed as > an argument to the

Re: [Xen-devel] [PATCH v5 06/18] xen/pvcalls: handle commands from the frontend

2017-07-03 Thread Juergen Gross
On 22/06/17 21:14, Stefano Stabellini wrote: > When the other end notifies us that there are commands to be read > (pvcalls_back_event), wake up the backend thread to parse the command. > > The command ring works like most other Xen rings, so use the usual > ring macros to read and write to it.

Re: [Xen-devel] DomU can't start after recompiling DomU(PV) OS kernel

2017-06-26 Thread Juergen Gross
On 06/26/2017 08:37 AM, 謝 東曄 wrote: Xen Version:4.5.5 Guest OS(DomU OS):Ubuntu 14.04 Old kernel: 4.4.0 new recompile Kernel : 4.4.31 // Install DomU OS in image file first, i use dd if=/dev/zero of=test.img bs=1M count=20480 to create 20G empty image file. then use xl create vm.cfg command to

Re: [Xen-devel] [PATCH v7 32/36] xen/x86: Remove SME feature in PV guests

2017-06-17 Thread Juergen Gross
On 16/06/17 20:55, Tom Lendacky wrote: > Xen does not currently support SME for PV guests. Clear the SME cpu > capability in order to avoid any ambiguity. > > Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juerge

[Xen-devel] [PATCH] tools/xen-detect: try sysfs node for obtaining guest type

2017-06-15 Thread Juergen Gross
Instead of relying on cpuid instruction behaviour to tell which domain type we are just try asking the kernel via the appropriate sysfs node (added in Linux kernel 4.13). Keep the old detection logic as a fallback for older kernels. Signed-off-by: Juergen Gross <jgr...@suse.com> --- tool

Re: [Xen-devel] [PATCH v3 11/18] xen/pvcalls: implement accept command

2017-06-15 Thread Juergen Gross
On 14/06/17 21:27, Stefano Stabellini wrote: > On Wed, 14 Jun 2017, Juergen Gross wrote: >> On 14/06/17 02:47, Stefano Stabellini wrote: >>> On Tue, 13 Jun 2017, Juergen Gross wrote: >>>> On 02/06/17 21:31, Stefano Stabellini wrote: >>>>> Implem

Re: [Xen-devel] [PATCH v4 2/4] xen: add sysfs node for guest type

2017-06-14 Thread Juergen Gross
N: >> +type = "PV"; >> +break; >> +case XEN_HVM_DOMAIN: >> +type = xen_pvh_domain() ? "PVH" : "HVM"; >> +break; >> +} > > I think we should return -EINVAL for unknown type. Or

[Xen-devel] [PATCH v4 2/4] xen: add sysfs node for guest type

2017-06-14 Thread Juergen Gross
in behavior of some instructions), add a sysfs node /sys/hypervisor/guest_type to explicitly deliver this information as it is known to the kernel. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: - use xen_domain_type instead of introducing xen_guest_type (Boris Ostrovsky) V2: -

[Xen-devel] [PATCH v4 0/4] xen: add xen sysfs nodes

2017-06-14 Thread Juergen Gross
another node to show the Xen hypervisor buildid in order to make hypervisor live patching easier. Juergen Gross (4): doc,xen: document hypervisor sysfs nodes for xen xen: add sysfs node for guest type xen: sync include/xen/interface/version.h xen: add sysfs node for hypervisor build id

[Xen-devel] [PATCH v4 3/4] xen: sync include/xen/interface/version.h

2017-06-14 Thread Juergen Gross
Sync include/xen/interface/version.h with the Xen source. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> --- include/xen/interface/version.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/x

[Xen-devel] [PATCH v4 4/4] xen: add sysfs node for hypervisor build id

2017-06-14 Thread Juergen Gross
For support of Xen hypervisor live patching the hypervisor build id is needed. Add a node /sys/hypervisor/properties/buildid containing the information. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: - send correct patch --- Documentation/ABI/testing/sysfs-hypervisor-xe

[Xen-devel] [PATCH v4 1/4] doc, xen: document hypervisor sysfs nodes for xen

2017-06-14 Thread Juergen Gross
file. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> --- V4: - s/full/fully/ (Boris Ostrovsky) V3: - added hint for hidden values where appropriate (Andrew Cooper) V2: - rename file to Documentation/ABI/stable/sysfs-hy

Re: [Xen-devel] [PATCH] xen: allocate page for shared info page from low memory

2017-06-14 Thread Juergen Gross
On 14/06/17 18:58, Boris Ostrovsky wrote: > On 06/12/2017 07:53 AM, Juergen Gross wrote: >> In a HVM guest the kernel allocates the page for mapping the shared >> info structure via extend_brk() today. This will lead to a drop of >> performance as the underlying EPT entry wil

Re: [Xen-devel] [PATCH v3 2/4] xen: add sysfs node for guest type

2017-06-14 Thread Juergen Gross
On 14/06/17 17:01, Boris Ostrovsky wrote: > On 06/14/2017 11:00 AM, Juergen Gross wrote: >> On 14/06/17 16:48, Boris Ostrovsky wrote: >>>> diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c >>>> index 84106f9c456c..d641e9970d5d 100644 >&g

Re: [Xen-devel] [PATCH v3 4/4] xen: add sysfs node for hypervisor build id

2017-06-14 Thread Juergen Gross
On 14/06/17 17:00, Boris Ostrovsky wrote: > On 06/12/2017 10:21 AM, Juergen Gross wrote: >> For support of Xen hypervisor live patching the hypervisor build id is >> needed. Add a node /sys/hypervisor/properties/buildid containing the >> information. >> >>

Re: [Xen-devel] [PATCH v3 2/4] xen: add sysfs node for guest type

2017-06-14 Thread Juergen Gross
On 14/06/17 16:48, Boris Ostrovsky wrote: > >> diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c >> index 84106f9c456c..d641e9970d5d 100644 >> --- a/drivers/xen/sys-hypervisor.c >> +++ b/drivers/xen/sys-hypervisor.c >> @@ -50,6 +50,18 @@ static int __init

[Xen-devel] [PATCH v3] xen/mce: don't issue error message for failed /dev/mcelog registration

2017-06-14 Thread Juergen Gross
When running under Xen as dom0 /dev/mcelog is being registered by Xen instead of the normal mcelog driver. Avoid an error message being issued by the mcelog driver in this case. Instead issue an informative message that Xen has registered the device. Signed-off-by: Juergen Gross <jgr...@suse.

Re: [Xen-devel] [PATCH v2] xen/mce: don't issue error message for failed /dev/mcelog registration

2017-06-14 Thread Juergen Gross
On 13/06/17 21:30, Joe Perches wrote: > On Tue, 2017-06-13 at 21:27 +0200, Juergen Gross wrote: >> On 13/06/17 18:31, Joe Perches wrote: >>> On Tue, 2017-06-13 at 18:13 +0200, Juergen Gross wrote: >>>> On 13/06/17 17:20, Ingo Molnar wrote: >>>>

Re: [Xen-devel] [PATCH v3 11/18] xen/pvcalls: implement accept command

2017-06-14 Thread Juergen Gross
On 14/06/17 02:47, Stefano Stabellini wrote: > On Tue, 13 Jun 2017, Juergen Gross wrote: >> On 02/06/17 21:31, Stefano Stabellini wrote: >>> Implement the accept command by calling inet_accept. To avoid blocking >>> in the kernel, call inet_accept(O_NONBLOCK)

Re: [Xen-devel] [PATCH v2] xen/mce: don't issue error message for failed /dev/mcelog registration

2017-06-13 Thread Juergen Gross
On 13/06/17 18:31, Joe Perches wrote: > On Tue, 2017-06-13 at 18:13 +0200, Juergen Gross wrote: >> On 13/06/17 17:20, Ingo Molnar wrote: >>> * Juergen Gross <jgr...@suse.com> wrote: >>> >>>> When running under Xen as dom0 /dev/mcelog is being regist

Re: [Xen-devel] [PATCH v2] xen/mce: don't issue error message for failed /dev/mcelog registration

2017-06-13 Thread Juergen Gross
On 13/06/17 17:20, Ingo Molnar wrote: > > * Juergen Gross <jgr...@suse.com> wrote: > >> When running under Xen as dom0 /dev/mcelog is being registered by Xen >> instead of the normal mcelog driver. Avoid an error message being >> issued by the mcelog d

Re: [Xen-devel] [PATCH 0/5] xen/pvh*: Support > 32 VCPUs at restore

2017-06-13 Thread Juergen Gross
On 03/06/17 02:05, Ankur Arora wrote: > This patch series fixes a bunch of issues in the xen_vcpu setup > logic. > > Simplify xen_vcpu related code: code refactoring in advance of the > rest of the patch series. > > Support > 32 VCPUs at restore: unify all vcpu restore logic in >

Re: [Xen-devel] [PATCH V3] xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU

2017-06-13 Thread Juergen Gross
On 07/06/17 13:46, Anoob Soman wrote: > A HVM domian booting generates around 200K (evtchn:qemu-dm xen-dyn) > interrupts,in a short period of time. All these evtchn:qemu-dm are bound > to VCPU 0, until irqbalance sees these IRQ and moves it to a different VCPU. > In one configuration, irqbalance

[Xen-devel] [PATCH v2] xen/mce: don't issue error message for failed /dev/mcelog registration

2017-06-13 Thread Juergen Gross
When running under Xen as dom0 /dev/mcelog is being registered by Xen instead of the normal mcelog driver. Avoid an error message being issued by the mcelog driver in this case. Instead issue an informative message that Xen has registered the device. Signed-off-by: Juergen Gross <jgr...@suse.

Re: [Xen-devel] [PATCH] xen/mce: don't issue error message for failed /dev/mcelog registration

2017-06-13 Thread Juergen Gross
On 13/06/17 15:02, Borislav Petkov wrote: > On Tue, Jun 13, 2017 at 02:49:21PM +0200, Juergen Gross wrote: >> When running under Xen as dom0 /dev/mcelog is being registered by Xen >> instead of the normal mcelog driver. Avoid an error message being >> issued by the mcelo

[Xen-devel] [PATCH] xen/mce: don't issue error message for failed /dev/mcelog registration

2017-06-13 Thread Juergen Gross
When running under Xen as dom0 /dev/mcelog is being registered by Xen instead of the normal mcelog driver. Avoid an error message being issued by the mcelog driver in this case. Instead issue an informative message that Xen has registered the device. Signed-off-by: Juergen Gross <jgr...@suse.

Re: [Xen-devel] [PATCH v3 17/18] xen/pvcalls: implement write

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > When the other end notifies us that there is data to be written > (pvcalls_back_conn_event), increment the io and write counters, and > schedule the ioworker. > > Implement the write function called by ioworker by reading the data from > the data

Re: [Xen-devel] [PATCH v3 16/18] xen/pvcalls: implement read

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > When an active socket has data available, increment the io and read > counters, and schedule the ioworker. > > Implement the read function by reading from the socket, writing the data > to the data ring. > > Set in_error on error. > >

Re: [Xen-devel] [PATCH v3 15/18] xen/pvcalls: implement the ioworker functions

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > We have one ioworker per socket. Each ioworker goes through the list of > outstanding read/write requests. Once all requests have been dealt with, > it returns. > > We use one atomic counter per socket for "read" operations and one > for "write"

Re: [Xen-devel] [PATCH v3 14/18] xen/pvcalls: disconnect and module_exit

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > Implement backend_disconnect. Call pvcalls_back_release_active on active > sockets and pvcalls_back_release_passive on passive sockets. > > Implement module_exit by calling backend_disconnect on frontend > connections. > > Signed-off-by: Stefano

Re: [Xen-devel] [PATCH v3 13/18] xen/pvcalls: implement release command

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > Release both active and passive sockets. For active sockets, make sure > to avoid possible conflicts with the ioworker reading/writing to those > sockets concurrently. Set map->release to let the ioworker know > atomically that the socket will be

Re: [Xen-devel] [PATCH v3 12/18] xen/pvcalls: implement poll command

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > Implement poll on passive sockets by requesting a delayed response with > mappass->reqcopy, and reply back when there is data on the passive > socket. > > Poll on active socket is unimplemented as by the spec, as the frontend > should just wait for

Re: [Xen-devel] [PATCH v3 11/18] xen/pvcalls: implement accept command

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > Implement the accept command by calling inet_accept. To avoid blocking > in the kernel, call inet_accept(O_NONBLOCK) from a workqueue, which get > scheduled on sk_data_ready (for a passive socket, it means that there > are connections to accept). > >

Re: [Xen-devel] [PATCH v3 09/18] xen/pvcalls: implement bind command

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > Allocate a socket. Track the allocated passive sockets with a new data > structure named sockpass_mapping. It contains an unbound workqueue to > schedule delayed work for the accept and poll commands. It also has a > reqcopy field to be used to store

Re: [Xen-devel] [PATCH v3 10/18] xen/pvcalls: implement listen command

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > Call inet_listen to implement the listen command. > > Signed-off-by: Stefano Stabellini > CC: boris.ostrov...@oracle.com > CC: jgr...@suse.com > --- > drivers/xen/pvcalls-back.c | 21 - > 1 file changed, 20

Re: [Xen-devel] [PATCH v3 08/18] xen/pvcalls: implement connect command

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > Allocate a socket. Keep track of socket <-> ring mappings with a new data > structure, called sock_mapping. Implement the connect command by calling > inet_stream_connect, and mapping the new indexes page and data ring. > Allocate a workqueue and a

Re: [Xen-devel] [PATCH v3 07/18] xen/pvcalls: implement socket command

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > Just reply with success to the other end for now. Delay the allocation > of the actual socket to bind and/or connect. > > Signed-off-by: Stefano Stabellini > CC: boris.ostrov...@oracle.com > CC: jgr...@suse.com > --- >

Re: [Xen-devel] [PATCH v3 18/18] xen: introduce a Kconfig option to enable the pvcalls backend

2017-06-13 Thread Juergen Gross
On 02/06/17 21:31, Stefano Stabellini wrote: > Also add pvcalls-back to the Makefile. > > Signed-off-by: Stefano Stabellini > CC: boris.ostrov...@oracle.com > CC: jgr...@suse.com > --- > drivers/xen/Kconfig | 12 > drivers/xen/Makefile | 1 + > 2 files

[Xen-devel] [PATCH v3 2/4] xen: add sysfs node for guest type

2017-06-12 Thread Juergen Gross
in behavior of some instructions), add a sysfs node /sys/hypervisor/guest_type to explicitly deliver this information as it is known to the kernel. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> --- V2: - remove PVHVM guest type (A

[Xen-devel] [PATCH v3 1/4] doc, xen: document hypervisor sysfs nodes for xen

2017-06-12 Thread Juergen Gross
file. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V3: - added hint for hidden values where appropriate (Andrew Cooper) V2: - rename file to Documentation/ABI/stable/sysfs-hypervisor-xen in order to reflect Xen dependency - leave pmu entries in old file under testing

[Xen-devel] [PATCH v3 4/4] xen: add sysfs node for hypervisor build id

2017-06-12 Thread Juergen Gross
For support of Xen hypervisor live patching the hypervisor build id is needed. Add a node /sys/hypervisor/properties/buildid containing the information. Signed-off-by: Juergen Gross <jgr...@suse.com> --- Documentation/ABI/testing/sysfs-hypervisor-xen | 11 +- drivers/xen/sys-hyperv

[Xen-devel] [PATCH v3 3/4] xen: sync include/xen/interface/version.h

2017-06-12 Thread Juergen Gross
Sync include/xen/interface/version.h with the Xen source. Signed-off-by: Juergen Gross <jgr...@suse.com> --- include/xen/interface/version.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/xen/interface/version.h b/include/xen/interface/version.h index 7ff649

[Xen-devel] [PATCH v3 0/4] xen: add xen sysfs nodes

2017-06-12 Thread Juergen Gross
another node to show the Xen hypervisor buildid in order to make hypervisor live patching easier. Juergen Gross (4): doc,xen: document hypervisor sysfs nodes for xen xen: add sysfs node for guest type xen: sync include/xen/interface/version.h xen: add sysfs node for hypervisor build id

[Xen-devel] [PATCH] xen: allocate page for shared info page from low memory

2017-06-12 Thread Juergen Gross
: we can take a page from the first 1MB of memory as the video memory at 640kB disallows using larger EPT entries. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/enlighten_hvm.c | 31 --- arch/x86/xen/enlighten_pv.c | 2 -- 2 files chang

[Xen-devel] Seabios hypercall page

2017-06-12 Thread Juergen Gross
While searching for the reason for a HVM domU performance problem I came across Seabios' hypercall page: it is usually located at the end of guest memory and marked as "reserved" in the guest E820 map. This will make it impossible for a Linux guest to use a large page mapping for the direct map

Re: [Xen-devel] Solved: HVM guest performance regression

2017-06-12 Thread Juergen Gross
On 12/06/17 09:35, Andrew Cooper wrote: > On 12/06/2017 06:48, Juergen Gross wrote: >> On 08/06/17 23:00, Dario Faggioli wrote: >>> Bringing in Konrad because... >>> >>> On Thu, 2017-06-08 at 11:37 +0200, Juergen Gross wrote: >>>> On 07/06/17 20:1

[Xen-devel] Solved: HVM guest performance regression

2017-06-11 Thread Juergen Gross
On 08/06/17 23:00, Dario Faggioli wrote: > Bringing in Konrad because... > > On Thu, 2017-06-08 at 11:37 +0200, Juergen Gross wrote: >> On 07/06/17 20:19, Stefano Stabellini wrote: >>> On Wed, 7 Jun 2017, Juergen Gross wrote: >>>> On 06/06/17 21:08, Stefano

[Xen-devel] [GIT PULL] xen: fix for 4.12 rc5

2017-06-09 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.12b-rc5-tag xen: fix for 4.12 rc5 It contains a fix for Xen on ARM when dealing with 64kB page size of a guest. Thanks. Juergen drivers/xen/privcmd.c | 4 ++-- 1 file changed,

<    4   5   6   7   8   9   10   11   12   13   >