Re: CPUs support APIC virtualization

2014-05-01 Thread Wanpeng Li
Hi Arthur, On Tue, Apr 22, 2014 at 11:08:31AM +0800, Arthur Chunqi Li wrote: Hi there, I have noticed in Intel SDM that some kinds of CPUs support APIC virtualization (e.g. Virtual-interrupt delivery). I checked all my Intel CPUs' MSR and found none of them support this. So do anybody know which

Re: [PATCH] random: Add initialized variable to proc

2014-05-01 Thread Andy Lutomirski
On Thu, May 1, 2014 at 8:35 AM, Andy Lutomirski l...@amacapital.net wrote: On Thu, May 1, 2014 at 8:05 AM, ty...@mit.edu wrote: On Wed, Apr 30, 2014 at 09:05:00PM -0700, H. Peter Anvin wrote: Giving the guest a seed would be highly useful, though. There are a number of ways to do that;

random: Providing a seed value to VM guests

2014-05-01 Thread H. Peter Anvin
On 05/01/2014 11:53 AM, Andy Lutomirski wrote: A CPUID leaf or an MSR advertised by a CPUID leaf has another advantage: it's easy to use in the ASLR code -- I don't think there's a real IDT, so there's nothing like rdmsr_safe available. It also avoids doing anything complicated with the

Re: random: Providing a seed value to VM guests

2014-05-01 Thread Andy Lutomirski
On Thu, May 1, 2014 at 11:59 AM, H. Peter Anvin h...@zytor.com wrote: On 05/01/2014 11:53 AM, Andy Lutomirski wrote: A CPUID leaf or an MSR advertised by a CPUID leaf has another advantage: it's easy to use in the ASLR code -- I don't think there's a real IDT, so there's nothing like

[3.13.y.z extended stable] Patch MIPS: KVM: Pass reserved instruction exceptions to guest has been added to staging queue

2014-05-01 Thread Kamal Mostafa
This is a note to let you know that I have just added a patch titled MIPS: KVM: Pass reserved instruction exceptions to guest to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree which can be found at:

Re: random: Providing a seed value to VM guests

2014-05-01 Thread tytso
On Thu, May 01, 2014 at 12:02:49PM -0700, Andy Lutomirski wrote: Is RDSEED really reasonable here? Won't it slow down by several orders of magnitude? That is I think the biggest problem; RDRAND and RDSEED are fast if they are native, but they will involve a VM exit if they need to be

Re: random: Providing a seed value to VM guests

2014-05-01 Thread H. Peter Anvin
The normal CPUID bit is unset I believe. On May 1, 2014 12:02:49 PM PDT, Andy Lutomirski l...@amacapital.net wrote: On Thu, May 1, 2014 at 11:59 AM, H. Peter Anvin h...@zytor.com wrote: On 05/01/2014 11:53 AM, Andy Lutomirski wrote: A CPUID leaf or an MSR advertised by a CPUID leaf has another

Re: random: Providing a seed value to VM guests

2014-05-01 Thread H. Peter Anvin
As I said... I think KVM has already added an emulated instructions enumeration API. On May 1, 2014 12:26:18 PM PDT, ty...@mit.edu wrote: On Thu, May 01, 2014 at 12:02:49PM -0700, Andy Lutomirski wrote: Is RDSEED really reasonable here? Won't it slow down by several orders of magnitude?

Re: random: Providing a seed value to VM guests

2014-05-01 Thread Andy Lutomirski
On May 1, 2014 12:26 PM, ty...@mit.edu wrote: On Thu, May 01, 2014 at 12:02:49PM -0700, Andy Lutomirski wrote: Is RDSEED really reasonable here? Won't it slow down by several orders of magnitude? That is I think the biggest problem; RDRAND and RDSEED are fast if they are native, but

Re: random: Providing a seed value to VM guests

2014-05-01 Thread H. Peter Anvin
RDSEED is not synchronous. It is, however, nonblocking. On May 1, 2014 1:16:40 PM PDT, Andy Lutomirski l...@amacapital.net wrote: On May 1, 2014 12:26 PM, ty...@mit.edu wrote: On Thu, May 01, 2014 at 12:02:49PM -0700, Andy Lutomirski wrote: Is RDSEED really reasonable here? Won't it slow

Re: random: Providing a seed value to VM guests

2014-05-01 Thread Andy Lutomirski
On Thu, May 1, 2014 at 1:30 PM, H. Peter Anvin h...@zytor.com wrote: RDSEED is not synchronous. It is, however, nonblocking. What I mean is: IIUC it's reasonable to call RDSEED a few times in a loop and hope it works. It makes no sense to do that with /dev/random. On May 1, 2014 1:16:40 PM

Re: random: Providing a seed value to VM guests

2014-05-01 Thread tytso
On Thu, May 01, 2014 at 01:32:55PM -0700, Andy Lutomirski wrote: On Thu, May 1, 2014 at 1:30 PM, H. Peter Anvin h...@zytor.com wrote: RDSEED is not synchronous. It is, however, nonblocking. What I mean is: IIUC it's reasonable to call RDSEED a few times in a loop and hope it works. It

Re: random: Providing a seed value to VM guests

2014-05-01 Thread Andy Lutomirski
On Thu, May 1, 2014 at 1:39 PM, ty...@mit.edu wrote: On Thu, May 01, 2014 at 01:32:55PM -0700, Andy Lutomirski wrote: On Thu, May 1, 2014 at 1:30 PM, H. Peter Anvin h...@zytor.com wrote: RDSEED is not synchronous. It is, however, nonblocking. What I mean is: IIUC it's reasonable to call

Re: random: Providing a seed value to VM guests

2014-05-01 Thread H. Peter Anvin
On 05/01/2014 01:56 PM, Andy Lutomirski wrote: Even if we could emulate RDSEED effectively**, I don't really understand what the guest is expected to do with it. And I generally dislike defining an interface with no known sensible users, because it means that there's a good chance that the

Re: random: Providing a seed value to VM guests

2014-05-01 Thread Andy Lutomirski
On Thu, May 1, 2014 at 2:01 PM, H. Peter Anvin h...@zytor.com wrote: On 05/01/2014 01:56 PM, Andy Lutomirski wrote: Even if we could emulate RDSEED effectively**, I don't really understand what the guest is expected to do with it. And I generally dislike defining an interface with no known

Re: random: Providing a seed value to VM guests

2014-05-01 Thread tytso
On Thu, May 01, 2014 at 02:06:13PM -0700, Andy Lutomirski wrote: I still don't see the point. What does this do better than virtio-rng? I believe you had been complaining about how complicated it was to set up virtio? And this complexity is also an issue if we want to use it to initialize

Re: random: Providing a seed value to VM guests

2014-05-01 Thread Andy Lutomirski
On Thu, May 1, 2014 at 3:28 PM, ty...@mit.edu wrote: On Thu, May 01, 2014 at 02:06:13PM -0700, Andy Lutomirski wrote: I still don't see the point. What does this do better than virtio-rng? I believe you had been complaining about how complicated it was to set up virtio? And this

Re: random: Providing a seed value to VM guests

2014-05-01 Thread H. Peter Anvin
On 05/01/2014 03:32 PM, Andy Lutomirski wrote: On Thu, May 1, 2014 at 3:28 PM, ty...@mit.edu wrote: On Thu, May 01, 2014 at 02:06:13PM -0700, Andy Lutomirski wrote: I still don't see the point. What does this do better than virtio-rng? I believe you had been complaining about how

Re: random: Providing a seed value to VM guests

2014-05-01 Thread Andy Lutomirski
On Thu, May 1, 2014 at 3:46 PM, H. Peter Anvin h...@zytor.com wrote: On 05/01/2014 03:32 PM, Andy Lutomirski wrote: On Thu, May 1, 2014 at 3:28 PM, ty...@mit.edu wrote: On Thu, May 01, 2014 at 02:06:13PM -0700, Andy Lutomirski wrote: I still don't see the point. What does this do better

Re: random: Providing a seed value to VM guests

2014-05-01 Thread H. Peter Anvin
On 05/01/2014 03:56 PM, Andy Lutomirski wrote: I think we're comparing: a) cpuid to detect rdrand *or* emulated rdrand followed by rdrand to b) cpuid to detect rdrand or the paravirt seed msr/cpuid call, followed by rdrand or the msr or cpuid read this seems like it barely makes a

KVM Nested L2 guest startup problems

2014-05-01 Thread Hu Yaohui
Hi all, I have a problem running the latest version of kvm with nested configuration. I used to run it with kernel 3.2.2 both for L0 and L1, which works perfectly. When I change my L0 to kernel 3.10.36, L1 to kernel 3.12.10. When I start L2 guest in L1 with qemu-kvm. I get the following error from