Re: [Xen-devel] [PATCH v3 for-next 4/4] xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN

2017-11-01 Thread Razvan Cojocaru
the callers are now switched to _mfn(domain_page_to_mfn(...)). > > Signed-off-by: Julien Grall <julien.gr...@linaro.org> Acked-by: Razvan Cojocaru <rcojoc...@bitdefender.com> Thanks, Razvan ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v1] x86/mm: Supresses vm_events caused by page-walks

2017-10-30 Thread Razvan Cojocaru
On 10/30/2017 07:07 PM, Tamas K Lengyel wrote: > On Mon, Oct 30, 2017 at 11:01 AM, Razvan Cojocaru > <rcojoc...@bitdefender.com> wrote: >> On 10/30/2017 06:39 PM, Tamas K Lengyel wrote: >>> On Mon, Oct 30, 2017 at 10:24 AM, Razvan Cojocaru >>> <rcojoc...@bit

Re: [Xen-devel] [PATCH v1] x86/mm: Supresses vm_events caused by page-walks

2017-10-30 Thread Razvan Cojocaru
On 10/30/2017 06:39 PM, Tamas K Lengyel wrote: > On Mon, Oct 30, 2017 at 10:24 AM, Razvan Cojocaru > <rcojoc...@bitdefender.com> wrote: >> On 30.10.2017 18:01, Tamas K Lengyel wrote: >>> On Mon, Oct 30, 2017 at 4:32 AM, Alexandru Isaila >>> <aisa...@

Re: [Xen-devel] [PATCH v1] x86/mm: Supresses vm_events caused by page-walks

2017-10-30 Thread Razvan Cojocaru
On 30.10.2017 18:01, Tamas K Lengyel wrote: > On Mon, Oct 30, 2017 at 4:32 AM, Alexandru Isaila > wrote: >> This patch is adding a way to enable/disable nested pagefault >> events. It introduces the xc_monitor_nested_pagefault function >> and adds the

Re: [Xen-devel] [PATCH v7] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-23 Thread Razvan Cojocaru
/20/2017 07:15 PM, Wei Liu wrote: >>>>> On Mon, Oct 16, 2017 at 08:07:41PM +0300, Petre Pircalabu wrote: >>>>>> From: Razvan Cojocaru <rcojoc...@bitdefender.com> >>>>>> >>>>>> For the default EPT view we have xc_set_mem_access

Re: [Xen-devel] [PATCH v7] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-23 Thread Razvan Cojocaru
On 23.10.2017 11:10, Jan Beulich wrote: >>>> On 20.10.17 at 18:32, <rcojoc...@bitdefender.com> wrote: >> On 10/20/2017 07:15 PM, Wei Liu wrote: >>> On Mon, Oct 16, 2017 at 08:07:41PM +0300, Petre Pircalabu wrote: >>>> From: Razvan Cojocaru <rcoj

Re: [Xen-devel] [PATCH v7] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-20 Thread Razvan Cojocaru
On 10/20/2017 07:39 PM, Wei Liu wrote: > On Fri, Oct 20, 2017 at 07:32:50PM +0300, Razvan Cojocaru wrote: >> On 10/20/2017 07:15 PM, Wei Liu wrote: >>> On Mon, Oct 16, 2017 at 08:07:41PM +0300, Petre Pircalabu wrote: >>>> From: Razvan Cojocaru <rcojoc...@bitdefend

Re: [Xen-devel] [PATCH v7] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-20 Thread Razvan Cojocaru
On 10/20/2017 07:15 PM, Wei Liu wrote: > On Mon, Oct 16, 2017 at 08:07:41PM +0300, Petre Pircalabu wrote: >> From: Razvan Cojocaru <rcojoc...@bitdefender.com> >> >> For the default EPT view we have xc_set_mem_access_multi(), which >> is able to set an array of p

Re: [Xen-devel] [PATCH RFC 00/14] Intel EPT-Based Sub-page Write Protection Support.

2017-10-20 Thread Razvan Cojocaru
On 20.10.2017 11:37, Yi Zhang wrote: > On 2017-10-19 at 12:07:44 +0300, Razvan Cojocaru wrote: >> On 19.10.2017 11:04, Zhang Yi wrote: >>> From: Zhang Yi Z <yi.z.zh...@linux.intel.com> >>> >>> Hi All, >>> >>> Here is a patch-series which

Re: [Xen-devel] [PATCH RFC 00/14] Intel EPT-Based Sub-page Write Protection Support.

2017-10-20 Thread Razvan Cojocaru
On 20.10.2017 11:37, Yi Zhang wrote: > On 2017-10-19 at 12:07:44 +0300, Razvan Cojocaru wrote: >> On 19.10.2017 11:04, Zhang Yi wrote: >>> From: Zhang Yi Z <yi.z.zh...@linux.intel.com> >>> >>> Hi All, >>> >>> Here is a patch-series which

Re: [Xen-devel] [PATCH RFC 00/14] Intel EPT-Based Sub-page Write Protection Support.

2017-10-19 Thread Razvan Cojocaru
On 19.10.2017 11:04, Zhang Yi wrote: > From: Zhang Yi Z > > Hi All, > > Here is a patch-series which adding EPT-Based Sub-page Write Protection > Support. You can get It's software developer manuals from: > >

Re: [Xen-devel] [PATCH RFC 14/14] xen: tools: Added xen-subpage tool.

2017-10-19 Thread Razvan Cojocaru
> +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#define DPRINTF(a, b...) fprintf(stderr, a, ## b) > +#define ERROR(a, b...) fprintf(stderr, a "\n", ## b) > +#define PERROR(a,

Re: [Xen-devel] [PATCH RFC 13/14] xen: tools: Introduce the set-subpage into xenctrl

2017-10-19 Thread Razvan Cojocaru
On 19.10.2017 11:15, Zhang Yi wrote: > From: Zhang Yi Z > > Introduce the Xen Hypercall HVMOP_set_subpage into Xenctl. > The API is defined as flowing. > > int xc_mem_set_subpage(xc_interface *handle, domid_t domid, >xen_pfn_t gfn, uint32_t

Re: [Xen-devel] [PATCH v2] x86/hvm: Add MSR old value

2017-10-13 Thread Razvan Cojocaru
On 10/13/2017 07:26 PM, Tamas K Lengyel wrote: > On Fri, Oct 13, 2017 at 9:50 AM, Jan Beulich wrote: > On 13.10.17 at 14:50, wrote: >>> This patch adds the old value param and the onchangeonly option >>> to the VM_EVENT_REASON_MOV_TO_MSR event. >>>

Re: [Xen-devel] [PATCH v1] x86/hvm: Add MSR old value

2017-10-13 Thread Razvan Cojocaru
On 13.10.2017 13:29, Jan Beulich wrote: +__set_bit(index + sizeof(struct monitor_msr_bitmap), bitmap); I think you miss "* 8" here - a bit position plus sizeof() doesn't produce any useful value. But what's worse - having read till the end of the patch I don't see you change any

[Xen-devel] X86EMUL_CMPXCHG_FAILED

2017-10-11 Thread Razvan Cojocaru
Hello, Now that "x86/hvm: implement hvmemul_write() using real mappings" is in, we can start working again on implementing hvmemul_cmpxchg() with a real CMPXCHG, and finally fix the SMP emulation race upstream. However, in order to do that we would need X86EMUL_CMPXCHG_FAILED which has been

Re: [Xen-devel] [PATCH v4] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-10 Thread Razvan Cojocaru
On 10/10/2017 05:24 PM, Jan Beulich wrote: On 10.10.17 at 16:13, wrote: >> On Ma, 2017-10-10 at 06:28 -0600, Jan Beulich wrote:> > > >> >> a.u.set_mem_access_multi.pfn_list, + a.u.set_mem_access_multi.acc

Re: [Xen-devel] [PATCH v3] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-09 Thread Razvan Cojocaru
On 09.10.2017 10:23, Jan Beulich wrote: On 06.10.17 at 18:07, wrote: On 10/06/2017 06:34 PM, Jan Beulich wrote: On 05.10.17 at 17:42, wrote: @@ -4451,6 +4453,7 @@ static int do_altp2m_op( case HVMOP_altp2m_destroy_p2m: case

Re: [Xen-devel] [PATCH v3] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-06 Thread Razvan Cojocaru
On 10/06/2017 06:34 PM, Jan Beulich wrote: On 05.10.17 at 17:42, wrote: >> @@ -4451,6 +4453,7 @@ static int do_altp2m_op( >> case HVMOP_altp2m_destroy_p2m: >> case HVMOP_altp2m_switch_p2m: >> case HVMOP_altp2m_set_mem_access: >> +case

Re: [Xen-devel] [PATCH v2 9/9] xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN

2017-10-05 Thread Razvan Cojocaru
the callers are now switched to _mfn(domain_page_to_mfn(...)). > > Signed-off-by: Julien Grall <julien.gr...@linaro.org> Acked-by: Razvan Cojocaru <rcojoc...@bitdefender.com> Thanks, Razvan ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 7/7] xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN

2017-10-04 Thread Razvan Cojocaru
fn_t by default. > > Only reasonable clean-ups are done in this patch because it is > already quite big. So some of the files now override page_to_mfn and > mfn_to_page to avoid using mfn_t. > > Signed-off-by: Julien Grall <julien.gr...@linaro.org> Acked-by: Razvan Cojocaru <r

Re: [Xen-devel] [PATCH v2 16/16] xen/x86: mem_access: Fix mis-indented line

2017-09-21 Thread Razvan Cojocaru
On 09/21/2017 03:40 PM, Julien Grall wrote: > Signed-off-by: Julien Grall <julien.gr...@arm.com> > > --- > > Cc: Razvan Cojocaru <rcojoc...@bitdefender.com> > Cc: Tamas K Lengyel <ta...@tklengyel.com> > Cc: George Dunlap <george.dun...@eu.citrix.com&g

Re: [Xen-devel] [PATCH] x86/domctl: Don't pause the whole domain if only getting vcpu state

2017-09-18 Thread Razvan Cojocaru
On 09/18/2017 06:35 PM, Jan Beulich wrote: On 12.09.17 at 15:53, wrote: >> --- a/xen/arch/x86/domctl.c >> +++ b/xen/arch/x86/domctl.c >> @@ -625,6 +625,26 @@ long arch_do_domctl( >> !is_hvm_domain(d) ) >> break; >> >> +if (

Re: [Xen-devel] [PATCH 08/15] xen/x86: p2m: Use typesafe gfn for the P2M callbacks get_entry and set_entry

2017-09-13 Thread Razvan Cojocaru
On 09/13/2017 09:27 PM, Julien Grall wrote: > Hi Andrew, > > On 09/13/2017 07:22 PM, Andrew Cooper wrote: >> On 13/09/2017 18:59, Julien Grall wrote: >>> diff --git a/xen/arch/x86/mm/p2m-pt.c b/xen/arch/x86/mm/p2m-pt.c >>> index 0e63d6ed11..57878b1886 100644 >>> --- a/xen/arch/x86/mm/p2m-pt.c >>>

Re: [Xen-devel] [PATCH 08/15] xen/x86: p2m: Use typesafe gfn for the P2M callbacks get_entry and set_entry

2017-09-13 Thread Razvan Cojocaru
On 09/13/2017 08:59 PM, Julien Grall wrote: > Signed-off-by: Julien Grall <julien.gr...@arm.com> > > Cc: Jan Beulich <jbeul...@suse.com> > Cc: Andrew Cooper <andrew.coop...@citrix.com> > Cc: Razvan Cojocaru <rcojoc...@bitdefender.com> > Cc: Tamas K

Re: [Xen-devel] [PATCH 1/2] public/domctl: drop unnecessary typedefs and handles

2017-09-12 Thread Razvan Cojocaru
e x86's paging_domctl() and descendants take a properly typed > handle, > - add const in a few places. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Acked-by: Razvan Cojocaru <rcojoc...@bitdefender.com> Thanks, Razvan ___ X

Re: [Xen-devel] [PATCH] mem_access: switch to plain bool

2017-09-11 Thread Razvan Cojocaru
On 11.09.2017 14:16, Wei Liu wrote: Signed-off-by: Wei Liu <wei.l...@citrix.com> --- Cc: Razvan Cojocaru <rcojoc...@bitdefender.com> Cc: Tamas K Lengyel <ta...@tklengyel.com> Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com>

Re: [Xen-devel] [PATCH] monitor: switch to plain bool

2017-09-08 Thread Razvan Cojocaru
On 08.09.2017 16:44, Wei Liu wrote: Signed-off-by: Wei Liu<wei.l...@citrix.com> --- Cc: Razvan Cojocaru<rcojoc...@bitdefender.com> Cc: Tamas K Lengyel<ta...@tklengyel.com> --- xen/arch/arm/monitor.c| 4 ++-- xen/arch/x86/hvm/monitor.c| 10 +- xe

Re: [Xen-devel] [RFC PATCH 4/4] vm_event: Move vm_event_toggle_singlestep to

2017-09-05 Thread Razvan Cojocaru
On 09/05/2017 11:57 AM, Sergej Proskurin wrote: > In this commit we move the declaration of the function > vm_event_toggle_singlestep from to and > implement the associated functionality on ARM. > > Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Ra

Re: [Xen-devel] [RFC PATCH 1/4] arm/monitor: Introduce monitoring of single-step events

2017-09-05 Thread Razvan Cojocaru
On 09/05/2017 11:57 AM, Sergej Proskurin wrote: > In this commit, we extend the capabilities of the monitor to allow > tracing of single-step events on ARM. > > Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Razvan Cojocaru <rcoj

Re: [Xen-devel] [PATCH v1] x86/hvm: Expose MSR_SHADOW_GS_BASE

2017-09-01 Thread Razvan Cojocaru
On 01.09.2017 13:55, Andrew Cooper wrote: On 01/09/17 11:44, Alexandru Isaila wrote: diff --git a/xen/include/public/arch-x86/hvm/save.h b/xen/include/public/arch-x86/hvm/save.h index fd7bf3f..e6e8e87 100644 --- a/xen/include/public/arch-x86/hvm/save.h +++

Re: [Xen-devel] [PATCH v4 39/39] arm/xen-access: Add test of xc_altp2m_change_gfn

2017-08-30 Thread Razvan Cojocaru
; > Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> > --- > Cc: Razvan Cojocaru <rcojoc...@bitdefender.com> > Cc: Tamas K Lengyel <ta...@tklengyel.com> > Cc: Ian Jackson <ian.jack...@eu.citrix.com> > Cc: Wei Liu <wei.l...@citrix.com> > --- > v3: Cos

Re: [Xen-devel] [PATCH v4 29/39] x86/altp2m: Move altp2m_check to altp2m.c

2017-08-30 Thread Razvan Cojocaru
On 08/30/2017 09:32 PM, Sergej Proskurin wrote: > diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c > index 42e6f09029..66f1d83d84 100644 > --- a/xen/common/vm_event.c > +++ b/xen/common/vm_event.c > @@ -29,6 +29,7 @@ > #include > #include > #include > +#include Any reason why

Re: [Xen-devel] [PATCH] xen-access: Correct default value of write-to-CR4 switch

2017-08-30 Thread Razvan Cojocaru
> > Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Razvan Cojocaru <rcojoc...@bitdefender.com> ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v5] common/vm_event: Initialize vm_event lists on domain creation

2017-08-30 Thread Razvan Cojocaru
On 08/29/2017 08:41 PM, Wei Liu wrote: -xfree(d->vm_event); +#ifdef CONFIG_HAS_MEM_PAGING +xfree(d->vm_event_paging); +#endif +xfree(d->vm_event_monitor); >>> Why do you unconditionally xfree these vm_event_monitor while you don't >>> unconditionally allocate

Re: [Xen-devel] [PATCH v5] x86/hvm: Allow guest_request vm_events coming from userspace

2017-08-16 Thread Razvan Cojocaru
On 08/16/2017 02:16 AM, Tamas K Lengyel wrote: > On Tue, Aug 15, 2017 at 2:06 AM, Jan Beulich wrote: > On 14.08.17 at 17:53, wrote: >>> On Tue, Aug 8, 2017 at 2:27 AM, Alexandru Isaila >>> wrote: ---

Re: [Xen-devel] [PATCH v4] x86/hvm: Allow guest_request vm_events coming from userspace

2017-08-05 Thread Razvan Cojocaru
On 08/05/2017 04:32 AM, Tamas K Lengyel wrote: > > > On Fri, Aug 4, 2017 at 5:32 AM, Alexandru Isaila > > wrote: > > In some introspection usecases, an in-guest agent needs to communicate > with the external introspection agent.

Re: [Xen-devel] [PATCH V2] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-08-03 Thread Razvan Cojocaru
On 03/09/2017 06:56 PM, Jan Beulich wrote: On 09.03.17 at 10:38, wrote: >> @@ -4535,6 +4536,30 @@ static int do_altp2m_op( >> a.u.set_mem_access.view); >> break; >> >> +case HVMOP_altp2m_set_mem_access_multi: >> +

Re: [Xen-devel] [PATCH v2] x86/hvm: Allow guest_request vm_events coming from userspace

2017-08-02 Thread Razvan Cojocaru
On 01.08.2017 19:07, Tamas K Lengyel wrote: On Tue, Aug 1, 2017 at 4:30 AM, Andrew Cooper wrote: On 01/08/17 10:46, Alexandru Isaila wrote: Allow guest userspace code to request that a vm_event be sent out via VMCALL. This functionality seems to be handy for a

Re: [Xen-devel] [PATCH v6] x86/monitor: Notify monitor if an emulation fails.

2017-08-01 Thread Razvan Cojocaru
On 07/25/2017 08:40 PM, Razvan Cojocaru wrote: > On 07/18/2017 01:20 PM, Razvan Cojocaru wrote: >> On 07/18/2017 01:09 PM, Andrew Cooper wrote: >>> On 18/07/17 10:37, Petre Pircalabu wrote: >>>> If case of a vm_event with the emulate_flags set, if the instr

Re: [Xen-devel] [PATCH v6] x86/monitor: Notify monitor if an emulation fails.

2017-07-25 Thread Razvan Cojocaru
On 07/18/2017 01:20 PM, Razvan Cojocaru wrote: > On 07/18/2017 01:09 PM, Andrew Cooper wrote: >> On 18/07/17 10:37, Petre Pircalabu wrote: >>> If case of a vm_event with the emulate_flags set, if the instruction >>> cannot be emulated, the monitor should be n

Re: [Xen-devel] Question about hvm_monitor_interrupt

2017-07-21 Thread Razvan Cojocaru
On 07/22/2017 12:33 AM, Tamas K Lengyel wrote: > Hey Razvan, Hello, > the vm_event that is being generated by doing > VM_EVENT_FLAG_GET_NEXT_INTERRUPT sends almost all required information > about the interrupt to the listener to allow it to get reinjected, > except the instruction length. If

Re: [Xen-devel] [PATCH v3 1/2] x86/mm: Change default value for suppress #VE in set_mem_access()

2017-07-20 Thread Razvan Cojocaru
On 07/20/2017 09:52 PM, Tamas K Lengyel wrote: > On Thu, Jul 20, 2017 at 12:25 PM, Razvan Cojocaru > <rcojoc...@bitdefender.com> wrote: >> On 07/20/2017 07:46 PM, Tamas K Lengyel wrote: >>> On Thu, Jul 20, 2017 at 10:43 AM, George Dunlap >>> <george.dun...@eu

Re: [Xen-devel] [PATCH v3 1/2] x86/mm: Change default value for suppress #VE in set_mem_access()

2017-07-20 Thread Razvan Cojocaru
On 07/20/2017 07:46 PM, Tamas K Lengyel wrote: > On Thu, Jul 20, 2017 at 10:43 AM, George Dunlap > wrote: >> On Wed, Jul 19, 2017 at 7:24 PM, Tamas K Lengyel wrote: I think the issue would be whether to allow a domain to set/clear the

Re: [Xen-devel] [PATCH v6] x86/monitor: Notify monitor if an emulation fails.

2017-07-18 Thread Razvan Cojocaru
On 07/18/2017 01:09 PM, Andrew Cooper wrote: > On 18/07/17 10:37, Petre Pircalabu wrote: >> If case of a vm_event with the emulate_flags set, if the instruction >> cannot be emulated, the monitor should be notified instead of directly >> injecting a hw exception. >> This behavior can be used to

Re: [Xen-devel] [PATCH v4] x86/monitor: Notify monitor if an emulation fails.

2017-07-12 Thread Razvan Cojocaru
On 07/12/2017 08:21 PM, Petre Pircalabu wrote: > If case of a vm_event with the emulate_flags set, if the instruction > cannot be emulated, the monitor should be notified instead of directly > injecting a hw exception. > This behavior can be used to re-execute an instruction not supported by > the

Re: [Xen-devel] [PATCH 10/18] x86/monitor.c: use plain bool

2017-06-30 Thread Razvan Cojocaru
by: Andrew Cooper <andrew.coop...@citrix.com> Acked-by: Razvan Cojocaru <rcojoc...@bitdefender.com> Thanks, Razvan ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH] common/vm_event: Initialize vm_event lists on domain creation

2017-06-27 Thread Razvan Cojocaru
On 06/27/2017 02:45 PM, Jan Beulich wrote: >>>> Razvan Cojocaru <rcojoc...@bitdefender.com> 06/27/17 1:38 PM >>> >> On 06/27/2017 02:26 PM, Jan Beulich wrote: >>>>>> Razvan Cojocaru <rcojoc...@bitdefender.com> 06/27/17 10:32 AM >>&g

Re: [Xen-devel] [PATCH] common/vm_event: Initialize vm_event lists on domain creation

2017-06-27 Thread Razvan Cojocaru
On 06/27/2017 02:26 PM, Jan Beulich wrote: >>>> Razvan Cojocaru <rcojoc...@bitdefender.com> 06/27/17 10:32 AM >>> >> On 06/27/2017 09:21 AM, Jan Beulich wrote: >>>>>> Andrew Cooper <andrew.coop...@citrix.com> 06/26/17 5:11 PM >>&g

Re: [Xen-devel] [For 4.9] Updating https://wiki.xenproject.org/wiki/Xen_Project_Release_Features to reflect support status of new features

2017-06-27 Thread Razvan Cojocaru
Hello, > - Security > Alternative 2pm : Supported – I think we should split this > out – it is currently implicitly covered under "Virtual Machine > Introspection" I agree that altp2m deserves its own space. While we're interested in it, our current solution makes no use of it, so it's certainly

Re: [Xen-devel] [PATCH] common/vm_event: Initialize vm_event lists on domain creation

2017-06-27 Thread Razvan Cojocaru
On 06/27/2017 09:21 AM, Jan Beulich wrote: Andrew Cooper 06/26/17 5:11 PM >>> >> There is also a difference in timing; vm_event_init_domain() is called >> when vm_event is started on the domain, not when the domain is >> constructed. IMO, the two should happen at

Re: [Xen-devel] [PATCH] common/vm_event: Initialize vm_event lists on domain creation

2017-06-26 Thread Razvan Cojocaru
On 06/26/2017 03:14 PM, Andrew Cooper wrote: > Razvan: I'd reword this to not mention livepatching. Simply having > list_empty() working is a good enough reason alone. Fair enough, I'll change the patch description as soon as we hear from Tamas, so that I might address as many comments as

Re: [Xen-devel] [PATCH] common/vm_event: Initialize vm_event lists on domain creation

2017-06-26 Thread Razvan Cojocaru
On 06/26/2017 02:39 PM, Konrad Rzeszutek Wilk wrote: > On June 26, 2017 5:48:17 AM EDT, Razvan Cojocaru <rcojoc...@bitdefender.com> > wrote: >> Pending livepatch code wants to check if the vm_event wait queues >> are active, and this is made harder by the fact that they we

[Xen-devel] [PATCH] common/vm_event: Initialize vm_event lists on domain creation

2017-06-26 Thread Razvan Cojocaru
memory, in domain_create(), in the newly added init_domain_vm_event() function. Signed-off-by: Razvan Cojocaru <rcojoc...@bitdefender.com> --- xen/common/domain.c| 5 ++--- xen/common/vm_event.c | 23 --- xen/include/xen/vm_event.h | 2 ++ 3 files chang

[Xen-devel] [PATCH V3] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
Fixed an issue where the maximum index allowed (31) goes beyond the actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. Coverity-ID: 1412966 Signed-off-by: Razvan Cojocaru <rcojoc...@bitdefender.com> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> --- C

Re: [Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
(Re-sent with CCs preserved). On 06/21/2017 07:06 PM, Jan Beulich wrote: On 21.06.17 at 16:56, wrote: >> --- a/xen/arch/x86/monitor.c >> +++ b/xen/arch/x86/monitor.c >> @@ -133,7 +133,8 @@ int arch_monitor_domctl_event(struct domain *d, >> bool_t

Re: [Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
On 06/21/2017 07:06 PM, Jan Beulich wrote: On 21.06.17 at 16:56, wrote: >> --- a/xen/arch/x86/monitor.c >> +++ b/xen/arch/x86/monitor.c >> @@ -133,7 +133,8 @@ int arch_monitor_domctl_event(struct domain *d, >> bool_t old_status; >> >> /* sanity

Re: [Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
On 06/21/2017 06:10 PM, Wei Liu wrote: > On Wed, Jun 21, 2017 at 05:56:02PM +0300, Razvan Cojocaru wrote: >> Fixed an issue where the maximum index allowed (31) goes beyond the >> actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. >> Coverity-ID:

[Xen-devel] [PATCH V2] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
Fixed an issue where the maximum index allowed (31) goes beyond the actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. Coverity-ID: 1412966 Signed-off-by: Razvan Cojocaru <rcojoc...@bitdefender.com> --- Changes since V1: - Changed '3' to 'ARRAY_SIZE(...)'. --- xen

Re: [Xen-devel] [PATCH] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
On 06/21/2017 05:33 PM, Andrew Cooper wrote: > On 21/06/17 15:28, Razvan Cojocaru wrote: >> Fixed an issue where the maximum index allowed (31) goes beyond the >> actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. >> Coverity-ID: 1412966 >> >

[Xen-devel] [PATCH] x86/monitor: Fixed CID 1412966: Memory - corruptions (OVERRUN)

2017-06-21 Thread Razvan Cojocaru
Fixed an issue where the maximum index allowed (31) goes beyond the actual number of array elements (4) of ad->monitor.write_ctrlreg_mask. Coverity-ID: 1412966 Signed-off-by: Razvan Cojocaru <rcojoc...@bitdefender.com> --- xen/arch/x86/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Xen-devel] [PATCH v4 1/2] x86/monitor: add masking support for write_ctrlreg events

2017-06-21 Thread Razvan Cojocaru
On 06/21/2017 04:58 PM, Wei Liu wrote: > On Mon, Jun 19, 2017 at 03:24:38PM +0300, Petre Pircalabu wrote: >> Add support for filtering out the write_ctrlreg monitor events if they >> are generated only by changing certains bits. >> A new parameter (bitmask) was added to the

Re: [Xen-devel] [PATCH v3 2/2] xen-access: write_ctrlreg_c4 test

2017-06-16 Thread Razvan Cojocaru
On 06/16/2017 10:20 PM, Petre Pircalabu wrote: > Add test for write_ctrlreg event handling. > > Signed-off-by: Petre Pircalabu > --- > tools/tests/xen-access/xen-access.c | 53 > - > 1 file changed, 52 insertions(+), 1 deletion(-)

Re: [Xen-devel] Interrupt issues with hvm_emulate_one_vm_event()

2017-05-29 Thread Razvan Cojocaru
On 05/26/17 18:38, Jan Beulich wrote: On 26.05.17 at 16:37, wrote: >> On 05/26/17 17:29, Jan Beulich wrote: >> On 25.05.17 at 11:40, wrote: I've noticed that, with pages marked NX and vm_event emulation, we can end up

Re: [Xen-devel] Interrupt issues with hvm_emulate_one_vm_event()

2017-05-29 Thread Razvan Cojocaru
On 05/29/17 15:11, Andrew Cooper wrote: > On 29/05/2017 12:46, Razvan Cojocaru wrote: >> On 05/29/17 14:05, Jan Beulich wrote: >>>>>> On 29.05.17 at 11:20, <rcojoc...@bitdefender.com> wrote: >>>> On 05/26/17 18:11, Andrew Cooper wrot

Re: [Xen-devel] Interrupt issues with hvm_emulate_one_vm_event()

2017-05-29 Thread Razvan Cojocaru
On 05/29/17 14:05, Jan Beulich wrote: On 29.05.17 at 11:20, wrote: >> On 05/26/17 18:11, Andrew Cooper wrote: >>> On 26/05/17 15:29, Jan Beulich wrote: >>> On 25.05.17 at 11:40, wrote: > I've noticed that, with pages marked NX

Re: [Xen-devel] Interrupt issues with hvm_emulate_one_vm_event()

2017-05-29 Thread Razvan Cojocaru
On 05/26/17 18:11, Andrew Cooper wrote: > On 26/05/17 15:29, Jan Beulich wrote: > On 25.05.17 at 11:40, wrote: >>> I've noticed that, with pages marked NX and vm_event emulation, we can >>> end up emulating an ud2, for which hvm_emulate_one() returns >>>

Re: [Xen-devel] Interrupt issues with hvm_emulate_one_vm_event()

2017-05-26 Thread Razvan Cojocaru
On 05/26/17 17:29, Jan Beulich wrote: On 25.05.17 at 11:40, wrote: >> I've noticed that, with pages marked NX and vm_event emulation, we can >> end up emulating an ud2, for which hvm_emulate_one() returns >> X86EMUL_EXCEPTION in hvm_emulate_one_vm_event(). > >

[Xen-devel] Interrupt issues with hvm_emulate_one_vm_event()

2017-05-25 Thread Razvan Cojocaru
Hello, I've noticed that, with pages marked NX and vm_event emulation, we can end up emulating an ud2, for which hvm_emulate_one() returns X86EMUL_EXCEPTION in hvm_emulate_one_vm_event(). This, in turn, causes a hvm_inject_event() call in the context of hvm_do_resume(), which can, if there's

Re: [Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-08 Thread Razvan Cojocaru
On 05/08/17 15:44, Jan Beulich wrote: On 04.05.17 at 11:00, wrote: >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -404,6 +404,7 @@ S: Supported >> F: tools/tests/xen-access >> F: xen/arch/*/monitor.c >> F: xen/arch/*/vm_event.c >> +F:

Re: [Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-04 Thread Razvan Cojocaru
7 at 11:00, <rcojoc...@bitdefender.com> wrote: >>>>> Created arch/x86/hvm/vm_event.c and include/asm-x86/hvm/vm_event.h, >>>>> where HVM-specific vm_event-related code will live. This cleans up >>>>> hvm_do_resume() and ensures that the vm_event

Re: [Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-04 Thread Razvan Cojocaru
sume() and ensures that the vm_event maintainers are >> responsible for changes to that code. >> >> Signed-off-by: Razvan Cojocaru <rcojoc...@bitdefender.com> >> Acked-by: Tamas K Lengyel <ta...@tklengyel.com> > > Acked-by: Jan Beulich <jbeul...@

[Xen-devel] [PATCH V3 0/2] Fix vm_event resume path race condition

2017-05-04 Thread Razvan Cojocaru
This small series first creates hvm/vm_event.{h,c}, in order to bring under vm_event maintainership the code that has previously lived in hvm_do_resume(), and then fixes a __context_switch()-related race condition when attempting to set registers via vm_event reply. [PATCH V3 1/2] x86/vm_event:

[Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h,c}

2017-05-04 Thread Razvan Cojocaru
Created arch/x86/hvm/vm_event.c and include/asm-x86/hvm/vm_event.h, where HVM-specific vm_event-related code will live. This cleans up hvm_do_resume() and ensures that the vm_event maintainers are responsible for changes to that code. Signed-off-by: Razvan Cojocaru <rcojoc...@bitdefender.

[Xen-devel] [PATCH V3 2/2] x86/vm_event: fix race between __context_switch() and vm_event_resume()

2017-05-04 Thread Razvan Cojocaru
ontrol setting of CRs and MSRs). The patch additionally removes the sync_vcpu_execstate(v) call from vm_event_resume(), which is no longer necessary, which removes the associated broadcast TLB flush (read: performance improvement). Signed-off-by: Razvan Cojocaru <rcojoc...@bitdefender.com>

Re: [Xen-devel] [PATCH V2 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-03 Thread Razvan Cojocaru
On 05/03/2017 11:32 PM, Tamas K Lengyel wrote: > On Wed, May 3, 2017 at 4:16 PM, Razvan Cojocaru > <rcojoc...@bitdefender.com> wrote: >> On 05/03/2017 11:05 PM, Tamas K Lengyel wrote: >>> >>> >>> On Wed, May 3, 2017 at 6:48 AM, Jan Beulich <jbeul..

Re: [Xen-devel] [PATCH V2 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-03 Thread Razvan Cojocaru
ent.c > >>> @@ -0,0 +1,101 @@ > >>> +/* > >>> + * arch/x86/hvm/vm_event.c > >>> + * > >>> + * HVM vm_event handling routines > >>> + * > >>> + * Copyright (c) 2017 Razvan Cojocaru (rcojoc..

Re: [Xen-devel] [PATCH v3] hvm: fix hypervisor crash in hvm_save_one()

2017-05-03 Thread Razvan Cojocaru
de=] > (XEN) Faulting linear address: 830492cbb447 > (XEN) > > At the same time pave the way for having zero-length records. > > Inspired by an earlier patch from Andrew and Razvan. > > Reported-by: Razvan Cojocaru <

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-03 Thread Razvan Cojocaru
On 05/03/17 12:30, Jan Beulich wrote: On 03.05.17 at 11:21, wrote: >> At 10:15 +0100 on 03 May (1493806508), Tim Deegan wrote: >>> At 00:31 -0600 on 03 May (1493771502), Jan Beulich wrote: +else if ( ctxt.cur > sizeof(*desc) ) { uint32_t off;

Re: [Xen-devel] [PATCH V2 2/2] x86/vm_event: fix race between __context_switch() and vm_event_resume()

2017-05-03 Thread Razvan Cojocaru
On 05/03/17 13:01, Jan Beulich wrote: On 03.05.17 at 11:10, wrote: >> The introspection agent can reply to a vm_event faster than >> vmx_vmexit_handler() can complete in some cases, where it is then >> not safe for vm_event_set_registers() to modify

Re: [Xen-devel] [PATCH V2 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-03 Thread Razvan Cojocaru
>cr3, 0) == X86EMUL_EXCEPTION ) >> -hvm_inject_hw_exception(TRAP_gp_fault, 0); >> - >> - w->do_write.cr3 = 0; >> -} >> -} >> +hvm_vm_event_do_resume(v); > > As indicated before, I think we want to keep > > if ( unl

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-03 Thread Razvan Cojocaru
On 05/03/17 12:15, Tim Deegan wrote: > At 00:31 -0600 on 03 May (1493771502), Jan Beulich wrote: >> Hmm, with both of you being of that opinion, I've taken another >> look. I think I see now why you think that way (this being data >> from an internal producer, overflow/underflow are not a primary

[Xen-devel] [PATCH V2 2/2] x86/vm_event: fix race between __context_switch() and vm_event_resume()

2017-05-03 Thread Razvan Cojocaru
onally removes the sync_vcpu_execstate(v) call from vm_event_resume(), which is no longer necessary, which removes the associated broadcast TLB flush (read: performance improvement). Signed-off-by: Razvan Cojocaru <rcojoc...@bitdefender.com> Signed-off-by: Andrew Cooper <andrew.coop...@citri

[Xen-devel] [PATCH V2 1/2] x86/vm_event: added hvm/vm_event.{h,c}

2017-05-03 Thread Razvan Cojocaru
Created arch/x86/hvm/vm_event.c and include/asm-x86/hvm/vm_event.h, where HVM-specific vm_event-related code will live. This cleans up hvm_do_resume() and ensures that the vm_event maintainers are responsible for changes to that code. Signed-off-by: Razvan Cojocaru <rcojoc...@bitdefender.

[Xen-devel] [PATCH V2 0/2] Fix vm_event resume path race condition

2017-05-03 Thread Razvan Cojocaru
This small series first creates hvm/vm_event.{h,c}, in order to bring under vm_event maintainership the code that has previously lived in hvm_do_resume(), and then fixes a __context_switch()-related race condition when attempting to set registers via vm_event reply. Previously this has been a

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Razvan Cojocaru
On 05/02/2017 07:11 PM, Andrew Cooper wrote: > On 02/05/17 17:02, Tim Deegan wrote: >> At 18:21 +0300 on 02 May (1493749307), Razvan Cojocaru wrote: >>> hvm_save_cpu_ctxt() returns success without writing any data into >>> hvm_domain_context_t when all VCPUs are o

Re: [Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Razvan Cojocaru
t;> (XEN) >> (XEN) Pagetable walk from 830492cbb447: >> (XEN) L4[0x106] = dbc36063 >> (XEN) L3[0x012] = ffff >> (XEN) >> (XEN) >> (XEN) Panic on CPU 5: >> (XEN) FATAL P

[Xen-devel] [PATCH V2] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Razvan Cojocaru
ff830492cbb447 (XEN) Reported-by: Razvan Cojocaru <rcojoc...@bitdefender.com> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Razvan Cojocaru <rcojoc...@bitdefender.com> Tested-by: Razvan Cojocaru <rcojoc...@bitdefender.com>

Re: [Xen-devel] [PATCH] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Razvan Cojocaru
On 05/02/17 17:09, Jan Beulich wrote: On 02.05.17 at 15:54, wrote: >> On 05/02/17 16:48, Jan Beulich wrote: >> On 02.05.17 at 15:25, wrote: --- a/xen/common/hvm/save.c +++ b/xen/common/hvm/save.c @@ -113,7 +113,7 @@

Re: [Xen-devel] [PATCH] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Razvan Cojocaru
On 05/02/17 16:48, Jan Beulich wrote: On 02.05.17 at 15:25, wrote: >> hvm_save_cpu_ctxt() does a memset(, 0, sizeof(ctxt)), which >> can lead to ctxt.cur being 0. This can then crash the hypervisor >> (with FATAL PAGE FAULT) in hvm_save_one() via the >> "off <

Re: [Xen-devel] [PATCH] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Razvan Cojocaru
On 05/02/17 16:41, Tim Deegan wrote: > Hi, > > At 16:25 +0300 on 02 May (1493742339), Razvan Cojocaru wrote: >> hvm_save_cpu_ctxt() does a memset(, 0, sizeof(ctxt)), which >> can lead to ctxt.cur being 0. This can then crash the hypervisor >> (with FATAL PAGE F

[Xen-devel] [PATCH] xen/hvm: fix hypervisor crash with hvm_save_one()

2017-05-02 Thread Razvan Cojocaru
5: (XEN) FATAL PAGE FAULT (XEN) [error_code=] (XEN) Faulting linear address: 830492cbb447 (XEN) Reported-by: Razvan Cojocaru <rcojoc...@bitdefender.com> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Razvan Cojo

Re: [Xen-devel] [RFC PATCH 4/4] arm/mem_access: Add software guest-page-table walk

2017-05-01 Thread Razvan Cojocaru
n might fail, as gva_to_ipa uses the > guest's translation tables, access to which might be restricted by the > active VTTBR. To address this issue, we perform the gva to ipa > translation in software. > > Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> &g

Re: [Xen-devel] [PATCH] x86/vm_event: fix race between vmx_vmexit_handler() and vm_event_resume()

2017-04-28 Thread Razvan Cojocaru
On 04/28/2017 09:25 AM, Jan Beulich wrote: On 27.04.17 at 19:31, wrote: >> On 27/04/17 09:52, Jan Beulich wrote: >> On 27.04.17 at 10:34, wrote: On 27/04/2017 09:01, Jan Beulich wrote: On 27.04.17 at 09:22,

Re: [Xen-devel] [PATCH] x86/vm_event: fix race between vmx_vmexit_handler() and vm_event_resume()

2017-04-27 Thread Razvan Cojocaru
On 04/27/17 12:00, Jan Beulich wrote: On 27.04.17 at 10:34, wrote: >> On 04/27/17 11:18, Jan Beulich wrote: >> On 27.04.17 at 10:11, wrote: On 04/27/17 11:01, Jan Beulich wrote: On 27.04.17 at 09:22,

Re: [Xen-devel] [PATCH] x86/vm_event: fix race between vmx_vmexit_handler() and vm_event_resume()

2017-04-27 Thread Razvan Cojocaru
On 04/27/17 11:18, Jan Beulich wrote: On 27.04.17 at 10:11, wrote: >> On 04/27/17 11:01, Jan Beulich wrote: >> On 27.04.17 at 09:22, wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -473,6 +473,39 @@

Re: [Xen-devel] [PATCH] x86/vm_event: fix race between vmx_vmexit_handler() and vm_event_resume()

2017-04-27 Thread Razvan Cojocaru
On 04/27/17 11:01, Jan Beulich wrote: On 27.04.17 at 09:22, wrote: >> The introspection agent can reply to a vm_event faster than >> vmx_vmexit_handler() can complete in some cases, where it is then >> not safe for vm_event_set_registers() to modify

[Xen-devel] [PATCH] x86/vm_event: fix race between vmx_vmexit_handler() and vm_event_resume()

2017-04-27 Thread Razvan Cojocaru
ent). Signed-off-by: Razvan Cojocaru <rcojoc...@bitdefender.com> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- xen/arch/x86/hvm/hvm.c | 35 +++ xen/arch/x86/vm_event.c| 22 ++ xen/common/vm_event.

Re: [Xen-devel] [PATCH v2 3/4] VMX: don't blindly enable descriptor table exiting control

2017-04-18 Thread Razvan Cojocaru
being different than in v1. Acked-by: Razvan Cojocaru <rcojoc...@bitdefender.com> Thanks, Razvan ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 2/2] tools: Use POSIX signal.h instead of sys/signal.h

2017-04-18 Thread Razvan Cojocaru
inepubs/009695399/functions/signal.html >> >> This removes the warning: >> #warning redirecting incorrect #include to >> when building with the musl C-library. >> >> Signed-off-by: Alistair Francis <alistair.fran...@xilinx.com> > > Acked-by: Wei Liu <w

  1   2   3   4   5   6   7   8   9   >