Re: [PATCH 2/7] xen: introduce the header file for the Xen 9pfs transport protocol

2017-03-06 Thread Boris Ostrovsky
> +struct xen_9pfs_header { > + uint32_t size; > + uint8_t id; > + uint16_t tag; I realize that this is in the spec now and it's probably too late to ask this question but wouldn't it be better if id and tag were swapped? No need to pack and potentially faster access to tag. -boris

Re: [PATCH 4/7] xen/9pfs: connect to the backend

2017-03-07 Thread Boris Ostrovsky
> > +static int xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) > +{ > + int i, j; > + > + list_del(>list); > + > + for (i = 0; i < priv->num_rings; i++) { > + if (priv->rings[i].intf == NULL) > + break; Are we guaranteed that all subsequent

Re: [PATCH 6/7] xen/9pfs: receive responses

2017-03-07 Thread Boris Ostrovsky
On 03/06/2017 03:01 PM, Stefano Stabellini wrote: > Upon receiving a notification from the backend, schedule the > p9_xen_response work_struct. p9_xen_response checks if any responses are > available, if so, it reads them one by one, calling p9_client_cb to send > them up to the 9p layer

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-07 Thread Boris Ostrovsky
On 03/06/2017 03:01 PM, Stefano Stabellini wrote: > Implement struct p9_trans_module create and close functions by looking > at the available Xen 9pfs frontend-backend connections. We don't expect > many frontend-backend connections, thus walking a list is OK. > > Send requests to the backend by

Re: [Xen-devel] [PATCH v2 00/21] x86/xen: untangle PV and PVHVM guest support code

2017-03-05 Thread Boris Ostrovsky
On 03/02/2017 12:53 PM, Vitaly Kuznetsov wrote: Changes since v1: - Patches 1,2 and 3 were split and reordered to avoid adding temporary #ifdefs [Juergen Gross] - Juergen's R-b added to what is now patches 14 and 15 (patches 4 and 5 in v1). Due to re-ordering there are some tiny

Re: [PATCH] jump_label: Fix anonymous union initialization

2017-03-02 Thread Boris Ostrovsky
On 03/02/2017 04:42 PM, Steven Rostedt wrote: > On Thu, 2 Mar 2017 16:07:19 -0500 > Jason Baron <jba...@akamai.com> wrote: > >> On 02/28/2017 11:32 AM, Boris Ostrovsky wrote: >>> Pre-4.6 gcc do not allow direct static initialization of members of >>>

Re: [PATCH linux v3 2/9] x86/acpi: store ACPI ids from MADT for future usage

2017-03-01 Thread Boris Ostrovsky
On 03/01/2017 02:54 PM, Thomas Gleixner wrote: > > Yes, I know it has been fixed later, but this crap should not have been > merged in the first place. > > Yours grumpy > > tglx Yes, we dropped the ball on this, this shouldn't have gone in without x86 maintainers' review. -boris

Re: [PATCHv4 18/33] x86/xen: convert __xen_pgd_walk() and xen_cleanmfnmap() to support p4d

2017-03-07 Thread Boris Ostrovsky
>> Don't we need to pass vaddr down to all routines so that they select >> appropriate tables? You seem to always be choosing the first one. > IIUC, we clear whole page table subtree covered by one pgd entry. > So, no, there's no need to pass vaddr down. Just pointer to page table > entry is

Re: [Xen-devel] [PATCHv4 18/33] x86/xen: convert __xen_pgd_walk() and xen_cleanmfnmap() to support p4d

2017-03-07 Thread Boris Ostrovsky
On 03/07/2017 01:26 PM, Andrew Cooper wrote: > On 07/03/17 18:18, Boris Ostrovsky wrote: >>>> Don't we need to pass vaddr down to all routines so that they select >>>> appropriate tables? You seem to always be choosing the first one. >>> IIUC, we clear whole p

Re: [PATCH v2] xen: make functions in xen-acpi-processor return void

2017-03-31 Thread Boris Ostrovsky
isor(struct acpi_processor > *_pr) > dst_cx_states = kcalloc(_pr->power.count, > sizeof(struct xen_processor_cx), GFP_KERNEL); > if (!dst_cx_states) > - return -ENOMEM; > + return; Maybe pr_warn(_once)()? In any case: Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH 2/2] xen: make functions in xen-acpi-processor return void

2017-03-31 Thread Boris Ostrovsky
ross <jgr...@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH v2] xen,kdump: handle pv domain in paddr_vmcoreinfo_note()

2017-03-31 Thread Boris Ostrovsky
sually build with !CONFIG_XEN) we will have to update this again. I suppose we can deal with that if/when it happens since we will discover this immediately. Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH 1/2] xen: correct error handling in xen-acpi-processor

2017-03-31 Thread Boris Ostrovsky
On 03/31/2017 07:19 AM, Juergen Gross wrote: > Error handling in upload_pm_data() is rather questionable: possible > errno values from called functions are or'ed together resulting in > strange return values: -EINVAL and -ENOMEM would e.g. result in > returning -EXDEV. And it doesn't matter

Re: [PATCH 3/3 v2] xen: Implement EFI reset_system callback

2017-04-24 Thread Boris Ostrovsky
reset_system > callback as a call to xen_reboot when using EFI Xen. Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH 1/3 v2] xen: Export xen_reboot

2017-04-24 Thread Boris Ostrovsky
on't think these changes are worth a whole patch. They can be folded into the third patch. -boris > > --- > > Cc: Boris Ostrovsky <boris.ostrov...@oracle.com> > Cc: Juergen Gross <jgr...@suse.com> > Cc: Thomas Gleixner <t...@linutronix.de> > Cc: Ingo Molnar <

Re: [PATCH] xen/events: Fix interrupt lost during irq_disable and irq_enable

2017-07-31 Thread Boris Ostrovsky
pt raising anymore. > > Now use enable_dynirq for enable_pirq of xen_pirq_chip to remove > eoi_pirq when irq_enable. > > Signed-off-by: Liu Shuo <shuo.a@intel.com> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH] xen: avoid deadlock in xenbus

2017-07-28 Thread Boris Ostrovsky
; > ... > if (current->pid != xenwatch_pid) > mutex_lock(_mutex); > ... > > In case a watch is firing before xenwatch_pid could be set and the > callback of that watch unregisters a watch, then a self-deadlock would > occur. > > Avoid this by setting xen

Re: [PATCH] xen-platform: constify pci_device_id.

2017-08-02 Thread Boris Ostrovsky
ail.com> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH v3 11/13] xen/pvcalls: implement poll command

2017-08-15 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: > For active sockets, check the indexes and use the inflight_conn_req > waitqueue to wait. > > For passive sockets if an accept is outstanding > (PVCALLS_FLAG_ACCEPT_INFLIGHT), check if it has been answered by looking > at bedata->rsp[req_id]. If

Re: [PATCH v3 12/13] xen/pvcalls: implement release command

2017-08-15 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: > Send PVCALLS_RELEASE to the backend and wait for a reply. Take both > in_mutex and out_mutex to avoid concurrent accesses. Then, free the > socket. > > For passive sockets, check whether we have already pre-allocated an > active socket for the

Re: [PATCH v4] xen: get rid of paravirt op adjust_exception_frame

2017-08-16 Thread Boris Ostrovsky
> arch/x86/xen/xen-ops.h| 1 - > 12 files changed, 140 insertions(+), 78 deletions(-) Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Applied to for-linus-4.14. -boris

Re: [PATCH] xen: cleanup xen.h

2017-08-16 Thread Boris Ostrovsky
On 07/27/2017 11:44 AM, Juergen Gross wrote: > On 27/07/17 17:37, Boris Ostrovsky wrote: >> On 07/27/2017 11:11 AM, Juergen Gross wrote: >>> The macros for testing domain types are more complicated then they >>> need to. Simplify them. >>> >>>

Re: [PATCH] xen-platform: constify pci_device_id.

2017-08-16 Thread Boris Ostrovsky
On 08/02/2017 06:36 PM, Boris Ostrovsky wrote: > On 08/02/2017 01:46 PM, Arvind Yadav wrote: >> pci_device_id are not supposed to change at runtime. All functions >> working with pci_device_id provided by work with >> const pci_device_id. So mark the non-const structs as co

Re: [PATCH 0/3] xen: do some cleanups

2017-08-16 Thread Boris Ostrovsky
On 08/04/2017 07:36 AM, Juergen Gross wrote: > Remove stuff no longer needed. > > Juergen Gross (3): > xen: remove tests for pvh mode in pure pv paths > xen: remove unused function xen_set_domain_pte() > xen: remove not used trace functions > > arch/x86/include/asm/xen/page.h | 5 - >

Re: [PATCH v3 09/13] xen/pvcalls: implement sendmsg

2017-08-14 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: Send data to an active socket by copying data to the "out" ring. Take the active socket out_mutex so that only one function can access the ring at any given time. If not enough room is available on the ring, rather than returning immediately

Re: [PATCH v3 10/13] xen/pvcalls: implement recvmsg

2017-08-14 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: Implement recvmsg by copying data from the "in" ring. If not enough data is available and the recvmsg call is blocking, then wait on the inflight_conn_req waitqueue. Take the active socket in_mutex so that only one function can access the ring

Re: [PATCH v3 08/13] xen/pvcalls: implement accept command

2017-08-14 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: Introduce a waitqueue to allow only one outstanding accept command at any given time and to implement polling on the passive socket. Introduce a flags field to keep track of in-flight accept and poll commands. Send PVCALLS_ACCEPT to the

Re: [PATCH v3 08/13] xen/pvcalls: implement accept command

2017-08-14 Thread Boris Ostrovsky
+ +ret = bedata->rsp[req_id].ret; You can just return bedata->rsp[req_id].ret; Or maybe not. The slot may get reused by the time you get to the end. -boris -boris +/* read ret, then set this rsp slot to be reused */ +smp_mb(); +WRITE_ONCE(bedata->rsp[req_id].req_id,

Re: [PATCH v3 00/13] introduce the Xen PV Calls frontend

2017-08-10 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: > Hi all, > > this series introduces the frontend for the newly introduced PV Calls > procotol. > > PV Calls is a paravirtualized protocol that allows the implementation of > a set of POSIX functions in a different domain. The PV Calls frontend >

Re: [PATCH v3 02/13] xen/pvcalls: implement frontend disconnect

2017-08-11 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: > Introduce a data structure named pvcalls_bedata. It contains pointers to > the command ring, the event channel, a list of active sockets and a list > of passive sockets. Lists accesses are protected by a spin_lock. > > Introduce a waitqueue to

Re: [PATCH v3 01/13] xen/pvcalls: introduce the pvcalls xenbus frontend

2017-08-11 Thread Boris Ostrovsky
igned-off-by: Stefano Stabellini <stef...@aporeto.com> > CC: boris.ostrov...@oracle.com > CC: jgr...@suse.com Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH v3 03/13] xen/pvcalls: connect to the backend

2017-08-11 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: > Implement the probe function for the pvcalls frontend. Read the > supported versions, max-page-order and function-calls nodes from > xenstore. > > Only one frontend<->backend connection is supported at any given time > for a guest. Store the

Re: [PATCH v3 04/13] xen/pvcalls: implement socket command and handle events

2017-08-12 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: Send a PVCALLS_SOCKET command to the backend, use the masked req_prod_pvt as req_id. This way, req_id is guaranteed to be between 0 and PVCALLS_NR_REQ_PER_RING. We already have a slot in the rsp array ready for the response, and there cannot be

Re: [PATCH v3 05/13] xen/pvcalls: implement connect command

2017-08-12 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: Send PVCALLS_CONNECT to the backend. Allocate a new ring and evtchn for the active socket. Introduce fields in struct sock_mapping to keep track of active sockets. Introduce a waitqueue to allow the frontend to wait on data coming from the

Re: [PATCH v3 06/13] xen/pvcalls: implement bind command

2017-08-12 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: Send PVCALLS_BIND to the backend. Introduce a new structure, part of struct sock_mapping, to store information specific to passive sockets. Introduce a status field to keep track of the status of the passive socket. Signed-off-by: Stefano

Re: [PATCH v3 07/13] xen/pvcalls: implement listen command

2017-08-12 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: Send PVCALLS_LISTEN to the backend. Signed-off-by: Stefano Stabellini <stef...@aporeto.com> CC: boris.ostrov...@oracle.com CC: jgr...@suse.com Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-16 Thread Boris Ostrovsky
On 08/16/2017 12:42 PM, Vitaly Kuznetsov wrote: > Vitaly Kuznetsov writes: > >> Peter Zijlstra writes: >> >>> On Fri, Aug 11, 2017 at 09:16:29AM -0700, Linus Torvalds wrote: On Fri, Aug 11, 2017 at 2:03 AM, Peter Zijlstra

Re: [PATCH] xen/x86: fix cpu hotplug

2017-07-18 Thread Boris Ostrovsky
lt;sta...@vger.kernel.org> # 4.12 > Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

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

2017-07-18 Thread Boris Ostrovsky
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, as the current memory size will > be smaller in almost all cases due

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

2017-07-18 Thread Boris Ostrovsky
On 07/18/2017 12:12 PM, Juergen Gross wrote: > 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

Re: [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN()

2017-07-21 Thread Boris Ostrovsky
160378206b2 ("xen/pvcalls: xenbus state handling") > Signed-off-by: Arnd Bergmann <a...@arndb.de> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH 1/3] x86: provide an init_mem_mapping hypervisor hook

2017-07-25 Thread Boris Ostrovsky
On 07/25/2017 05:50 AM, Juergen Gross wrote: > Provide a hook in hypervisor_x86 called after setting up initial > memory mapping. > > This is needed e.g. by Xen HVM guests to map the hypervisor shared > info page. This is not necessarily a problem specific to guests so I wonder whether the hook

Re: [PATCH 2/3] xen: split up xen_hvm_init_shared_info()

2017-07-25 Thread Boris Ostrovsky
On 07/25/2017 05:50 AM, Juergen Gross wrote: > > -void __ref xen_hvm_init_shared_info(void) > +void xen_hvm_init_shared_info(void) Why are you dropping __ref? -boris

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

2017-07-23 Thread Boris Ostrovsky
On 06/14/2017 01:11 PM, Juergen Gross wrote: 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

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

2017-07-24 Thread Boris Ostrovsky
On 07/23/2017 04:25 PM, Boris Ostrovsky wrote: On 06/14/2017 01:11 PM, Juergen Gross wrote: 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

Re: [PATCH v2 05/13] xen/pvcalls: implement bind command

2017-07-27 Thread Boris Ostrovsky
>> This all looks very similar to previous patches. Can it be factored out? > You are right that the pattern is the same for all commands: > - get a request > - fill the request > - possibly do something else > - wait > however each request is different, the struct and fields are different. >

Re: [Xen-devel] [PATCH v2 09/13] xen/pvcalls: implement recvmsg

2017-07-27 Thread Boris Ostrovsky
On 07/26/2017 08:08 PM, Stefano Stabellini wrote: > On Wed, 26 Jul 2017, Boris Ostrovsky wrote: >>>> + count++; >>>> + else >>>> + wait_event_inte

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

2017-07-27 Thread Boris Ostrovsky
On 07/17/2017 01:47 PM, Juergen Gross wrote: > 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>

Re: [PATCH] xen: cleanup xen.h

2017-07-27 Thread Boris Ostrovsky
(xen_domain_type == XEN_PV_DOMAIN) Stray tab. > +#define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN) > +#define xen_pvh_domain() (xen_pvh) Not sure we need parentheses here. Either way Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> > > #ifd

Re: [PATCH v2 02/13] xen/pvcalls: connect to the backend

2017-07-27 Thread Boris Ostrovsky
>>> static int pvcalls_front_probe(struct xenbus_device *dev, >>> const struct xenbus_device_id *id) >>> { >>> + int ret = -EFAULT, evtchn, ref = -1, i; >>> + unsigned int max_page_order, function_calls, len; >>> + char *versions; >>> + grant_ref_t gref_head = 0;

Re: [PATCH v2 11/13] xen/pvcalls: implement release command

2017-07-27 Thread Boris Ostrovsky
> +int pvcalls_front_release(struct socket *sock) > +{ > + struct pvcalls_bedata *bedata; > + struct sock_mapping *map; > + int req_id, notify; > + struct xen_pvcalls_request *req; > + > + if (!pvcalls_front_dev) > + return -EIO; > + bedata =

Re: [PATCH v2 02/13] xen/pvcalls: connect to the backend

2017-07-26 Thread Boris Ostrovsky
On 7/25/2017 5:21 PM, Stefano Stabellini wrote: Implement the probe function for the pvcalls frontend. Read the supported versions, max-page-order and function-calls nodes from xenstore. Introduce a data structure named pvcalls_bedata. It contains pointers to the command ring, the event

Re: [PATCH v1] xen: get rid of paravirt op adjust_exception_frame

2017-07-26 Thread Boris Ostrovsky
exception entry. When running as Xen pv-guest just use the exception entry with prepended instructions, otherwise use the entry without the Xen specific code. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> (I'd s/xen/x86/ in su

Re: [PATCH v2 04/13] xen/pvcalls: implement connect command

2017-07-26 Thread Boris Ostrovsky
On 7/25/2017 5:22 PM, Stefano Stabellini wrote: Send PVCALLS_CONNECT to the backend. Allocate a new ring and evtchn for the active socket. Introduce a data structure to keep track of sockets. Introduce a waitqueue to allow the frontend to wait on data coming from the backend on the active

Re: [PATCH v2 03/13] xen/pvcalls: implement socket command and handle events

2017-07-26 Thread Boris Ostrovsky
On 7/25/2017 5:22 PM, Stefano Stabellini wrote: Send a PVCALLS_SOCKET command to the backend, use the masked req_prod_pvt as req_id. This way, req_id is guaranteed to be between 0 and PVCALLS_NR_REQ_PER_RING. We already have a slot in the rsp array ready for the response, and there cannot be

Re: [PATCH v2 05/13] xen/pvcalls: implement bind command

2017-07-26 Thread Boris Ostrovsky
On 7/25/2017 5:22 PM, Stefano Stabellini wrote: Send PVCALLS_BIND to the backend. Introduce a new structure, part of struct sock_mapping, to store information specific to passive sockets. Introduce a status field to keep track of the status of the passive socket. Introduce a waitqueue for

Re: [PATCH v2 07/13] xen/pvcalls: implement accept command

2017-07-26 Thread Boris Ostrovsky
On 07/25/2017 05:22 PM, Stefano Stabellini wrote: > Send PVCALLS_ACCEPT to the backend. Allocate a new active socket. Make > sure that only one accept command is executed at any given time by > setting PVCALLS_FLAG_ACCEPT_INFLIGHT and waiting on the > inflight_accept_req waitqueue. > >

Re: [Xen-devel] [PATCH v2 09/13] xen/pvcalls: implement recvmsg

2017-07-26 Thread Boris Ostrovsky
>> +while (!(flags & MSG_DONTWAIT) && !pvcalls_front_read_todo(map)) { >> +if (count < PVCALLS_FRONT_MAX_SPIN) >> +count++; >> +else >> +wait_event_interruptible(map->active.inflight_conn_req, >> +

Re: [PATCH v2 09/13] xen/pvcalls: implement recvmsg

2017-07-26 Thread Boris Ostrovsky
On 07/25/2017 05:22 PM, Stefano Stabellini wrote: > Implement recvmsg by copying data from the "in" ring. If not enough data > is available and the recvmsg call is blocking, then wait on the > inflight_conn_req waitqueue. Take the active socket in_mutex so that > only one function can access the

Re: [PATCH v2 10/13] xen/pvcalls: implement poll command

2017-07-26 Thread Boris Ostrovsky
On 07/25/2017 05:22 PM, Stefano Stabellini wrote: > For active sockets, check the indexes and use the inflight_conn_req > waitqueue to wait. > > For passive sockets, send PVCALLS_POLL to the backend. Use the > inflight_accept_req waitqueue if an accept is outstanding. Otherwise use > the

Re: [PATCH 4/4] xen: Drop un-informative message during boot

2017-07-20 Thread Boris Ostrovsky
this message does not > provide useful information. Drop this message. > > Signed-off-by: Punit Agrawal <punit.agra...@arm.com> > Cc: Boris Ostrovsky <boris.ostrov...@oracle.com> > Cc: Juergen Gross <jgr...@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

[PATCH] xen/x86: Call xen_smp_intr_init_pv() on BSP

2017-04-26 Thread Boris Ostrovsky
Recent code rework that split handling ov PV, HVM and PVH guests into separate files missed calling xen_smp_intr_init_pv() on CPU0. Add this call. Signed-off-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Reported-by: Sander Eikelenboom <li...@eikelenboom.it> --- arch/x86/xen/

Re: [PATCH] x86/xen: fix xsave capability setting

2017-04-26 Thread Boris Ostrovsky
variant testing via cpuid(). > > Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Boris Ostrovsky <boris.osrtov...@oracle.com> (This, BTW, was apparently broken on Intel as well, at least if you go back to Xen 4.1).

Re: xen_exit_mmap() questions

2017-04-26 Thread Boris Ostrovsky
On 04/26/2017 06:49 PM, Andy Lutomirski wrote: On Wed, Apr 26, 2017 at 3:45 PM, Boris Ostrovsky <boris.ostrov...@oracle.com> wrote: On 04/26/2017 04:52 PM, Andy Lutomirski wrote: I was trying to understand xen_drop_mm_ref() to update it for some changes I'm working on, and I'm won

Re: xen_exit_mmap() questions

2017-04-26 Thread Boris Ostrovsky
On 04/26/2017 04:52 PM, Andy Lutomirski wrote: > I was trying to understand xen_drop_mm_ref() to update it for some > changes I'm working on, and I'm wondering whether we need > xen_exit_mmap() at all. > > AFAICS the intent is to force all CPUs to drop their lazy uses of the > mm being destroyed

Re: xen_exit_mmap() questions

2017-04-27 Thread Boris Ostrovsky
> Also, this code in drop_other_mm_ref() looks dubious to me: > > /* If this cpu still has a stale cr3 reference, then make sure >it has been flushed. */ > if (this_cpu_read(xen_current_cr3) == __pa(mm->pgd)) > load_cr3(swapper_pg_dir); >

[PATCH] xen: Revert commits da72ff5bfcb0 and 72a9b186292d

2017-04-24 Thread Boris Ostrovsky
ests). 2) Any HVM guest The kernel will not boot on Xen < 4.0 which does not have vector injection support. Since the only other mode supported is INTx which. So based on this summary, I think before commit (72a9b186292) we were in much better position from a user point o

Re: xen_exit_mmap() questions

2017-04-27 Thread Boris Ostrovsky
On 04/27/2017 12:46 PM, Andy Lutomirski wrote: > On Thu, Apr 27, 2017 at 6:21 AM, Boris Ostrovsky > <boris.ostrov...@oracle.com> wrote: >>>>>>> Also, this code in drop_other_mm_ref() looks dubious to me: >>>>>>> >>>>>

Re: [PATCH 2/3] xen: remove unused function xen_set_domain_pte()

2017-08-04 Thread Boris Ostrovsky
On 08/04/2017 07:36 AM, Juergen Gross wrote: > The function xen_set_domain_pte() is used nowhere in the kernel. > Remove it. > > Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> (+ Ingo and Steven who are maintainers

Re: [PATCH 3/3] xen: remove not used trace functions

2017-08-04 Thread Boris Ostrovsky
On 08/04/2017 07:36 AM, Juergen Gross wrote: > There are some Xen specific trace functions defined in > include/trace/events/xen.h. Remove them. > > Signed-off-by: Juergen Gross <jgr...@suse.com> (Again, adding Ingo and Steven) Reviewed-by: Boris Ostrovsky <boris.ostrov...@

Re: [PATCH 1/3] xen: remove tests for pvh mode in pure pv paths

2017-08-04 Thread Boris Ostrovsky
On 08/04/2017 07:36 AM, Juergen Gross wrote: > Remove the last tests for XENFEAT_auto_translated_physmap in pure > PV-domain specific paths. PVH V1 is gone and the feature will always > be "false" in PV guests. > > Signed-off-by: Juergen Gross <jgr...@suse.com>

Re: [PATCH v2 11/13] xen/pvcalls: implement release command

2017-08-01 Thread Boris Ostrovsky
On 07/31/2017 06:34 PM, Stefano Stabellini wrote: > On Thu, 27 Jul 2017, Boris Ostrovsky wrote: >>> +int pvcalls_front_release(struct socket *sock) >>> +{ >>> + struct pvcalls_bedata *bedata; >>> + struct sock_mapping *map; >>> + int req_id,

Re: [PATCH v2 11/13] xen/pvcalls: implement release command

2017-08-01 Thread Boris Ostrovsky
>> BTW, I also noticed that in rcvmsg you are calling >> wait_event_interruptible() while holding the lock. Have you tested with >> CONFIG_DEBUG_ATOMIC_SLEEP? (or maybe it's some other config option that >> would complain about those sorts of thing) > I believe sleeping while holding a mutex is

Re: [PATCH v2 0/3] fix xen hvm guest with kaslr enabled

2017-08-08 Thread Boris Ostrovsky
ave some feedback, please? > > I'd like to get this regression fixed in 4.13. > > In case nobody objects this week I'll just add the patches to the Xen > tree for rc5. As I said before I think .init_mem_mapping() could live in x86_platform_ops() but this works too, so Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> But this still wants x86 maintainers' ACK. -boris

Re: [PATCH] xen-blkfront: use a right index when checking requests

2017-08-09 Thread Boris Ostrovsky
eviewed-by: Thomas Friebel <frieb...@amazon.de> Reviewed-by: Eduardo Valentin <edu...@amazon.com> Cc: Boris Ostrovsky <boris.ostrov...@oracle.com> Cc: Juergen Gross <jgr...@suse.com> Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Cc: Roger Pau Monne <roge

Re: [PATCH v3] xen: get rid of paravirt op adjust_exception_frame

2017-08-07 Thread Boris Ostrovsky
> diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c > index 811e4ddb3f37..a3dcd83187ce 100644 > --- a/arch/x86/xen/enlighten_pv.c > +++ b/arch/x86/xen/enlighten_pv.c > @@ -579,6 +579,71 @@ static void xen_write_ldt_entry(struct desc_struct *dt, > int entrynum, >

Re: [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN()

2017-08-16 Thread Boris Ostrovsky
On 07/21/2017 03:26 PM, Stefano Stabellini wrote: > On Fri, 21 Jul 2017, Arnd Bergmann wrote: >> __WARN() is an internal helper that is only available on >> some architectures, but causes a build error e.g. on ARM64 >> in some configurations: >> >> drivers/xen/pvcalls-back.c: In function

Re: [PATCH] xen/events: events_fifo: Don't use {get,put}_cpu() in xen_evtchn_fifo_init()

2017-08-22 Thread Boris Ostrovsky
On 08/22/2017 12:15 PM, Julien Grall wrote: > Hi, > > Gentle ping. This patch was reviewed but not queued. Are we waiting > for other reviewed? Applied to for-linus-4.14. -boris

Re: [PATCH] xen: fix build failure related to removing adjust_exception_frame

2017-08-17 Thread Boris Ostrovsky
On 08/17/2017 05:03 AM, Juergen Gross wrote: > A kernel configured with XEN_PV but without KVM_GUEST will fail to > build since the patch removing the adjust_exception_frame paravirt > op. > > Fix this failure. > > Reported-by: Sander Eikelenboom > Signed-off-by: Juergen

Re: [PATCH v2 1/2] paravirt,xen: remove xen_patch()

2017-08-18 Thread Boris Ostrovsky
On 08/16/2017 01:31 PM, Juergen Gross wrote: > Xen's paravirt patch function xen_patch() does some special casing for > irq_ops functions to apply relocations when those functions can be > patched inline instead of calls. > > Unfortunately none of the special case function replacements is small >

Re: [PATCH] xen/events: events_fifo: Don't use {get,put}_cpu() in xen_evtchn_fifo_init()

2017-08-17 Thread Boris Ostrovsky
set). > > xen_evtchn_fifo_init() will always be called before SMP is initialized, > so {get,put}_cpu() could be replaced by a simple smp_processor_id(). On x86 this will be called out of init_IRQ(), which is already preceded by preempt_disable(). Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH v8 1/5] x86: add simple udelay calibration

2017-05-02 Thread Boris Ostrovsky
On 03/21/2017 04:01 AM, Lu Baolu wrote: > Add a simple udelay calibration in x86 architecture-specific > boot-time initializations. This will get a workable estimate > for loops_per_jiffy. Hence, udelay() could be used after this > initialization. This breaks Xen PV guests since at this point,

Re: [PATCH] x86/xen: Improve failed hypercall debugging

2017-05-02 Thread Boris Ostrovsky
>debug[] is not initialized in this case. -boris > > Cc: Juergen Gross <jgr...@suse.com> > Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> > Cc: Boris Ostrovsky <boris.ostrov...@oracle.com> > Signed-off-by: Andy Lutomirski <l...@kernel

[PATCH] xen: Move xen_have_vector_callback definition to enlighten.c

2017-05-02 Thread Boris Ostrovsky
definition to enlighten.c resolves this issue. Signed-off-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Reported-by: Randy Dunlap <rdun...@infradead.org> --- arch/x86/xen/enlighten.c | 3 +++ arch/x86/xen/enlighten_hvm.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) dif

Re: [Xen-devel] [PATCH] xen: do not re-use pirq number cached in pci device msi msg data

2017-05-03 Thread Boris Ostrovsky
On 05/03/2017 02:19 PM, David Woodhouse wrote: > On Wed, 2017-02-22 at 10:14 -0500, Boris Ostrovsky wrote: >> On 02/22/2017 09:28 AM, Bjorn Helgaas wrote: >>> On Tue, Feb 21, 2017 at 10:58:39AM -0500, Boris Ostrovsky wrote: >>>> On 02/21/2017 10:45 AM, Juergen Gross

[PATCH] xen/x86: Do not call xen_init_time_ops() until shared_info is initialized

2017-05-03 Thread Boris Ostrovsky
ot;) where we end up reading tsc_to_system_mul from xen_dummy_shared_info (i.e. getting zero value) and then trying to divide by it in pvclock_tsc_khz(). Signed-off-by: Boris Ostrovsky <boris.ostrov...@oracle.com> --- arch/x86/xen/enlighten_pv.c | 9 +++-- arch/x86/xen/time.c

Re: [PATCH] xen: adjust early dom0 p2m handling to xen hypervisor behavior

2017-05-10 Thread Boris Ostrovsky
On 05/10/2017 12:08 AM, Juergen Gross wrote: > When booted as pv-guest the p2m list presented by the Xen is already > mapped to virtual addresses. In dom0 case the hypervisor might make use > of 2M- or 1G-pages for this mapping. Unfortunately while being properly > aligned in virtual and machine

Re: [patch V2 16/17] init: Introduce SYSTEM_SCHEDULING state

2017-05-17 Thread Boris Ostrovsky
hed_smp_init() removes the pinning and lets it schedule on all non > isolated cpus. > > Add a new state which allows to enable those checks earlier and add it to > the xen do_poweroff() function. > > No functional change. > > Signed-off-by: Thomas Gleixner <t...@linutronix.

Re: [PATCH 06/18] xen/pvcalls: handle commands from the frontend

2017-05-15 Thread Boris Ostrovsky
On 05/15/2017 04:35 PM, 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: [PATCH 07/18] xen/pvcalls: implement socket command

2017-05-15 Thread Boris Ostrovsky
On 05/15/2017 04:35 PM, 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: [PATCH 08/18] xen/pvcalls: implement connect command

2017-05-15 Thread Boris Ostrovsky
On 05/15/2017 04:36 PM, 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. Associate the socket to an

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

2017-05-15 Thread Boris Ostrovsky
On 05/15/2017 04:35 PM, Stefano Stabellini wrote: The pvcalls backend has one ioworker per cpu: the ioworkers are implemented as a cpu bound workqueue, and will deal with the actual socket and data ring reads/writes. ioworkers are global: we only have one set for all the frontends. They

Re: [PATCH 04/18] xen/pvcalls: xenbus state handling

2017-05-15 Thread Boris Ostrovsky
On 05/15/2017 04:35 PM, 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 functions

Re: [PATCH 05/18] xen/pvcalls: connect to a frontend

2017-05-15 Thread Boris Ostrovsky
On 05/15/2017 04:35 PM, Stefano Stabellini wrote: Introduce a per-frontend data structure named pvcalls_back_priv. 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,

Re: [PATCH v3 05/18] xen/pvcalls: connect to a frontend

2017-06-12 Thread Boris Ostrovsky
d frontends. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> > CC: boris.ostrov...@oracle.com > CC: jgr...@suse.com Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH v3 06/18] xen/pvcalls: handle commands from the frontend

2017-06-12 Thread Boris Ostrovsky
> + > static void pvcalls_back_work(struct work_struct *work) > { > + struct pvcalls_fedata *priv = container_of(work, > + struct pvcalls_fedata, register_work); > + int notify, notify_all = 0, more = 1; > + struct xen_pvcalls_request req; > + struct xenbus_device

Re: [PATCH v3 04/18] xen/pvcalls: xenbus state handling

2017-06-12 Thread Boris Ostrovsky
; > Introduce stub functions for disconnecting/connecting to a frontend. > > Signed-off-by: Stefano Stabellini <stef...@aporeto.com> > CC: boris.ostrov...@oracle.com > CC: jgr...@suse.com Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH v3 01/18] xen: introduce the pvcalls interface header

2017-06-12 Thread Boris Ostrovsky
ris.ostrov...@oracle.com > CC: jgr...@suse.com Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com>

Re: [PATCH v4 12/18] xen/pvcalls: implement poll command

2017-06-21 Thread Boris Ostrovsky
>>> + >>> + mappass->reqcopy = *req; >>> + icsk = inet_csk(mappass->sock->sk); >>> + queue = >icsk_accept_queue; >>> + spin_lock(>rskq_lock); >>> + data = queue->rskq_accept_head != NULL; >>> + spin_unlock(>rskq_lock); >> What is the purpose of the queue lock here? > It is only there

Re: [PATCH v4 16/18] xen/pvcalls: implement read

2017-06-21 Thread Boris Ostrovsky
On 06/15/2017 03:09 PM, 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. > >

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