Message ID | 20181227063419.12981-14-yang.zhong@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Support Kconfig in QEMU | expand |
On 27/12/18 07:34, Yang Zhong wrote: > From: Paolo Bonzini <pbonzini@redhat.com> > > This lets you disable SCSI altogether with "CONFIG_SCSI=n". USB_STORAGE_BOT and USB_STORAGE_UAS must also select SCSI. Paolo
On 2018-12-27 07:34, Yang Zhong wrote: > From: Paolo Bonzini <pbonzini@redhat.com> > > This lets you disable SCSI altogether with "CONFIG_SCSI=n". > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > Signed-off-by: Yang Zhong <yang.zhong@intel.com> > --- > hw/scsi/Kconfig | 11 ++++++++++- > hw/scsi/Makefile.objs | 2 +- > 2 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig > index 6e7575397f..d669a4824e 100644 > --- a/hw/scsi/Kconfig > +++ b/hw/scsi/Kconfig > @@ -5,24 +5,29 @@ config LSI_SCSI_PCI > bool > default y > depends on PCI > + select SCSI > > config MPTSAS_SCSI_PCI > bool > default y > depends on PCI > + select SCSI > > config MEGASAS_SCSI_PCI > bool > default y > depends on PCI > + select SCSI > > config VMW_PVSCSI_SCSI_PCI > bool > default y > depends on PCI > + select SCSI > > config ESP > bool > + select SCSI > > config ESP_PCI > bool > @@ -30,11 +35,15 @@ config ESP_PCI > depends on PCI > select ESP > > -config PSERIES > +config SPAPR_VSCSI > bool > + select SCSI I think this should get "default y" and "depends on PSERIES" now. Thomas
On Fri, Jan 04, 2019 at 02:38:23PM +0100, Paolo Bonzini wrote: > On 27/12/18 07:34, Yang Zhong wrote: > > From: Paolo Bonzini <pbonzini@redhat.com> > > > > This lets you disable SCSI altogether with "CONFIG_SCSI=n". > > USB_STORAGE_BOT and USB_STORAGE_UAS must also select SCSI. > > Paolo Thanks for Paolo's reminder, i will add this. Regards, Yang
On Fri, Jan 04, 2019 at 02:39:50PM +0100, Thomas Huth wrote: > On 2018-12-27 07:34, Yang Zhong wrote: > > From: Paolo Bonzini <pbonzini@redhat.com> > > > > This lets you disable SCSI altogether with "CONFIG_SCSI=n". > > > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > > Signed-off-by: Yang Zhong <yang.zhong@intel.com> > > --- > > hw/scsi/Kconfig | 11 ++++++++++- > > hw/scsi/Makefile.objs | 2 +- > > 2 files changed, 11 insertions(+), 2 deletions(-) > > > > diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig > > index 6e7575397f..d669a4824e 100644 > > --- a/hw/scsi/Kconfig > > +++ b/hw/scsi/Kconfig > > > > -config PSERIES > > +config SPAPR_VSCSI > > bool > > + select SCSI > > I think this should get "default y" and "depends on PSERIES" now. > > Thomas Hello Thomas, I greped CONFIG_PSERIES from current Kconfig repo and got below list ./hw/net/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_llan.o ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr.o spapr_caps.o spapr_vio.o spapr_events.o ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_hcall.o spapr_iommu.o spapr_rtas.o ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_pci.o spapr_rtc.o spapr_drc.o ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_cpu_core.o spapr_ovec.o spapr_irq.o ./hw/ppc/Makefile.objs:ifeq ($(CONFIG_PCI)$(CONFIG_PSERIES)$(CONFIG_LINUX), yyy) ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_rtas_ddw.o ./hw/char/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_vty.o ./hw/nvram/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_nvram.o ./default-configs/ppc64-softmmu.mak:CONFIG_PSERIES=y ./default-configs/ppc64-softmmu.mak:CONFIG_XICS=$(CONFIG_PSERIES) ./default-configs/ppc64-softmmu.mak:CONFIG_XICS_SPAPR=$(CONFIG_PSERIES) ./default-configs/ppc64-softmmu.mak:CONFIG_XICS_KVM=$(call land,$(CONFIG_PSERIES),$(CONFIG_KVM)) Since this time is only for x86 and i did not add Kconfig file in hw/ppc/, i did not add this dependency too in here. In previous plan, i will add "config PSERRIES" in hw/ppc/Kconfig file for PowerPC pSeries and will add dependency in that time, thanks. Regards, Yang
On 08/01/19 09:04, Yang Zhong wrote: > On Fri, Jan 04, 2019 at 02:39:50PM +0100, Thomas Huth wrote: >> On 2018-12-27 07:34, Yang Zhong wrote: >>> From: Paolo Bonzini <pbonzini@redhat.com> >>> >>> This lets you disable SCSI altogether with "CONFIG_SCSI=n". >>> >>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> >>> Signed-off-by: Yang Zhong <yang.zhong@intel.com> >>> --- >>> hw/scsi/Kconfig | 11 ++++++++++- >>> hw/scsi/Makefile.objs | 2 +- >>> 2 files changed, 11 insertions(+), 2 deletions(-) >>> >>> diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig >>> index 6e7575397f..d669a4824e 100644 >>> --- a/hw/scsi/Kconfig >>> +++ b/hw/scsi/Kconfig >>> >>> -config PSERIES >>> +config SPAPR_VSCSI >>> bool >>> + select SCSI >> >> I think this should get "default y" and "depends on PSERIES" now. >> >> Thomas > > Hello Thomas, > > I greped CONFIG_PSERIES from current Kconfig repo and got below list > ./hw/net/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_llan.o > ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr.o spapr_caps.o spapr_vio.o spapr_events.o > ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_hcall.o spapr_iommu.o spapr_rtas.o > ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_pci.o spapr_rtc.o spapr_drc.o > ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_cpu_core.o spapr_ovec.o spapr_irq.o > ./hw/ppc/Makefile.objs:ifeq ($(CONFIG_PCI)$(CONFIG_PSERIES)$(CONFIG_LINUX), yyy) > ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_rtas_ddw.o > ./hw/char/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_vty.o > ./hw/nvram/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_nvram.o > ./default-configs/ppc64-softmmu.mak:CONFIG_PSERIES=y > ./default-configs/ppc64-softmmu.mak:CONFIG_XICS=$(CONFIG_PSERIES) > ./default-configs/ppc64-softmmu.mak:CONFIG_XICS_SPAPR=$(CONFIG_PSERIES) > ./default-configs/ppc64-softmmu.mak:CONFIG_XICS_KVM=$(call land,$(CONFIG_PSERIES),$(CONFIG_KVM)) > > Since this time is only for x86 and i did not add Kconfig file in hw/ppc/, i did not add > this dependency too in here. > > In previous plan, i will add "config PSERRIES" in hw/ppc/Kconfig file for PowerPC pSeries > and will add dependency in that time, thanks. You could skip the conversion to Kconfig of default-configs/, but already add all "source hw/ARCH/Kconfig" statements to hw/Kconfig and all "select" statements for buses. Then, all machine types for example could start removing CONFIG_SCSI=y and CONFIG_PCI=y, even if you do not have the machines converted. Paolo
On Tue, Jan 08, 2019 at 12:42:06PM +0100, Paolo Bonzini wrote: > On 08/01/19 09:04, Yang Zhong wrote: > > On Fri, Jan 04, 2019 at 02:39:50PM +0100, Thomas Huth wrote: > >> On 2018-12-27 07:34, Yang Zhong wrote: > >>> From: Paolo Bonzini <pbonzini@redhat.com> > >>> > >>> This lets you disable SCSI altogether with "CONFIG_SCSI=n". > >>> > >>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > >>> Signed-off-by: Yang Zhong <yang.zhong@intel.com> > >>> --- > >>> hw/scsi/Kconfig | 11 ++++++++++- > >>> hw/scsi/Makefile.objs | 2 +- > >>> 2 files changed, 11 insertions(+), 2 deletions(-) > >>> > >>> diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig > >>> index 6e7575397f..d669a4824e 100644 > >>> --- a/hw/scsi/Kconfig > >>> +++ b/hw/scsi/Kconfig > >>> > >>> -config PSERIES > >>> +config SPAPR_VSCSI > >>> bool > >>> + select SCSI > >> > >> I think this should get "default y" and "depends on PSERIES" now. > >> > >> Thomas > > > > Hello Thomas, > > > > I greped CONFIG_PSERIES from current Kconfig repo and got below list > > ./hw/net/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_llan.o > > ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr.o spapr_caps.o spapr_vio.o spapr_events.o > > ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_hcall.o spapr_iommu.o spapr_rtas.o > > ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_pci.o spapr_rtc.o spapr_drc.o > > ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_cpu_core.o spapr_ovec.o spapr_irq.o > > ./hw/ppc/Makefile.objs:ifeq ($(CONFIG_PCI)$(CONFIG_PSERIES)$(CONFIG_LINUX), yyy) > > ./hw/ppc/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_rtas_ddw.o > > ./hw/char/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_vty.o > > ./hw/nvram/Makefile.objs:obj-$(CONFIG_PSERIES) += spapr_nvram.o > > ./default-configs/ppc64-softmmu.mak:CONFIG_PSERIES=y > > ./default-configs/ppc64-softmmu.mak:CONFIG_XICS=$(CONFIG_PSERIES) > > ./default-configs/ppc64-softmmu.mak:CONFIG_XICS_SPAPR=$(CONFIG_PSERIES) > > ./default-configs/ppc64-softmmu.mak:CONFIG_XICS_KVM=$(call land,$(CONFIG_PSERIES),$(CONFIG_KVM)) > > > > Since this time is only for x86 and i did not add Kconfig file in hw/ppc/, i did not add > > this dependency too in here. > > > > In previous plan, i will add "config PSERRIES" in hw/ppc/Kconfig file for PowerPC pSeries > > and will add dependency in that time, thanks. > > You could skip the conversion to Kconfig of default-configs/, but > already add all "source hw/ARCH/Kconfig" statements to hw/Kconfig and > all "select" statements for buses. Then, all machine types for example > could start removing CONFIG_SCSI=y and CONFIG_PCI=y, even if you do not > have the machines converted. > Hello Paolo, Okay, i will add extra patches for other machines and only keep ARCHs dependency for default-configs/*-softmmu.mak in next stage. The new patches will include: 1) hw/ARCH/Makefile configurable 2) Add Kconfig into hw/ARCH/ 3) convert bus, like pci, usb in other ARCHs Regards, Yang > Paolo
diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig index 6e7575397f..d669a4824e 100644 --- a/hw/scsi/Kconfig +++ b/hw/scsi/Kconfig @@ -5,24 +5,29 @@ config LSI_SCSI_PCI bool default y depends on PCI + select SCSI config MPTSAS_SCSI_PCI bool default y depends on PCI + select SCSI config MEGASAS_SCSI_PCI bool default y depends on PCI + select SCSI config VMW_PVSCSI_SCSI_PCI bool default y depends on PCI + select SCSI config ESP bool + select SCSI config ESP_PCI bool @@ -30,11 +35,15 @@ config ESP_PCI depends on PCI select ESP -config PSERIES +config SPAPR_VSCSI bool + select SCSI config VIRTIO_SCSI bool + default y + depends on VIRTIO + select SCSI config VHOST_USER_SCSI bool diff --git a/hw/scsi/Makefile.objs b/hw/scsi/Makefile.objs index 45167baeaf..54b36ed8b1 100644 --- a/hw/scsi/Makefile.objs +++ b/hw/scsi/Makefile.objs @@ -6,7 +6,7 @@ common-obj-$(CONFIG_MEGASAS_SCSI_PCI) += megasas.o common-obj-$(CONFIG_VMW_PVSCSI_SCSI_PCI) += vmw_pvscsi.o common-obj-$(CONFIG_ESP) += esp.o common-obj-$(CONFIG_ESP_PCI) += esp-pci.o -obj-$(CONFIG_PSERIES) += spapr_vscsi.o +obj-$(CONFIG_SPAPR_VSCSI) += spapr_vscsi.o ifeq ($(CONFIG_VIRTIO_SCSI),y) obj-y += virtio-scsi.o virtio-scsi-dataplane.o