Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-08 Thread Tim Deegan
Hi, At 12:58 + on 06 Dec (1512565090), Julien Grall wrote: > On 12/06/2017 12:28 PM, George Dunlap wrote: > > 2. It sounds like rather than using PoD, you could use the > > "misconfigured p2m table" technique that x86 uses: set bits in the p2m > > entry which cause a specific kind of HAP fault

Re: [Xen-devel] Ping: [PATCH] x86/mm: drop bogus assertion

2017-12-08 Thread Tim Deegan
omething the hypervisor needs to be concerned about.) Release > > builds work fine, which is a first indication that the assertion isn't > > really needed. Yep, this assertion should just go away, so: Reviewed-by: Tim Deegan > > What's worse though - there appears to be a

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-10 Thread Tim Deegan
At 14:38 + on 08 Dec (1512743913), Julien Grall wrote: > On 08/12/17 08:03, Tim Deegan wrote: > > +1 for avoiding the full majesty of PoD if you don't need it. > > > > It should be possible to do something like the misconfigured-entry bit > > trick by _all

Re: [Xen-devel] [PATCH v8 1/6] x86/domain: remove the 'oos_off' flag

2019-09-03 Thread Tim Deegan
At 15:50 +0100 on 02 Sep (1567439409), Paul Durrant wrote: > The flag is not needed since the domain 'options' can now be tested > directly. > > Signed-off-by: Paul Durrant Acked-by: Tim Deegan ___ Xen-devel

Re: [Xen-devel] [PATCH] x86/shadow: don't enable shadow mode with too small a shadow allocation (part 2)

2019-09-05 Thread Tim Deegan
ng of > log-dirty mode wouldn't have allocated anything further. > > Reported-by: James Wang > Signed-off-by: Jan Beulich Acked-by: Tim Deegan > --- a/xen/arch/x86/mm/shadow/common.c > +++ b/xen/arch/x86/mm/shadow/common.c > @@ -2864,7 +2864,8 @@ static int shadow_one_bi

Re: [Xen-devel] [PATCH] x86/shadow: fold p2m page accounting into sh_min_allocation()

2019-09-11 Thread Tim Deegan
At 10:34 +0200 on 05 Sep (1567679687), Jan Beulich wrote: > This is to make the function live up to the promise its name makes. And > it simplifies all callers. > > Suggested-by: Andrew Cooper > Signed-off-by: Jan Beulich Acked

Re: [Xen-devel] [PATCH v2] x86/shadow: adjust minimum allocation calculations

2019-02-09 Thread Tim Deegan
e_pages() no longer needlessly add 1 to > the vCPU count. > > Finally make the debugging printk() in shadow_alloc_p2m_page() a little > more useful by logging some of the relevant domain settings. > > Reported-by: Roger Pau Monné > Signed-off-by: Jan Beulich > Reviewed-

Re: [Xen-devel] [PATCH] x86/shadow: don't use map_domain_page_global() on paths that may not fail

2019-02-22 Thread Tim Deegan
th (other than again by crashing the guest). > > Signed-off-by: Jan Beulich I follow your argument, so Acked-by: Tim Deegan I would expect this to have a measurable cost on page fault times (on configurations where global map isn't just a directmap). It would be goo

Re: [Xen-devel] [PATCH 0/2] x86/shadow: two tiny further bits of PV/HVM separation

2019-03-11 Thread Tim Deegan
At 10:56 -0600 on 11 Mar (1552301785), Jan Beulich wrote: > 1: sh_validate_guest_pt_write() is HVM-only > 2: sh_{write,cmpxchg}_guest_entry() are PV-only Acked-by: Tim Deegan Thanks, Tim. ___ Xen-devel mailing list Xen-devel@lists.xenproje

Re: [Xen-devel] [PATCH] x86/shadow: Drop incorrect diagnostic when shadowing TSS.RSP0

2019-04-16 Thread Tim Deegan
issue of terminology, to which I defer to Tim to judge. Hi, Sorry for the delay; I have been away. FWIW I prefer the original comment, and I think that referring to the stack as "not yet shadowed" is confusing when the problem might be that the stack itself is indeed shadowed. I'd

Re: [Xen-devel] [PATCH] Fix the KDD_LOG statements to use appropriate format specifier for printing uint64_t

2019-12-01 Thread Tim Deegan
-by: Jenish Rakholiya > Signed-off-by: Julian Tuminaro Acked-by: Tim Deegan Thanks for the fix! Tim. ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH] MAINTAINERS: drop Tim Deegan from 'The Rest'

2019-10-16 Thread Tim Deegan
I have not been active in this role for a while now. Signed-off-by: Tim Deegan --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 533cfdc08f..f60d765baf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -537,7 +537,6 @@ M: Jan Beulich M: Julien

Re: [Xen-devel] [PATCH 1/1] kdd.c: Add support for initial handshake in KD protocol for Win 7, 8 and 10 (64 bit)

2019-11-10 Thread Tim Deegan
Hi, At 21:24 -0500 on 05 Nov (1572989067), Julian Tuminaro wrote: > Current implementation of find_os is based on the hard-coded values for > different Windows version. It uses the value for get the address to > start looking for DOS header in the given specified range. However, this > is not scal

Re: [Xen-devel] [PATCH V2] kdd.c: Add support for initial handshake in KD protocol for Win 7, 8 and 10 (64 bit)

2019-11-14 Thread Tim Deegan
ave the image base, we > search for the DBGKD_GET_VERSION64 structure type in .data section to > get information required for handshake. Thanks for the updates, this looks good! Reviewed-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@list

Re: [Xen-devel] [PATCH] x86/shadow: don't enable shadow mode with too small a shadow allocation

2018-11-30 Thread Tim Deegan
pty, check whether the pool is smaller than what > shadow_set_allocation() would minimally bump it to if it was invoked in > the first place. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan Thanks, Tim. ___ Xen-devel mailing list Xe

Re: [Xen-devel] [PATCH 7/7] tools/kdd: mute spurious gcc warning

2018-04-06 Thread Tim Deegan
Hi, At 16:32 +0200 on 06 Apr (1523032362), Marek Marczykowski-Górecki wrote: > On Fri, Apr 06, 2018 at 09:56:05AM -0400, Boris Ostrovsky wrote: > > Can we instead pre-compute the pointer to pacify the compiler? I haven't > > seen the original error so I can't test it, but something like > > Nope,

Re: [Xen-devel] [PATCH] tools/kdd: use mute -Warray-bounds only on new gcc version

2018-04-07 Thread Tim Deegan
At 00:39 +0200 on 07 Apr (1523061555), Marek Marczykowski-Górecki wrote: > On Fri, Apr 06, 2018 at 06:12:50PM +0100, Wei Liu wrote: > > On Fri, Apr 06, 2018 at 05:32:57PM +0200, Marek Marczykowski-Górecki wrote: > > Oh thanks for the quick turnaround. > > > > Since Tim thinks it is better to not d

Re: [Xen-devel] [PATCH] tools/kdd: silence gcc 8 warning a different way

2018-04-16 Thread Tim Deegan
At 09:29 +0100 on 16 Apr (1523870989), Wei Liu wrote: > Cc Tim > On Thu, Apr 12, 2018 at 06:04:49AM -0600, Jan Beulich wrote: > > Older gcc doesn't like "#pragma GCC diagnostic" inside functions. > > > > Signed-off-by: Jan Beulich > > > > --- a/tools/debugger/kdd/kdd.c > > +++ b/tools/debugger

Re: [Xen-devel] [PATCH v7 1/9] x86/xpti: avoid copying L4 page table contents when possible

2018-04-16 Thread Tim Deegan
Hi, At 02:43 -0600 on 13 Apr (1523587395), Jan Beulich wrote: > >>> On 12.04.18 at 20:09, wrote: > > For mitigation of Meltdown the current L4 page table is copied to the > > cpu local root page table each time a 64 bit pv guest is entered. > > > > Copying can be avoided in cases where the guest

Re: [Xen-devel] [PATCH v8 1/9] x86/xpti: avoid copying L4 page table contents when possible

2018-04-21 Thread Tim Deegan
Hi, At 09:44 +0200 on 19 Apr (1524131080), Juergen Gross wrote: > >> So either I'm adding some kind of locking/rcu, or I'm switching to use > >> IPIs and access root_pgt_changed only locally. > >> > >> Do you have any preference? > > > > Since issuing an IPI is just a single call, I'd prefer not

Re: [Xen-devel] [PATCH v8 1/9] x86/xpti: avoid copying L4 page table contents when possible

2018-04-22 Thread Tim Deegan
At 19:11 +0200 on 21 Apr (1524337893), Juergen Gross wrote: > On 21/04/18 15:32, Tim Deegan wrote: > > At 09:44 +0200 on 19 Apr (1524131080), Juergen Gross wrote: > >> Another alternative would be to pass another flag to the callers to > >> signal the need for a flus

Re: [Xen-devel] [PATCH v8 1/9] x86/xpti: avoid copying L4 page table contents when possible

2018-04-24 Thread Tim Deegan
At 07:45 +0200 on 23 Apr (1524469545), Juergen Gross wrote: > On 22/04/18 18:39, Tim Deegan wrote: > > At 19:11 +0200 on 21 Apr (1524337893), Juergen Gross wrote: > >> On 21/04/18 15:32, Tim Deegan wrote: > >>> At 09:44 +0200 on 19 Apr (1524131080), Juergen Gross wro

Re: [Xen-devel] [PATCH v9 1/9] x86/xpti: avoid copying L4 page table contents when possible

2018-04-26 Thread Tim Deegan
improvement: > > - real time drops from 112 seconds to 103 seconds > - system time drops from 142 seconds to 131 seconds > > Signed-off-by: Juergen Gross > Reviewed-by: Jan Beulich Acked-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2 07/10] xen/arm: Release maintenance interrupt when CPU is hot-unplugged

2018-04-26 Thread Tim Deegan
At 11:08 +0100 on 26 Apr (1524740921), Julien Grall wrote: > On 20/04/18 13:25, Mirela Simonovic wrote: > >> This looks a bit weird. AFAIU, if you disable the CPU interface, then you > >> should never receive interrupt after. So why would you re-enable them? > >> > >> I realize the code in __c

Re: [Xen-devel] [PATCH v2 07/10] xen/arm: Release maintenance interrupt when CPU is hot-unplugged

2018-04-27 Thread Tim Deegan
Hi, At 10:28 +0100 on 27 Apr (1524824906), Julien Grall wrote: > On 26/04/18 15:23, Tim Deegan wrote: > > At 11:08 +0100 on 26 Apr (1524740921), Julien Grall wrote: > >>>>>> On 20/04/18 13:25, Mirela Simonovic wrote: > >>>> This looks a bit weird. AFAI

Re: [Xen-devel] [PATCH v1 2/2] Replace occurances of xen.org with xenproject.org

2018-04-27 Thread Tim Deegan
At 10:40 +0100 on 27 Apr (1524825602), Wei Liu wrote: > On Fri, Apr 27, 2018 at 10:30:51AM +0100, Lars Kurth wrote: > > KDD DEBUGGER > > -M: Tim Deegan > > +M: Tim Deegan > > I think Tim should choose which domain name he prefers. I would prefer to keep using @

Re: [Xen-devel] [PATCH v6 3/9] x86/mm: add disallow_mask parameter to get_page_from_l1e

2018-03-19 Thread Tim Deegan
At 09:54 -0600 on 13 Mar (1520934871), Jan Beulich wrote: > >>> On 13.02.18 at 21:04, wrote: > > --- a/xen/arch/x86/mm/shadow/multi.c > > +++ b/xen/arch/x86/mm/shadow/multi.c > > @@ -858,13 +858,21 @@ shadow_get_page_from_l1e(shadow_l1e_t sl1e, struct > > domain *d, p2m_type_t type) > > int

Re: [Xen-devel] [for-4.11][PATCH v6 16/16] xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN

2018-03-22 Thread Tim Deegan
i Liu > Acked-by: Jan Beulich > Reviewed-by: George Dunlap Thought I'd already acked this for the shadow code, but clearly not. Sorry for the delay, and: Acked-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 07/16] x86/shadow: fetch CPL just once in sh_page_fault()

2018-07-11 Thread Tim Deegan
r compiler problems, but I think the > change here is worthwhile nevertheless. > > Signed-off-by: Jan Beulich I don't quite follow what the compiler bug does here -- it would be nice to say what effect it has on the final code. In any case, the code change is fine. Reviewed-by: T

Re: [Xen-devel] [PATCH 6/6] x86/shadow: a little bit of style cleanup

2018-07-23 Thread Tim Deegan
At 04:51 -0600 on 19 Jul (1531975863), Jan Beulich wrote: > Correct indentation of a piece of code, adjusting comment style at the > same time. Constify gl3e pointers and drop a bogus (and useless once > corrected) cast. > > Signed-off-by: Jan Beulich Acked

Re: [Xen-devel] [PATCH 3/6] x86/HVM: implement memory read caching

2018-07-23 Thread Tim Deegan
plementation for now: Only exact matches are satisfied (no overlaps or > partial reads or anything). > > Signed-off-by: Jan Beulich For the change to shadow code: Acked-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xenproject.

Re: [Xen-devel] [PATCH RFC] tools/kdd: avoid adversarial optimisation hazard

2018-08-03 Thread Tim Deegan
Hi, Apologies for the delay. Several of my other hats were on fire. > > I suspect the address, from which offset is derived, is bounded. But I > > haven't found the spec for KD. > > I don’t think there is one. Indeed not. The official way to extend windbg &c is to write a plugin that runs on

Re: [Xen-devel] [PATCH 9/9] x86/vmx: Don't leak EFER.NXE into guest context

2018-05-24 Thread Tim Deegan
e > intercept all writes to CR0 and reads from MSR_EFER, so can provide > architecturally consistent behaviour from the guests point of view. > > As a result of fixing EFER context switching, we can remove the Intel-special > case from hvm_nx_enabled

Re: [Xen-devel] [PATCH] tools/kdd: alternative way of muting spurious gcc warning

2018-05-24 Thread Tim Deegan
s only anyway), which apparently also avoid gcc complaining about > > this (otherwise correct) code. > > > > Fixes 437e00fea04becc91c1b6bc1c0baa636b067a5cc "tools/kdd: mute spurious > > gcc warning" > > > > Signed-off-by: Marek Marczykowski-G

Re: [Xen-devel] [PATCH 0/6] x86/mm: Minor non-functional cleanup

2018-08-16 Thread Tim Deegan
opriate conversion functions > x86/shadow: Switch shadow_domain.has_fast_mmio_entries to bool > x86/shadow: Use MASK_* helpers for the MMIO fastpath PTE manipulation > x86/shadow: Clean up the MMIO fastpath helpers > x86/shadow: Use mfn_t in shadow_track_dirty_vram() Reviewed

Re: [Xen-devel] [PATCH 25/34] x86/mm/shadow: make it build with !CONFIG_HVM

2018-08-23 Thread Tim Deegan
gt; Signed-off-by: Wei Liu Reviewed-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 26/34] x86/mm/shadow: split out HVM only code

2018-08-23 Thread Tim Deegan
. > > Signed-off-by: Wei Liu Reviewed-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] x86/mm: Drop {HAP,SHADOW}_ERROR() wrappers

2018-08-30 Thread Tim Deegan
essary (bad shadow op, and the empty > stubs for incorrect sh_map_and_validate_gl?e() calls). > > Signed-off-by: Andrew Cooper Acked-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Ping: [PATCH] x86: improve vCPU selection in pagetable_dying()

2018-10-03 Thread Tim Deegan
At 17:56 +0100 on 03 Oct (1538589366), George Dunlap wrote: > On 09/26/2018 08:04 AM, Jan Beulich wrote: > > Looking at things again (in particular > > the comment ahead of pagetable_dying()) I now actually wonder why > > HVMOP_pagetable_dying is permitted to be called by other than a domain > > fo

Re: [Xen-devel] [PATCH 18/18] tools/debugger/kdd: Install as `xen-kdd', not just `kdd'

2018-10-07 Thread Tim Deegan
At 18:29 +0100 on 05 Oct (1538764157), Ian Jackson wrote: > `kdd' is an unfortunate namespace landgrab. Bah, humbug, etc. :) Can we have a note in the changelog for the next release to warn the few kdd users that we've done this? > Signed-off-by: Ian Jackson Acked-by: Tim

Re: [Xen-devel] [PATCH v3 25/25] x86/shadow: fold sh_x86_emulate_{write, cmpxchg}() into their only callers

2018-02-05 Thread Tim Deegan
Hi, At 01:42 -0700 on 05 Feb (1517794959), Jan Beulich wrote: > >>> On 02.02.18 at 17:52, wrote: > > On 07/12/17 14:19, Jan Beulich wrote: > >> +case 1: prev = cmpxchg((uint8_t *)ptr, old, new); break; > >> +case 2: prev = cmpxchg((uint16_t *)ptr, old, new); break; > >> +case 4: prev

Re: [Xen-devel] [PATCH v4 15/20] x86emul: correctly handle CMPXCHG* comparison failures

2018-02-28 Thread Tim Deegan
MUL_CMPXCHG_FAILED"), albeit with X86EMUL_CMPXCHG_FAILED now > becoming a value distinct from X86EMUL_RETRY. > > Signed-off-by: Jan Beulich > Acked-by: Andrew Cooper Shadow parts Acked-by: Tim Deegan And also for the other parts of the series (13/20, 19/20 and 20/20). Tim. ___

Re: [Xen-devel] [PATCH 5/3] x86/shadow: emulate_gva_to_mfn() should respect p2m_ioreq_server

2018-11-14 Thread Tim Deegan
At 04:22 -0700 on 13 Nov (1542082936), Jan Beulich wrote: > >>> On 13.11.18 at 11:59, wrote: > >> Subject: [PATCH 5/3] x86/shadow: emulate_gva_to_mfn() should respect > >> p2m_ioreq_server > >> > >> Writes to such pages would need to be handed to the emulator, which we're > >> not prepared to do

Re: [Xen-devel] [PATCH 5/3] x86/shadow: emulate_gva_to_mfn() should respect p2m_ioreq_server

2018-11-14 Thread Tim Deegan
At 12:44 + on 14 Nov (1542199496), Paul Durrant wrote: > > -Original Message- > > From: Tim Deegan [mailto:t...@xen.org] > > Sent: 14 November 2018 12:42 > > To: Jan Beulich > > Cc: Paul Durrant ; Andrew Cooper > > ; Wei Liu ; xen-devel > >

Re: [Xen-devel] [PATCH v2 3/3] x86/shadow: emulate_gva_to_mfn() should respect p2m_ioreq_server

2018-11-15 Thread Tim Deegan
At 05:51 -0700 on 15 Nov (1542261108), Jan Beulich wrote: > Writes to such pages need to be handed to the emulator. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xenproject.

Re: [Xen-devel] [PATCH] x86/shadow: un-hide "full" auditing code

2018-11-20 Thread Tim Deegan
ed; the prior code structure suggests that this > was originally intended anyway. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan Thanks! Tim. ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] x86/shadow: make 1-bit-disable match 1-bit-enable

2017-12-20 Thread Tim Deegan
> Signed-off-by: Jan Beulich Acked-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 1/6] x86/shadow: drop further 32-bit relics

2017-12-20 Thread Tim Deegan
x27;s > a good chance that further cleanup opportunity exists, which I simply > didn't notice). > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan > I'm not sure if all the ASSERT()s are really useful to have. They seem good to me. Tim. _

Re: [Xen-devel] [PATCH 2/6] x86/shadow: remove pointless loops over all vCPU-s

2017-12-20 Thread Tim Deegan
At 08:05 -0700 on 12 Dec (1513065939), Jan Beulich wrote: > The vCPU count can be had more directly. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan > In the sh_make_shadow() case the question is whether it really was > intended to count all vCPU-s, rather than e.g. only

Re: [Xen-devel] [PATCH 4/6] x86/shadow: widen reference count

2017-12-20 Thread Tim Deegan
At 08:07 -0700 on 12 Dec (1513066056), Jan Beulich wrote: > Utilize as many of the bits available in the union as possible, without > (just to be on the safe side) colliding with any of the bits outside of > PGT_type_mask. > > Signed-off-by: Jan Beulich Acked

Re: [Xen-devel] [PATCH 3/6] x86/shadow: ignore sh_pin() failure in one more case

2017-12-20 Thread Tim Deegan
t; Suggested-by: Tim Deegan > Signed-off-by: Jan Beulich Reviewed-by: Tim Deegan > Would it be worth making sh_pin() return void, by adding a bool > parameter which the other call site in sh_set_toplevel_shadow() could > use to indicate a ref is avalable to be used (instead of a

Re: [Xen-devel] [PATCH 5/6] x86/mm: clean up SHARED_M2P{, _ENTRY} uses

2017-12-20 Thread Tim Deegan
> Signed-off-by: Jan Beulich Acked-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 6/6] x86: use paging_mark_pfn_dirty()

2017-12-20 Thread Tim Deegan
At 08:09 -0700 on 12 Dec (1513066153), Jan Beulich wrote: > ... in preference over paging_mark_dirty(), when the PFN is known > anyway. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xe

Re: [PATCH 0/2] x86/mm: {paging,sh}_{cmpxchg,write}_guest_entry() adjustments

2020-10-03 Thread Tim Deegan
At 13:56 +0200 on 28 Sep (1601301371), Jan Beulich wrote: > 1: {paging,sh}_{cmpxchg,write}_guest_entry() cannot fault > 2: remove some indirection from {paging,sh}_cmpxchg_guest_entry() Acked-by: Tim Deegan

Re: [PATCH 04/10] x86/shadow: sh_update_linear_entries() is a no-op for PV

2020-04-18 Thread Tim Deegan
At 16:26 +0200 on 17 Apr (1587140817), Jan Beulich wrote: > Consolidate the shadow_mode_external() in here: Check this once at the > start of the function. > > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/mm/shadow/multi.c > +++ b/xen/arch/x86/mm/shadow/multi.c > @@ -3707,34 +3707,30 @@ sh_

Re: [PATCH 07/10] x86/shadow: the guess_wrmap() hook is needed for HVM only

2020-04-18 Thread Tim Deegan
At 16:28 +0200 on 17 Apr (1587140897), Jan Beulich wrote: > sh_remove_write_access() bails early for !external guests, and hence its > building and thus the need for the hook can be suppressed altogether in > !HVM configs. > > Signed-off-by: Jan Beulich > @@ -366,6 +367,14 @@ int sh_validate_gue

Re: [PATCH 00/10] x86: mm (mainly shadow) adjustments

2020-04-18 Thread Tim Deegan
At 16:23 +0200 on 17 Apr (1587140581), Jan Beulich wrote: > Large parts of this series are to further isolate pieces which > are needed for HVM only, and hence would better not be built > with HVM=n. But there are also a few other items which I've > noticed along the road. Ack

Re: [PATCH 07/10] x86/shadow: the guess_wrmap() hook is needed for HVM only

2020-04-20 Thread Tim Deegan
At 15:06 +0200 on 20 Apr (1587395210), Jan Beulich wrote: > On 18.04.2020 11:03, Tim Deegan wrote: > > At 16:28 +0200 on 17 Apr (1587140897), Jan Beulich wrote: > >> sh_remove_write_access() bails early for !external guests, and hence its > >> building and thus t

Re: [PATCH] x86/shadow: make sh_remove_write_access() helper HVM only

2020-04-21 Thread Tim Deegan
map() hook is needed for HVM > only") > Reported-by: Andrew Cooper > Signed-off-by: Jan Beulich Acked-by: Tim Deegan

Re: [PATCH v2 2/4] x86/shadow: sh_update_linear_entries() is a no-op for PV

2020-04-21 Thread Tim Deegan
At 11:11 +0200 on 21 Apr (1587467497), Jan Beulich wrote: > Consolidate the shadow_mode_external() in here: Check this once at the > start of the function. > > Signed-off-by: Jan Beulich > Acked-by: Andrew Cooper > Acked-by: Tim Deegan > --- > v2: Delete stale part

Re: [PATCH v11 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-28 Thread Tim Deegan
t; switch_cr3_cr4, as it's not clear whether code could rely on > > > switch_cr3_cr4 also performing a guest linear TLB flush. A following > > > patch can remove the ASID/VPID tickle from switch_cr3_cr4 if found to > > > not be necessary. > > > > > > Signed-off-by: Roger Pau Monné > > > > Reviewed-by: Jan Beulich > > Tim, ICYMI, this patch needs your ack. Sorry! Thanks for the reminder. Acked-by: Tim Deegan

Re: [PATCH] x86/traps: Rework #PF[Rsvd] bit handling

2020-05-20 Thread Tim Deegan
At 18:09 +0200 on 19 May (1589911795), Jan Beulich wrote: > static inline int sh_type_has_up_pointer(struct domain *d, unsigned int t) > { > /* Multi-page shadows don't have up-pointers */ > if ( t == SH_type_l1_32_shadow > || t == SH_type_fl1_32_shadow > || t == SH_type_l

Re: [Xen-devel] [PATCH v9 0/4] purge free_shared_domheap_page()

2020-02-07 Thread Tim Deegan
At 09:17 + on 06 Feb (1580980664), Durrant, Paul wrote: > > -Original Message- > > From: Jan Beulich > > On 06.02.2020 09:28, Durrant, Paul wrote: > > >> xen/arch/x86/mm/shadow/common.c | 2 +- > George, Julien, Tim, > > Can I have acks or o

Re: [Xen-devel] [PATCH v4 2/7] x86/paging: add TLB flush hooks

2020-02-13 Thread Tim Deegan
patches that will add implementation specific optimizations to > them. > > No functional change intended. > > Signed-off-by: Roger Pau Monné > Reviewed-by: Wei Liu Acked-by: Tim Deegan ___ Xen-devel mailing list Xen-de

Re: [Xen-devel] [PATCH v4 2/7] x86/paging: add TLB flush hooks

2020-02-13 Thread Tim Deegan
At 09:02 + on 13 Feb (1581584528), Tim Deegan wrote: > At 18:28 +0100 on 10 Feb (1581359304), Roger Pau Monne wrote: > > Add shadow and hap implementation specific helpers to perform guest > > TLB flushes. Note that the code for both is exactly the same at the > > momen

Re: [Xen-devel] [PATCH v4 4/7] x86/tlb: introduce a flush guests TLB flag

2020-02-13 Thread Tim Deegan
s behavior. I haven't looked at each specific > shadow code TLB flush in order to figure out whether it actually > requires a guest TLB flush or not, so there might be room for > improvement in that regard. > > Signed-off-by: Roger Pau Monné > Reviewed-by: Wei Liu Acked-by: Ti

Re: [PATCH v3 2/3] x86/shadow: refactor shadow_vram_{get,put}_l1e()

2020-10-29 Thread Tim Deegan
here > sensible / possible. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan

Re: [PATCH v3 3/3] x86/shadow: sh_{make,destroy}_monitor_table() are "even more" HVM-only

2020-10-29 Thread Tim Deegan
type dropped in 8d7b633adab7 ("x86/mm: > Consolidate all Xen L4 slot writing into init_xen_l4_slots()"), which > gets done here as well. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan > TBD: In principle both functions could have their first parameter > c

Re: [PATCH 2/5] x86/p2m: collapse the two ->write_p2m_entry() hooks

2020-10-29 Thread Tim Deegan
an directly use struct p2m_domain's. This merely requires (from a > strictly formal pov; in practice this may not even be needed) making > sure we don't end up using safe_write_pte() for nested P2Ms. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan

Re: [PATCH 5/5] x86/p2m: split write_p2m_entry() hook

2020-10-29 Thread Tim Deegan
Beulich This seems like a good approach to me. I'm happy with the shadow parts but am not confident enough on nested p2m any more to have an opinion on that side. Acked-by: Tim Deegan

Re: [PATCH] x86/shadow: correct GFN use by sh_unshadow_for_p2m_change()

2020-10-29 Thread Tim Deegan
large page > aligned, > - incrementing by page-size-scaled values can't be right. > > Signed-off-by: Jan Beulich Reviewed-by: Tim Deegan Thanks! Tim.

Re: Ping: [PATCH v3 0/3] x86: shim building adjustments (plus shadow follow-on)

2020-10-29 Thread Tim Deegan
At 14:40 +0100 on 29 Oct (1603982415), Jan Beulich wrote: > Tim, > > unless you tell me otherwise I'm intending to commit the latter > two with Roger's acks some time next week. Of course it would > still be nice to know your view on the first of the TBDs in > patch 3 (which may result in further

Re: [PATCH v2 7/9] x86/p2m: pass old PTE directly to write_p2m_entry_pre() hook

2020-11-06 Thread Tim Deegan
p the intermediate sh_write_p2m_entry_pre(): > sh_unshadow_for_p2m_change() can itself be used as the hook function, > moving the conditional into there, > - introduce a local variable holding the flags of the old entry. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan

Re: [PATCH v2 8/9] x86/shadow: cosmetics to sh_unshadow_for_p2m_change()

2020-11-07 Thread Tim Deegan
At 10:38 +0100 on 06 Nov (1604659127), Jan Beulich wrote: > Besides the adjustments for style > - use switch(), > - widen scope of commonly used variables, > - narrow scope of other variables. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan

Re: [PATCH v2 9/9] x86/shadow: adjust TLB flushing in sh_unshadow_for_p2m_change()

2020-11-07 Thread Tim Deegan
the end of the function. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan

Re: [PATCH 5/5] x86/p2m: split write_p2m_entry() hook

2020-11-12 Thread Tim Deegan
At 15:04 +0100 on 12 Nov (1605193496), Jan Beulich wrote: > On 12.11.2020 14:07, Roger Pau Monné wrote: > > On Thu, Nov 12, 2020 at 01:29:33PM +0100, Jan Beulich wrote: > >> I agree with all this. If only it was merely about TLB flushes. In > >> the shadow case, shadow_blow_all_tables() gets invoke

Re: [Xen-devel] [PATCH] x86/shadow: use single (atomic) MOV for emulated writes

2020-01-16 Thread Tim Deegan
to memcpy() only for accesses not 2, 4, or 8 bytes in size. > > Signed-off-by: Jason Andryuk Acked-by: Tim Deegan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Issues/improvements performing flush of guest TLBs

2020-01-16 Thread Tim Deegan
Hi, At 12:16 +0100 on 15 Jan (1579090561), Roger Pau Monné wrote: > - Shadow: it's not clear to me exactly which parts of sh_update_cr3 >are needed in order to perform a guest TLB flush. I think calling: > > #if (SHADOW_OPTIMIZATIONS & SHOPT_VIRTUAL_TLB) > /* No longer safe to use cached

Re: [Xen-devel] [PATCH] xen/x86: p2m: Don't initialize slot 0 of the P2M

2020-02-05 Thread Tim Deegan
At 18:31 + on 03 Feb (1580754711), Julien Grall wrote: > On 03/02/2020 17:37, George Dunlap wrote: > > On 2/3/20 5:22 PM, Julien Grall wrote: > >> On 03/02/2020 17:10, George Dunlap wrote: > >>> On 2/3/20 4:58 PM, Julien Grall wrote: > From: Julien Grall > > It is not entirely c

Re: [PATCH 15/17] x86/shadow: drop SH_type_l2h_pae_shadow

2021-01-22 Thread Tim Deegan
Hi, At 16:10 +0100 on 14 Jan (1610640627), Jan Beulich wrote: > This is a remnant from 32-bit days, having no place anymore where a > shadow of this type would be created. > > Signed-off-by: Jan Beulich > --- > hash_{domain,vcpu}_foreach() have a use each of literal 15. It's not > clear to me wh

Re: [PATCH 00/17] x86/PV: avoid speculation abuse through guest accessors plus ...

2021-01-22 Thread Tim Deegan
ood, thank you! Reviewed-by: Tim Deegan I have read the uaccess stuff in passing and it looks OK to me too, but I didn't review it in detail. Cheers, Tim.

Re: [PATCH 15/17] x86/shadow: drop SH_type_l2h_pae_shadow

2021-01-22 Thread Tim Deegan
Hi, At 17:31 +0100 on 22 Jan (1611336662), Jan Beulich wrote: > On 22.01.2021 14:11, Tim Deegan wrote: > > At 16:10 +0100 on 14 Jan (1610640627), Jan Beulich wrote: > >> hash_{domain,vcpu}_foreach() have a use each of literal 15. It's not > >> clear to me what

Re: [PATCH] x86/shadow: replace stale literal numbers in hash_{vcpu,domain}_foreach()

2021-01-25 Thread Tim Deegan
gher than 15), dimensioned by SH_type_unused. Have the ASSERT()s > follow suit and add build time checks at the call sites. > > Also adjust a comment naming the wrong of the two functions. > > Signed-off-by: Jan Beulich Reviewed-by: Tim Deegan > --- > The ASSERT()s being

Re: [PATCH 5/5] x86/shadow: l3table[] and gl3e[] are HVM only

2020-07-18 Thread Tim Deegan
At 12:00 +0200 on 15 Jul (1594814409), Jan Beulich wrote: > ... by the very fact that they're 3-level specific, while PV always gets > run in 4-level mode. This requires adding some seemingly redundant > #ifdef-s - some of them will be possible to drop again once 2- and > 3-level guest code doesn't

Re: [PATCH 0/5] x86: mostly shadow related XSA-319 follow-up

2020-07-18 Thread Tim Deegan
e these all seem good to me, thank you! Acked-by: Tim Deegan

Re: [PATCH 5/5] x86/shadow: l3table[] and gl3e[] are HVM only

2020-07-20 Thread Tim Deegan
At 10:55 +0200 on 20 Jul (1595242521), Jan Beulich wrote: > On 18.07.2020 20:20, Tim Deegan wrote: > > At 12:00 +0200 on 15 Jul (1594814409), Jan Beulich wrote: > >> ... by the very fact that they're 3-level specific, while PV always gets > >> run in 4-level

Re: [PATCH] x86/hvm: Clean up track_dirty_vram() calltree

2020-07-26 Thread Tim Deegan
nt32_t, so there is no need for >nr_frames to be unsigned long in the lower levels. > > No functional change. > > Signed-off-by: Andrew Cooper Acked-by: Tim Deegan

Re: [PATCH] x86/shadow: Reposition sh_remove_write_access_from_sl1p()

2020-05-24 Thread Tim Deegan
ad of > its first users, which is within a larger #ifdef'd SHOPT_OUT_OF_SYNC block. > > Fix up for style while moving it. No functional change. > > Signed-off-by: Andrew Cooper Thank you! This is fine, either as-is or with the suggested change to a switch. Reviewed-by: Tim Deegan

Re: [PATCH v1] kdd: remove zero-length arrays

2020-06-09 Thread Tim Deegan
Hi, At 09:55 +0100 on 09 Jun (1591696552), Paul Durrant wrote: > > -Original Message- > > From: Xen-devel On Behalf Of Olaf > > Hering > > Sent: 08 June 2020 21:39 > > To: xen-devel@lists.xenproject.org > > Cc: Ian Jackson ; Olaf Hering ; >

Re: [PATCH v1] kdd: remove zero-length arrays

2020-06-10 Thread Tim Deegan
At 15:22 +0200 on 09 Jun (1591716153), Olaf Hering wrote: > Am Tue, 9 Jun 2020 13:15:49 +0100 > schrieb Tim Deegan : > > > Olaf, can you try dropping the 'payload' field from the header and > > replacing the payload[0] in pkt with payload[] ? > > In file i

Re: Build problems in kdd.c with xen-4.14.0-rc4

2020-07-03 Thread Tim Deegan
Hi Michael, Thanks for ther report! At 23:21 +0100 on 30 Jun (1593559296), Michael Young wrote: > I get the following errors when trying to build xen-4.14.0-rc4 > > kdd.c: In function 'kdd_tx': > kdd.c:754:15: error: array subscript 16 is above array bounds of > 'uint8_t[16]' {aka 'unsigned cha

Re: [PATCH for-4.14] kdd: fix build again

2020-07-03 Thread Tim Deegan
top using [0] arrays to access packet contents") > Reported-by: Michael Young > Signed-off-by: Wei Liu Reviewed-by: Tim Deegan Thanks! Tim.

Re: [Xen-devel] [PATCH 4/6] x86/domain: remove the 'oos_off' flag

2019-07-24 Thread Tim Deegan
At 17:06 +0100 on 23 Jul (1563901567), Paul Durrant wrote: > The flag is not needed since the domain 'createflags' can now be tested > directly. > > Signed-off-by: Paul Durrant Acked-by: Tim Deegan though some of this change seems to have got into patch 3, maybe they

Re: [PATCH v3 0/4] x86/P2M: allow 2M superpage use for shadowed guests

2022-08-16 Thread Tim Deegan
hadow: slightly consolidate sh_unshadow_for_p2m_change() (part III) > 4: P2M: allow 2M superpage use for shadowed guests Acked-by: Tim Deegan FWIW I think that adding some kind of mfn_mask() opreration would be neater and more understandable than subtracting the PSE flag. Cheers, Tim.

Re: [PATCH 0/8] x86: XSA-40{1,2,8} follow-up

2022-07-30 Thread Tim Deegan
er. Shadow parts Acked-by: Tim Deegan Cheers, Tim.

Re: [PATCH 07/16] x86/shadow: call sh_update_cr3() directly from sh_page_fault()

2023-03-27 Thread Tim Deegan
Hi, At 10:33 +0100 on 22 Mar (1679481226), Jan Beulich wrote: > There's no need for an indirect call here, as the mode is invariant > throughout the entire paging-locked region. All it takes to avoid it is > to have a forward declaration of sh_update_cr3() in place. > > Signed-off-by: Jan Beulich

Re: [PATCH 07/16] x86/shadow: call sh_update_cr3() directly from sh_page_fault()

2023-03-28 Thread Tim Deegan
At 12:37 +0200 on 28 Mar (1680007032), Jan Beulich wrote: > On 27.03.2023 17:39, Tim Deegan wrote: > > At 10:33 +0100 on 22 Mar (1679481226), Jan Beulich wrote: > >> There's no need for an indirect call here, as the mode is invariant > >> throughout the entire pagin

Re: [PATCH] x86/shadow: drop callback_mask pseudo-variables

2021-07-03 Thread Tim Deegan
. > > Requested-by: Roberto Bagnara > Signed-off-by: Jan Beulich Acked-by: Tim Deegan

Re: [PATCH 1/5] tools/debugger: Fix PAGE_SIZE redefinition error

2021-04-29 Thread Tim Deegan
Hi, At 15:05 +0300 on 27 Apr (1619535916), Costin Lupu wrote: > If PAGE_SIZE is already defined in the system (e.g. in > /usr/include/limits.h header) then gcc will trigger a redefinition error > because of -Werror. This commit also protects PAGE_SHIFT definitions for > keeping consistency. Thank

Re: [PATCH 1/5] tools/debugger: Fix PAGE_SIZE redefinition error

2021-04-30 Thread Tim Deegan
At 14:36 +0300 on 30 Apr (1619793419), Costin Lupu wrote: > Hi Tim, > > On 4/29/21 10:58 PM, Tim Deegan wrote: > > Hi, > > > > At 15:05 +0300 on 27 Apr (1619535916), Costin Lupu wrote: > >> If PAGE_SIZE is already defined in the system (e.g. in > >>

  1   2   >