Re: [Xen-devel] [PATCH v12 03/11] x86/hvm: Introduce hvm_save_cpu_ctxt_one func

2018-07-17 Thread Isaila Alexandru
On Lu, 2018-07-16 at 15:29 +, Paul Durrant wrote: > > > > -Original Message- > > From: Alexandru Isaila [mailto:aisa...@bitdefender.com] > > Sent: 16 July 2018 15:55 > > To: xen-de...@lists.xen.org > > Cc: Ian Jackson ; Wei Liu > com>; > > jbeul...@suse.com; Andrew Cooper ; Paul > > D

[Xen-devel] PING: [PATCH v3] x86/mm: Add mem access rights to NPT

2018-07-17 Thread Isaila Alexandru
Any thoughts on this patch are appreciated. Thanks,  Alex   On Lu, 2018-07-02 at 15:42 +0300, Alexandru Isaila wrote: > From: Isaila Alexandru > > This patch adds access rights for the NPT pages. The access rights > are > saved in a radix tree with the root saved in p2m_domain. T

Re: [Xen-devel] [PATCH v12 03/11] x86/hvm: Introduce hvm_save_cpu_ctxt_one func

2018-07-17 Thread Isaila Alexandru
On Ma, 2018-07-17 at 08:03 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 17.07.18 at 14:25, wrote: > > On Lu, 2018-07-16 at 15:29 +, Paul Durrant wrote: > > > > > > > > > > > From: Alexandru Isaila [mailto:aisa...@bitdefender.com] > > > > Sent: 16 July 2018 15:55 > > > > --- a/xe

Re: [Xen-devel] [PATCH v3] x86/mm: Add mem access rights to NPT

2018-07-19 Thread Isaila Alexandru
On Mi, 2018-07-18 at 15:33 +, George Dunlap wrote: > > > > > On Jul 2, 2018, at 8:42 AM, Alexandru Isaila > om> wrote: > > > > From: Isaila Alexandru > > > > This patch adds access rights for the NPT pages. The access rights > > a

Re: [Xen-devel] [PATCH v3] x86/mm: Add mem access rights to NPT

2018-07-19 Thread Isaila Alexandru
On Jo, 2018-07-19 at 04:02 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 19.07.18 at 10:43, wrote: > > On 07/19/2018 11:30 AM, Jan Beulich wrote: > > > > > > > > > > > > > > > > > > > > > > > > On 19.07.18 at 10:18, wrote: > > > > On Mi, 2018-07-18 at 15:33 +, George Dunlap wr

Re: [Xen-devel] [PATCH v3] x86/mm: Add mem access rights to NPT

2018-07-20 Thread Isaila Alexandru
> I will absolutely nack any interface where if the caller says, > "Please > remove read permission", the hypervisor says, "OK!" but then allows > read > permission anyway -- particularly in one which is allegedly designed > for > security tools. > > If it's not practical / more work than it's wor

Re: [Xen-devel] [PATCH v4] x86/mm: Add mem access rights to NPT

2018-07-25 Thread Isaila Alexandru
> > > > +static void p2m_set_access(struct p2m_domain *p2m, unsigned long > > gfn, > > +  p2m_access_t a) > > +{ > > +int rc; > > + > > +if ( !p2m->mem_access_settings ) > > +return; > No error indication? I would say ASSERT is a better choice i

Re: [Xen-devel] [PATCH v4] x86/mm: Add mem access rights to NPT

2018-07-25 Thread Isaila Alexandru
On Mi, 2018-07-25 at 03:14 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 25.07.18 at 10:29, wrote: > > > > > > > > +static void p2m_set_access(struct p2m_domain *p2m, unsigned > > > > long > > > > gfn, > > > > +  p2m_access_t a) > > > > +{ > > > > +

Re: [Xen-devel] [PATCH v14 08/11] x86/hvm: Add handler for save_one funcs

2018-07-31 Thread Isaila Alexandru
On Ma, 2018-07-31 at 06:34 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 25.07.18 at 14:14, wrote: > > --- a/xen/arch/x86/hvm/save.c > > +++ b/xen/arch/x86/hvm/save.c > > @@ -85,16 +85,18 @@ int arch_hvm_load(struct domain *d, struct > > hvm_save_header *hdr) > >  /* List of handlers f

Re: [Xen-devel] [PATCH v14 10/11] x86/hvm: Remove redundant save functions

2018-07-31 Thread Isaila Alexandru
On Ma, 2018-07-31 at 07:24 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 25.07.18 at 14:14, wrote: > > --- a/xen/arch/x86/hvm/hpet.c > > +++ b/xen/arch/x86/hvm/hpet.c > > @@ -516,8 +516,9 @@ static const struct hvm_mmio_ops hpet_mmio_ops > > = { > >  }; > >   > >   > > -static int hpet

Re: [Xen-devel] [PATCH v14 08/11] x86/hvm: Add handler for save_one funcs

2018-07-31 Thread Isaila Alexandru
On Ma, 2018-07-31 at 07:32 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 31.07.18 at 14:55, wrote: > > On Ma, 2018-07-31 at 06:34 -0600, Jan Beulich wrote: > > > > > > > > > > > > > > > > > > > > > > > > On 25.07.18 at 14:14, wrote: > > > > --- a/xen/arch/x86/hvm/vlapic.c > > > >

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

2018-08-01 Thread Isaila Alexandru
On Ma, 2018-07-31 at 07:08 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 25.07.18 at 14:14, wrote: > > This patch is focused on moving the for loop to the caller so > > now we can save info for a single vcpu instance with the save_one > > handlers. > > > > Signed-off-by: Alexandru Isa

Re: [Xen-devel] [PATCH v14 06/11] x86/hvm: Introduce hvm_save_mtrr_msr_one func

2018-08-01 Thread Isaila Alexandru
On Ma, 2018-07-31 at 06:16 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 25.07.18 at 14:14, wrote: > > This is used to save data from a single instance. > > > > Signed-off-by: Alexandru Isaila > > > > --- > > Changes since v11: > > - hvm_save_mtrr_msr() now returns err from > >

Re: [Xen-devel] [PATCH v15 09/14] x86/hvm: Introduce lapic_save_regs_one func

2018-08-07 Thread Isaila Alexandru
On Ma, 2018-08-07 at 06:09 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 03.08.18 at 15:53, wrote: > > This is used to save data from a single instance. > > > > Signed-off-by: Alexandru Isaila > > --- > >  xen/arch/x86/hvm/vlapic.c | 27 +++ > >  1 file changed

Re: [Xen-devel] [PATCH v15 06/14] x86/hvm: Introduce hvm_save_mtrr_msr_one func

2018-08-07 Thread Isaila Alexandru
> > > > > -hvm_get_guest_pat(v, &hw_mtrr.msr_pat_cr); > > +memcpy(hw_mtrr.msr_mtrr_fixed, mtrr_state->fixed_ranges, > > NUM_FIXED_MSR); > You want to BUILD_BUG_ON() array sizes differing, and then use > sizeof() in the call to memcpy(). > In this case sizes are different: msr_mtrr_fi

Re: [Xen-devel] [PATCH v4] x86/mm: Add mem access rights to NPT

2018-08-09 Thread Isaila Alexandru
On Mi, 2018-07-25 at 04:37 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 25.07.18 at 11:25, wrote: > > On 07/24/2018 01:02 PM, Jan Beulich wrote: > > > > > > > > > > > > > > > > > > > > > > > > On 24.07.18 at 13:26, wrote: > > > > On 07/24/2018 09:55 AM, Jan Beulich wrote: > > > >

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

2018-08-22 Thread Isaila Alexandru
On Mi, 2018-08-22 at 16:41 +0200, Roger Pau Monné wrote: > On Wed, Aug 22, 2018 at 05:02:43PM +0300, Alexandru Isaila wrote: > > > > This patch is focused on moving changing hvm_save_one() to save one > > typecode from one vcpu and now that the save functions get data > > from a > > single vcpu we

Re: [Xen-devel] [PATCH v17 12/13] x86/hvm: Remove redundant save functions

2018-08-22 Thread Isaila Alexandru
> >   > > -if ( handler(d, h) != 0 ) > > +if ( handler(d->vcpu[0], h) != 0 ) > >  { > >  printk(XENLOG_G_ERR > > -   "HVM%d save: failed to save type > > %"PRIu16"\n", > > +   "HVM d%d save: failed to save t

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

2018-08-29 Thread Isaila Alexandru
On Mi, 2018-08-22 at 18:15 +0300, Isaila Alexandru wrote: > On Mi, 2018-08-22 at 16:41 +0200, Roger Pau Monné wrote: > > > > On Wed, Aug 22, 2018 at 05:02:43PM +0300, Alexandru Isaila wrote: > > > > > > > > > This patch is focused on moving

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

2018-08-31 Thread Isaila Alexandru
On Mi, 2018-08-29 at 08:13 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 29.08.18 at 16:02, wrote: > > On Mi, 2018-08-22 at 18:15 +0300, Isaila Alexandru wrote: > > > > > > On Mi, 2018-08-22 at 16:41 +0200, Roger Pau

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

2018-09-03 Thread Isaila Alexandru
On Lu, 2018-09-03 at 16:36 +0200, Roger Pau Monné wrote: > On Fri, Aug 31, 2018 at 04:56:21PM +0300, Isaila Alexandru wrote: > > > > On Mi, 2018-08-29 at 08:13 -0600, Jan Beulich wrote: > > > > > > > > > > > > > > > > > &

Re: [Xen-devel] [PATCH v18 00/13] x86/domctl: Save info for one vcpu instance

2018-09-07 Thread Isaila Alexandru
On Fri, 2018-09-07 at 03:48 -0600, Jan Beulich wrote: > > > > On 03.09.18 at 15:14, wrote: > > > > This patch series addresses the ideea of saving data from a single > > vcpu instance. > > First it starts by adding *save_one functions, then it introduces a > > handler for the > > new save_one* fu

Re: [Xen-devel] [PATCH v18 12/13] x86/hvm: Remove redundant save functions

2018-09-07 Thread Isaila Alexandru
On Fri, 2018-09-07 at 03:43 -0600, Jan Beulich wrote: > > > > On 03.09.18 at 15:14, wrote: > > > > This patch removes the redundant save functions and renames the > > save_one* to save. It then changes the domain param to vcpu in the > > save funcs and adapts print messages in order to match the

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

2018-09-10 Thread Isaila Alexandru
On Mon, 2018-09-10 at 07:25 -0600, Jan Beulich wrote: > > > > On 10.09.18 at 14:36, wrote: > > > > --- a/xen/arch/x86/hvm/save.c > > +++ b/xen/arch/x86/hvm/save.c > > @@ -155,6 +155,11 @@ int hvm_save_one(struct domain *d, unsigned > > int typecode, unsigned int instance, > > if ( !ctxt.data

Re: [Xen-devel] [PATCH v19 12/13] x86/hvm: Remove redundant save functions

2018-09-10 Thread Isaila Alexandru
On Mon, 2018-09-10 at 15:36 +0300, Alexandru Isaila wrote: > This patch removes the redundant save functions and renames the > save_one* to save. It then changes the domain param to vcpu in the > save funcs and adapts print messages in order to match the format of > the > other save related message

Re: [Xen-devel] [PATCH v19 12/13] x86/hvm: Remove redundant save functions

2018-09-10 Thread Isaila Alexandru
On Mon, 2018-09-10 at 07:42 -0600, Jan Beulich wrote: > > > > On 10.09.18 at 15:33, wrote: > > > > On Mon, 2018-09-10 at 15:36 +0300, Alexandru Isaila wrote: > > > This patch removes the redundant save functions and renames the > > > save_one* to save. It then changes the domain param to vcpu in

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

2018-09-18 Thread Isaila Alexandru
On Thu, 2018-09-13 at 08:17 -0600, Jan Beulich wrote: > > > > On 12.09.18 at 11:47, wrote: > > > > The original version of the patch emulated the current instruction > > (which, as a side-effect, emulated the page-walk as well), however > > we > > need finer-grained control. We want to emulate th

[Xen-devel] Save paused cpu ctx

2018-09-19 Thread Isaila Alexandru
ter Reset" (https://so ftware.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1- 2abcd-3abcd.pdf page 2996). Is this enough to be up streamed? Regards, Isaila Alexandru ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://l

Re: [Xen-devel] Save paused cpu ctx

2018-09-19 Thread Isaila Alexandru
On Wed, 2018-09-19 at 10:41 +0200, Roger Pau Monné wrote: > On Wed, Sep 19, 2018 at 11:21:32AM +0300, Isaila Alexandru wrote: > > Hello, > > > > I want to restart the discussion on dropping the "if ( v- > > >pause_flags & > > VPF_down )" from

Re: [Xen-devel] Save paused cpu ctx

2018-09-19 Thread Isaila Alexandru
On Wed, 2018-09-19 at 03:01 -0600, Jan Beulich wrote: > > > > On 19.09.18 at 10:21, wrote: > > > > I want to restart the discussion on dropping the "if ( v- > > >pause_flags & > > VPF_down )" from hvm_save_cpu_ctxt() and be able to save context in > > a > > vcup down state. The content of the ctx

Re: [Xen-devel] [PATCH v1] x86/hvm: Change return error for offline vcpus

2018-09-20 Thread Isaila Alexandru
On Thu, 2018-09-20 at 07:55 -0600, Jan Beulich wrote: > > > > On 20.09.18 at 14:54, wrote: > > > > --- a/xen/arch/x86/hvm/save.c > > +++ b/xen/arch/x86/hvm/save.c > > @@ -165,7 +165,7 @@ int hvm_save_one(struct domain *d, unsigned int > > typecode, unsigned int instance, > > if ( (rv = hvm_s

Re: [Xen-devel] [PATCH v2] x86/hvm: Change return error for offline vcpus

2018-09-21 Thread Isaila Alexandru
On Fri, 2018-09-21 at 09:44 +0100, Wei Liu wrote: > On Fri, Sep 21, 2018 at 09:43:22AM +0100, Wei Liu wrote: > > On Fri, Sep 21, 2018 at 10:30:30AM +0300, Alexandru Isaila wrote: > > > This patch is needed in order to have a different return error > > > for invalid vcpu > > > and offline vcpu on th

Re: [Xen-devel] [PATCH v2] x86/hvm: Change return error for offline vcpus

2018-09-21 Thread Isaila Alexandru
On Fri, 2018-09-21 at 04:34 -0600, Jan Beulich wrote: > > > > On 21.09.18 at 09:30, wrote: > > > > --- a/xen/arch/x86/hvm/save.c > > +++ b/xen/arch/x86/hvm/save.c > > @@ -165,7 +165,8 @@ int hvm_save_one(struct domain *d, unsigned int > > typecode, unsigned int instance, > > if ( (rv = hvm_s

Re: [Xen-devel] [PATCH v4] x86/mm: Add mem access rights to NPT

2018-09-26 Thread Isaila Alexandru
On Wed, 2018-07-25 at 04:37 -0600, Jan Beulich wrote: > > > > On 25.07.18 at 11:25, wrote: > > > > On 07/24/2018 01:02 PM, Jan Beulich wrote: > > > > > > On 24.07.18 at 13:26, wrote: > > > > > > > > On 07/24/2018 09:55 AM, Jan Beulich wrote: > > > > > > > > On 23.07.18 at 15:48, wrote: > > > >

Re: [Xen-devel] [RFC PATCH 2/2] x86/mm: Add mem access rights to NPT

2018-09-27 Thread Isaila Alexandru
On Wed, 2018-09-26 at 17:47 +0100, George Dunlap wrote: > From: Isaila Alexandru > > This patch adds access control for NPT mode. > > There aren’t enough extra bits to store the access rights in the NPT > p2m > table, so we add a radix tree to store extra information

Re: [Xen-devel] [PATCH] mem_access: Fix npfec.kind propagation

2018-09-27 Thread Isaila Alexandru
On Thu, 2018-09-27 at 12:25 +0100, George Dunlap wrote: > The name of the "with_gla" flag is confusing; it has nothing to do > with the existence or lack thereof of a faulting GLA, but rather > where > the fault originated. The npfec.kind value is always valid, and > should thus be propagated, reg

Re: [Xen-devel] [PATCH V6] x86/altp2m: Hypercall to set altp2m view visibility

2020-03-29 Thread Isaila Alexandru
On 27.03.2020 04:30, Tian, Kevin wrote: From: Isaila Alexandru Sent: Tuesday, March 24, 2020 6:46 PM Hi Kevin and sorry for the long reply time, On 10.03.2020 04:04, sTian, Kevin wrote: From: Alexandru Stefan ISAILA Sent: Tuesday, March 3, 2020 8:23 PM At this moment a guest can call

Re: [PATCH V7] x86/altp2m: Hypercall to set altp2m view visibility

2020-03-31 Thread Isaila Alexandru
On 31.03.2020 10:43, Jan Beulich wrote: On 30.03.2020 08:54, Alexandru Isaila wrote: At this moment a guest can call vmfunc to change the altp2m view. This should be limited in order to avoid any unwanted view switch. The new xc_altp2m_set_visibility() solves this by making views invisible t

Ping: [PATCH V7] x86/altp2m: Hypercall to set altp2m view visibility

2020-04-08 Thread Isaila Alexandru
Hi Kevin, This is a kind reminder if you can have another look at the new version of this patch. Thanks, Alex On 30.03.2020 09:54, Alexandru Isaila wrote: At this moment a guest can call vmfunc to change the altp2m view. This should be limited in order to avoid any unwanted view switch. The

Re: [PATCH V7] x86/altp2m: Hypercall to set altp2m view visibility

2020-04-09 Thread Isaila Alexandru
On 10.04.2020 06:10, Tian, Kevin wrote: diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index a3d115b650..375e9cf368 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -4511,6 +4511,7 @@ static int do_altp2m_op( case HVMOP_altp2m_get_mem_access: case

Re: [PATCH V7] x86/altp2m: Hypercall to set altp2m view visibility

2020-04-09 Thread Isaila Alexandru
Are there any more r-b needed for this patch? Thanks, Alex On 30.03.2020 09:54, Alexandru Isaila wrote: At this moment a guest can call vmfunc to change the altp2m view. This should be limited in order to avoid any unwanted view switch. The new xc_altp2m_set_visibility() solves this by making

Ping: [PATCH V8] x86/altp2m: Hypercall to set altp2m view visibility

2020-04-13 Thread Isaila Alexandru
Hi, I need a review for the tools bits in this patch. Thanks, Alex On 13.04.2020 09:51, Alexandru Isaila wrote: At this moment a guest can call vmfunc to change the altp2m view. This should be limited in order to avoid any unwanted view switch. The new xc_altp2m_set_visibility() solves this b

Re: [Xen-devel] [PATCH] vmevent: reduce include dependencies

2020-03-09 Thread Isaila Alexandru
On 09.03.2020 13:51, Jan Beulich wrote: There's no need for virtually everything to include public/vm_event.h. Move its inclusion out of sched.h. This requires using the non-typedef name in p2m_mem_paging_resume()'s prototype; by not changing the function definition at the same time it'll remai

Re: [Xen-devel] [PATCH V6] x86/altp2m: Hypercall to set altp2m view visibility

2020-03-24 Thread Isaila Alexandru
Hi Kevin and sorry for the long reply time, On 10.03.2020 04:04, sTian, Kevin wrote: From: Alexandru Stefan ISAILA Sent: Tuesday, March 3, 2020 8:23 PM At this moment a guest can call vmfunc to change the altp2m view. This should be limited in order to avoid any unwanted view switch. I lo

Re: [PATCH RFC v2 8/8] evtchn: don't call Xen consumer callback with per-channel lock held

2020-11-03 Thread Isaila Alexandru
Hi Jan and sorry for the late reply, On 20.10.2020 17:13, Jan Beulich wrote: While there don't look to be any problems with this right now, the lock order implications from holding the lock can be very difficult to follow (and may be easy to violate unknowingly). The present callbacks don't (a

Re: [PATCH v3 5/5] evtchn: don't call Xen consumer callback with per-channel lock held

2020-11-30 Thread Isaila Alexandru
On 23.11.2020 15:30, Jan Beulich wrote: While there don't look to be any problems with this right now, the lock order implications from holding the lock can be very difficult to follow (and may be easy to violate unknowingly). The present callbacks don't (and no such callback should) have any nee

Re: [PATCH v2 09/12] x86: make mem-paging configuarable and default it to off for being unsupported

2021-04-12 Thread Isaila Alexandru
On 12.04.2021 17:12, Jan Beulich wrote: CAUTION: This email originated from outside of our organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. While doing so, make the option dependent upon HVM, which really is the main purpose

Re: [PATCH v2 09/12] x86: make mem-paging configuarable and default it to off for being unsupported

2021-04-12 Thread Isaila Alexandru
On 12.04.2021 17:18, Tamas K Lengyel wrote: CAUTION: This email originated from outside of our organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. On Mon, Apr 12, 2021 at 10:12 AM Jan Beulich wrote: While doing so, make the o

Re: [PATCH v2 08/12] x86: mem-access is HVM-only

2021-04-12 Thread Isaila Alexandru
On 12.04.2021 17:10, Jan Beulich wrote: CAUTION: This email originated from outside of our organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. By excluding the file from being built for !HVM, #ifdef-ary can be removed from it.