[Qemu-devel] [PULL 08/19] hw/i386: turn off vmport if CONFIG_VMPORT is disabled

Paolo Bonzini posted 19 patches 6 years, 6 months ago
Maintainers: Max Reitz <mreitz@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Peter Lieven <pl@kamp.de>, Ronnie Sahlberg <ronniesahlberg@gmail.com>, Fam Zheng <fam@euphon.net>, Paolo Bonzini <pbonzini@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <rth@twiddle.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
[Qemu-devel] [PULL 08/19] hw/i386: turn off vmport if CONFIG_VMPORT is disabled
Posted by Paolo Bonzini 6 years, 6 months ago
From: Julio Montes <julio.montes@intel.com>

vmport device is not included when CONFIG_VMPORT is disabled, hence
QEMU fails with the following error:

`Unknown device 'vmport' for bus 'ISA': unknown.`

v2: imply VMPORT (Paolo Bonzini )

Signed-off-by: Julio Montes <julio.montes@intel.com>
Message-Id: <20190712160257.18270-1-julio.montes@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/Kconfig | 4 ++--
 hw/i386/pc.c    | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 4ddf2a9..b9c96ac 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -51,6 +51,7 @@ config PC_ACPI
 config I440FX
     bool
     imply E1000_PCI
+    imply VMPORT
     select PC_PCI
     select PC_ACPI
     select ACPI_SMBUS
@@ -58,7 +59,6 @@ config I440FX
     select IDE_PIIX
     select DIMM
     select SMBIOS
-    select VMPORT
     select VMMOUSE
     select FW_CFG_DMA
 
@@ -77,6 +77,7 @@ config Q35
     imply VTD
     imply AMD_IOMMU
     imply E1000E_PCI_EXPRESS
+    imply VMPORT
     select PC_PCI
     select PC_ACPI
     select PCI_EXPRESS_Q35
@@ -84,7 +85,6 @@ config Q35
     select AHCI_ICH9
     select DIMM
     select SMBIOS
-    select VMPORT
     select VMMOUSE
     select FW_CFG_DMA
 
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index c33ce47..549c437 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -83,6 +83,7 @@
 #include "hw/mem/memory-device.h"
 #include "sysemu/replay.h"
 #include "qapi/qmp/qerror.h"
+#include "config-devices.h"
 
 /* debug PC/ISA interrupts */
 //#define DEBUG_IRQ
@@ -2793,7 +2794,11 @@ static void pc_machine_initfn(Object *obj)
 
     pcms->max_ram_below_4g = 0; /* use default */
     pcms->smm = ON_OFF_AUTO_AUTO;
+#ifdef CONFIG_VMPORT
     pcms->vmport = ON_OFF_AUTO_AUTO;
+#else
+    pcms->vmport = ON_OFF_AUTO_OFF;
+#endif /* CONFIG_VMPORT */
     /* acpi build is enabled by default if machine supports it */
     pcms->acpi_build_enabled = PC_MACHINE_GET_CLASS(pcms)->has_acpi_build;
     pcms->smbus_enabled = true;
-- 
1.8.3.1



Re: [Qemu-devel] [PULL 08/19] hw/i386: turn off vmport if CONFIG_VMPORT is disabled
Posted by Philippe Mathieu-Daudé 6 years, 6 months ago
Hi,

On 7/16/19 10:11 AM, Paolo Bonzini wrote:
> From: Julio Montes <julio.montes@intel.com>
> 
> vmport device is not included when CONFIG_VMPORT is disabled, hence
> QEMU fails with the following error:
> 
> `Unknown device 'vmport' for bus 'ISA': unknown.`
> 
> v2: imply VMPORT (Paolo Bonzini )
> 
> Signed-off-by: Julio Montes <julio.montes@intel.com>
> Message-Id: <20190712160257.18270-1-julio.montes@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/i386/Kconfig | 4 ++--
>  hw/i386/pc.c    | 5 +++++
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 4ddf2a9..b9c96ac 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -51,6 +51,7 @@ config PC_ACPI
>  config I440FX
>      bool
>      imply E1000_PCI
> +    imply VMPORT
>      select PC_PCI
>      select PC_ACPI
>      select ACPI_SMBUS
> @@ -58,7 +59,6 @@ config I440FX
>      select IDE_PIIX
>      select DIMM
>      select SMBIOS
> -    select VMPORT
>      select VMMOUSE
>      select FW_CFG_DMA
>  
> @@ -77,6 +77,7 @@ config Q35
>      imply VTD
>      imply AMD_IOMMU
>      imply E1000E_PCI_EXPRESS
> +    imply VMPORT
>      select PC_PCI
>      select PC_ACPI
>      select PCI_EXPRESS_Q35
> @@ -84,7 +85,6 @@ config Q35
>      select AHCI_ICH9
>      select DIMM
>      select SMBIOS
> -    select VMPORT
>      select VMMOUSE
>      select FW_CFG_DMA
>  
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index c33ce47..549c437 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -83,6 +83,7 @@
>  #include "hw/mem/memory-device.h"
>  #include "sysemu/replay.h"
>  #include "qapi/qmp/qerror.h"
> +#include "config-devices.h"
>  
>  /* debug PC/ISA interrupts */
>  //#define DEBUG_IRQ
> @@ -2793,7 +2794,11 @@ static void pc_machine_initfn(Object *obj)
>  
>      pcms->max_ram_below_4g = 0; /* use default */
>      pcms->smm = ON_OFF_AUTO_AUTO;
> +#ifdef CONFIG_VMPORT
>      pcms->vmport = ON_OFF_AUTO_AUTO;
> +#else
> +    pcms->vmport = ON_OFF_AUTO_OFF;
> +#endif /* CONFIG_VMPORT */
>      /* acpi build is enabled by default if machine supports it */
>      pcms->acpi_build_enabled = PC_MACHINE_GET_CLASS(pcms)->has_acpi_build;
>      pcms->smbus_enabled = true;
> 

Testing v4.1.0-rc1, this commit breaks ./configure
--without-default-devices:

  GEN     i386-softmmu/config-devices.mak.tmp
    select VMMOUSE if I440FX
    select VMMOUSE if Q35
    config VMMOUSE depends on VMPORT
Traceback (most recent call last):
  File "scripts/minikconf.py", line 703, in <module>
    config = data.compute_config()
  File "scripts/minikconf.py", line 253, in compute_config
    clause.process()
  File "scripts/minikconf.py", line 188, in process
    self.dest.set_value(False, self)
  File "scripts/minikconf.py", line 118, in set_value
    raise KconfigDataError('contradiction between clauses when setting
%s' % self)
__main__.KconfigDataError: contradiction between clauses when setting
VMMOUSE

97fd1ea8c1065839ae4c19bfdc3590033a5b9788 is the first bad commit
commit 97fd1ea8c1065839ae4c19bfdc3590033a5b9788
Author: Julio Montes <julio.montes@intel.com>
Date:   Fri Jul 12 16:02:57 2019 +0000

    hw/i386: turn off vmport if CONFIG_VMPORT is disabled

    vmport device is not included when CONFIG_VMPORT is disabled, hence
    QEMU fails with the following error:

    `Unknown device 'vmport' for bus 'ISA': unknown.`

    v2: imply VMPORT (Paolo Bonzini )

    Signed-off-by: Julio Montes <julio.montes@intel.com>
    Message-Id: <20190712160257.18270-1-julio.montes@intel.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Re: [Qemu-devel] [PULL 08/19] hw/i386: turn off vmport if CONFIG_VMPORT is disabled
Posted by Paolo Bonzini 6 years, 6 months ago
Should VMMOUSE also be implied?

Paolo

Il mar 16 lug 2019, 20:55 Philippe Mathieu-Daudé <philmd@redhat.com> ha
scritto:

> Hi,
>
> On 7/16/19 10:11 AM, Paolo Bonzini wrote:
> > From: Julio Montes <julio.montes@intel.com>
> >
> > vmport device is not included when CONFIG_VMPORT is disabled, hence
> > QEMU fails with the following error:
> >
> > `Unknown device 'vmport' for bus 'ISA': unknown.`
> >
> > v2: imply VMPORT (Paolo Bonzini )
> >
> > Signed-off-by: Julio Montes <julio.montes@intel.com>
> > Message-Id: <20190712160257.18270-1-julio.montes@intel.com>
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >  hw/i386/Kconfig | 4 ++--
> >  hw/i386/pc.c    | 5 +++++
> >  2 files changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> > index 4ddf2a9..b9c96ac 100644
> > --- a/hw/i386/Kconfig
> > +++ b/hw/i386/Kconfig
> > @@ -51,6 +51,7 @@ config PC_ACPI
> >  config I440FX
> >      bool
> >      imply E1000_PCI
> > +    imply VMPORT
> >      select PC_PCI
> >      select PC_ACPI
> >      select ACPI_SMBUS
> > @@ -58,7 +59,6 @@ config I440FX
> >      select IDE_PIIX
> >      select DIMM
> >      select SMBIOS
> > -    select VMPORT
> >      select VMMOUSE
> >      select FW_CFG_DMA
> >
> > @@ -77,6 +77,7 @@ config Q35
> >      imply VTD
> >      imply AMD_IOMMU
> >      imply E1000E_PCI_EXPRESS
> > +    imply VMPORT
> >      select PC_PCI
> >      select PC_ACPI
> >      select PCI_EXPRESS_Q35
> > @@ -84,7 +85,6 @@ config Q35
> >      select AHCI_ICH9
> >      select DIMM
> >      select SMBIOS
> > -    select VMPORT
> >      select VMMOUSE
> >      select FW_CFG_DMA
> >
> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> > index c33ce47..549c437 100644
> > --- a/hw/i386/pc.c
> > +++ b/hw/i386/pc.c
> > @@ -83,6 +83,7 @@
> >  #include "hw/mem/memory-device.h"
> >  #include "sysemu/replay.h"
> >  #include "qapi/qmp/qerror.h"
> > +#include "config-devices.h"
> >
> >  /* debug PC/ISA interrupts */
> >  //#define DEBUG_IRQ
> > @@ -2793,7 +2794,11 @@ static void pc_machine_initfn(Object *obj)
> >
> >      pcms->max_ram_below_4g = 0; /* use default */
> >      pcms->smm = ON_OFF_AUTO_AUTO;
> > +#ifdef CONFIG_VMPORT
> >      pcms->vmport = ON_OFF_AUTO_AUTO;
> > +#else
> > +    pcms->vmport = ON_OFF_AUTO_OFF;
> > +#endif /* CONFIG_VMPORT */
> >      /* acpi build is enabled by default if machine supports it */
> >      pcms->acpi_build_enabled =
> PC_MACHINE_GET_CLASS(pcms)->has_acpi_build;
> >      pcms->smbus_enabled = true;
> >
>
> Testing v4.1.0-rc1, this commit breaks ./configure
> --without-default-devices:
>
>   GEN     i386-softmmu/config-devices.mak.tmp
>     select VMMOUSE if I440FX
>     select VMMOUSE if Q35
>     config VMMOUSE depends on VMPORT
> Traceback (most recent call last):
>   File "scripts/minikconf.py", line 703, in <module>
>     config = data.compute_config()
>   File "scripts/minikconf.py", line 253, in compute_config
>     clause.process()
>   File "scripts/minikconf.py", line 188, in process
>     self.dest.set_value(False, self)
>   File "scripts/minikconf.py", line 118, in set_value
>     raise KconfigDataError('contradiction between clauses when setting
> %s' % self)
> __main__.KconfigDataError: contradiction between clauses when setting
> VMMOUSE
>
> 97fd1ea8c1065839ae4c19bfdc3590033a5b9788 is the first bad commit
> commit 97fd1ea8c1065839ae4c19bfdc3590033a5b9788
> Author: Julio Montes <julio.montes@intel.com>
> Date:   Fri Jul 12 16:02:57 2019 +0000
>
>     hw/i386: turn off vmport if CONFIG_VMPORT is disabled
>
>     vmport device is not included when CONFIG_VMPORT is disabled, hence
>     QEMU fails with the following error:
>
>     `Unknown device 'vmport' for bus 'ISA': unknown.`
>
>     v2: imply VMPORT (Paolo Bonzini )
>
>     Signed-off-by: Julio Montes <julio.montes@intel.com>
>     Message-Id: <20190712160257.18270-1-julio.montes@intel.com>
>     Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>