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

2023-03-29 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 paging-

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

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
Shadow parts Acked-by: Tim Deegan Cheers, Tim.

Re: [PATCH 1/2] x86/mm: don't open-code p2m_is_pod()

2021-12-02 Thread Tim Deegan
At 12:01 +0100 on 01 Dec (1638360084), Jan Beulich wrote: > Replace all comparisons against p2m_populate_on_demand (outside of > switch() statements) with the designated predicate. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan

Re: [PATCH 1/2] x86/shadow: defer/avoid paging_mfn_is_dirty() invocation

2021-12-02 Thread Tim Deegan
from sflags, in order to then check whether _PAGE_RW is > actually still set there before calling the function. > > While moving the block of code, fold two if()s and make a few style > adjustments. > > Signed-off-by: Jan Beulich Reviewed-by: Tim Deegan > --- > TBD: Per

Re: sh_unshadow_for_p2m_change() vs p2m_set_entry()

2021-10-01 Thread Tim Deegan
At 07:59 +0200 on 01 Oct (1633075173), Jan Beulich wrote: > On 27.09.2021 22:25, Tim Deegan wrote: > > At 13:31 +0200 on 24 Sep (1632490304), Jan Beulich wrote: > >> The 2M logic also first checks _PAGE_PRESENT (and _PAGE_PSE), while > >> the 4k logic appears to infer th

Re: sh_unshadow_for_p2m_change() vs p2m_set_entry()

2021-09-27 Thread Tim Deegan
Hi, At 13:31 +0200 on 24 Sep (1632490304), Jan Beulich wrote: > I'm afraid you're still my best guess to hopefully get an insight > on issues like this one. I'm now very rusty on all this but I'll do my best! I suspect I'll just be following you through the code. > While doing IOMMU superpage

Re: [PATCH 4/4] x86/PV: properly set shadow allocation for Dom0

2021-08-31 Thread Tim Deegan
the tasklet, on a best effort basis (again like done for > PVH). > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan

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: Invalid _Static_assert expanded from HASH_CALLBACKS_CHECK

2021-06-07 Thread Tim Deegan
Hi, At 08:45 +0200 on 31 May (1622450756), Jan Beulich wrote: > On 28.05.2021 17:44, Tim Deegan wrote: > > Hi, > > > > At 10:58 +0200 on 25 May (1621940330), Jan Beulich wrote: > >> On 24.05.2021 06:29, Roberto Bagnara wrote: > >>> I stumbl

[PATCH] MAINTAINERS: adjust x86/mm/shadow maintainers

2021-06-03 Thread Tim Deegan
Better reflect reality: Andrew and Jan are active maintainers and I review patches. Keep myself as a reviewer so I can help with historical context Signed-off-by: Tim Deegan --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git MAINTAINERS MAINTAINERS index

Re: Invalid _Static_assert expanded from HASH_CALLBACKS_CHECK

2021-05-28 Thread Tim Deegan
Hi, At 10:58 +0200 on 25 May (1621940330), Jan Beulich wrote: > On 24.05.2021 06:29, Roberto Bagnara wrote: > > I stumbled upon parsing errors due to invalid uses of > > _Static_assert expanded from HASH_CALLBACKS_CHECK where > > the tested expression is not constant, as mandated by > > the C

Re: [PATCH] x86/shadow: fix DO_UNSHADOW()

2021-05-24 Thread Tim Deegan
y misleading indentation. Besides adding the missing braces, > also adjust the two oddly formatted if()-s in the macro. > > Fixes: 90629587e16e ("x86/shadow: replace stale literal numbers in > hash_{vcpu,domain}_foreach()") > Signed-off-by: Jan Beulich Reviewed-by: Tim Deegan

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

2021-05-11 Thread Tim Deegan
include any Xen headers and (2) to > add > consistency for code in both kdd.c and kdd-xen.c. > > Signed-off-by: Costin Lupu Reviewed-by: Tim Deegan Thanks! Tim.

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 > &g

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.

Re: [PATCH v4 1/3] VMX: use a single, global APIC access page

2021-04-26 Thread Tim Deegan
At 16:42 +0200 on 23 Apr (1619196141), Jan Beulich wrote: > On 23.04.2021 16:17, Roger Pau Monné wrote: > > On Fri, Apr 23, 2021 at 12:52:57PM +0200, Jan Beulich wrote: > >> +if ( mfn_valid(mfn = shadow_l1e_get_mfn(sl1e)) && > > > > Nit: I would prefer if assigned mfn outside of the

Re: [PATCH v4 1/3] VMX: use a single, global APIC access page

2021-04-26 Thread Tim Deegan
translation will produce its address as result for respective > accesses. > > By making this page global, we also eliminate the need to refcount it, > or to assign it to any domain in the first place. > > Signed-off-by: Jan Beulich Looks good, thanks for the changes! Acked-by: Tim Deegan

Re: [PATCH v4] VMX: use a single, global APIC access page

2021-04-22 Thread Tim Deegan
At 11:38 +0200 on 22 Apr (1619091522), Jan Beulich wrote: > On 22.04.2021 09:42, Tim Deegan wrote: > > At 13:25 +0200 on 19 Apr (1618838726), Jan Beulich wrote: > >> On 17.04.2021 21:24, Tim Deegan wrote: > >>> At 12:40 +0200 on 12 Apr (1618231248), Jan Beulich wrote

Re: [PATCH 6/7] x86/shadow: Make _shadow_prealloc() compile at -Og

2021-04-22 Thread Tim Deegan
y, > initialising it to NULL placates the compiler. Yeah, this analysis seems wrong to me too - if nothing else, why does it not complain about the identical code in shadow_blow_tables() below? That said, since the non-debug build doesn't complain here, presumably it will be able to elide this dead store. Acked-by: Tim Deegan

Re: [PATCH v4] VMX: use a single, global APIC access page

2021-04-22 Thread Tim Deegan
At 13:25 +0200 on 19 Apr (1618838726), Jan Beulich wrote: > On 17.04.2021 21:24, Tim Deegan wrote: > > At 12:40 +0200 on 12 Apr (1618231248), Jan Beulich wrote: > >> By making this page global, we also eliminate the need to refcount it, > >> or to assign it to an

Re: [PATCH v4] VMX: use a single, global APIC access page

2021-04-17 Thread Tim Deegan
Hi, Apologies for not sending comments before, and thanks for the ping. At 12:40 +0200 on 12 Apr (1618231248), Jan Beulich wrote: > The address of this page is used by the CPU only to recognize when to > access the virtual APIC page instead. No accesses would ever go to this > page. It only

Re: [PATCH v2 11/12] x86/p2m: write_p2m_entry_{pre,post} hooks are HVM-only

2021-04-15 Thread Tim Deegan
At 16:13 +0200 on 12 Apr (1618244032), Jan Beulich wrote: > Move respective shadow code to its HVM-only source file, thus making it > possible to exclude the hooks as well. This then shows that > shadow_p2m_init() also isn't needed in !HVM builds. > > Signed-off-by: Jan Beulich

Re: [PATCH v2 03/12] x86/mm: the gva_to_gfn() hook is HVM-only

2021-04-15 Thread Tim Deegan
At 16:07 +0200 on 12 Apr (1618243630), Jan Beulich wrote: > As is the adjacent ga_to_gfn() one as well as paging_gva_to_gfn(). > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan

Re: [PATCH] x86/shadow: adjust callback arrays

2021-04-15 Thread Tim Deegan
At 18:03 +0200 on 15 Apr (1618509812), Jan Beulich wrote: > On 15.04.2021 17:59, Tim Deegan wrote: > > At 12:42 +0200 on 12 Apr (1618231332), Jan Beulich wrote: > >> Some of them have entries with stale comments. Rather than correcting > >> these comments, re-arrange how

Re: [PATCH 0/2] x86/shadow: shadow_get_page_from_l1e() adjustments

2021-04-15 Thread Tim Deegan
adow_get_page_from_l1e() > 2: streamline shadow_get_page_from_l1e() Acked-by: Tim Deegan Thanks, Tim.

Re: [PATCH] x86/shadow: adjust callback arrays

2021-04-15 Thread Tim Deegan
shadow_hash_{insert,delete}(). > > Signed-off-by: Jan Beulich Looks good, but please leave the arrays at full size. With the full array, a bug could lead to an assertion failure or NULL deref; with a short array it could mean following a bogus funtion pointer. With that change, Ac

Re: [PATCH 10/14] tools/kdd: Use const whenever we point to literal strings

2021-04-06 Thread Tim Deegan
At 16:57 +0100 on 05 Apr (1617641829), Julien Grall wrote: > From: Julien Grall > > literal strings are not meant to be modified. So we should use const > char * rather than char * when we want to shore a pointer to them. > > Signed-off-by: Julien Grall Acked-by: Tim Deegan Thanks, Tim.

Re: [PATCH 03/14] xen/x86: shadow: The return type of sh_audit_flags() should be const

2021-04-06 Thread Tim Deegan
he opportunity to fix the coding style in the declaration of > sh_audit_flags. > > Signed-off-by: Julien Grall Acked-by: Tim Deegan Thanks, Tim.

Re: [PATCH 2/2][4.15?] x86/shadow: encode full GFN in magic MMIO entries

2021-03-08 Thread Tim Deegan
ugly, sanity-check the result (invoking #error to identify failure). > > This then allows dropping from sh_l1e_mmio() again the guarding against > too large GFNs. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan > I wonder if the respective check in sh_audit_l1_table()

Re: [PATCH 1/2][4.15?] x86/shadow: suppress "fast fault path" optimization when running virtualized

2021-03-08 Thread Tim Deegan
can actually be observed. Therefore, besides evaluating the > number of address bits when deciding whether to use the optimization, > also check whether we're running virtualized ourselves. > > Requested-by: Andrew Cooper > Signed-off-by: Jan Beulich Acked-by: Tim Deegan I woul

Re: [PATCH][4.15] x86/shadow: suppress "fast fault path" optimization without reserved bits

2021-02-26 Thread Tim Deegan
> > Requested-by: Andrew Cooper > Signed-off-by: Jan Beulich Acked-by: Tim Deegan > I wonder if subsequently we couldn't arrange for SMEP/SMAP faults to be > utilized instead, on capable hardware (which might well be all having > such large a physical address width). I don't imm

Re: [PATCH][4.15] x86/shadow: replace bogus return path in shadow_get_page_from_l1e()

2021-02-26 Thread Tim Deegan
T() instead, just in case any new caller would > appear. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan

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

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 the

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

2021-01-22 Thread Tim Deegan
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 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

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

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

2020-11-07 Thread Tim Deegan
at > the end of the function. > > 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 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: 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] x86/shadow: correct GFN use by sh_unshadow_for_p2m_change()

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

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

2020-10-29 Thread Tim Deegan
h 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 2/5] x86/p2m: collapse the two ->write_p2m_entry() hooks

2020-10-29 Thread Tim Deegan
y 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 v3 3/3] x86/shadow: sh_{make,destroy}_monitor_table() are "even more" HVM-only

2020-10-29 Thread Tim Deegan
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 > constified. In f

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 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] x86/hvm: Clean up track_dirty_vram() calltree

2020-07-26 Thread Tim Deegan
uint32_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 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 mode

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-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

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

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

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

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 included fr

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] x86/shadow: Reposition sh_remove_write_access_from_sl1p()

2020-05-24 Thread Tim Deegan
ahead 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] 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 ==

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

2020-04-29 Thread Tim Deegan
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 v2 2/4] x86/shadow: sh_update_linear_entries() is a no-op for PV

2020-04-22 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] x86/shadow: make sh_remove_write_access() helper HVM only

2020-04-22 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 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 thu

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. Acked-by

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

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 @@

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

2020-02-13 Thread Tim Deegan
aven'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: Tim Deegan _

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 2/7] x86/paging: add TLB flush hooks

2020-02-13 Thread Tim Deegan
ther 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 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] 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

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

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

2020-01-16 Thread Tim Deegan
emcpy() 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] [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

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
nce we have 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 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

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

2019-10-17 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] 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] x86/shadow: don't enable shadow mode with too small a shadow allocation (part 2)

2019-09-05 Thread Tim Deegan
> 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_o

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 mailing li

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 were reord

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

2019-04-16 Thread Tim Deegan
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 also be h

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: don't use map_domain_page_global() on paths that may not fail

2019-02-22 Thread Tim Deegan
ther 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 good to know

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

2019-02-09 Thread Tim Deegan
able_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 enable shadow mode with too small a shadow allocation

2018-11-30 Thread Tim Deegan
heck 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 Xen-devel@li

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

2018-11-20 Thread Tim Deegan
ode disabled; 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 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 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 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 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 Deegan

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 > >

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

2018-08-30 Thread Tim Deegan
are unnecessary (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] [PATCH 26/34] x86/mm/shadow: split out HVM only code

2018-08-24 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 25/34] x86/mm/shadow: make it build with !CONFIG_HVM

2018-08-24 Thread Tim Deegan
igned-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 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 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 is to write a plugin that runs on

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

2018-07-23 Thread Tim Deegan
lementation 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.org h

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 07/16] x86/shadow: fetch CPL just once in sh_page_fault()

2018-07-11 Thread Tim Deegan
piler 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: Tim Deegan

  1   2   >