mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-01 08:56:32 +00:00
packaging: merge packaging repository
git-subtree-dir: tools/packaging git-subtree-mainline:f818b46a41
git-subtree-split:1f22d72d5d
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
3
tools/packaging/qemu/README.md
Normal file
3
tools/packaging/qemu/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# QEMU patches
|
||||
|
||||
This directory contains patches used to build QEMU.
|
159
tools/packaging/qemu/default-configs/aarch64-softmmu.mak
Normal file
159
tools/packaging/qemu/default-configs/aarch64-softmmu.mak
Normal file
@@ -0,0 +1,159 @@
|
||||
# Default configuration for aarch64-softmmu
|
||||
|
||||
# We support all the 32 bit boards so need all their config
|
||||
include arm-softmmu.mak
|
||||
|
||||
CONFIG_AUX=y
|
||||
CONFIG_DDC=y
|
||||
CONFIG_DPCD=y
|
||||
CONFIG_XLNX_ZYNQMP=y
|
||||
CONFIG_XLNX_ZYNQMP_ARM=y
|
||||
CONFIG_XLNX_VERSAL=y
|
||||
CONFIG_SBSA_REF=y
|
||||
CONFIG_ARM_SMMUV3=y
|
||||
CONFIG_MEM_DEVICE=y
|
||||
CONFIG_DIMM=y
|
||||
|
||||
# Below is borrowed from i386-softmmu.mak of Kata
|
||||
# VM port
|
||||
CONFIG_VMMOUSE=n
|
||||
CONFIG_VMPORT=n
|
||||
|
||||
# VMWARE
|
||||
CONFIG_VMW_PVSCSI_SCSI_PCI=n
|
||||
CONFIG_VMXNET3_PCI=n
|
||||
|
||||
# Audio and sound cards
|
||||
CONFIG_AC97=n
|
||||
CONFIG_ADLIB=n
|
||||
CONFIG_CS4231A=n
|
||||
CONFIG_ES1370=n
|
||||
CONFIG_GUS=n
|
||||
CONFIG_HDA=n
|
||||
CONFIG_SB16=n
|
||||
CONFIG_SD=n
|
||||
|
||||
# Automotive
|
||||
CONFIG_CAN_BUS=n
|
||||
CONFIG_CAN_PCI=n
|
||||
CONFIG_CAN_SJA1000=n
|
||||
|
||||
# Network
|
||||
CONFIG_E1000_PCI=n
|
||||
CONFIG_E1000E_PCI_EXPRESS=n
|
||||
CONFIG_EEPRO100_PCI=n
|
||||
CONFIG_NE2000_COMMON=n
|
||||
CONFIG_NE2000_ISA=n
|
||||
CONFIG_NE2000_PCI=n
|
||||
CONFIG_PCNET_COMMON=n
|
||||
CONFIG_PCNET_PCI=n
|
||||
CONFIG_ROCKER=n
|
||||
CONFIG_RTL8139_PCI=n
|
||||
|
||||
# USB
|
||||
CONFIG_USB=n
|
||||
CONFIG_USB_AUDIO=n
|
||||
CONFIG_USB_BLUETOOTH=n
|
||||
CONFIG_USB_EHCI=n
|
||||
CONFIG_USB_EHCI_PCI=n
|
||||
CONFIG_USB_NETWORK=n
|
||||
CONFIG_USB_OHCI=n
|
||||
CONFIG_USB_OHCI_PCI=n
|
||||
CONFIG_USB_SERIAL=n
|
||||
CONFIG_USB_SMARTCARD=n
|
||||
CONFIG_USB_STORAGE_BOT=n
|
||||
CONFIG_USB_STORAGE_MTP=n
|
||||
CONFIG_USB_STORAGE_UAS=n
|
||||
CONFIG_USB_TABLET_WACOM=n
|
||||
CONFIG_USB_UHCI=n
|
||||
CONFIG_USB_XHCI=n
|
||||
CONFIG_USB_XHCI_NEC=n
|
||||
|
||||
# ISA
|
||||
CONFIG_IDE_ISA=n
|
||||
CONFIG_ISA_DEBUG=n
|
||||
CONFIG_ISA_IPMI_BT=n
|
||||
CONFIG_ISA_IPMI_KCS=n
|
||||
|
||||
# VGA
|
||||
CONFIG_ATI_VGA=n
|
||||
CONFIG_VGA=n
|
||||
CONFIG_VGA_CIRRUS=n
|
||||
CONFIG_VGA_ISA=n
|
||||
CONFIG_VGA_PCI=n
|
||||
CONFIG_VHOST_USER_VGA=n
|
||||
CONFIG_VIRTIO_VGA=n
|
||||
CONFIG_VMWARE_VGA=n
|
||||
|
||||
# Displays
|
||||
CONFIG_BOCHS_DISPLAY=n
|
||||
CONFIG_DDC=n
|
||||
CONFIG_QXL=n
|
||||
|
||||
# Graphics
|
||||
CONFIG_OPENGL=n
|
||||
CONFIG_SPICE=n
|
||||
CONFIG_X11=n
|
||||
|
||||
# test devices
|
||||
CONFIG_HYPERV_TESTDEV=n
|
||||
CONFIG_ISA_TESTDEV=n
|
||||
CONFIG_PCI_TESTDEV=n
|
||||
|
||||
# XEN
|
||||
CONFIG_XEN=n
|
||||
|
||||
# PCIe
|
||||
CONFIG_XIO3130=n
|
||||
|
||||
# SCSI
|
||||
CONFIG_ESP=n
|
||||
CONFIG_ESP_PCI=n
|
||||
CONFIG_LSI_SCSI_PCI=n
|
||||
CONFIG_MEGASAS_SCSI_PCI=n
|
||||
CONFIG_MPTSAS_SCSI_PCI=n
|
||||
|
||||
# i2c
|
||||
CONFIG_BITBANG_I2C=n
|
||||
|
||||
# UART
|
||||
CONFIG_SERIAL_PCI_MULTI=n
|
||||
|
||||
# PCI
|
||||
CONFIG_EDU=n
|
||||
CONFIG_I82801B11=n
|
||||
CONFIG_IOH3420=n
|
||||
CONFIG_IPACK=n
|
||||
CONFIG_PXB=n
|
||||
|
||||
# SD
|
||||
CONFIG_SDHCI=n
|
||||
CONFIG_SDHCI_PCI=n
|
||||
|
||||
# watchdog
|
||||
CONFIG_WDT_IB6300ESB=n
|
||||
CONFIG_WDT_IB700=n
|
||||
|
||||
# Apple
|
||||
CONFIG_APPLESMC=n
|
||||
|
||||
# Timer
|
||||
CONFIG_HPET=n
|
||||
|
||||
# IPMI
|
||||
CONFIG_IPMI=n
|
||||
CONFIG_IPMI_EXTERN=n
|
||||
CONFIG_IPMI_LOCAL=n
|
||||
|
||||
# misc
|
||||
CONFIG_IVSHMEM_DEVICE=n
|
||||
CONFIG_PVPANIC=n
|
||||
CONFIG_SEV=n
|
||||
CONFIG_SGA=n
|
||||
|
||||
#vhost
|
||||
CONFIG_VHOST_USER_INPUT=n
|
||||
|
||||
# TPM
|
||||
CONFIG_TPM_CRB=n
|
||||
CONFIG_TPM_TIS=n
|
216
tools/packaging/qemu/default-configs/arm-softmmu.mak
Normal file
216
tools/packaging/qemu/default-configs/arm-softmmu.mak
Normal file
@@ -0,0 +1,216 @@
|
||||
# Default configuration for arm-softmmu
|
||||
|
||||
CONFIG_VGA=y
|
||||
CONFIG_NAND=y
|
||||
CONFIG_ECC=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_PTIMER=y
|
||||
CONFIG_MAX7310=y
|
||||
CONFIG_WM8750=y
|
||||
CONFIG_TWL92230=y
|
||||
CONFIG_TSC2005=y
|
||||
CONFIG_LM832X=y
|
||||
CONFIG_TMP105=y
|
||||
CONFIG_TMP421=y
|
||||
CONFIG_PCA9552=y
|
||||
CONFIG_STELLARIS=y
|
||||
CONFIG_STELLARIS_INPUT=y
|
||||
CONFIG_STELLARIS_ENET=y
|
||||
CONFIG_SSD0303=y
|
||||
CONFIG_SSD0323=y
|
||||
CONFIG_DDC=y
|
||||
CONFIG_SII9022=y
|
||||
CONFIG_ADS7846=y
|
||||
CONFIG_MAX111X=y
|
||||
CONFIG_SSI=y
|
||||
CONFIG_SSI_SD=y
|
||||
CONFIG_SSI_M25P80=y
|
||||
CONFIG_LAN9118=y
|
||||
CONFIG_SMC91C111=y
|
||||
CONFIG_ALLWINNER_EMAC=y
|
||||
CONFIG_IMX_FEC=y
|
||||
CONFIG_FTGMAC100=y
|
||||
CONFIG_DS1338=y
|
||||
CONFIG_PFLASH_CFI01=y
|
||||
CONFIG_PFLASH_CFI02=y
|
||||
CONFIG_MICRODRIVE=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_MUSB=y
|
||||
CONFIG_USB_EHCI_SYSBUS=y
|
||||
CONFIG_PLATFORM_BUS=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
|
||||
CONFIG_ARM11MPCORE=y
|
||||
CONFIG_A9MPCORE=y
|
||||
CONFIG_A15MPCORE=y
|
||||
|
||||
CONFIG_ARM_V7M=y
|
||||
CONFIG_NETDUINO2=y
|
||||
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GIC_KVM=$(CONFIG_KVM)
|
||||
CONFIG_ARM_TIMER=y
|
||||
CONFIG_ARM_MPTIMER=y
|
||||
CONFIG_A9_GTIMER=y
|
||||
CONFIG_PL011=y
|
||||
CONFIG_PL022=y
|
||||
CONFIG_PL031=y
|
||||
CONFIG_PL041=y
|
||||
CONFIG_PL050=y
|
||||
CONFIG_PL061=y
|
||||
CONFIG_PL080=y
|
||||
CONFIG_PL110=y
|
||||
CONFIG_PL181=y
|
||||
CONFIG_PL190=y
|
||||
CONFIG_PL310=y
|
||||
CONFIG_PL330=y
|
||||
CONFIG_CADENCE=y
|
||||
CONFIG_XGMAC=y
|
||||
CONFIG_EXYNOS4=y
|
||||
CONFIG_PXA2XX=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_BITBANG_I2C=y
|
||||
CONFIG_FRAMEBUFFER=y
|
||||
CONFIG_XILINX_SPIPS=y
|
||||
CONFIG_ZYNQ_DEVCFG=y
|
||||
|
||||
CONFIG_ARM11SCU=y
|
||||
CONFIG_A9SCU=y
|
||||
CONFIG_DIGIC=y
|
||||
CONFIG_MARVELL_88W8618=y
|
||||
CONFIG_OMAP=y
|
||||
CONFIG_TSC210X=y
|
||||
CONFIG_BLIZZARD=y
|
||||
CONFIG_ONENAND=y
|
||||
CONFIG_TUSB6010=y
|
||||
CONFIG_IMX=y
|
||||
CONFIG_MAINSTONE=y
|
||||
CONFIG_MPS2=y
|
||||
CONFIG_MUSCA=y
|
||||
CONFIG_NSERIES=y
|
||||
CONFIG_RASPI=y
|
||||
CONFIG_REALVIEW=y
|
||||
CONFIG_ZAURUS=y
|
||||
CONFIG_ZYNQ=y
|
||||
CONFIG_STM32F2XX_TIMER=y
|
||||
CONFIG_STM32F2XX_USART=y
|
||||
CONFIG_STM32F2XX_SYSCFG=y
|
||||
CONFIG_STM32F2XX_ADC=y
|
||||
CONFIG_STM32F2XX_SPI=y
|
||||
CONFIG_STM32F205_SOC=y
|
||||
CONFIG_NRF51_SOC=y
|
||||
|
||||
CONFIG_CMSDK_APB_TIMER=y
|
||||
CONFIG_CMSDK_APB_DUALTIMER=y
|
||||
CONFIG_CMSDK_APB_UART=y
|
||||
CONFIG_CMSDK_APB_WATCHDOG=y
|
||||
|
||||
CONFIG_MPS2_FPGAIO=y
|
||||
CONFIG_MPS2_SCC=y
|
||||
|
||||
CONFIG_TZ_MPC=y
|
||||
CONFIG_TZ_MSC=y
|
||||
CONFIG_TZ_PPC=y
|
||||
CONFIG_ARMSSE=y
|
||||
CONFIG_IOTKIT_SECCTL=y
|
||||
CONFIG_IOTKIT_SYSCTL=y
|
||||
CONFIG_IOTKIT_SYSINFO=y
|
||||
CONFIG_ARMSSE_CPUID=y
|
||||
|
||||
CONFIG_VERSATILE=y
|
||||
CONFIG_VERSATILE_PCI=y
|
||||
CONFIG_VERSATILE_I2C=y
|
||||
|
||||
CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
|
||||
CONFIG_VFIO_PLATFORM=y
|
||||
CONFIG_VFIO_XGMAC=y
|
||||
CONFIG_VFIO_AMD_XGBE=y
|
||||
|
||||
CONFIG_INTEGRATOR=y
|
||||
CONFIG_INTEGRATOR_DEBUG=y
|
||||
|
||||
CONFIG_ALLWINNER_A10_PIT=y
|
||||
CONFIG_ALLWINNER_A10_PIC=y
|
||||
CONFIG_ALLWINNER_A10=y
|
||||
|
||||
CONFIG_FSL_IMX6=y
|
||||
CONFIG_FSL_IMX31=y
|
||||
CONFIG_FSL_IMX25=y
|
||||
CONFIG_FSL_IMX7=y
|
||||
CONFIG_FSL_IMX6UL=y
|
||||
|
||||
CONFIG_IMX_I2C=y
|
||||
|
||||
CONFIG_PCIE_PORT=y
|
||||
CONFIG_XIO3130=y
|
||||
CONFIG_IOH3420=y
|
||||
CONFIG_I82801B11=y
|
||||
CONFIG_ACPI=y
|
||||
CONFIG_ARM_VIRT=y
|
||||
CONFIG_SMBIOS=y
|
||||
CONFIG_ASPEED_SOC=y
|
||||
CONFIG_SMBUS_EEPROM=y
|
||||
CONFIG_GPIO_KEY=y
|
||||
CONFIG_MSF2=y
|
||||
CONFIG_FW_CFG_DMA=y
|
||||
CONFIG_XILINX_AXI=y
|
||||
CONFIG_PCI_EXPRESS_DESIGNWARE=y
|
||||
|
||||
CONFIG_STRONGARM=y
|
||||
CONFIG_HIGHBANK=y
|
||||
CONFIG_MUSICPAL=y
|
||||
CONFIG_MEM_DEVICE=y
|
||||
CONFIG_DIMM=y
|
||||
CONFIG_NVDIMM=y
|
||||
CONFIG_ACPI_NVDIMM=y
|
||||
|
||||
CONFIG_PCI=y
|
||||
# For now, CONFIG_IDE_CORE requires ISA, so we enable it here
|
||||
CONFIG_ISA_BUS=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
include virtio.mak
|
||||
CONFIG_USB_UHCI=y
|
||||
CONFIG_USB_OHCI=y
|
||||
CONFIG_USB_EHCI=y
|
||||
CONFIG_USB_XHCI=y
|
||||
CONFIG_USB_XHCI_NEC=y
|
||||
CONFIG_NE2000_PCI=n
|
||||
CONFIG_EEPRO100_PCI=n
|
||||
CONFIG_PCNET_PCI=n
|
||||
CONFIG_PCNET_COMMON=n
|
||||
CONFIG_AC97=n
|
||||
CONFIG_HDA=y
|
||||
CONFIG_ES1370=n
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_LSI_SCSI_PCI=y
|
||||
CONFIG_VMW_PVSCSI_SCSI_PCI=n
|
||||
CONFIG_MEGASAS_SCSI_PCI=n
|
||||
CONFIG_MPTSAS_SCSI_PCI=n
|
||||
CONFIG_RTL8139_PCI=n
|
||||
CONFIG_E1000_PCI=n
|
||||
CONFIG_E1000E_PCI_EXPRESS=n
|
||||
CONFIG_IDE_CORE=y
|
||||
CONFIG_IDE_QDEV=y
|
||||
CONFIG_IDE_PCI=y
|
||||
CONFIG_AHCI=y
|
||||
CONFIG_ESP=n
|
||||
CONFIG_ESP_PCI=n
|
||||
CONFIG_SERIAL_ISA=y
|
||||
CONFIG_SERIAL_PCI=y
|
||||
CONFIG_CAN_BUS=y
|
||||
CONFIG_CAN_SJA1000=y
|
||||
CONFIG_CAN_PCI=y
|
||||
CONFIG_IPACK=n
|
||||
CONFIG_WDT_IB6300ESB=n
|
||||
CONFIG_PCI_TESTDEV=n
|
||||
CONFIG_NVME_PCI=y
|
||||
CONFIG_SD=y
|
||||
CONFIG_SDHCI=n
|
||||
CONFIG_EDU=n
|
||||
CONFIG_VGA_PCI=y
|
||||
CONFIG_BOCHS_DISPLAY=n
|
||||
CONFIG_IVSHMEM_DEVICE=n
|
||||
CONFIG_ROCKER=n
|
||||
CONFIG_VFIO=$(CONFIG_LINUX)
|
||||
CONFIG_VFIO_PCI=y
|
||||
CONFIG_PCI_GENERIC=y
|
216
tools/packaging/qemu/default-configs/arm-softmmu.mak.virt
Normal file
216
tools/packaging/qemu/default-configs/arm-softmmu.mak.virt
Normal file
@@ -0,0 +1,216 @@
|
||||
# Default configuration for arm-softmmu
|
||||
|
||||
CONFIG_VGA=y
|
||||
CONFIG_NAND=y
|
||||
CONFIG_ECC=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_PTIMER=y
|
||||
CONFIG_MAX7310=y
|
||||
CONFIG_WM8750=y
|
||||
CONFIG_TWL92230=y
|
||||
CONFIG_TSC2005=y
|
||||
CONFIG_LM832X=y
|
||||
CONFIG_TMP105=y
|
||||
CONFIG_TMP421=y
|
||||
CONFIG_PCA9552=y
|
||||
CONFIG_STELLARIS=n
|
||||
CONFIG_STELLARIS_INPUT=y
|
||||
CONFIG_STELLARIS_ENET=y
|
||||
CONFIG_SSD0303=y
|
||||
CONFIG_SSD0323=y
|
||||
CONFIG_DDC=y
|
||||
CONFIG_SII9022=y
|
||||
CONFIG_ADS7846=y
|
||||
CONFIG_MAX111X=y
|
||||
CONFIG_SSI=y
|
||||
CONFIG_SSI_SD=y
|
||||
CONFIG_SSI_M25P80=y
|
||||
CONFIG_LAN9118=y
|
||||
CONFIG_SMC91C111=y
|
||||
CONFIG_ALLWINNER_EMAC=y
|
||||
CONFIG_IMX_FEC=y
|
||||
CONFIG_FTGMAC100=y
|
||||
CONFIG_DS1338=y
|
||||
CONFIG_PFLASH_CFI01=y
|
||||
CONFIG_PFLASH_CFI02=y
|
||||
CONFIG_MICRODRIVE=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_MUSB=y
|
||||
CONFIG_USB_EHCI_SYSBUS=y
|
||||
CONFIG_PLATFORM_BUS=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
|
||||
CONFIG_ARM11MPCORE=y
|
||||
CONFIG_A9MPCORE=y
|
||||
CONFIG_A15MPCORE=y
|
||||
|
||||
CONFIG_ARM_V7M=y
|
||||
CONFIG_NETDUINO2=n
|
||||
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GIC_KVM=$(CONFIG_KVM)
|
||||
CONFIG_ARM_TIMER=y
|
||||
CONFIG_ARM_MPTIMER=y
|
||||
CONFIG_A9_GTIMER=y
|
||||
CONFIG_PL011=y
|
||||
CONFIG_PL022=n
|
||||
CONFIG_PL031=y
|
||||
CONFIG_PL041=n
|
||||
CONFIG_PL050=n
|
||||
CONFIG_PL061=y
|
||||
CONFIG_PL080=y
|
||||
CONFIG_PL110=n
|
||||
CONFIG_PL181=n
|
||||
CONFIG_PL190=y
|
||||
CONFIG_PL310=y
|
||||
CONFIG_PL330=y
|
||||
CONFIG_CADENCE=y
|
||||
CONFIG_XGMAC=y
|
||||
CONFIG_EXYNOS4=n
|
||||
CONFIG_PXA2XX=n
|
||||
CONFIG_I2C=y
|
||||
CONFIG_BITBANG_I2C=y
|
||||
CONFIG_FRAMEBUFFER=y
|
||||
CONFIG_XILINX_SPIPS=y
|
||||
CONFIG_ZYNQ_DEVCFG=y
|
||||
|
||||
CONFIG_ARM11SCU=y
|
||||
CONFIG_A9SCU=y
|
||||
CONFIG_DIGIC=n
|
||||
CONFIG_MARVELL_88W8618=y
|
||||
CONFIG_OMAP=y
|
||||
CONFIG_TSC210X=y
|
||||
CONFIG_BLIZZARD=y
|
||||
CONFIG_ONENAND=y
|
||||
CONFIG_TUSB6010=y
|
||||
CONFIG_IMX=y
|
||||
CONFIG_MAINSTONE=n
|
||||
CONFIG_MPS2=n
|
||||
CONFIG_MUSCA=n
|
||||
CONFIG_NSERIES=n
|
||||
CONFIG_RASPI=n
|
||||
CONFIG_REALVIEW=n
|
||||
CONFIG_ZAURUS=y
|
||||
CONFIG_ZYNQ=n
|
||||
CONFIG_STM32F2XX_TIMER=y
|
||||
CONFIG_STM32F2XX_USART=y
|
||||
CONFIG_STM32F2XX_SYSCFG=y
|
||||
CONFIG_STM32F2XX_ADC=y
|
||||
CONFIG_STM32F2XX_SPI=y
|
||||
CONFIG_STM32F205_SOC=n
|
||||
CONFIG_NRF51_SOC=n
|
||||
|
||||
CONFIG_CMSDK_APB_TIMER=y
|
||||
CONFIG_CMSDK_APB_DUALTIMER=y
|
||||
CONFIG_CMSDK_APB_UART=y
|
||||
CONFIG_CMSDK_APB_WATCHDOG=y
|
||||
|
||||
CONFIG_MPS2_FPGAIO=y
|
||||
CONFIG_MPS2_SCC=y
|
||||
|
||||
CONFIG_TZ_MPC=y
|
||||
CONFIG_TZ_MSC=y
|
||||
CONFIG_TZ_PPC=y
|
||||
CONFIG_ARMSSE=y
|
||||
CONFIG_IOTKIT_SECCTL=y
|
||||
CONFIG_IOTKIT_SYSCTL=y
|
||||
CONFIG_IOTKIT_SYSINFO=y
|
||||
CONFIG_ARMSSE_CPUID=y
|
||||
|
||||
CONFIG_VERSATILE=n
|
||||
CONFIG_VERSATILE_PCI=y
|
||||
CONFIG_VERSATILE_I2C=y
|
||||
|
||||
CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
|
||||
CONFIG_VFIO=$(CONFIG_LINUX)
|
||||
CONFIG_VFIO_PLATFORM=y
|
||||
CONFIG_VFIO_XGMAC=y
|
||||
CONFIG_VFIO_AMD_XGBE=y
|
||||
|
||||
CONFIG_INTEGRATOR=n
|
||||
CONFIG_INTEGRATOR_DEBUG=y
|
||||
|
||||
CONFIG_ALLWINNER_A10_PIT=n
|
||||
CONFIG_ALLWINNER_A10_PIC=n
|
||||
CONFIG_ALLWINNER_A10=n
|
||||
|
||||
CONFIG_FSL_IMX6=n
|
||||
CONFIG_FSL_IMX31=n
|
||||
CONFIG_FSL_IMX25=n
|
||||
CONFIG_FSL_IMX7=n
|
||||
CONFIG_FSL_IMX6UL=n
|
||||
|
||||
CONFIG_IMX_I2C=y
|
||||
|
||||
CONFIG_PCIE_PORT=y
|
||||
CONFIG_XIO3130=y
|
||||
CONFIG_IOH3420=y
|
||||
CONFIG_I82801B11=y
|
||||
CONFIG_ACPI=y
|
||||
CONFIG_ARM_VIRT=y
|
||||
CONFIG_SMBIOS=y
|
||||
CONFIG_ASPEED_SOC=n
|
||||
CONFIG_SMBUS_EEPROM=y
|
||||
CONFIG_GPIO_KEY=y
|
||||
CONFIG_MSF2=n
|
||||
CONFIG_FW_CFG_DMA=y
|
||||
CONFIG_XILINX_AXI=y
|
||||
CONFIG_PCI_EXPRESS_DESIGNWARE=y
|
||||
|
||||
CONFIG_STRONGARM=n
|
||||
CONFIG_HIGHBANK=n
|
||||
CONFIG_MUSICPAL=n
|
||||
CONFIG_MEM_DEVICE=y
|
||||
CONFIG_DIMM=y
|
||||
CONFIG_NVDIMM=y
|
||||
CONFIG_ACPI_NVDIMM=y
|
||||
|
||||
CONFIG_PCI=y
|
||||
# For now, CONFIG_IDE_CORE requires ISA, so we enable it here
|
||||
CONFIG_ISA_BUS=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
include virtio.mak
|
||||
CONFIG_USB_UHCI=y
|
||||
CONFIG_USB_OHCI=y
|
||||
CONFIG_USB_EHCI=y
|
||||
CONFIG_USB_XHCI=y
|
||||
CONFIG_USB_XHCI_NEC=y
|
||||
CONFIG_NE2000_PCI=n
|
||||
CONFIG_EEPRO100_PCI=n
|
||||
CONFIG_PCNET_PCI=n
|
||||
CONFIG_PCNET_COMMON=n
|
||||
CONFIG_AC97=n
|
||||
CONFIG_HDA=y
|
||||
CONFIG_ES1370=n
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_LSI_SCSI_PCI=y
|
||||
CONFIG_VMW_PVSCSI_SCSI_PCI=n
|
||||
CONFIG_MEGASAS_SCSI_PCI=n
|
||||
CONFIG_MPTSAS_SCSI_PCI=n
|
||||
CONFIG_RTL8139_PCI=n
|
||||
CONFIG_E1000_PCI=n
|
||||
CONFIG_E1000E_PCI_EXPRESS=n
|
||||
CONFIG_IDE_CORE=y
|
||||
CONFIG_IDE_QDEV=y
|
||||
CONFIG_IDE_PCI=y
|
||||
CONFIG_AHCI=y
|
||||
CONFIG_ESP=n
|
||||
CONFIG_ESP_PCI=n
|
||||
CONFIG_SERIAL_ISA=y
|
||||
CONFIG_SERIAL_PCI=y
|
||||
CONFIG_CAN_BUS=y
|
||||
CONFIG_CAN_SJA1000=y
|
||||
CONFIG_CAN_PCI=y
|
||||
CONFIG_IPACK=n
|
||||
CONFIG_WDT_IB6300ESB=n
|
||||
CONFIG_PCI_TESTDEV=n
|
||||
CONFIG_NVME_PCI=y
|
||||
CONFIG_SD=y
|
||||
CONFIG_SDHCI=n
|
||||
CONFIG_EDU=n
|
||||
CONFIG_VGA_PCI=y
|
||||
CONFIG_BOCHS_DISPLAY=n
|
||||
CONFIG_IVSHMEM_DEVICE=n
|
||||
CONFIG_ROCKER=n
|
||||
CONFIG_VFIO_PCI=y
|
||||
CONFIG_PCI_GENERIC=y
|
148
tools/packaging/qemu/default-configs/i386-softmmu.mak
Normal file
148
tools/packaging/qemu/default-configs/i386-softmmu.mak
Normal file
@@ -0,0 +1,148 @@
|
||||
# Boards
|
||||
CONFIG_ACPI_PCI=y
|
||||
CONFIG_I440FX=y
|
||||
CONFIG_ISAPC=n
|
||||
CONFIG_Q35=y
|
||||
|
||||
# VM port
|
||||
CONFIG_VMMOUSE=n
|
||||
CONFIG_VMPORT=n
|
||||
|
||||
# VMWARE
|
||||
CONFIG_VMW_PVSCSI_SCSI_PCI=n
|
||||
CONFIG_VMXNET3_PCI=n
|
||||
|
||||
# Audio and sound cards
|
||||
CONFIG_AC97=n
|
||||
CONFIG_ADLIB=n
|
||||
CONFIG_CS4231A=n
|
||||
CONFIG_ES1370=n
|
||||
CONFIG_GUS=n
|
||||
CONFIG_HDA=n
|
||||
CONFIG_SB16=n
|
||||
CONFIG_SD=n
|
||||
|
||||
# Automotive
|
||||
CONFIG_CAN_BUS=n
|
||||
CONFIG_CAN_PCI=n
|
||||
CONFIG_CAN_SJA1000=n
|
||||
|
||||
# Network
|
||||
CONFIG_E1000_PCI=n
|
||||
CONFIG_E1000E_PCI_EXPRESS=n
|
||||
CONFIG_EEPRO100_PCI=n
|
||||
CONFIG_NE2000_COMMON=n
|
||||
CONFIG_NE2000_ISA=n
|
||||
CONFIG_NE2000_PCI=n
|
||||
CONFIG_PCNET_COMMON=n
|
||||
CONFIG_PCNET_PCI=n
|
||||
CONFIG_ROCKER=n
|
||||
CONFIG_RTL8139_PCI=n
|
||||
|
||||
# USB
|
||||
CONFIG_USB=n
|
||||
CONFIG_USB_AUDIO=n
|
||||
CONFIG_USB_BLUETOOTH=n
|
||||
CONFIG_USB_EHCI=n
|
||||
CONFIG_USB_EHCI_PCI=n
|
||||
CONFIG_USB_NETWORK=n
|
||||
CONFIG_USB_OHCI=n
|
||||
CONFIG_USB_OHCI_PCI=n
|
||||
CONFIG_USB_SERIAL=n
|
||||
CONFIG_USB_SMARTCARD=n
|
||||
CONFIG_USB_STORAGE_BOT=n
|
||||
CONFIG_USB_STORAGE_MTP=n
|
||||
CONFIG_USB_STORAGE_UAS=n
|
||||
CONFIG_USB_TABLET_WACOM=n
|
||||
CONFIG_USB_UHCI=n
|
||||
CONFIG_USB_XHCI=n
|
||||
CONFIG_USB_XHCI_NEC=n
|
||||
|
||||
# ISA
|
||||
CONFIG_IDE_ISA=n
|
||||
CONFIG_ISA_DEBUG=n
|
||||
CONFIG_ISA_IPMI_BT=n
|
||||
CONFIG_ISA_IPMI_KCS=n
|
||||
|
||||
# VGA
|
||||
CONFIG_ATI_VGA=n
|
||||
CONFIG_VGA=n
|
||||
CONFIG_VGA_CIRRUS=n
|
||||
CONFIG_VGA_ISA=n
|
||||
CONFIG_VGA_PCI=n
|
||||
CONFIG_VHOST_USER_VGA=n
|
||||
CONFIG_VIRTIO_VGA=n
|
||||
CONFIG_VMWARE_VGA=n
|
||||
|
||||
# Displays
|
||||
CONFIG_BOCHS_DISPLAY=n
|
||||
CONFIG_DDC=n
|
||||
CONFIG_QXL=n
|
||||
|
||||
# Graphics
|
||||
CONFIG_OPENGL=n
|
||||
CONFIG_SPICE=n
|
||||
CONFIG_X11=n
|
||||
|
||||
# test devices
|
||||
CONFIG_HYPERV_TESTDEV=n
|
||||
CONFIG_ISA_TESTDEV=n
|
||||
CONFIG_PCI_TESTDEV=n
|
||||
|
||||
# XEN
|
||||
CONFIG_XEN=n
|
||||
|
||||
# PCIe
|
||||
CONFIG_XIO3130=n
|
||||
|
||||
# SCSI
|
||||
CONFIG_ESP=n
|
||||
CONFIG_ESP_PCI=n
|
||||
CONFIG_LSI_SCSI_PCI=n
|
||||
CONFIG_MEGASAS_SCSI_PCI=n
|
||||
CONFIG_MPTSAS_SCSI_PCI=n
|
||||
|
||||
# i2c
|
||||
CONFIG_BITBANG_I2C=n
|
||||
|
||||
# UART
|
||||
CONFIG_SERIAL_PCI_MULTI=n
|
||||
|
||||
# PCI
|
||||
CONFIG_EDU=n
|
||||
CONFIG_I82801B11=n
|
||||
CONFIG_IOH3420=n
|
||||
CONFIG_IPACK=n
|
||||
CONFIG_PXB=n
|
||||
|
||||
# SD
|
||||
CONFIG_SDHCI=n
|
||||
CONFIG_SDHCI_PCI=n
|
||||
|
||||
# watchdog
|
||||
CONFIG_WDT_IB6300ESB=n
|
||||
CONFIG_WDT_IB700=n
|
||||
|
||||
# Apple
|
||||
CONFIG_APPLESMC=n
|
||||
|
||||
# Timer
|
||||
CONFIG_HPET=n
|
||||
|
||||
# IPMI
|
||||
CONFIG_IPMI=n
|
||||
CONFIG_IPMI_EXTERN=n
|
||||
CONFIG_IPMI_LOCAL=n
|
||||
|
||||
# misc
|
||||
CONFIG_IVSHMEM_DEVICE=n
|
||||
CONFIG_PVPANIC=n
|
||||
CONFIG_SEV=n
|
||||
CONFIG_SGA=n
|
||||
|
||||
#vhost
|
||||
CONFIG_VHOST_USER_INPUT=n
|
||||
|
||||
# TPM
|
||||
CONFIG_TPM_CRB=n
|
||||
CONFIG_TPM_TIS=n
|
@@ -0,0 +1,98 @@
|
||||
From 894a8ae5524fff4ad9d3551c515788c5650e1fc7 Mon Sep 17 00:00:00 2001
|
||||
From: Yang Zhong <yang.zhong@intel.com>
|
||||
Date: Wed, 28 Mar 2018 20:14:53 +0800
|
||||
Subject: [PATCH 1/2] 9p: removing coroutines of 9p to increase the I/O
|
||||
performance
|
||||
|
||||
This is a quick workaround, need to be fixed.
|
||||
|
||||
Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
|
||||
---
|
||||
hw/9pfs/9p.c | 12 +++++-------
|
||||
hw/9pfs/9p.h | 6 +++---
|
||||
hw/9pfs/coth.h | 3 +++
|
||||
3 files changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
|
||||
index 55821343e5..c5f089860d 100644
|
||||
--- a/hw/9pfs/9p.c
|
||||
+++ b/hw/9pfs/9p.c
|
||||
@@ -690,10 +690,7 @@ static void coroutine_fn pdu_complete(V9fsPDU *pdu, ssize_t len)
|
||||
out_notify:
|
||||
pdu->s->transport->push_and_notify(pdu);
|
||||
|
||||
- /* Now wakeup anybody waiting in flush for this request */
|
||||
- if (!qemu_co_queue_next(&pdu->complete)) {
|
||||
- pdu_free(pdu);
|
||||
- }
|
||||
+ pdu_free(pdu);
|
||||
}
|
||||
|
||||
static mode_t v9mode_to_mode(uint32_t mode, V9fsString *extension)
|
||||
@@ -3525,7 +3522,7 @@ static inline bool is_read_only_op(V9fsPDU *pdu)
|
||||
|
||||
void pdu_submit(V9fsPDU *pdu, P9MsgHeader *hdr)
|
||||
{
|
||||
- Coroutine *co;
|
||||
+// Coroutine *co;
|
||||
CoroutineEntry *handler;
|
||||
V9fsState *s = pdu->s;
|
||||
|
||||
@@ -3543,8 +3540,9 @@ void pdu_submit(V9fsPDU *pdu, P9MsgHeader *hdr)
|
||||
}
|
||||
|
||||
qemu_co_queue_init(&pdu->complete);
|
||||
- co = qemu_coroutine_create(handler, pdu);
|
||||
- qemu_coroutine_enter(co);
|
||||
+ handler(pdu);
|
||||
+ //co = qemu_coroutine_create(handler, pdu);
|
||||
+ //qemu_coroutine_enter(co);
|
||||
}
|
||||
|
||||
/* Returns 0 on success, 1 on failure. */
|
||||
diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h
|
||||
index 8883761b2c..24aeba03f7 100644
|
||||
--- a/hw/9pfs/9p.h
|
||||
+++ b/hw/9pfs/9p.h
|
||||
@@ -320,21 +320,21 @@ extern int total_open_fd;
|
||||
static inline void v9fs_path_write_lock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_wrlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_wrlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void v9fs_path_read_lock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_rdlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_rdlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void v9fs_path_unlock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_unlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_unlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/hw/9pfs/coth.h b/hw/9pfs/coth.h
|
||||
index 19e4d9287e..728a25865d 100644
|
||||
--- a/hw/9pfs/coth.h
|
||||
+++ b/hw/9pfs/coth.h
|
||||
@@ -47,6 +47,9 @@
|
||||
qemu_coroutine_yield(); \
|
||||
} while (0)
|
||||
|
||||
+#undef v9fs_co_run_in_worker
|
||||
+#define v9fs_co_run_in_worker(code_block) do {code_block} while(0);
|
||||
+
|
||||
void co_run_in_worker_bh(void *);
|
||||
int coroutine_fn v9fs_co_readlink(V9fsPDU *, V9fsPath *, V9fsString *);
|
||||
int coroutine_fn v9fs_co_readdir(V9fsPDU *, V9fsFidState *, struct dirent **);
|
||||
--
|
||||
2.17.2
|
||||
|
@@ -0,0 +1,73 @@
|
||||
From b17fbbe55cba95ad323b27c2f9f3e22eb6364d4b Mon Sep 17 00:00:00 2001
|
||||
From: Peng Tao <tao.peng@linux.alibaba.com>
|
||||
Date: Fri, 14 Jun 2019 14:35:13 +0800
|
||||
Subject: [PATCH] migration: allow private destination ram with x-ignore-shared
|
||||
|
||||
By removing the share ram check, qemu is able to migrate
|
||||
to private destination ram when x-ignore-shared capability
|
||||
is on. Then we can create multiple destination VMs based
|
||||
on the same source VM.
|
||||
|
||||
This changes the x-ignore-shared migration capability to
|
||||
work similar to Lai's original bypass-shared-memory
|
||||
work(https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg00003.html)
|
||||
which enables kata containers (https://katacontainers.io)
|
||||
to implement the VM templating feature.
|
||||
|
||||
An example usage in kata containers(https://katacontainers.io):
|
||||
1. Start the source VM:
|
||||
qemu-system-x86 -m 2G \
|
||||
-object memory-backend-file,id=mem0,size=2G,share=on,mem-path=/tmpfs/template-memory \
|
||||
-numa node,memdev=mem0
|
||||
2. Stop the template VM, set migration x-ignore-shared capability,
|
||||
migrate "exec:cat>/tmpfs/state", quit it
|
||||
3. Start target VM:
|
||||
qemu-system-x86 -m 2G \
|
||||
-object memory-backend-file,id=mem0,size=2G,share=off,mem-path=/tmpfs/template-memory \
|
||||
-numa node,memdev=mem0 \
|
||||
-incoming defer
|
||||
4. connect to target VM qmp, set migration x-ignore-shared capability,
|
||||
migrate_incoming "exec:cat /tmpfs/state"
|
||||
5. create more target VMs repeating 3 and 4
|
||||
|
||||
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
Cc: Yury Kotov <yury-kotov@yandex-team.ru>
|
||||
Cc: Jiangshan Lai <laijs@hyper.sh>
|
||||
Cc: Xu Wang <xu@hyper.sh>
|
||||
Signed-off-by: Peng Tao <tao.peng@linux.alibaba.com>
|
||||
Reviewed-by: Juan Quintela <quintela@redhat.com>
|
||||
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
Message-Id: <1560494113-1141-1-git-send-email-tao.peng@linux.alibaba.com>
|
||||
Signed-off-by: Juan Quintela <quintela@redhat.com>
|
||||
---
|
||||
migration/ram.c | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/migration/ram.c b/migration/ram.c
|
||||
index 8a6ad61d3d..8622b4dc49 100644
|
||||
--- a/migration/ram.c
|
||||
+++ b/migration/ram.c
|
||||
@@ -3426,7 +3426,6 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
|
||||
}
|
||||
if (migrate_ignore_shared()) {
|
||||
qemu_put_be64(f, block->mr->addr);
|
||||
- qemu_put_byte(f, ramblock_is_ignored(block) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4393,12 +4392,6 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
|
||||
}
|
||||
if (migrate_ignore_shared()) {
|
||||
hwaddr addr = qemu_get_be64(f);
|
||||
- bool ignored = qemu_get_byte(f);
|
||||
- if (ignored != ramblock_is_ignored(block)) {
|
||||
- error_report("RAM block %s should %s be migrated",
|
||||
- id, ignored ? "" : "not");
|
||||
- ret = -EINVAL;
|
||||
- }
|
||||
if (ramblock_is_ignored(block) &&
|
||||
block->mr->addr != addr) {
|
||||
error_report("Mismatched GPAs for block %s "
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -0,0 +1,43 @@
|
||||
From bf71d7d8e04e85517578c021804c77739f9fed72 Mon Sep 17 00:00:00 2001
|
||||
From: Julio Montes <julio.montes@intel.com>
|
||||
Date: Mon, 8 Jul 2019 21:19:36 +0000
|
||||
Subject: [PATCH] memory-backend-file/nvdimm: support read-only files as
|
||||
memory-backends
|
||||
|
||||
Currently is not possible to use a file that is part of a read-only
|
||||
filesystem as memory backend for nvdimm devices, even if this is not modified
|
||||
in the guest. In order to improve the security of Virtual Machines that share
|
||||
and do not modify the memory-backend-file, QEMU should support
|
||||
read-only memory-backeds.
|
||||
|
||||
Use case:
|
||||
* Kata Containers use a memory-backed-file as read-only rootfs, and this
|
||||
file is used to start all the virtual machines in the node.
|
||||
It would be really bad if somehow a malicious container modified it.
|
||||
|
||||
Signed-off-by: Julio Montes <julio.montes@intel.com>
|
||||
Message-Id: <20190708211936.8037-1-julio.montes@intel.com>
|
||||
---
|
||||
exec.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/exec.c b/exec.c
|
||||
index 3e78de3b8f..a1b6f939fb 100644
|
||||
--- a/exec.c
|
||||
+++ b/exec.c
|
||||
@@ -1865,6 +1865,12 @@ static int file_ram_open(const char *path,
|
||||
break;
|
||||
}
|
||||
g_free(filename);
|
||||
+ } else if (errno == EROFS) {
|
||||
+ fd = open(path, O_RDONLY);
|
||||
+ if (fd >= 0) {
|
||||
+ /* @path names an existing read-only file, use it */
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
if (errno != EEXIST && errno != EINTR) {
|
||||
error_setg_errno(errp, errno,
|
||||
--
|
||||
2.17.2
|
||||
|
@@ -0,0 +1,98 @@
|
||||
From 493163ca322c87860492328c7898064051321c67 Mon Sep 17 00:00:00 2001
|
||||
From: Yang Zhong <yang.zhong@intel.com>
|
||||
Date: Wed, 28 Mar 2018 20:14:53 +0800
|
||||
Subject: [PATCH 1/3] 9p: removing coroutines of 9p to increase the I/O
|
||||
performance
|
||||
|
||||
This is a quick workaround, need to be fixed.
|
||||
|
||||
Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
|
||||
---
|
||||
hw/9pfs/9p.c | 12 +++++-------
|
||||
hw/9pfs/9p.h | 6 +++---
|
||||
hw/9pfs/coth.h | 3 +++
|
||||
3 files changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
|
||||
index 55821343e5..c5f089860d 100644
|
||||
--- a/hw/9pfs/9p.c
|
||||
+++ b/hw/9pfs/9p.c
|
||||
@@ -690,10 +690,7 @@ static void coroutine_fn pdu_complete(V9fsPDU *pdu, ssize_t len)
|
||||
out_notify:
|
||||
pdu->s->transport->push_and_notify(pdu);
|
||||
|
||||
- /* Now wakeup anybody waiting in flush for this request */
|
||||
- if (!qemu_co_queue_next(&pdu->complete)) {
|
||||
- pdu_free(pdu);
|
||||
- }
|
||||
+ pdu_free(pdu);
|
||||
}
|
||||
|
||||
static mode_t v9mode_to_mode(uint32_t mode, V9fsString *extension)
|
||||
@@ -3525,7 +3522,7 @@ static inline bool is_read_only_op(V9fsPDU *pdu)
|
||||
|
||||
void pdu_submit(V9fsPDU *pdu, P9MsgHeader *hdr)
|
||||
{
|
||||
- Coroutine *co;
|
||||
+// Coroutine *co;
|
||||
CoroutineEntry *handler;
|
||||
V9fsState *s = pdu->s;
|
||||
|
||||
@@ -3543,8 +3540,9 @@ void pdu_submit(V9fsPDU *pdu, P9MsgHeader *hdr)
|
||||
}
|
||||
|
||||
qemu_co_queue_init(&pdu->complete);
|
||||
- co = qemu_coroutine_create(handler, pdu);
|
||||
- qemu_coroutine_enter(co);
|
||||
+ handler(pdu);
|
||||
+ //co = qemu_coroutine_create(handler, pdu);
|
||||
+ //qemu_coroutine_enter(co);
|
||||
}
|
||||
|
||||
/* Returns 0 on success, 1 on failure. */
|
||||
diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h
|
||||
index 8883761b2c..24aeba03f7 100644
|
||||
--- a/hw/9pfs/9p.h
|
||||
+++ b/hw/9pfs/9p.h
|
||||
@@ -320,21 +320,21 @@ extern int total_open_fd;
|
||||
static inline void v9fs_path_write_lock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_wrlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_wrlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void v9fs_path_read_lock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_rdlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_rdlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void v9fs_path_unlock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_unlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_unlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/hw/9pfs/coth.h b/hw/9pfs/coth.h
|
||||
index 19e4d9287e..728a25865d 100644
|
||||
--- a/hw/9pfs/coth.h
|
||||
+++ b/hw/9pfs/coth.h
|
||||
@@ -47,6 +47,9 @@
|
||||
qemu_coroutine_yield(); \
|
||||
} while (0)
|
||||
|
||||
+#undef v9fs_co_run_in_worker
|
||||
+#define v9fs_co_run_in_worker(code_block) do {code_block} while(0);
|
||||
+
|
||||
void co_run_in_worker_bh(void *);
|
||||
int coroutine_fn v9fs_co_readlink(V9fsPDU *, V9fsPath *, V9fsString *);
|
||||
int coroutine_fn v9fs_co_readdir(V9fsPDU *, V9fsFidState *, struct dirent **);
|
||||
--
|
||||
2.17.2
|
||||
|
@@ -0,0 +1,45 @@
|
||||
From f116c58ab18762b1fdf5b5908af8612bf933d159 Mon Sep 17 00:00:00 2001
|
||||
From: Julio Montes <julio.montes@intel.com>
|
||||
Date: Mon, 8 Jul 2019 21:19:36 +0000
|
||||
Subject: [PATCH 2/3] memory-backend-file/nvdimm: support read-only files as
|
||||
memory-backends
|
||||
|
||||
Currently it is not possible to use a file that is part of a read-only
|
||||
filesystem as memory backend for nvdimm devices, even if the file itself
|
||||
is not modified in the guest. Same goes for files that do not have write access.
|
||||
In order to improve the security of Virtual Machines that share
|
||||
and do not modify the memory-backend-file, QEMU should support
|
||||
read-only memory-backends.
|
||||
|
||||
Use case:
|
||||
* Kata Containers use a memory-backed-file as read-only rootfs, and this
|
||||
file is used to start all the virtual machines in the node.
|
||||
It would be really bad if somehow a malicious container modified it.
|
||||
|
||||
Signed-off-by: Julio Montes <julio.montes@intel.com>
|
||||
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
|
||||
Message-Id: <20190708211936.8037-1-julio.montes@intel.com>
|
||||
---
|
||||
exec.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/exec.c b/exec.c
|
||||
index 3e78de3b8f..a1b6f939fb 100644
|
||||
--- a/exec.c
|
||||
+++ b/exec.c
|
||||
@@ -1865,6 +1865,12 @@ static int file_ram_open(const char *path,
|
||||
break;
|
||||
}
|
||||
g_free(filename);
|
||||
+ } else if (errno == EROFS || errno == EACCES) {
|
||||
+ fd = open(path, O_RDONLY);
|
||||
+ if (fd >= 0) {
|
||||
+ /* @path names an existing read-only file, use it */
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
if (errno != EEXIST && errno != EINTR) {
|
||||
error_setg_errno(errp, errno,
|
||||
--
|
||||
2.17.2
|
||||
|
@@ -0,0 +1,71 @@
|
||||
From 19ec1516315083bb609a6683271dc19adb464522 Mon Sep 17 00:00:00 2001
|
||||
From: Cleber Rosa <crosa@redhat.com>
|
||||
Date: Mon, 26 Aug 2019 11:58:32 -0400
|
||||
Subject: [PATCH 3/3] configure: more resilient Python version capture
|
||||
|
||||
The current approach to capture the Python version is fragile, as it
|
||||
was demonstrated by a very specific build of Python 3 on Fedora 29
|
||||
that, under non-interactive shells would print multiline version
|
||||
information.
|
||||
|
||||
The (badly) stripped version output would be sent to config-host.mak,
|
||||
producing bad syntax and rendering the makefiles unusable. Now, the
|
||||
Python versions is printed by configure, but only a simple (and better
|
||||
controlled variable) indicating whether the build system is using
|
||||
Python 2 is kept on config-host.mak.
|
||||
|
||||
Signed-off-by: Cleber Rosa <crosa@redhat.com>
|
||||
|
||||
Message-Id: <20190826155832.17427-1-crosa@redhat.com>
|
||||
Reviewed-by: Tony Nguyen <tony.nguyen@bt.com>
|
||||
---
|
||||
configure | 5 +++--
|
||||
tests/Makefile.include | 2 +-
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 714e7fb6a1..0a6a617fa3 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1864,7 +1864,7 @@ if ! $python -c 'import sys; sys.exit(sys.version_info < (2,7))'; then
|
||||
fi
|
||||
|
||||
# Preserve python version since some functionality is dependent on it
|
||||
-python_version=$($python -V 2>&1 | sed -e 's/Python\ //')
|
||||
+python_version=$($python -c 'import sys; print("%d.%d.%d" % (sys.version_info[0], sys.version_info[1], sys.version_info[2]))' 2>/dev/null)
|
||||
|
||||
# Suppress writing compiled files
|
||||
python="$python -B"
|
||||
@@ -6514,6 +6514,7 @@ if ! $python -c 'import sys; sys.exit(sys.version_info < (3,0))'; then
|
||||
echo
|
||||
echo "warning: Python 2 support is deprecated" >&2
|
||||
echo "warning: Python 3 will be required for building future versions of QEMU" >&2
|
||||
+ python2="y"
|
||||
fi
|
||||
|
||||
config_host_mak="config-host.mak"
|
||||
@@ -7333,7 +7334,7 @@ echo "INSTALL_DATA=$install -c -m 0644" >> $config_host_mak
|
||||
echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak
|
||||
echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak
|
||||
echo "PYTHON=$python" >> $config_host_mak
|
||||
-echo "PYTHON_VERSION=$python_version" >> $config_host_mak
|
||||
+echo "PYTHON2=$python2" >> $config_host_mak
|
||||
echo "CC=$cc" >> $config_host_mak
|
||||
if $iasl -h > /dev/null 2>&1; then
|
||||
echo "IASL=$iasl" >> $config_host_mak
|
||||
diff --git a/tests/Makefile.include b/tests/Makefile.include
|
||||
index fd7fdb8658..fc67846431 100644
|
||||
--- a/tests/Makefile.include
|
||||
+++ b/tests/Makefile.include
|
||||
@@ -1132,7 +1132,7 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results
|
||||
AVOCADO_SHOW=app
|
||||
AVOCADO_TAGS=$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGET_DIRS)))
|
||||
|
||||
-ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2)
|
||||
+ifneq ($(PYTHON2),y)
|
||||
$(TESTS_VENV_DIR): $(TESTS_VENV_REQ)
|
||||
$(call quiet-command, \
|
||||
$(PYTHON) -m venv --system-site-packages $@, \
|
||||
--
|
||||
2.17.2
|
||||
|
@@ -0,0 +1,98 @@
|
||||
From 4400ea745b2a073186061a04dc07d90a8fb8a51f Mon Sep 17 00:00:00 2001
|
||||
From: Yang Zhong <yang.zhong@intel.com>
|
||||
Date: Wed, 28 Mar 2018 20:14:53 +0800
|
||||
Subject: [PATCH 1/2] 9p: removing coroutines of 9p to increase the I/O
|
||||
performance
|
||||
|
||||
This is a quick workaround, need to be fixed.
|
||||
|
||||
Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
|
||||
---
|
||||
hw/9pfs/9p.c | 12 +++++-------
|
||||
hw/9pfs/9p.h | 6 +++---
|
||||
hw/9pfs/coth.h | 3 +++
|
||||
3 files changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
|
||||
index 520177f40c..191c43e42d 100644
|
||||
--- a/hw/9pfs/9p.c
|
||||
+++ b/hw/9pfs/9p.c
|
||||
@@ -1082,10 +1082,7 @@ static void coroutine_fn pdu_complete(V9fsPDU *pdu, ssize_t len)
|
||||
out_notify:
|
||||
pdu->s->transport->push_and_notify(pdu);
|
||||
|
||||
- /* Now wakeup anybody waiting in flush for this request */
|
||||
- if (!qemu_co_queue_next(&pdu->complete)) {
|
||||
- pdu_free(pdu);
|
||||
- }
|
||||
+ pdu_free(pdu);
|
||||
}
|
||||
|
||||
static mode_t v9mode_to_mode(uint32_t mode, V9fsString *extension)
|
||||
@@ -3968,7 +3965,7 @@ static inline bool is_read_only_op(V9fsPDU *pdu)
|
||||
|
||||
void pdu_submit(V9fsPDU *pdu, P9MsgHeader *hdr)
|
||||
{
|
||||
- Coroutine *co;
|
||||
+// Coroutine *co;
|
||||
CoroutineEntry *handler;
|
||||
V9fsState *s = pdu->s;
|
||||
|
||||
@@ -3986,8 +3983,9 @@ void pdu_submit(V9fsPDU *pdu, P9MsgHeader *hdr)
|
||||
}
|
||||
|
||||
qemu_co_queue_init(&pdu->complete);
|
||||
- co = qemu_coroutine_create(handler, pdu);
|
||||
- qemu_coroutine_enter(co);
|
||||
+ handler(pdu);
|
||||
+ //co = qemu_coroutine_create(handler, pdu);
|
||||
+ //qemu_coroutine_enter(co);
|
||||
}
|
||||
|
||||
/* Returns 0 on success, 1 on failure. */
|
||||
diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h
|
||||
index 3904f82901..30ecab2b2e 100644
|
||||
--- a/hw/9pfs/9p.h
|
||||
+++ b/hw/9pfs/9p.h
|
||||
@@ -380,21 +380,21 @@ extern int total_open_fd;
|
||||
static inline void v9fs_path_write_lock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_wrlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_wrlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void v9fs_path_read_lock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_rdlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_rdlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void v9fs_path_unlock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_unlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_unlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/hw/9pfs/coth.h b/hw/9pfs/coth.h
|
||||
index c2cdc7a9ea..0fe971d1f5 100644
|
||||
--- a/hw/9pfs/coth.h
|
||||
+++ b/hw/9pfs/coth.h
|
||||
@@ -46,6 +46,9 @@
|
||||
qemu_coroutine_yield(); \
|
||||
} while (0)
|
||||
|
||||
+#undef v9fs_co_run_in_worker
|
||||
+#define v9fs_co_run_in_worker(code_block) do {code_block} while(0);
|
||||
+
|
||||
void co_run_in_worker_bh(void *);
|
||||
int coroutine_fn v9fs_co_readlink(V9fsPDU *, V9fsPath *, V9fsString *);
|
||||
int coroutine_fn v9fs_co_readdir(V9fsPDU *, V9fsFidState *, struct dirent **);
|
||||
--
|
||||
2.21.0
|
||||
|
@@ -0,0 +1,45 @@
|
||||
From f06edce09ed88568a743c6aa36343081e35cca54 Mon Sep 17 00:00:00 2001
|
||||
From: Julio Montes <julio.montes@intel.com>
|
||||
Date: Mon, 8 Jul 2019 21:19:36 +0000
|
||||
Subject: [PATCH 2/2] memory-backend-file/nvdimm: support read-only files as
|
||||
memory-backends
|
||||
|
||||
Currently it is not possible to use a file that is part of a read-only
|
||||
filesystem as memory backend for nvdimm devices, even if the file itself
|
||||
is not modified in the guest. Same goes for files that do not have write access.
|
||||
In order to improve the security of Virtual Machines that share
|
||||
and do not modify the memory-backend-file, QEMU should support
|
||||
read-only memory-backends.
|
||||
|
||||
Use case:
|
||||
* Kata Containers use a memory-backed-file as read-only rootfs, and this
|
||||
file is used to start all the virtual machines in the node.
|
||||
It would be really bad if somehow a malicious container modified it.
|
||||
|
||||
Signed-off-by: Julio Montes <julio.montes@intel.com>
|
||||
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
|
||||
Message-Id: <20190708211936.8037-1-julio.montes@intel.com>
|
||||
---
|
||||
exec.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/exec.c b/exec.c
|
||||
index ffdb518535..506a5af8c1 100644
|
||||
--- a/exec.c
|
||||
+++ b/exec.c
|
||||
@@ -1819,6 +1819,12 @@ static int file_ram_open(const char *path,
|
||||
break;
|
||||
}
|
||||
g_free(filename);
|
||||
+ } else if (errno == EROFS || errno == EACCES) {
|
||||
+ fd = open(path, O_RDONLY);
|
||||
+ if (fd >= 0) {
|
||||
+ /* @path names an existing read-only file, use it */
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
if (errno != EEXIST && errno != EINTR) {
|
||||
error_setg_errno(errp, errno,
|
||||
--
|
||||
2.21.0
|
||||
|
@@ -0,0 +1,98 @@
|
||||
From 3de89ce9fb5eda46f7cefd70e9090cb7cd7ec803 Mon Sep 17 00:00:00 2001
|
||||
From: Yang Zhong <yang.zhong@intel.com>
|
||||
Date: Wed, 28 Mar 2018 20:14:53 +0800
|
||||
Subject: [PATCH 1/2] 9p: removing coroutines of 9p to increase the I/O
|
||||
performance
|
||||
|
||||
This is a quick workaround, need to be fixed.
|
||||
|
||||
Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
|
||||
---
|
||||
hw/9pfs/9p.c | 12 +++++-------
|
||||
hw/9pfs/9p.h | 6 +++---
|
||||
hw/9pfs/coth.h | 3 +++
|
||||
3 files changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
|
||||
index 9e046f7acb..11c8ee08d9 100644
|
||||
--- a/hw/9pfs/9p.c
|
||||
+++ b/hw/9pfs/9p.c
|
||||
@@ -1082,10 +1082,7 @@ static void coroutine_fn pdu_complete(V9fsPDU *pdu, ssize_t len)
|
||||
out_notify:
|
||||
pdu->s->transport->push_and_notify(pdu);
|
||||
|
||||
- /* Now wakeup anybody waiting in flush for this request */
|
||||
- if (!qemu_co_queue_next(&pdu->complete)) {
|
||||
- pdu_free(pdu);
|
||||
- }
|
||||
+ pdu_free(pdu);
|
||||
}
|
||||
|
||||
static mode_t v9mode_to_mode(uint32_t mode, V9fsString *extension)
|
||||
@@ -3997,7 +3994,7 @@ static inline bool is_read_only_op(V9fsPDU *pdu)
|
||||
|
||||
void pdu_submit(V9fsPDU *pdu, P9MsgHeader *hdr)
|
||||
{
|
||||
- Coroutine *co;
|
||||
+// Coroutine *co;
|
||||
CoroutineEntry *handler;
|
||||
V9fsState *s = pdu->s;
|
||||
|
||||
@@ -4015,8 +4012,9 @@ void pdu_submit(V9fsPDU *pdu, P9MsgHeader *hdr)
|
||||
}
|
||||
|
||||
qemu_co_queue_init(&pdu->complete);
|
||||
- co = qemu_coroutine_create(handler, pdu);
|
||||
- qemu_coroutine_enter(co);
|
||||
+ handler(pdu);
|
||||
+ //co = qemu_coroutine_create(handler, pdu);
|
||||
+ //qemu_coroutine_enter(co);
|
||||
}
|
||||
|
||||
/* Returns 0 on success, 1 on failure. */
|
||||
diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h
|
||||
index b8f72a3bd9..d16bf9d05e 100644
|
||||
--- a/hw/9pfs/9p.h
|
||||
+++ b/hw/9pfs/9p.h
|
||||
@@ -391,21 +391,21 @@ extern int total_open_fd;
|
||||
static inline void v9fs_path_write_lock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_wrlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_wrlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void v9fs_path_read_lock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_rdlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_rdlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void v9fs_path_unlock(V9fsState *s)
|
||||
{
|
||||
if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {
|
||||
- qemu_co_rwlock_unlock(&s->rename_lock);
|
||||
+ // qemu_co_rwlock_unlock(&s->rename_lock);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/hw/9pfs/coth.h b/hw/9pfs/coth.h
|
||||
index c2cdc7a9ea..0fe971d1f5 100644
|
||||
--- a/hw/9pfs/coth.h
|
||||
+++ b/hw/9pfs/coth.h
|
||||
@@ -46,6 +46,9 @@
|
||||
qemu_coroutine_yield(); \
|
||||
} while (0)
|
||||
|
||||
+#undef v9fs_co_run_in_worker
|
||||
+#define v9fs_co_run_in_worker(code_block) do {code_block} while(0);
|
||||
+
|
||||
void co_run_in_worker_bh(void *);
|
||||
int coroutine_fn v9fs_co_readlink(V9fsPDU *, V9fsPath *, V9fsString *);
|
||||
int coroutine_fn v9fs_co_readdir(V9fsPDU *, V9fsFidState *, struct dirent **);
|
||||
--
|
||||
2.21.0
|
||||
|
@@ -0,0 +1,45 @@
|
||||
From 3a6e5e157f355b3c42b6c2a0c85b4acaba849ac3 Mon Sep 17 00:00:00 2001
|
||||
From: Julio Montes <julio.montes@intel.com>
|
||||
Date: Mon, 8 Jul 2019 21:19:36 +0000
|
||||
Subject: [PATCH 2/2] memory-backend-file/nvdimm: support read-only files as
|
||||
memory-backends
|
||||
|
||||
Currently it is not possible to use a file that is part of a read-only
|
||||
filesystem as memory backend for nvdimm devices, even if the file itself
|
||||
is not modified in the guest. Same goes for files that do not have write access.
|
||||
In order to improve the security of Virtual Machines that share
|
||||
and do not modify the memory-backend-file, QEMU should support
|
||||
read-only memory-backends.
|
||||
|
||||
Use case:
|
||||
* Kata Containers use a memory-backed-file as read-only rootfs, and this
|
||||
file is used to start all the virtual machines in the node.
|
||||
It would be really bad if somehow a malicious container modified it.
|
||||
|
||||
Signed-off-by: Julio Montes <julio.montes@intel.com>
|
||||
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
|
||||
Message-Id: <20190708211936.8037-1-julio.montes@intel.com>
|
||||
---
|
||||
exec.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/exec.c b/exec.c
|
||||
index 2874bb5088..ba2fff234b 100644
|
||||
--- a/exec.c
|
||||
+++ b/exec.c
|
||||
@@ -1781,6 +1781,12 @@ static int file_ram_open(const char *path,
|
||||
break;
|
||||
}
|
||||
g_free(filename);
|
||||
+ } else if (errno == EROFS || errno == EACCES) {
|
||||
+ fd = open(path, O_RDONLY);
|
||||
+ if (fd >= 0) {
|
||||
+ /* @path names an existing read-only file, use it */
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
if (errno != EEXIST && errno != EINTR) {
|
||||
error_setg_errno(errp, errno,
|
||||
--
|
||||
2.21.0
|
||||
|
@@ -0,0 +1,26 @@
|
||||
From 2317a63d2acab16be4655ec87542a2bf3d75551b Mon Sep 17 00:00:00 2001
|
||||
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
||||
Date: Thu, 26 Sep 2019 18:41:34 +0100
|
||||
Subject: [PATCH] virtiofsd: Add time to seccomp
|
||||
|
||||
Needed by static builds
|
||||
|
||||
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
---
|
||||
contrib/virtiofsd/seccomp.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/contrib/virtiofsd/seccomp.c b/contrib/virtiofsd/seccomp.c
|
||||
index 3b92c6ee13..374bab2bef 100644
|
||||
--- a/contrib/virtiofsd/seccomp.c
|
||||
+++ b/contrib/virtiofsd/seccomp.c
|
||||
@@ -75,6 +75,7 @@ static const int syscall_whitelist[] = {
|
||||
SCMP_SYS(setresuid),
|
||||
SCMP_SYS(set_robust_list),
|
||||
SCMP_SYS(symlinkat),
|
||||
+ SCMP_SYS(time), /* Rarely needed, except on static builds */
|
||||
SCMP_SYS(tgkill),
|
||||
SCMP_SYS(unlinkat),
|
||||
SCMP_SYS(utimensat),
|
||||
--
|
||||
2.21.0
|
@@ -0,0 +1,50 @@
|
||||
From 47adda63e398a179b6211763377c8f61c5d62f5a Mon Sep 17 00:00:00 2001
|
||||
From: Sebastien Boeuf <sebastien.boeuf@intel.com>
|
||||
Date: Wed, 7 Aug 2019 07:15:32 -0700
|
||||
Subject: [PATCH] libvhost-user: Fix the VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD
|
||||
check
|
||||
|
||||
Vhost user protocol features are set as a bitmask. And the following
|
||||
constant VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD value is 10 because the bit
|
||||
10 indicates if the features is set or not.
|
||||
|
||||
The proper way to check for the presence or absence of this feature is
|
||||
to shift 1 by the value of this constant and then mask it with the
|
||||
actual bitmask representing the supported protocol features.
|
||||
|
||||
This patch aims to fix the current code as it was not doing the
|
||||
shifting, but instead it was masking directly with the value of the
|
||||
constant itself.
|
||||
|
||||
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
|
||||
---
|
||||
contrib/libvhost-user/libvhost-user.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c
|
||||
index 215ce22b79..626e2a035f 100644
|
||||
--- a/contrib/libvhost-user/libvhost-user.c
|
||||
+++ b/contrib/libvhost-user/libvhost-user.c
|
||||
@@ -1129,7 +1129,8 @@ bool vu_set_queue_host_notifier(VuDev *dev, VuVirtq *vq, int fd,
|
||||
|
||||
vmsg.fd_num = fd_num;
|
||||
|
||||
- if ((dev->protocol_features & VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) == 0) {
|
||||
+ if ((dev->protocol_features &
|
||||
+ (1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD)) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2554,7 +2555,8 @@ int64_t vu_fs_cache_request(VuDev *dev, VhostUserSlaveRequest req, int fd,
|
||||
|
||||
vmsg.fd_num = fd_num;
|
||||
|
||||
- if ((dev->protocol_features & VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) == 0) {
|
||||
+ if ((dev->protocol_features &
|
||||
+ (1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD)) == 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
Reference in New Issue
Block a user