qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] kvm: work around supported cpuid ioctl() broken


From: Avi Kivity
Subject: [Qemu-devel] Re: [PATCH] kvm: work around supported cpuid ioctl() brokenness
Date: Mon, 18 May 2009 01:56:20 +0300
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Mark McLoughlin wrote:
KVM_GET_SUPPORTED_CPUID has been known to fail to return -E2BIG
when it runs out of entries. Detect this by always trying again
with a bigger table if the ioctl() fills the table.


Looks good, except for

     cpuid = (struct kvm_cpuid2 *)qemu_mallocz(size);
     cpuid->nent = max;
     r = kvm_ioctl(s, KVM_GET_SUPPORTED_CPUID, cpuid);
+    if (r == 0 && cpuid->nent >= max)
+        r = -E2BIG;


Missing braces.

--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]