qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] configure: define CONFIG_XEN when Xen is enabled


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] configure: define CONFIG_XEN when Xen is enabled
Date: Tue, 28 Jul 2020 12:00:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 7/28/20 11:56 AM, Philippe Mathieu-Daudé wrote:
> On 7/28/20 11:53 AM, Peter Maydell wrote:
>> On Tue, 28 Jul 2020 at 10:51, Philippe Mathieu-Daudé <philmd@redhat.com> 
>> wrote:
>>> I'd rather uninline xen_enabled() but I'm not sure this has perf
>>> penalties. Paolo is that OK to uninline it?
> 
> I suppose no because it is in various hot paths:
> 
> exec.c:588:    if (xen_enabled() && memory_access_is_direct(mr, is_write)) {
> exec.c:2243:        if (xen_enabled()) {
> exec.c:2326:    if (xen_enabled()) {
> exec.c:2478:    } else if (xen_enabled()) {
> exec.c:2525:            } else if (xen_enabled()) {
> exec.c:2576:    if (xen_enabled() && block->host == NULL) {
> exec.c:2609:    if (xen_enabled() && block->host == NULL) {
> exec.c:2657:    if (xen_enabled()) {
> exec.c:3625:        if (xen_enabled()) {
> exec.c:3717:    if (xen_enabled()) {
> include/exec/ram_addr.h:295:    if (!mask && !xen_enabled()) {
> 
>>
>> Can we just follow the same working pattern we already have
>> for kvm_enabled() etc ?
> 
> This was the idea... I'll look at what I missed.

Apparently kvm_enabled() checks CONFIG_KVM_IS_POSSIBLE instead
of CONFIG_KVM, I suppose to bypass this limitation (from osdep.h):

 21 #ifdef NEED_CPU_H
 22 # ifdef CONFIG_KVM
 24 #  define CONFIG_KVM_IS_POSSIBLE
 25 # endif
 26 #else
 27 # define CONFIG_KVM_IS_POSSIBLE
 28 #endif
 29
 30 #ifdef CONFIG_KVM_IS_POSSIBLE
    ...

Paolo do you confirm this is the reason?

I'll prepare a similar patch.

> 
> Phil.
> 




reply via email to

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