]> git.proxmox.com Git - mirror_qemu.git/commit - target/i386/cpu.c
target-i386: Allow physical address bits to be set
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Fri, 8 Jul 2016 15:01:36 +0000 (16:01 +0100)
committerEduardo Habkost <ehabkost@redhat.com>
Wed, 20 Jul 2016 14:58:43 +0000 (11:58 -0300)
commitaf45907a132857cfd47acc998bf5f7c26cd13071
tree27dd842877f7e206ee6fd118460fee7709865625
parent709787ee997f0a0ccab78e0edaf10d48929151ee
target-i386: Allow physical address bits to be set

Currently QEMU sets the x86 number of physical address bits to the
magic number 40.  This is only correct on some small AMD systems;
Intel systems tend to have 36, 39, 46 bits, and large AMD systems
tend to have 48.

Having the value different from your actual hardware is detectable
by the guest and in principal can cause problems;
The current limit of 40 stops TB VMs being created by those lucky
enough to have that much.

This patch lets you set the physical bits by a cpu property but
defaults to the same 40bits which matches TCGs setup.

I've removed the ancient warning about the 42 bit limit in exec.c;
I can't find that limit in there and no one else seems to know where
it is.

We use a magic value of 0 as the property default so that we can
later distinguish between the default and a user set value.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
target-i386/cpu.c
target-i386/cpu.h