From 14176c8d05fe910e9f1ee537e7af016565ccffc3 Mon Sep 17 00:00:00 2001 From: Joelle van Dyne Date: Mon, 15 Mar 2021 11:03:38 -0700 Subject: block: feature detection for host block support On Darwin (iOS), there are no system level APIs for directly accessing host block devices. We detect this at configure time. Signed-off-by: Joelle van Dyne Message-Id: <20210315180341.31638-2-j@getutm.app> Signed-off-by: Paolo Bonzini --- qapi/block-core.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'qapi') diff --git a/qapi/block-core.json b/qapi/block-core.json index 2ea2941..a54f37d 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -897,7 +897,8 @@ 'discriminator': 'driver', 'data': { 'file': 'BlockStatsSpecificFile', - 'host_device': 'BlockStatsSpecificFile', + 'host_device': { 'type': 'BlockStatsSpecificFile', + 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)' }, 'nvme': 'BlockStatsSpecificNvme' } } ## @@ -2814,7 +2815,10 @@ { 'enum': 'BlockdevDriver', 'data': [ 'blkdebug', 'blklogwrites', 'blkreplay', 'blkverify', 'bochs', 'cloop', 'compress', 'copy-on-read', 'dmg', 'file', 'ftp', 'ftps', - 'gluster', 'host_cdrom', 'host_device', 'http', 'https', 'iscsi', + 'gluster', + {'name': 'host_cdrom', 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)' }, + {'name': 'host_device', 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)' }, + 'http', 'https', 'iscsi', 'luks', 'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', 'parallels', 'preallocate', 'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'rbd', { 'name': 'replication', 'if': 'defined(CONFIG_REPLICATION)' }, @@ -3995,8 +3999,10 @@ 'ftp': 'BlockdevOptionsCurlFtp', 'ftps': 'BlockdevOptionsCurlFtps', 'gluster': 'BlockdevOptionsGluster', - 'host_cdrom': 'BlockdevOptionsFile', - 'host_device':'BlockdevOptionsFile', + 'host_cdrom': { 'type': 'BlockdevOptionsFile', + 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)' }, + 'host_device': { 'type': 'BlockdevOptionsFile', + 'if': 'defined(HAVE_HOST_BLOCK_DEVICE)' }, 'http': 'BlockdevOptionsCurlHttp', 'https': 'BlockdevOptionsCurlHttps', 'iscsi': 'BlockdevOptionsIscsi', -- cgit v1.1 From 1e63fe685804dfadddd643bf3860b1a59702d4bf Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 17 Jun 2021 17:53:06 +0200 Subject: machine: pass QAPI struct to mc->smp_parse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As part of converting -smp to a property with a QAPI type, define the struct and use it to do the actual parsing. machine_smp_parse takes care of doing the QemuOpts->QAPI conversion by hand, for now. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini Message-Id: <20210617155308.928754-10-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- qapi/machine.json | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'qapi') diff --git a/qapi/machine.json b/qapi/machine.json index e4d0f9b..c3210ee 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1284,3 +1284,31 @@ ## { 'event': 'MEM_UNPLUG_ERROR', 'data': { 'device': 'str', 'msg': 'str' } } + +## +# @SMPConfiguration: +# +# Schema for CPU topology configuration. "0" or a missing value lets +# QEMU figure out a suitable value based on the ones that are provided. +# +# @cpus: number of virtual CPUs in the virtual machine +# +# @sockets: number of sockets in the CPU topology +# +# @dies: number of dies per socket in the CPU topology +# +# @cores: number of cores per thread in the CPU topology +# +# @threads: number of threads per core in the CPU topology +# +# @maxcpus: maximum number of hotpluggable virtual CPUs in the virtual machine +# +# Since: 6.1 +## +{ 'struct': 'SMPConfiguration', 'data': { + '*cpus': 'int', + '*sockets': 'int', + '*dies': 'int', + '*cores': 'int', + '*threads': 'int', + '*maxcpus': 'int' } } -- cgit v1.1