lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Sep 2007 14:20:47 -0700
From:	Zachary Amsden <zach@...are.com>
To:	Anthony Liguori <anthony@...emonkey.ws>
Cc:	Jeremy Fitzhardinge <jeremy@...p.org>,
	Anthony Liguori <aliguori@...ibm.com>,
	kvm-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
	Avi Kivity <avi@...ranet.com>
Subject: Re: [kvm-devel] [PATCH] Refactor hypercall infrastructure

On Fri, 2007-09-14 at 16:02 -0500, Anthony Liguori wrote:
> Jeremy Fitzhardinge wrote:
> > Anthony Liguori wrote:
> >   
> >> This patch refactors the current hypercall infrastructure to better support live
> >> migration and SMP.  It eliminates the hypercall page by trapping the UD
> >> exception that would occur if you used the wrong hypercall instruction for the
> >> underlying architecture and replacing it with the right one lazily.
> >>   
> >>     
> >
> > I guess it would be pretty rude/unlikely for these opcodes to get reused
> > in other implementations...  But couldn't you make the page trap
> > instead, rather than relying on an instruction fault?
> >   
> 
> The whole point of using the instruction is to allow hypercalls to be 
> used in many locations.  This has the nice side effect of not requiring 
> a central hypercall initialization routine in the guest to fetch the 
> hypercall page.  A PV driver can be completely independent of any other 
> code provided that it restricts itself to it's hypercall namespace.

But if the instruction is architecture dependent, and you run on the
wrong architecture, now you have to patch many locations at fault time,
introducing some nasty runtime code / data cache overlap performance
problems.  Granted, they go away eventually.

I prefer the idea of a hypercall page, but not a central initialization.
Rather, a decentralized approach where PV drivers can detect using CPUID
which hypervisor is present, and a common MSR shared by all hypervisors
that provides the location of the hypercall page.

Zach

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ