qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 5/5] x86: Set physical address bits based on


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 5/5] x86: Set physical address bits based on host
Date: Fri, 8 Jul 2016 18:34:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1


On 08/07/2016 17:01, Dr. David Alan Gilbert (git) wrote:
> +            uint32_t host_phys_bits = x86_host_phys_bits();
> +            static bool warned;
> +
> +            if (cpu->host_phys_bits) {
> +                /* The user asked for us to use the host physical bits */
> +                cpu->phys_bits = host_phys_bits;
> +            }
> +
> +            /* Print a warning if the user set it to a value that's not the
> +             * host value.
> +             */
> +            if (cpu->phys_bits != host_phys_bits && cpu->phys_bits != 0 &&
> +                !warned) {
> +                error_report("Warning: Host physical bits (%u)"
> +                                 " does not match phys-bits property (%u)",
> +                                 host_phys_bits, cpu->phys_bits);
> +                warned = true;
> +            }
> +
> +            if (cpu->phys_bits &&
> +                (cpu->phys_bits > TARGET_PHYS_ADDR_SPACE_BITS ||
> +                cpu->phys_bits < 32)) {
>                  error_setg(errp, "phys-bits should be between 32 and %u "
>                                   " (but is %u)",
>                                   TARGET_PHYS_ADDR_SPACE_BITS, 
> cpu->phys_bits);

Michael Tsirkin suggested a way to support guest-phys-bits <
host-phys-bits in KVM.  I plan to implement it soonish.  In the
meanwhile I guess this patch is fine, we can refine it later.

Paolo



reply via email to

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