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]
Message-ID: <4F7041EE.10305@redhat.com>
Date:	Mon, 26 Mar 2012 12:16:14 +0200
From:	Avi Kivity <avi@...hat.com>
To:	"Michael S. Tsirkin" <mst@...hat.com>
CC:	Joerg Roedel <joerg.roedel@....com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC dontapply] kvm_para: add mmio word store hypercall

On 03/26/2012 12:08 PM, Michael S. Tsirkin wrote:
>
> > > +		gpa = hc_gpa(vcpu, a1, a2);
> > > +		if (!write_mmio(vcpu, gpa, 2, &a0) && run) {
> > 
> > What's this && run thing?
>
> I'm not sure - copied this from another other place in emulation:
> arch/x86/kvm/x86.c:4953:                if (!write_mmio(vcpu, gpa, 2, &a0) && run)
>
> I assumed there's some way to trigger emulation while VCPU does not run.
> No?

Not the way you initialize run above.

>
> > 
> > > +			run->exit_reason = KVM_EXIT_MMIO;
> > > +			run->mmio.phys_addr = gpa;
> > > +			memcpy(run->mmio.data, &a0, 2);
> > > +			run->mmio.len = 2;
> > > +			run->mmio.is_write = 1;
> > > +                        r = 0;
> > > +		}
> > > +		goto noret;
> > 
> > What if the address is in RAM?
> > Note the guest can't tell if a piece of memory is direct mapped or
> > implemented as mmio.
>
> True but doing hypercalls for memory which can be
> mapped directly is bad for performance - it's
> the reverse of what we are trying to do here.

It's bad, but the guest can't tell.

Suppose someone implements virtio in hardware and we pass it through to
a guest.  It should continue working, no?

> The intent is to use this for virtio where we can explicitly let the
> guest know whether using a hypercall is safe.
>
> Acceptable?  What do you suggest?

It's iffy.

What's the performance gain from this thing?


-- 
error compiling committee.c: too many arguments to function

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