[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] x86/HVM: latch linear->phys translation results
On 20/06/16 14:12, Tim Deegan wrote: > At 12:54 +0100 on 09 Jun (1465476894), Andrew Cooper wrote: >> On 08/06/16 14:09, Jan Beulich wrote: >>> ... to avoid re-doing the same translation later again (in a retry, for >>> example). This doesn't help very often according to my testing, but >>> it's pretty cheap to have, and will be of further use subsequently. >>> >>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> >>> >>> --- a/xen/arch/x86/hvm/emulate.c >>> +++ b/xen/arch/x86/hvm/emulate.c >>> @@ -678,6 +678,19 @@ static struct hvm_mmio_cache *hvmemul_fi >>> return cache; >>> } >>> >>> +static void latch_linear_to_phys(struct hvm_vcpu_io *vio, unsigned long >>> gla, >>> + unsigned long gpa, bool_t write) >>> +{ >>> + if ( vio->mmio_access.gla_valid ) >>> + return; >>> + >>> + vio->mmio_gva = gla & PAGE_MASK; >> This suggest that mmio_vga is mis-named. >> >> Looking at the uses, handle_mmio_with_translation() is used >> inconsistently, with virtual addresses from the shadow code, but linear >> addresses from nested hap code. >> >> Clearly one of these two users are buggy for guests running in a non >> flat way, and it looks to be the shadow side which is buggy. > Yes, the naming in the shadow code is incorrect. Shadow code, along > with a lot of Xen code, uses "virtual" to refer to what the manuals > call linear addresses, i.e. the inputs to paging. IIRC it was only > with the introduction of HAP hardware interfaces that we started using > the term "linear" widely in Xen code. > > I will ack a mechanical renaming if you like, though beware of public > interfaces with the old name, and common code ("linear" being an x86 > term). I will be doing some cleanup in due course, although I don't have enough time to do this right now. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |