From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611920628; cv=none; d=zohomail.com; s=zohoarc; b=a3F0aofejzIt3fUaksnZY0Yze6kYgk8YgMtiXFmWGv6gYp6uj5KMM0g7EYaymT7j/7YElCtcE5GNe+DEP+Gnl6KCVssnj3Z0lqX/UHofO4uKjwSgh7CpTzG5URRbFWRqeeM05JHnkrZ7lhl59zFYdlkECUsGgrIwFxZGAElHxHk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611920628; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DF2ujscpBWWd61+y18LUXFkaFfNppq3d0BazzuCJ7mo=; b=IVxazw16g+DPwckHlAXgcUPscxnv8B7zD+Nqs5D71IuQjtP3AmUDvIbYVo16oj9O9G05QzPl9c2UPnT1O7KhPxjWw/dlLoi3ApIeONqvNgMtFrIGBKBCbZ47C0Z5TVxrT21mHOANRtBQDRoBUFVtx8Z9gkleSV6P7tMA1JCKzt8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611920628953123.69092755052236; Fri, 29 Jan 2021 03:43:48 -0800 (PST) Received: from localhost ([::1]:55930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SBm-0002lZ-8R for importer@patchew.org; Fri, 29 Jan 2021 06:43:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnA-00048v-EX for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:20 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:37998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5Rn8-0005sK-BN for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:20 -0500 Received: by mail-ej1-x62d.google.com with SMTP id bl23so12448484ejb.5 for ; Fri, 29 Jan 2021 03:18:17 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DF2ujscpBWWd61+y18LUXFkaFfNppq3d0BazzuCJ7mo=; b=Vt9fbPGi2hCoTwz40qgFnZ9Zw6Q4elr4L9Ftbj395DMfc3YaGlgYQS47UVu7FelXQy TS8+7lcCUXcy1jT0Fnhcd6t+dIzHgqPaAkbwevWr6bvx8Yxgund//rtR6gASG0Tv25W5 YiAAh++85lweKkAcjYKLiGZVoEHa9o/gM2toOt/9lVstNVcJaVbeJj0GTsQO4uYbKQuX pJrA4RadKsdbbsFYgnjxWQEm/RHvYJZGhjc+Y9CWqZVnUpOSfn3qJX4e7eVmeH7NFypf bML6lDVoHKpZPVgcAqttOLk6gUftocuzACc6NrjRydyOiTdpMJp40e+csgCUalglgjCe s9/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=DF2ujscpBWWd61+y18LUXFkaFfNppq3d0BazzuCJ7mo=; b=ZBRwPJgD0s4KzG6NPNeX1TICrbT4slOW1aV39D8fBrYb8D9uKNrLu3fhmTKYaxbCFw Q0ziGGftF6VcqmnzB1U1VPuFkawRu4u3AVspl/ehhm7Cypw0BI1/3yqdm+FWNtOJkIA0 UCWIETOmQLRtL5oJ97nSR4EqZ9+lNCfD3iYsNDZIYFVuVIvwMsceQ+97b6S9DthETN/s yhdyMRmmyyyjRh6DwBB0GT3WovtdF0PoT3/FODy9AAfNWiLvSUqkKNEzWJ22S4leVUMO ZO6osNYmSQUyoEVhN7Chff3ynzAFVNCA2vxyTaZJRha6/WDQ0o9er4R102YOGjK0V4w0 EBeQ== X-Gm-Message-State: AOAM531yDKKL3vXrioep219wAkfyOWsK7YLtgzhnh93iYmsBldNenvnL aJR0bnM6qswn5GDGGLTXj34T4PLnmDZ8Lg== X-Google-Smtp-Source: ABdhPJwElwLafUbrLRDJ9PdTHrlh8K0odkrDt3TBX34lXHuWFhCJVEAYcqnD0AIoUvPfzCrNti6dcg== X-Received: by 2002:a17:906:86d7:: with SMTP id j23mr4087270ejy.5.1611919096532; Fri, 29 Jan 2021 03:18:16 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 01/36] fuzz: ignore address_space_map is_write flag Date: Fri, 29 Jan 2021 12:17:39 +0100 Message-Id: <20210129111814.566629-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Bulekov , Darren Kenny Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Alexander Bulekov We passed an is_write flag to the fuzz_dma_read_cb function to differentiate between the mapped DMA regions that need to be populated with fuzzed data, and those that don't. We simply passed through the address_space_map is_write parameter. The goal was to cut down on unnecessarily populating mapped DMA regions, when they are not read from. Unfortunately, nothing precludes code from reading from regions mapped with is_write=3Dtrue. For example, see: https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg04729.html This patch removes the is_write parameter to fuzz_dma_read_cb. As a result, we will fill all mapped DMA regions with fuzzed data, ignoring the specified transfer direction. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny Message-Id: <20210120060255.558535-1-alxndr@bu.edu> --- include/exec/memory.h | 8 +++----- include/exec/memory_ldst_cached.h.inc | 6 +++--- memory_ldst.c.inc | 8 ++++---- softmmu/memory.c | 5 ++--- softmmu/physmem.c | 4 ++-- tests/qtest/fuzz/generic_fuzz.c | 9 +++------ 6 files changed, 17 insertions(+), 23 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 521d9901d7..0f89787de2 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -45,13 +45,11 @@ DECLARE_OBJ_CHECKERS(IOMMUMemoryRegion, IOMMUMemoryRegi= onClass, #ifdef CONFIG_FUZZ void fuzz_dma_read_cb(size_t addr, size_t len, - MemoryRegion *mr, - bool is_write); + MemoryRegion *mr); #else static inline void fuzz_dma_read_cb(size_t addr, size_t len, - MemoryRegion *mr, - bool is_write) + MemoryRegion *mr) { /* Do Nothing */ } @@ -2504,7 +2502,7 @@ address_space_read_cached(MemoryRegionCache *cache, h= waddr addr, void *buf, hwaddr len) { assert(addr < cache->len && len <=3D cache->len - addr); - fuzz_dma_read_cb(cache->xlat + addr, len, cache->mrs.mr, false); + fuzz_dma_read_cb(cache->xlat + addr, len, cache->mrs.mr); if (likely(cache->ptr)) { memcpy(buf, cache->ptr + addr, len); return MEMTX_OK; diff --git a/include/exec/memory_ldst_cached.h.inc b/include/exec/memory_ld= st_cached.h.inc index 01efad62de..7bc8790d34 100644 --- a/include/exec/memory_ldst_cached.h.inc +++ b/include/exec/memory_ldst_cached.h.inc @@ -28,7 +28,7 @@ static inline uint32_t ADDRESS_SPACE_LD_CACHED(l)(MemoryR= egionCache *cache, hwaddr addr, MemTxAttrs attrs, MemTxResult *result) { assert(addr < cache->len && 4 <=3D cache->len - addr); - fuzz_dma_read_cb(cache->xlat + addr, 4, cache->mrs.mr, false); + fuzz_dma_read_cb(cache->xlat + addr, 4, cache->mrs.mr); if (likely(cache->ptr)) { return LD_P(l)(cache->ptr + addr); } else { @@ -40,7 +40,7 @@ static inline uint64_t ADDRESS_SPACE_LD_CACHED(q)(MemoryR= egionCache *cache, hwaddr addr, MemTxAttrs attrs, MemTxResult *result) { assert(addr < cache->len && 8 <=3D cache->len - addr); - fuzz_dma_read_cb(cache->xlat + addr, 8, cache->mrs.mr, false); + fuzz_dma_read_cb(cache->xlat + addr, 8, cache->mrs.mr); if (likely(cache->ptr)) { return LD_P(q)(cache->ptr + addr); } else { @@ -52,7 +52,7 @@ static inline uint32_t ADDRESS_SPACE_LD_CACHED(uw)(Memory= RegionCache *cache, hwaddr addr, MemTxAttrs attrs, MemTxResult *result) { assert(addr < cache->len && 2 <=3D cache->len - addr); - fuzz_dma_read_cb(cache->xlat + addr, 2, cache->mrs.mr, false); + fuzz_dma_read_cb(cache->xlat + addr, 2, cache->mrs.mr); if (likely(cache->ptr)) { return LD_P(uw)(cache->ptr + addr); } else { diff --git a/memory_ldst.c.inc b/memory_ldst.c.inc index 2fed2de18e..b56e961967 100644 --- a/memory_ldst.c.inc +++ b/memory_ldst.c.inc @@ -42,7 +42,7 @@ static inline uint32_t glue(address_space_ldl_internal, S= UFFIX)(ARG1_DECL, MO_32 | devend_memop(endian), attr= s); } else { /* RAM case */ - fuzz_dma_read_cb(addr, 4, mr, false); + fuzz_dma_read_cb(addr, 4, mr); ptr =3D qemu_map_ram_ptr(mr->ram_block, addr1); switch (endian) { case DEVICE_LITTLE_ENDIAN: @@ -111,7 +111,7 @@ static inline uint64_t glue(address_space_ldq_internal,= SUFFIX)(ARG1_DECL, MO_64 | devend_memop(endian), attr= s); } else { /* RAM case */ - fuzz_dma_read_cb(addr, 8, mr, false); + fuzz_dma_read_cb(addr, 8, mr); ptr =3D qemu_map_ram_ptr(mr->ram_block, addr1); switch (endian) { case DEVICE_LITTLE_ENDIAN: @@ -177,7 +177,7 @@ uint32_t glue(address_space_ldub, SUFFIX)(ARG1_DECL, r =3D memory_region_dispatch_read(mr, addr1, &val, MO_8, attrs); } else { /* RAM case */ - fuzz_dma_read_cb(addr, 1, mr, false); + fuzz_dma_read_cb(addr, 1, mr); ptr =3D qemu_map_ram_ptr(mr->ram_block, addr1); val =3D ldub_p(ptr); r =3D MEMTX_OK; @@ -215,7 +215,7 @@ static inline uint32_t glue(address_space_lduw_internal= , SUFFIX)(ARG1_DECL, MO_16 | devend_memop(endian), attr= s); } else { /* RAM case */ - fuzz_dma_read_cb(addr, 2, mr, false); + fuzz_dma_read_cb(addr, 2, mr); ptr =3D qemu_map_ram_ptr(mr->ram_block, addr1); switch (endian) { case DEVICE_LITTLE_ENDIAN: diff --git a/softmmu/memory.c b/softmmu/memory.c index 333e1ed7b0..4fc0071dcd 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -1440,7 +1440,7 @@ MemTxResult memory_region_dispatch_read(MemoryRegion = *mr, unsigned size =3D memop_size(op); MemTxResult r; =20 - fuzz_dma_read_cb(addr, size, mr, false); + fuzz_dma_read_cb(addr, size, mr); if (!memory_region_access_valid(mr, addr, size, false, attrs)) { *pval =3D unassigned_mem_read(mr, addr, size); return MEMTX_DECODE_ERROR; @@ -3282,8 +3282,7 @@ void memory_region_init_rom_device(MemoryRegion *mr, #ifdef CONFIG_FUZZ void __attribute__((weak)) fuzz_dma_read_cb(size_t addr, size_t len, - MemoryRegion *mr, - bool is_write) + MemoryRegion *mr) { } #endif diff --git a/softmmu/physmem.c b/softmmu/physmem.c index cdcd197656..f31e545b8b 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -2824,7 +2824,7 @@ MemTxResult flatview_read_continue(FlatView *fv, hwad= dr addr, stn_he_p(buf, l, val); } else { /* RAM case */ - fuzz_dma_read_cb(addr, len, mr, false); + fuzz_dma_read_cb(addr, len, mr); ram_ptr =3D qemu_ram_ptr_length(mr->ram_block, addr1, &l, fals= e); memcpy(buf, ram_ptr, l); } @@ -3185,7 +3185,7 @@ void *address_space_map(AddressSpace *as, memory_region_ref(mr); *plen =3D flatview_extend_translation(fv, addr, len, mr, xlat, l, is_write, attrs); - fuzz_dma_read_cb(addr, *plen, mr, is_write); + fuzz_dma_read_cb(addr, *plen, mr); ptr =3D qemu_ram_ptr_length(mr->ram_block, xlat, plen, true); =20 return ptr; diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuz= z.c index be76d47d2d..deb74f15be 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -175,7 +175,7 @@ static int memory_access_size(MemoryRegion *mr, unsigne= d l, hwaddr addr) * generic_fuzz(), avoiding potential race-conditions, which we don't have * a good way for reproducing right now. */ -void fuzz_dma_read_cb(size_t addr, size_t len, MemoryRegion *mr, bool is_w= rite) +void fuzz_dma_read_cb(size_t addr, size_t len, MemoryRegion *mr) { /* Are we in the generic-fuzzer or are we using another fuzz-target? */ if (!qts_global) { @@ -187,14 +187,11 @@ void fuzz_dma_read_cb(size_t addr, size_t len, Memory= Region *mr, bool is_write) * - We have no DMA patterns defined * - The length of the DMA read request is zero * - The DMA read is hitting an MR other than the machine's main RAM - * - The DMA request is not a read (what happens for a address_space_m= ap - * with is_write=3DTrue? Can the device use the same pointer to do r= eads?) * - The DMA request hits past the bounds of our RAM */ if (dma_patterns->len =3D=3D 0 || len =3D=3D 0 || mr !=3D current_machine->ram - || is_write || addr > current_machine->ram_size) { return; } @@ -213,12 +210,12 @@ void fuzz_dma_read_cb(size_t addr, size_t len, Memory= Region *mr, bool is_write) double_fetch =3D true; if (addr < region.addr && avoid_double_fetches) { - fuzz_dma_read_cb(addr, region.addr - addr, mr, is_write); + fuzz_dma_read_cb(addr, region.addr - addr, mr); } if (addr + len > region.addr + region.size && avoid_double_fetches) { fuzz_dma_read_cb(region.addr + region.size, - addr + len - (region.addr + region.size), mr, is_w= rite); + addr + len - (region.addr + region.size), mr); } return; } --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611920766; cv=none; d=zohomail.com; s=zohoarc; b=lxv6IwO7Lw7K/ilsD4DYBTpvKuwqXLXSjhX6HFVe0NJJETDGC+5Ofg7rfHwPWO4tRSlcxqQe7kQPTQq6EPjHo2kzfvKTGLS9oWGzl+0J3mxukpmqGRUFD6atZ+JrRp4P60g00C1zklgQo0VuV2IHwBKXCQz1d2GjLa6jU1D53wY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611920766; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fD81jsDTeYK4+eURnIGLe1g62Xp8VlxDYja/CHWOcds=; b=lQWQp1gfusj6G7RnxDhmbEl2RVJxvRvWvvLu1k0sUDJtkoY/I1ZPSWN6EdvOQOQoTCPzLoUMZMTtmvy+RXvBkovMVDCcawM5uqi4XkFkUjeVeed3vZVtOJr9+j/XN5ibEJp+dmkNaV9sIIrXbPuWs9RhhtkE2anZr0jLZwGkyjA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611920766634795.9930985448428; Fri, 29 Jan 2021 03:46:06 -0800 (PST) Received: from localhost ([::1]:33992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SE1-0005Ny-E5 for importer@patchew.org; Fri, 29 Jan 2021 06:46:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnB-0004Ar-Di for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:21 -0500 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:33464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5Rn9-0005tH-0v for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:21 -0500 Received: by mail-ej1-x630.google.com with SMTP id by1so12486565ejc.0 for ; Fri, 29 Jan 2021 03:18:18 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fD81jsDTeYK4+eURnIGLe1g62Xp8VlxDYja/CHWOcds=; b=NHxNaiKDSy+XYfPEZ1JEp4GoZ7+CaOh+8uSB50nkmK3En2+hs8Q01JFqxjszmWBrA/ elFdgxrfWbZLk6blE1DQLWbnxjd61o2TzNbsmk45t3JiqrUHcHd6YV/Dr+3maY+8xU29 +Y6kwOJgL53QCqpaM2kQcw1JHfLuPxO7fV8Pl7V8GLGovA1nC1JxpVW0bjV9pEQe08Sv AayIBL1EPIc69x3nTnj3pAoL6L3mriK1YHNXJCrzPDJXauuimzenHq9HbjU/ut3F46ls SU0EcsX7crYq0376517nyfi5tsbXaOZPMCCKBBzcEQnnDwPz/LWEXMniJWKm5lQ7wAxk nBUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fD81jsDTeYK4+eURnIGLe1g62Xp8VlxDYja/CHWOcds=; b=nHw1I+Ky4e0iGewGdoJbqnHW2YXgmnIL/gioX0lwss98zJmQhS1hRzaZbIKhCWa0YU V4vbT+FLtINX7b+yyDQgB6GZi0jp0Ai4EVB482H0NZ/awV931vUXABkPs30orfT7M6IK BuW7KB6r2o0q4KUv7b4LRauZmb8mOmprq8PxQKJcF1KnBnSi+VF8KWiibam5mma8lqns mmb78Is1nepqo0H2TSD677Q6vwSvdSG5k1jqJWCJZUEo2BEfca8YHY5tjnIoifL9ru6l xqI85SzGGYwSnCuquHcpjhhjLH0y/8w4DEt2bnbBOc+vJAZY4sNmnpITjLrRX9WYkgnL rhmA== X-Gm-Message-State: AOAM5326pTn/2iDyQenY99IHcW+c8zW2DAQDzzOhSD5pT1LzGOQPyOCV feuTC7lNLuovhJ92hKJLRkYh+ccphvQDBA== X-Google-Smtp-Source: ABdhPJzd4vM955H5z+gsrC4CptiGLOcCKAeM35CUBXUtatiWR7NNFDvd+Yta6lSXHViALmj/xK5r/w== X-Received: by 2002:a17:907:2851:: with SMTP id el17mr3808009ejc.405.1611919097695; Fri, 29 Jan 2021 03:18:17 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 02/36] fuzz: refine the ide/ahci fuzzer configs Date: Fri, 29 Jan 2021 12:17:40 +0100 Message-Id: <20210129111814.566629-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x630.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Bulekov , Thomas Huth , Darren Kenny Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Alexander Bulekov Disks work differently depending on the x86 machine type (SATA vs PATA). Additionally, we should fuzz the atapi code paths, which might contain vulnerabilities such as CVE-2020-29443. This patch adds hard-disk and cdrom generic-fuzzer configs for both the pc (PATA) and q35 (SATA) machine types. Signed-off-by: Alexander Bulekov Acked-by: Thomas Huth Reviewed-by: Darren Kenny Message-Id: <20210120152211.109782-1-alxndr@bu.edu> --- tests/qtest/fuzz/generic_fuzz_configs.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/gen= eric_fuzz_configs.h index 7fed035345..aa4c03f1ae 100644 --- a/tests/qtest/fuzz/generic_fuzz_configs.h +++ b/tests/qtest/fuzz/generic_fuzz_configs.h @@ -85,10 +85,28 @@ const generic_fuzz_config predefined_configs[] =3D { .objects =3D "intel-hda", },{ .name =3D "ide-hd", + .args =3D "-machine pc -nodefaults " + "-drive file=3Dnull-co://,if=3Dnone,format=3Draw,id=3Ddisk0 " + "-device ide-hd,drive=3Ddisk0", + .objects =3D "*ide*", + },{ + .name =3D "ide-atapi", + .args =3D "-machine pc -nodefaults " + "-drive file=3Dnull-co://,if=3Dnone,format=3Draw,id=3Ddisk0 " + "-device ide-cd,drive=3Ddisk0", + .objects =3D "*ide*", + },{ + .name =3D "ahci-hd", .args =3D "-machine q35 -nodefaults " "-drive file=3Dnull-co://,if=3Dnone,format=3Draw,id=3Ddisk0 " "-device ide-hd,drive=3Ddisk0", - .objects =3D "ahci*", + .objects =3D "*ahci*", + },{ + .name =3D "ahci-atapi", + .args =3D "-machine q35 -nodefaults " + "-drive file=3Dnull-co://,if=3Dnone,format=3Draw,id=3Ddisk0 " + "-device ide-cd,drive=3Ddisk0", + .objects =3D "*ahci*", },{ .name =3D "floppy", .args =3D "-machine pc -nodefaults -device floppy,id=3Dfloppy0 " --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611920147; cv=none; d=zohomail.com; s=zohoarc; b=RQ7IcKCjqiudeNw9DrEXCufChSk49kIqjiSCOp0bwDrf6jxNP9GWgFO/o2X4/vwkzsoNyY7jSYzlelGuqg9aNYczrkZsSdQ8IBhMXpwSFMzSqCkElww+oC3/QxTh+yr4iR0YcZeJXXrepfWlOEqYVfouXgLWHZWDBW7kvfHOtoo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611920147; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vM/hCi4QzyBItSwDReV3rwOFjjrUHsJHgYVNtzBAOv8=; b=FdZ5TK4tnwqvAXmwr1VOI3LhiW4zdYBstk0rrBx4PO6UE1XKSG1Xsppnvm+jMaiUsot61Q2j/JNWi+Le32NZZ2n+TX6DJduUyfz2lWOhsQSVi4QXVnqKWrLZSJhjOYQRMLgDWnD2BuHLqnNIwPoLCQ2AaP7kEGdj+h1ZjpK8or8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611920147032610.7518411132772; Fri, 29 Jan 2021 03:35:47 -0800 (PST) Received: from localhost ([::1]:60446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5S41-00010s-W1 for importer@patchew.org; Fri, 29 Jan 2021 06:35:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnB-0004Bn-NI for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:21 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:45907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5Rn9-0005tN-VF for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:21 -0500 Received: by mail-ed1-x533.google.com with SMTP id f1so10084539edr.12 for ; Fri, 29 Jan 2021 03:18:19 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vM/hCi4QzyBItSwDReV3rwOFjjrUHsJHgYVNtzBAOv8=; b=J4oisH4OEsj6iiXIMd16W/TcCSkSMTSXd+Y4VeVh0bFLibZkxB2WZ2v3qQf4gskDtq ghuXQ+DvqrNl30eJbhGPLHblLc8kRifE4KPNTkzqBDJU5w6W5a2kTGvJKBGBfwn44/gj e46tEfpXpqXtKddZLGa2q76tQceKW5f8WPjxSLgu66SiqXVgDR/VL8nTNn+nYccudQEF wcGU+GLMCZJNc2h2WQwfoqSfZc4cpJ7SQbH6T9FrgrVD0PMKcEMFCvSZWWNzWbWYR2HN DH5YS5Fj8NIoigvuMwdbVJQ6WwP0scou7FaopYRDZZ0ianJjiUIXP9hd5wNk8OKLAvit /zfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=vM/hCi4QzyBItSwDReV3rwOFjjrUHsJHgYVNtzBAOv8=; b=adVITrX8YEFQuFzTtOK02WH2kdgAzXCUj6xFHAv2eZG5MWqShyTgqyyZYgBByb/wvt vahQBJAioE+azk6GqCcxCzvx0kYaWzPWDbXXHOYwqnhcOtBKYd7c4FAU5J1v6R/0U6pv x1n+RWWPYTuKBmiUxjXhM/WwhiYnrIQUe9qL2WhSFChdH5dYI9IXUd4Y28oCdP+FAIua ydt66hA+w2+oksawPwaPvgODb5Z4Zm+64tKGO72sN26+Yr/ESni6w41UU2ChMH827Gul 5TvI0PbSnr6StvSIWaS85dgKXVTeCBkGjlDdkGpc/HVgv/cZf8tuxttniXasuhpFjVch Kp4A== X-Gm-Message-State: AOAM530cnjnldTU5jUap1sTBYSJxGbkEqAY6lp9Po8iBeNPZV/Jxfv6l P4qKHUeatR+Q7fg0fCIUeOqJHM1uIMzBag== X-Google-Smtp-Source: ABdhPJycf5n9ZDweHokDLaCKA/0JQnx7NBJGNpIegNIwtkI5MyCyyMdq0OjtGfsOGtqpI71bQfvw4A== X-Received: by 2002:aa7:d4d2:: with SMTP id t18mr4643684edr.238.1611919098633; Fri, 29 Jan 2021 03:18:18 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 03/36] docs/fuzz: fix pre-meson path Date: Fri, 29 Jan 2021 12:17:41 +0100 Message-Id: <20210129111814.566629-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x533.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Bulekov , Thomas Huth Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Alexander Bulekov Signed-off-by: Alexander Bulekov Reviewed-by: Thomas Huth Message-Id: <20210117201014.271610-2-alxndr@bu.edu> --- docs/devel/fuzzing.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/devel/fuzzing.rst b/docs/devel/fuzzing.rst index 6096242d99..5f5200c843 100644 --- a/docs/devel/fuzzing.rst +++ b/docs/devel/fuzzing.rst @@ -119,7 +119,7 @@ Adding a new fuzzer =20 Coverage over virtual devices can be improved by adding additional fuzzers. Fuzzers are kept in ``tests/qtest/fuzz/`` and should be added to -``tests/qtest/fuzz/Makefile.include`` +``tests/qtest/fuzz/meson.build`` =20 Fuzzers can rely on both qtest and libqos to communicate with virtual devi= ces. =20 @@ -128,8 +128,7 @@ Fuzzers can rely on both qtest and libqos to communicat= e with virtual devices. 2. Write the fuzzing code using the libqtest/libqos API. See existing fuzz= ers for reference. =20 -3. Register the fuzzer in ``tests/fuzz/Makefile.include`` by appending the - corresponding object to fuzz-obj-y +3. Add the fuzzer to ``tests/qtest/fuzz/meson.build``. =20 Fuzzers can be more-or-less thought of as special qtest programs which can modify the qtest commands and/or qtest command arguments based on inputs --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611920930; cv=none; d=zohomail.com; s=zohoarc; b=XFDHbmLT7si2YqlvHr5jeoF9oEaYuMsmd2i4wLzzaLgzZCtmm+PsxWqJvMEFiPkIwpetaL3ndrbTcVYeNP2KtYzVveqRDdVoUkuwLnoUXDl4diUicSXK+wGmySPgpGMl7i5+KZQ0ZaktOBEcmwTi5NXQk64B+inGoDbm5kYY4tI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611920930; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=p0gUq9l/dd+MCZ+Us772HwQOuGhCcjbbMzRDKa3bhUc=; b=falZ22rzUEmOQ87Onfkov6vf9vMj4V53YTERCFwhgkQR+Qq7vIEzhlAfsSMb40t4HAUDchumDJpgziM9RGUxucyRyWxssYdcTgtBlxRfiaKzNIZ6aP9OQJRIQ4i+VO2NetD/xkqJgxuLFR/i91F0CRzhGZPk+qCrww7T5TJjFGM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611920930234594.3910765127611; Fri, 29 Jan 2021 03:48:50 -0800 (PST) Received: from localhost ([::1]:40204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SGf-00082X-6B for importer@patchew.org; Fri, 29 Jan 2021 06:48:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnC-0004Dt-M9 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:22 -0500 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:33269) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnB-0005ta-3L for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:22 -0500 Received: by mail-ed1-x532.google.com with SMTP id c6so10159809ede.0 for ; Fri, 29 Jan 2021 03:18:20 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p0gUq9l/dd+MCZ+Us772HwQOuGhCcjbbMzRDKa3bhUc=; b=OWa/xB7MlHU1oS51y5C6PXk3vfdHU2nG06V304FaXI2+zWc3TMV+gxkjsELiLP9VjW 90+pLHxWrFDs2E22HurS3/Ahx6tqP9tbPKzDIGy2EymXi+szYkZTBfRUnaB3ZN4yuFOm xVwTjVT1BuW4mJ4Dx+6Ziqu0EPmVUVlCUoRW30pvvf9Aur2ufKQaKtwZVaWYMojr+83A 95PXGmK5g7LQsSD01BTLG8gmZ7PyROH4V2kmgEOp+L10aKL44v1uIFbnbQhCzgwVBvrJ iVL2WFpFY2aK9qukDkRxso9pwLvMsc20YQckBFK7E/LXENnSVy6TZs1qOCYc1Wj89gSk ApqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=p0gUq9l/dd+MCZ+Us772HwQOuGhCcjbbMzRDKa3bhUc=; b=YW8wp+wqIP+XDRyOrrQXmR6/8nhkCMgT6FZuPqYJFyRZgU8IpiYNXSQdmpS5n4zeKG LjkZep3IZXNGPyvgZMqHV1GeRUrx7XveARIJ9Bp7nYxI3ZY8d00BbodKVG1kIEUV1OM+ 7Zga9/daIo+rdSoewufF3bzrZko+6S1Le6xFZ33CuE8LrXm7xnfoH8I873XQgGZPdcpd znUpPB/Jccc1ch+1xfReADKyEH/GnvPmNmKGtbb4NfvRlrwOyM9BMSCdx0EtHiFRbHak M6nCCBWTqdbBQYCcPuWrGRCoJBiZsBQAQm3MGSNDvMfBamkFCex2MU5hiW2WavA1AyIr ArdQ== X-Gm-Message-State: AOAM533rZ8cARxWTPT7FV9v12Yi8kMznKHzZ/znSZLG+rQTI493mqDik +hc38rjUA8eOs5K0dJI160rEoFCWdtRVow== X-Google-Smtp-Source: ABdhPJz0GSkhO5kCqS9R4Y27c/Ide4jl+asg4o27I4cojSR9o/9A+okZHF7dJ+sGPgVY0IgWoYMj8w== X-Received: by 2002:a05:6402:20e:: with SMTP id t14mr4509565edv.178.1611919099478; Fri, 29 Jan 2021 03:18:19 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 04/36] fuzz: log the arguments used to initialize QEMU Date: Fri, 29 Jan 2021 12:17:42 +0100 Message-Id: <20210129111814.566629-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Bulekov , Thomas Huth Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Alexander Bulekov This is useful for building reproducers. Instead checking the code or the QEMU_FUZZ_ARGS, the arguments are at the top of the crash log. Signed-off-by: Alexander Bulekov Reviewed-by: Thomas Huth Message-Id: <20210117201014.271610-3-alxndr@bu.edu> --- tests/qtest/fuzz/fuzz.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/fuzz.c b/tests/qtest/fuzz/fuzz.c index 238866a037..496d11a231 100644 --- a/tests/qtest/fuzz/fuzz.c +++ b/tests/qtest/fuzz/fuzz.c @@ -159,6 +159,8 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char = ***envp) char *target_name; const char *bindir; char *datadir; + GString *cmd_line; + gchar *pretty_cmd_line; bool serialize =3D false; =20 /* Initialize qgraph and modules */ @@ -217,7 +219,7 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char = ***envp) } =20 /* Run QEMU's softmmu main with the fuzz-target dependent arguments */ - GString *cmd_line =3D fuzz_target->get_init_cmdline(fuzz_target); + cmd_line =3D fuzz_target->get_init_cmdline(fuzz_target); g_string_append_printf(cmd_line, " %s -qtest /dev/null ", getenv("QTEST_LOG") ? "" : "-qtest-log none"); =20 @@ -226,6 +228,13 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char= ***envp) wordexp(cmd_line->str, &result, 0); g_string_free(cmd_line, true); =20 + if (getenv("QTEST_LOG")) { + pretty_cmd_line =3D g_strjoinv(" ", result.we_wordv + 1); + printf("Starting %s with Arguments: %s\n", + result.we_wordv[0], pretty_cmd_line); + g_free(pretty_cmd_line); + } + qemu_init(result.we_wordc, result.we_wordv, NULL); =20 /* re-enable the rcu atfork, which was previously disabled in qemu_ini= t */ --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611920680; cv=none; d=zohomail.com; s=zohoarc; b=Zmx73S/93gsaG04t7PAUugE5w5FxQYspAlBxGg4RqUZVrenlbYyjnUgDuK90hrg/f6Ab/HbjG08X49CpUhmkj9t9F2McOAGCeuOrkpyFWif9nNq0MxrP+ZEYE10O69QLu1iI10OgRUEqB7Q56DCCiokuGy/8N2NyhxlwNGrrO3c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611920680; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6i9W6OOUOf+/H2AgjkKfRW+CSfY5qPrCTrtVFBIN+NA=; b=Uz6SQ64VkiGOvUHH87JgPS99hqyMFLPE7Ha5YClWLBjHfUPW85iXFn5VJNxXhJMYUaNw67dGFj1cGhRVJjjfroNsiZPmpZRZ2WK9mfI4GbyPVdjyPILcKWaOJT1farQMb8b/BfGZJmwhpJJhaGT8gmbjr8GPeaS6NfhrgZQmPoI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161192068002327.630470931355717; Fri, 29 Jan 2021 03:44:40 -0800 (PST) Received: from localhost ([::1]:59432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SCc-0004E4-S5 for importer@patchew.org; Fri, 29 Jan 2021 06:44:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnD-0004Fn-9A for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:23 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:45901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnB-0005uX-OX for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:23 -0500 Received: by mail-ed1-x52c.google.com with SMTP id f1so10084627edr.12 for ; Fri, 29 Jan 2021 03:18:21 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6i9W6OOUOf+/H2AgjkKfRW+CSfY5qPrCTrtVFBIN+NA=; b=YiDHuOrjo+0EsVJqxCN4iUJK/6apnyprpvUvx4W8VOAfb3avoW0lhcyNR585b8et7R p4wuLl/4djTwrGS2b+VVF4s/y7H3zYdLfYbHrzxqN2sdoncp6gt6vRgg4bdnzpfe9HI/ NRutKH/lXXzu3fZWaEfsRhWWTFIG6o+LfJfXCrELTJUzzkI4K6CIODFB+yl7Z252pr/d 9K9gnBiqvQJgSqjBX8Yx9sV//eShFSwOh5a6WPem3jgU3hA6GDA2PHS9OC0kz9hxx9hQ EOWHIqsdrTtOZ4o2wknbSmwD8c4/SH+HPSLqyUS972EDQLTKRwBR2k3E8kZ4/U/+Pv+o CK3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6i9W6OOUOf+/H2AgjkKfRW+CSfY5qPrCTrtVFBIN+NA=; b=SMr0cxnuy5jtQSMG5M2UWGhvEBl5EunPqMrGHRmUTI5Kel6XfTCrXVQ/LVomK6EzqW oW5481GPnM3mqAVibMDuaVbbI/LnosI2MMXCDH1D9xo83yktjTh43T+5uX3/Nx4iqNHd cp/dgibtpFvy5LUaORqftFC2FJvlDJ2GsH1buAUHSzeXCz7co3vtnZEhXBhMdhfFR6bY LBZSb33BVG3d/CWGrwPRZo8YWMIAjvdf99zUd24tNzUq8AKVm7VdlM1gC0wnGOD3aj+k g22cLcny/4gj8VRQRCrmcwtJ90ULqBmQMCcqIf4L8tOBWeoeNNjcq86gN6ZWDOhw74AC P/4A== X-Gm-Message-State: AOAM533Z711sH/Y2/LZj1uB6kodmVpDjEL8ukU7Ojl/PKMqFgGaKI4wV rCly5DDp3GuJQrq864tq3rMXLwmq6wsHHw== X-Google-Smtp-Source: ABdhPJxU1Jnh0WtkYx0Cz0EKk7nhQcRMiWuONP+SSMINukwMTO5685I8+NxxC+alPhyvsy/WlfJAHg== X-Received: by 2002:a05:6402:2d1:: with SMTP id b17mr4460795edx.95.1611919100416; Fri, 29 Jan 2021 03:18:20 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 05/36] fuzz: enable dynamic args for generic-fuzz configs Date: Fri, 29 Jan 2021 12:17:43 +0100 Message-Id: <20210129111814.566629-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52c.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Bulekov , Thomas Huth Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Alexander Bulekov For some device configurations, it is useful to configure some resources, and adjust QEMU arguments at runtime, prior to fuzzing. This patch adds an "argfunc" to generic the generic_fuzz_config. When specified, it is responsible for configuring the resources and returning a string containing the corresponding QEMU arguments. This can be useful for targets that rely on e.g.: * a temporary qcow2 image * a temporary directory * an unused TCP port used to bind the VNC server Signed-off-by: Alexander Bulekov Reviewed-by: Thomas Huth Message-Id: <20210117230924.449676-2-alxndr@bu.edu> --- tests/qtest/fuzz/generic_fuzz.c | 10 +++++++++- tests/qtest/fuzz/generic_fuzz_configs.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuz= z.c index deb74f15be..ee8c17a04c 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -933,12 +933,20 @@ static GString *generic_fuzz_cmdline(FuzzTarget *t) =20 static GString *generic_fuzz_predefined_config_cmdline(FuzzTarget *t) { + gchar *args; const generic_fuzz_config *config; g_assert(t->opaque); =20 config =3D t->opaque; setenv("QEMU_AVOID_DOUBLE_FETCH", "1", 1); - setenv("QEMU_FUZZ_ARGS", config->args, 1); + if (config->argfunc) { + args =3D config->argfunc(); + setenv("QEMU_FUZZ_ARGS", args, 1); + g_free(args); + } else { + g_assert_nonnull(config->args); + setenv("QEMU_FUZZ_ARGS", config->args, 1); + } setenv("QEMU_FUZZ_OBJECTS", config->objects, 1); return generic_fuzz_cmdline(t); } diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/gen= eric_fuzz_configs.h index aa4c03f1ae..51e69c6e42 100644 --- a/tests/qtest/fuzz/generic_fuzz_configs.h +++ b/tests/qtest/fuzz/generic_fuzz_configs.h @@ -16,6 +16,7 @@ =20 typedef struct generic_fuzz_config { const char *name, *args, *objects; + gchar* (*argfunc)(void); /* Result must be freeable by g_free() */ } generic_fuzz_config; =20 const generic_fuzz_config predefined_configs[] =3D { --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611920249; cv=none; d=zohomail.com; s=zohoarc; b=OxF6eQQLeDCacrStt169L/QTprNZwfWwYPEIXvmDvddtYfqP2y8o3IMvSTuQRw5xhDYs0kV7hBomlOGEFLsEfhYEOX7aGGkWFMDn7q95d1zkjc8cEMr2j4WdaFlEnD0XMNcrU2T5uw19CLFse4DeaOeLJ3JZ/nQNO2ojoWRHQjk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611920249; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=N868ZEyZ6u5XOq6H/Pyk+nswe7j/Yy+s5xT76V+knOs=; b=ezHU5x9UGtv5zzbZWPUte8PHUSqo5CPLH3+Nr4Rn0M285fsioNyukaYhks7qJpb9aaoD6TjV5RbCLgSwqhrgD8J2Xx1vl0d61IE3gqXK4eO2ueeH+Gg/yxCzBNoePejHHqGqld0RFLU4KGF4r+0AvsSqm3LmiLpgHZFdSxYay3s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611920249540485.9125327423591; Fri, 29 Jan 2021 03:37:29 -0800 (PST) Received: from localhost ([::1]:38650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5S5f-0003fj-FX for importer@patchew.org; Fri, 29 Jan 2021 06:37:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnE-0004IV-FN for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:24 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:37441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnC-0005v6-Mp for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:24 -0500 Received: by mail-ej1-x632.google.com with SMTP id kg20so12453937ejc.4 for ; Fri, 29 Jan 2021 03:18:22 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=N868ZEyZ6u5XOq6H/Pyk+nswe7j/Yy+s5xT76V+knOs=; b=SW8KdqCUm2h7JckRbaebxJDCOSC9PuypijhwA9PMgrmrgo3G7AucHv16ONqR1kCRWJ 7Hc0+MeUiZWNLuI5C4PQGq7eouyS71atTnJgSyvCrJjlLao7j4jfq0q716WFfizoGc/p dmK0U25VAHyOEjn7KcnReevfxKo4rK4GLS9gXNDsszPQona+iXKPBFecU93Mt1pJC2xz OGp2N047BFDHw5vNM1znF6L4tfsnITS/JGt7DTr8fjd+1ugWEgXzPVqsWINb1uVKCq54 Qix0Jcbo8pB3RejqHerKf+jN0NyI8lqFrlA68jWR7rrcOjWr/2V5bmzqED07vlkYS7AH sIQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=N868ZEyZ6u5XOq6H/Pyk+nswe7j/Yy+s5xT76V+knOs=; b=ZsQMYi+MUyQjQQk9HMk4QylucEKDpZthihwx2xEUcuQ31M6iCYtf9EyqlXTPYtJCKi qOFutROmMZuPLP9nlsLYjSyJr61wcG1AFFvYykooqPM4jXNXJfAuc5+wNvCdRiqfsuB7 gCTyEvInxopK72muhOlcDsP4hpJDoafboegNpt2F2Ydtwk8mo/NEtEkEXi/WIqlsDEsI aRlAgLyPjVuEJhNhIww03IP+qiVf6MPdsriHEF+sAPEZyWBLoW2JeDlZHtcwoP3MiM5N M9JACAOeCZ55mujoX3+KpOOK4BjGh3B01LVNphrcNg+l0PnKd+3LR8nQKG5rnmGVbo5B u1zg== X-Gm-Message-State: AOAM530nNLJHq72DfOiVelCfpFJdXl6XDwqatuWMoCeWXqHQVm2KUPMJ FxV+z2iGQuRngcMyOd0LX8OVbQ1OZ9vJDQ== X-Google-Smtp-Source: ABdhPJxzB88h8OpBD3WE5gpk++Y3IIX+H/GBWEKG4og+SfCvYLxRZr3qAnmBWXe+RBHfQQvbO1LzhA== X-Received: by 2002:a17:906:fcce:: with SMTP id qx14mr3971643ejb.220.1611919101434; Fri, 29 Jan 2021 03:18:21 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 06/36] docs/fuzz: add some information about OSS-Fuzz Date: Fri, 29 Jan 2021 12:17:44 +0100 Message-Id: <20210129111814.566629-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Bulekov , Darren Kenny Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Alexander Bulekov Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny Message-Id: <20210117230924.449676-3-alxndr@bu.edu> --- docs/devel/fuzzing.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/devel/fuzzing.rst b/docs/devel/fuzzing.rst index 5f5200c843..97797c4f8c 100644 --- a/docs/devel/fuzzing.rst +++ b/docs/devel/fuzzing.rst @@ -180,6 +180,36 @@ To ensure that these env variables have been configure= d correctly, we can use:: =20 The output should contain a complete list of matched MemoryRegions. =20 +OSS-Fuzz +-------- +QEMU is continuously fuzzed on `OSS-Fuzz` __(https://github.com/google/oss= -fuzz). +By default, the OSS-Fuzz build will try to fuzz every fuzz-target. Since t= he +generic-fuzz target requires additional information provided in environment +variables, we pre-define some generic-fuzz configs in +``tests/qtest/fuzz/generic_fuzz_configs.h``. Each config must specify: + +- ``.name``: To identify the fuzzer config + +- ``.args`` OR ``.argfunc``: A string or pointer to a function returning a + string. These strings are used to specify the ``QEMU_FUZZ_ARGS`` + environment variable. ``argfunc`` is useful when the config relies on e= .g. + a dynamically created temp directory, or a free tcp/udp port. + +- ``.objects``: A string that specifies the ``QEMU_FUZZ_OBJECTS`` environm= ent + variable. + +To fuzz additional devices/device configuration on OSS-Fuzz, send patches = for +either a new device-specific fuzzer or a new generic-fuzz config. + +Build details: + +- The Dockerfile that sets up the environment for building QEMU's + fuzzers on OSS-Fuzz can be fund in the OSS-Fuzz repository + __(https://github.com/google/oss-fuzz/blob/master/projects/qemu/Dockerfi= le) + +- The script responsible for building the fuzzers can be found in the + QEMU source tree at ``scripts/oss-fuzz/build.sh`` + Implementation Details / Fuzzer Lifecycle ----------------------------------------- =20 --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921079; cv=none; d=zohomail.com; s=zohoarc; b=ce0CEj7IPIZtbBAtdSWqwiyPO9Lrz9mDcE/EA1PO72be5LNpFYG2LSqIvl4UBz4PZffooutruwCxpRHBWFIt4w+qmiOJ49aH9M6e1bfIu0pk0pxJC3oD4gOeWdZxOHPnxwXMSI+i3cvEtaw8Z/Xj9mfdiC3/TYT7pPSM9Im2Yo0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921079; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZmniK0yzO+id8G0haBxNriDaxYyBXhcth1WQMA0kwrs=; b=LWHBWdltB/GNTQkyYEQsSreaLnwAv8h+k80w5U9bDpYa70Ux1DlBV1XIakK7nusnS+uYYqax6yGPGEAYupg16GfnoaaQgdtOvyrwNFEgt3PSG304AXyJwVGnmE9A8Cb3PEqbmuI9w4Ku8RMolec9JKYAmEzldPbYEuCyy8zCRms= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921079275858.6737840514324; Fri, 29 Jan 2021 03:51:19 -0800 (PST) Received: from localhost ([::1]:46448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SJ4-0002I9-7O for importer@patchew.org; Fri, 29 Jan 2021 06:51:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnF-0004Js-0b for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:29 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:39504) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnD-0005vJ-Gy for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:24 -0500 Received: by mail-ej1-x631.google.com with SMTP id g3so12439008ejb.6 for ; Fri, 29 Jan 2021 03:18:23 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZmniK0yzO+id8G0haBxNriDaxYyBXhcth1WQMA0kwrs=; b=L70IC3itBdeg78iCfVEyKOk+9naGCK93NGFai9AZSqCVxGR8JZjgWf3CeIZYgAvQWB adjsI+TRZ1HE0Hq0P2XugKrJAnyvJmnLxvHKW9fzfLOymg4OnwYX60nuv7EqeA7F2xSD in3VL1z391qpXxN8GJbImHYKVPBw92QJC3kMrxPa/D+7VyKAJX2j7DR7FKUGhVwIKq1/ hBuxkDEXBXLeDb2CQRw45XxXmFWl+o48zXt6tj7Cex4SVUZWZougNCR/th9CymAfYR/M 5+OsTZm50qAt74E8Zoe3/EcSg0g0bh9Vw4DOIHeuKPoOb4wGveWTatkY35ybDqsc+iJe Jbww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ZmniK0yzO+id8G0haBxNriDaxYyBXhcth1WQMA0kwrs=; b=BljtyLkGgJU5lNCyY+jAEnNA8t5RhXdJkpCL+4X3x7uJul1YnnFmEWVWsi8RlpN5FK P9tZeUs6ch9w5gRICZEE43PNriHT5eKqsu5tr7pc1V0slQb29Z5P/RRtKYUAvtgNysMn mfjvJ2x1TauY1nQczr09MmCKZPW92hKRoU8xYcPhs0chhDqwJuvfXyAZmKpPpDEBQxvE vcEbdXR1hUU2uHZb6rG+LRWyCZnE6fyR2oT0fflETiMhyIgtdxUK+8YjwHaLId1GKLiX n6N6fRL0JxWrCynrt8edL77AehhZDppHFb/yLqtOqCGshbZqPDMC89WGIsGYNKvv07RL b/aQ== X-Gm-Message-State: AOAM531oDrOS8wY5aUZoQ0WoTqRc0Y/AiqPwh5qhlqARUerTJu+su0tA BuwjSz12H5r/T9kNFLgy4XWPcmS6iIOm6w== X-Google-Smtp-Source: ABdhPJzzizVAUb6H3Cup2ZAyMdokXccQKAbWqw/EQGkNV4eSb+8y0ISRBb8GheUAMlHJrnA/iacf+Q== X-Received: by 2002:a17:906:d8c3:: with SMTP id re3mr4135785ejb.80.1611919102256; Fri, 29 Jan 2021 03:18:22 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 07/36] fuzz: add virtio-9p configurations for fuzzing Date: Fri, 29 Jan 2021 12:17:45 +0100 Message-Id: <20210129111814.566629-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Bulekov , Darren Kenny Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Alexander Bulekov virtio-9p devices are often used to expose a virtual-filesystem to the guest. There have been some bugs reported in this device, such as CVE-2018-19364, and CVE-2021-20181. We should fuzz this device This patch adds two virtio-9p configurations: * One with the widely used -fsdev local driver. This driver leaks some state in the form of files/directories created in the shared dir. * One with the synth driver. While it is not used in the real world, this driver won't leak leak state between fuzz inputs. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny Message-Id: <20210117230924.449676-4-alxndr@bu.edu> --- tests/qtest/fuzz/generic_fuzz_configs.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/gen= eric_fuzz_configs.h index 51e69c6e42..5d599765c4 100644 --- a/tests/qtest/fuzz/generic_fuzz_configs.h +++ b/tests/qtest/fuzz/generic_fuzz_configs.h @@ -19,6 +19,16 @@ typedef struct generic_fuzz_config { gchar* (*argfunc)(void); /* Result must be freeable by g_free() */ } generic_fuzz_config; =20 +static inline gchar *generic_fuzzer_virtio_9p_args(void){ + char tmpdir[] =3D "/tmp/qemu-fuzz.XXXXXX"; + g_assert_nonnull(mkdtemp(tmpdir)); + + return g_strdup_printf("-machine q35 -nodefaults " + "-device virtio-9p,fsdev=3Dhshare,mount_tag=3Dhshare " + "-fsdev local,id=3Dhshare,path=3D%s,security_model=3Dmapped-xattr," + "writeout=3Dimmediate,fmode=3D0600,dmode=3D0700", tmpdir); +} + const generic_fuzz_config predefined_configs[] =3D { { .name =3D "virtio-net-pci-slirp", @@ -60,6 +70,16 @@ const generic_fuzz_config predefined_configs[] =3D { .name =3D "virtio-mouse", .args =3D "-machine q35 -nodefaults -device virtio-mouse", .objects =3D "virtio*", + },{ + .name =3D "virtio-9p", + .argfunc =3D generic_fuzzer_virtio_9p_args, + .objects =3D "virtio*", + },{ + .name =3D "virtio-9p-synth", + .args =3D "-machine q35 -nodefaults " + "-device virtio-9p,fsdev=3Dhshare,mount_tag=3Dhshare " + "-fsdev synth,id=3Dhshare", + .objects =3D "virtio*", },{ .name =3D "e1000", .args =3D "-M q35 -nodefaults " --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921237; cv=none; d=zohomail.com; s=zohoarc; b=kshCwNBxOFVplV5s+j8oAIo6smutg1osKgbFCX4NeQdtHp2dIql59sB4b5WZLNNSId9vRZrFfm7vd/qZWj4jC3MHWSK2cmfUSBkiGNBvTLfVFCIYZUedeAFA+NHgiV95KEqITbqPiIBfZ4plTNKNtbInPn8aWdqWD/wgdi0vSvo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921237; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BO9Qi6gsd1HjJky0aDF1av5K+7FDTCunwCjMyFDDpdU=; b=HF3x3rRL2m0jMPlf/rHVHcFn3BQxuAPUhVeYP4yzPmAaFY3YUrsIPhJ738m4aXqHdm/4Sji5xaEZTBijEI2ZDtTWeeLJ05B0JiisPAXf7Z4lj6tMTGDkThdKbyzFy8gao/85JkQd7V2iNmoNFPfJu5zKaLadfNwQYgdlaTwpkKk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921237826555.9844004553248; Fri, 29 Jan 2021 03:53:57 -0800 (PST) Received: from localhost ([::1]:52728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SLb-0004tJ-RC for importer@patchew.org; Fri, 29 Jan 2021 06:53:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnF-0004K7-TT for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:29 -0500 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:38007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnE-0005wI-HG for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:25 -0500 Received: by mail-ej1-x635.google.com with SMTP id bl23so12448953ejb.5 for ; Fri, 29 Jan 2021 03:18:24 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BO9Qi6gsd1HjJky0aDF1av5K+7FDTCunwCjMyFDDpdU=; b=Ag0t55sD8demCjIJEqXY+7Oq2HRnhxaCFnFBpkKJANYlHKBlVfUUOjjZnRCzUJrlzo n9BKQQS/PmiJJ4dow275/WEODUzDkMQ7LsmaR1Cef9iTw2Z6kJFNiA6oLb8D/Z6jcWZQ YAkuRGD2I6YPb4YTK8hc3X8TVEHWTd8it49ZLpr8UTQjRayqwnKj3ZdrdODJUrp0fDGQ qvPFy8K+JQgJ9P60sbSk8Xb360+DQj6QKRllYeQrpiNcnCJXUFA1o6dgKfVvjPRKwGOW x8akbODRnUonzhL9TOQb0jRNfxgoHjwjx5c7c9T2rEe5XBHalMx3MsOnPhmxH5zv+iFi GWlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BO9Qi6gsd1HjJky0aDF1av5K+7FDTCunwCjMyFDDpdU=; b=Y0KN0aWHnJPg10S1WqJns3dNn+rKINv2+/QHuhheD63CMiG4bSDWA/bB4eWAxm+Vrl G1ft33JPaWfeoqYqtQQQd/gm/kq1FIRH3XyGaPfhsdcdSxzTIB4gUatTDQ/TWdMcsoYs 4zSoU1dT1aG5EnF3sygZJ4j3N0p/zDKtwuzOAD3cT3nzgW5/FxktOgaI8NBNpAzzb0Du ug+9eVl9bmroqI8Xirjyd30dYQuV+AAWBJ4QjwwzOk2WDSWyHBShvp8zKypBbb9/wpRZ Sg7BDJ/jLYN9byt4Z3Xgce1erdiLMGsacV7NIkqLBqhRerEd8+533mdnUloWho+mtwZY oFPA== X-Gm-Message-State: AOAM532JVL4k8a8GCLCqwS6kj7nRmGlyzKCNz10WL0M0x6WqLSHPI0T/ NT9PJxIwLTA3TSCRBnR4GSfNhIYaS/Rn9A== X-Google-Smtp-Source: ABdhPJwNg01Hq8X7HhQRn1XY8GSXdNg9hvbaz+iJlHYfcoboTevzZCeWoDuHS6hpavERUtx3W70GuA== X-Received: by 2002:a17:906:ff43:: with SMTP id zo3mr4019647ejb.542.1611919103230; Fri, 29 Jan 2021 03:18:23 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 08/36] target/i386: do not set LM for 32-bit emulation "-cpu host/max" Date: Fri, 29 Jan 2021 12:17:46 +0100 Message-Id: <20210129111814.566629-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nathan Chancellor Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 32-bit targets by definition do not support long mode; therefore, the bit must be masked in the features supported by the accelerator. As a side effect, this avoids setting up the 0x80000008 CPUID leaf for qemu-system-i386 -cpu host which since commit 5a140b255d ("x86/cpu: Use max host physical address if -cpu max option is applied") would have printed this error: qemu-system-i386: phys-bits should be between 32 and 36 (but is 48) Reported-by: Nathan Chancellor Tested-by: Nathan Chancellor Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 72a79e6019..2b2c1c5389 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5081,6 +5081,11 @@ static uint64_t x86_cpu_get_supported_feature_word(F= eatureWord w, } else { return ~0; } +#ifndef TARGET_X86_64 + if (w =3D=3D FEAT_8000_0001_EDX) { + r &=3D ~CPUID_EXT2_LM; + } +#endif if (migratable_only) { r &=3D x86_cpu_get_migratable_flags(w); } --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611920871; cv=none; d=zohomail.com; s=zohoarc; b=OujB6kWd6EhaqoQsUILIusQl3ZTLwTAS4D1Z4aBOlypgDOdoKnsDrIAEvk7KlfhDBk+uVZTny/z4cm+dBjyMur22BmiTa2iv6g6BOsNqHZouFND87HWXyPfaBdqsCbkf8Psc+2LJZ/hgVCQD41Y1fHrNAZiJc3BUBv6evVOFPko= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611920871; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wuogPbvhpo56gM/ceAnzLWm4d5y8A+rkROWRVMmokrQ=; b=CkDBP4YHbtKxK37SBz/TVtHQwPNMdfEodrYN/iSzP7vSF0xv1HZTfRXPE5tAzGOzm7MztW23qtogEsP+SBP0mhsMKh2yVwO8uGS6t3InHZmcp9DeKI5F6emnawBQrwgVpkfeNwQxRDcz38IGvkEH8JkSE7hAJ0R/8XhDhVFl13g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16119208711112.381674933325826; Fri, 29 Jan 2021 03:47:51 -0800 (PST) Received: from localhost ([::1]:37436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SFi-0006q6-3j for importer@patchew.org; Fri, 29 Jan 2021 06:47:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnJ-0004KB-7J for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:29 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:37437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnF-0005xM-8Q for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:26 -0500 Received: by mail-ej1-x62d.google.com with SMTP id kg20so12454096ejc.4 for ; Fri, 29 Jan 2021 03:18:24 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wuogPbvhpo56gM/ceAnzLWm4d5y8A+rkROWRVMmokrQ=; b=WFN7aXA/1ouUoMP2ntwop4to98menYHdAeKDtEIs9w5mt6X0lJnO+FnAqJpdtRE4Hp WYcJOMC8ZkYpDpFSqDm5Jh731DA8YfmYn9NaToR4hq6xUDBndsi+Za/hoqDlkCIWkQiu Oys4kn4zqx3wRcu0BCvNXUUdO6kliFMjykReVvvQsCkpiO9hDog31MrbfTERlqtHqJLC i0a8+CF044qMS/PMepHSjUq0/W6Noo1jZorUfCBNGcTp5pmR8QiX0lTdeB1OKejqs1z8 mWd+diEIYQ5t56HqxmSQJgv/2milHQs8mxhPPTbxwhkX87cMCaoFx83QciSISeuqpOjA mZVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=wuogPbvhpo56gM/ceAnzLWm4d5y8A+rkROWRVMmokrQ=; b=GgVsoUrDER4EYmCBr3Avxbh2+f2Ebc74z+UfCvTdhaDaz0kCf3HQtS5d+xzQj/GK0b g7/0VumhCtijfTa3GnaYfe1FxX1BlCbknhWkNXjIpaPVPKlpTqSy1SC2VVGBAT7dxW14 lXbZOzfh07hSYjiOGUVR88gnkgi0EVUk1gQm5EMbWCeL0fl6/xN/a5XostBTY6CUVxDO RI40Xv/GgT8ct/89xY6Kl1bF7BFqNOMdgGUEA3dOnPuXsGCzsdBlNcKdrdPpfsR0pcTP KLPhuuqELzA4yk9egB+vhpveyAG1NZaj4FcX+iMIi1XPMcIVSnNXRjmeOInZTNaxa/yk alCg== X-Gm-Message-State: AOAM530VAVXZYl1VFcTKBlrSXipVxRc1WNsRQekVxnpvhUT79sXhJALh Dr2PvkE+lb6cR2v5lPKwvFhw91DJu/1HLQ== X-Google-Smtp-Source: ABdhPJwZzN98/zRAm580PKtQ8rdob4k03LTSjpGZGnzXGzBCdMKOBp4hG0/OyQTBffR0uYyTdndBRA== X-Received: by 2002:a17:906:1c13:: with SMTP id k19mr4080613ejg.338.1611919104098; Fri, 29 Jan 2021 03:18:24 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 09/36] machine: add missing doc for memory-backend option Date: Fri, 29 Jan 2021 12:17:47 +0100 Message-Id: <20210129111814.566629-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Add documentation for '-machine memory-backend' CLI option and how to use it. And document that x-use-canonical-path-for-ramblock-id, is considered to be stable to make sure it won't go away by accident. x- was intended for unstable/iternal properties, and not supposed to be stable option. However it's too late to rename (drop x-) it as it would mean that users will have to mantain both x-use-canonical-path-for-ramblock-id (for QEMU 5.0-5.2) versions and prefix-less for later versions. Signed-off-by: Igor Mammedov Message-Id: <20210121161504.1007247-1-imammedo@redhat.com> Signed-off-by: Paolo Bonzini --- backends/hostmem.c | 10 ++++++++++ qemu-options.hx | 26 +++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/backends/hostmem.c b/backends/hostmem.c index 9f9ac95edd..813aeb83c9 100644 --- a/backends/hostmem.c +++ b/backends/hostmem.c @@ -498,6 +498,16 @@ host_memory_backend_class_init(ObjectClass *oc, void *= data) host_memory_backend_get_share, host_memory_backend_set_share); object_class_property_set_description(oc, "share", "Mark the memory as private to QEMU or shared"); + /* + * Do not delete/rename option. This option must be considered stable + * (as if it didn't have the 'x-' prefix including deprecation period)= as + * long as 4.0 and older machine types exists. + * Option will be used by upper layers to override (disable) canonical= path + * for ramblock-id set by compat properties on old machine types ( <= =3D 4.0), + * to keep migration working when backend is used for main RAM with + * -machine memory-backend=3D option (main RAM historically used prefi= x-less + * ramblock-id). + */ object_class_property_add_bool(oc, "x-use-canonical-path-for-ramblock-= id", host_memory_backend_get_use_canonical_path, host_memory_backend_set_use_canonical_path); diff --git a/qemu-options.hx b/qemu-options.hx index 9172d51659..53e547fab0 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -35,7 +35,8 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \ " suppress-vmdesc=3Don|off disables self-describing mig= ration (default=3Doff)\n" " nvdimm=3Don|off controls NVDIMM support (default=3Dof= f)\n" " memory-encryption=3D@var{} memory encryption object t= o use (default=3Dnone)\n" - " hmat=3Don|off controls ACPI HMAT support (default=3Do= ff)\n", + " hmat=3Don|off controls ACPI HMAT support (default=3Do= ff)\n" + " memory-backend=3D'backend-id' specifies explicitly pr= ovided backend for main RAM (default=3Dnone)\n", QEMU_ARCH_ALL) SRST ``-machine [type=3D]name[,prop=3Dvalue[,...]]`` @@ -96,6 +97,29 @@ SRST ``hmat=3Don|off`` Enables or disables ACPI Heterogeneous Memory Attribute Table (HMAT) support. The default is off. + + ``memory-backend=3D'id'`` + An alternative to legacy ``-mem-path`` and ``mem-prealloc`` option= s. + Allows to use a memory backend as main RAM. + + For example: + :: + -object memory-backend-file,id=3Dpc.ram,size=3D512M,mem-path=3D/hu= getlbfs,prealloc=3Don,share=3Don + -machine memory-backend=3Dpc.ram + -m 512M + + Migration compatibility note: + a) as backend id one shall use value of 'default-ram-id', advertis= ed by + machine type (available via ``query-machines`` QMP command), if mi= gration + to/from old QEMU (<5.0) is expected. + b) for machine types 4.0 and older, user shall + use ``x-use-canonical-path-for-ramblock-id=3Doff`` backend option + if migration to/from old QEMU (<5.0) is expected. + For example: + :: + -object memory-backend-ram,id=3Dpc.ram,size=3D512M,x-use-canonical= -path-for-ramblock-id=3Doff + -machine memory-backend=3Dpc.ram + -m 512M ERST =20 HXCOMM Deprecated by -machine --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611920379; cv=none; d=zohomail.com; s=zohoarc; b=FGVAQMKJU0jhfK5DSpc505AzcNbpapoX3KiygvAkAGWcLoPaIFw6dmhxXSg0xKSqw34DlCY+fNIZRyGEWVVzmLsExSvIRaOIJZgc2qgx1K9ra7JBDwPVjOQgKuA+i9ayqBGVg/kG6rdqisYpRTsCuF5qN9rYXhRtW30jayWr/Tk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611920379; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=U47m2lAgbtUyDgIiGWrmy6EFiS8hoviM8UxvgRNb+XE=; b=MEBDMG5BAsAFxDTPSQjRnW56uQtFWGZfehz6dtYJvP1Unitf9Y2FqMUFQuyoWdcqafDosHPlNIW5dagwwsQc1d/HyD0OlA4FZhW6ENmOFWFaO+mBTQBI5GIFd4cbH0Vy1dLeQ29zPepWtPrnM6nfZ7K/6Z9ROHP3lUY6Dkb2vdM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611920379208114.34049118046437; Fri, 29 Jan 2021 03:39:39 -0800 (PST) Received: from localhost ([::1]:45002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5S7m-0006Q2-3e for importer@patchew.org; Fri, 29 Jan 2021 06:39:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnL-0004PA-95 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:31 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:38006) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnJ-0005xV-0V for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:30 -0500 Received: by mail-ej1-x633.google.com with SMTP id bl23so12449086ejb.5 for ; Fri, 29 Jan 2021 03:18:26 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U47m2lAgbtUyDgIiGWrmy6EFiS8hoviM8UxvgRNb+XE=; b=JGhCns+Wlk8ko06xD4jnc6rAUcM02EJvuiiSJJlxl6AI4JdRcD2ZRfwMVlcEEiypbD gx9msrkK2jF9eA78g9ZLb6/M2EVU3Lf7mG28XDzskNLBXrU4MVMjQMXAMUrO04bSlIcn VBd8lJb2DySoQMhavKBbDSHxrmq/hMAf1cHa9bcXAP0U8WOdo6V+ylsLJSHH9LyJjkj6 mhV8JykYmtSXANwXxEKCdhAh0PGyIcFL4ncBAgbMiWbTCWtdtCA5Qf7kYR7od1jKpHuX ocWf/xr6nPSKaQgiPZc06GvnjwTmV/aluq2s2mRXXezKFqaUeQ+FgySu9PU9gmCvUryy DT8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=U47m2lAgbtUyDgIiGWrmy6EFiS8hoviM8UxvgRNb+XE=; b=Y9h7F6j82KLNL1X5NKMC3nJ51qwxaNsi//4KLjBGmV9r16JJMg8ocjD8ipEun0XBRF Lkato3B+ClJ99PJO17kKmefecaZl0dpcwzFjiyJ1JDGbbofHSAxM+7k+JgqlvWzaqO8D /8kUorEfiKdKj0pL4E9YUMBRfUPpc0OXGMhHLFWIQrHOYQxomAzVLJzTL/38ueBPbGnB SedsnRu45+F2TIrMOc6bBiiN+rMCahM9NB2dupgUh9m6tEmbyh/xvBd0CgRMgaIZEfq7 XgxI+/mwTVAvBqcpb85AUoYxVERtEsaI+/Yf8dIFWv1kEBweI2gJffY9O1zXO4ua7m4a xleQ== X-Gm-Message-State: AOAM533WAGoYWbZ8LhLF2lJI1zl4BgdWWnXfCMEEWfqZwYeTSIzq89rZ Ze52geCLmZmyEFihvNsS+4yFvYUs0msB0Q== X-Google-Smtp-Source: ABdhPJxGd0nWoMNrcvKAXqDFV2xrEI9RTvQDoq0K6r6sz3bpLZuM6IqXdmbb5TqACfDclP1LIrlVEA== X-Received: by 2002:a17:906:e98:: with SMTP id p24mr3967823ejf.67.1611919105147; Fri, 29 Jan 2021 03:18:25 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 10/36] meson: accept either shared or static libraries if --disable-static Date: Fri, 29 Jan 2021 12:17:48 +0100 Message-Id: <20210129111814.566629-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x633.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Lieven Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Meson's "static" argument to cc.find_library is a tri-state. By default Meson *prefers* a shared library, which basically means using -l to look for it; instead, "static: false" *requires* a shared library. Of course, "static: true" requires a static library, which is all good for --enable-static builds. For --disable-static, "static: false" is rarely desirable; it does not match what the configure script used to do and the test is more complex (and harder to debug if it fails, which was reported by Peter Lieven for librbd). Reported-by: Peter Lieven Tested-by: Peter Lieven Signed-off-by: Paolo Bonzini --- docs/devel/build-system.rst | 2 +- meson.build | 79 +++++++++++++++++++------------------ 2 files changed, 42 insertions(+), 39 deletions(-) diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index 31f4dced2a..69ce3087e3 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -100,7 +100,7 @@ In meson.build:: # Detect dependency sdl_image =3D dependency('SDL2_image', required: get_option('sdl_image'), method: 'pkg-config', - static: enable_static) + kwargs: static_kwargs) =20 # Create config-host.h (if applicable) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) diff --git a/meson.build b/meson.build index a58c6f6785..688124d3da 100644 --- a/meson.build +++ b/meson.build @@ -18,6 +18,9 @@ config_host =3D keyval.load(meson.current_build_dir() / '= config-host.mak') enable_modules =3D 'CONFIG_MODULES' in config_host enable_static =3D 'CONFIG_STATIC' in config_host =20 +# Allow both shared and static libraries unless --enable-static +static_kwargs =3D enable_static ? {'static': true} : {} + # Temporary directory used for files created while # configure runs. Since it is in the build directory # we can safely blow away any previous version of it @@ -311,14 +314,14 @@ endif pixman =3D not_found if have_system or have_tools pixman =3D dependency('pixman-1', required: have_system, version:'>=3D0.= 21.8', - method: 'pkg-config', static: enable_static) + method: 'pkg-config', kwargs: static_kwargs) endif pam =3D not_found if 'CONFIG_AUTH_PAM' in config_host pam =3D cc.find_library('pam') endif libaio =3D cc.find_library('aio', required: false) -zlib =3D dependency('zlib', required: true, static: enable_static) +zlib =3D dependency('zlib', required: true, kwargs: static_kwargs) linux_io_uring =3D not_found if 'CONFIG_LINUX_IO_URING' in config_host linux_io_uring =3D declare_dependency(compile_args: config_host['LINUX_I= O_URING_CFLAGS'].split(), @@ -333,7 +336,7 @@ libnfs =3D not_found if not get_option('libnfs').auto() or have_block libnfs =3D dependency('libnfs', version: '>=3D1.9.3', required: get_option('libnfs'), - method: 'pkg-config', static: enable_static) + method: 'pkg-config', kwargs: static_kwargs) endif =20 libattr_test =3D ''' @@ -354,7 +357,7 @@ if not get_option('attr').disabled() else libattr =3D cc.find_library('attr', has_headers: ['attr/xattr.h'], required: get_option('attr'), - static: enable_static) + kwargs: static_kwargs) if libattr.found() and not \ cc.links(libattr_test, dependencies: libattr, args: '-DCONFIG_LIBATT= R') libattr =3D not_found @@ -381,14 +384,14 @@ seccomp =3D not_found if not get_option('seccomp').auto() or have_system or have_tools seccomp =3D dependency('libseccomp', version: '>=3D2.3.0', required: get_option('seccomp'), - method: 'pkg-config', static: enable_static) + method: 'pkg-config', kwargs: static_kwargs) endif =20 libcap_ng =3D not_found if not get_option('cap_ng').auto() or have_system or have_tools libcap_ng =3D cc.find_library('cap-ng', has_headers: ['cap-ng.h'], required: get_option('cap_ng'), - static: enable_static) + kwargs: static_kwargs) endif if libcap_ng.found() and not cc.links(''' #include @@ -409,7 +412,7 @@ if get_option('xkbcommon').auto() and not have_system a= nd not have_tools xkbcommon =3D not_found else xkbcommon =3D dependency('xkbcommon', required: get_option('xkbcommon'), - method: 'pkg-config', static: enable_static) + method: 'pkg-config', kwargs: static_kwargs) endif vde =3D not_found if config_host.has_key('CONFIG_VDE') @@ -445,13 +448,13 @@ libiscsi =3D not_found if not get_option('libiscsi').auto() or have_block libiscsi =3D dependency('libiscsi', version: '>=3D1.9.0', required: get_option('libiscsi'), - method: 'pkg-config', static: enable_static) + method: 'pkg-config', kwargs: static_kwargs) endif zstd =3D not_found if not get_option('zstd').auto() or have_block zstd =3D dependency('libzstd', version: '>=3D1.4.0', required: get_option('zstd'), - method: 'pkg-config', static: enable_static) + method: 'pkg-config', kwargs: static_kwargs) endif gbm =3D not_found if 'CONFIG_GBM' in config_host @@ -468,14 +471,14 @@ if not get_option('curl').auto() or have_block curl =3D dependency('libcurl', version: '>=3D7.29.0', method: 'pkg-config', required: get_option('curl'), - static: enable_static) + kwargs: static_kwargs) endif libudev =3D not_found if targetos =3D=3D 'linux' and (have_system or have_tools) libudev =3D dependency('libudev', method: 'pkg-config', required: get_option('libudev'), - static: enable_static) + kwargs: static_kwargs) endif =20 mpathlibs =3D [libudev] @@ -511,17 +514,17 @@ if targetos =3D=3D 'linux' and have_tools and not get= _option('mpath').disabled() }''' libmpathpersist =3D cc.find_library('mpathpersist', required: get_option('mpath'), - static: enable_static) + kwargs: static_kwargs) if libmpathpersist.found() mpathlibs +=3D libmpathpersist if enable_static mpathlibs +=3D cc.find_library('devmapper', required: get_option('mpath'), - static: enable_static) + kwargs: static_kwargs) endif mpathlibs +=3D cc.find_library('multipath', required: get_option('mpath'), - static: enable_static) + kwargs: static_kwargs) foreach lib: mpathlibs if not lib.found() mpathlibs =3D [] @@ -571,7 +574,7 @@ if have_system and not get_option('curses').disabled() curses =3D dependency(curses_dep, required: false, method: 'pkg-config', - static: enable_static) + kwargs: static_kwargs) endif endforeach msg =3D get_option('curses').enabled() ? 'curses library not found' : '' @@ -596,7 +599,7 @@ if have_system and not get_option('curses').disabled() foreach curses_libname : curses_libname_list libcurses =3D cc.find_library(curses_libname, required: false, - static: enable_static) + kwargs: static_kwargs) if libcurses.found() if cc.links(curses_test, args: curses_compile_args, dependencies= : libcurses) curses =3D declare_dependency(compile_args: curses_compile_arg= s, @@ -647,7 +650,7 @@ brlapi =3D not_found if not get_option('brlapi').auto() or have_system brlapi =3D cc.find_library('brlapi', has_headers: ['brlapi.h'], required: get_option('brlapi'), - static: enable_static) + kwargs: static_kwargs) if brlapi.found() and not cc.links(''' #include #include @@ -663,7 +666,7 @@ endif =20 sdl =3D not_found if not get_option('sdl').auto() or (have_system and not cocoa.found()) - sdl =3D dependency('sdl2', required: get_option('sdl'), static: enable_s= tatic) + sdl =3D dependency('sdl2', required: get_option('sdl'), kwargs: static_k= wargs) sdl_image =3D not_found endif if sdl.found() @@ -671,7 +674,7 @@ if sdl.found() sdl =3D declare_dependency(compile_args: '-Wno-undef', dependencies: sdl) sdl_image =3D dependency('SDL2_image', required: get_option('sdl_image'), - method: 'pkg-config', static: enable_static) + method: 'pkg-config', kwargs: static_kwargs) else if get_option('sdl_image').enabled() error('sdl-image required, but SDL was @0@'.format( @@ -683,10 +686,10 @@ endif rbd =3D not_found if not get_option('rbd').auto() or have_block librados =3D cc.find_library('rados', required: get_option('rbd'), - static: enable_static) + kwargs: static_kwargs) librbd =3D cc.find_library('rbd', has_headers: ['rbd/librbd.h'], required: get_option('rbd'), - static: enable_static) + kwargs: static_kwargs) if librados.found() and librbd.found() and cc.links(''' #include #include @@ -705,7 +708,7 @@ glusterfs_iocb_has_stat =3D false if not get_option('glusterfs').auto() or have_block glusterfs =3D dependency('glusterfs-api', version: '>=3D3', required: get_option('glusterfs'), - method: 'pkg-config', static: enable_static) + method: 'pkg-config', kwargs: static_kwargs) if glusterfs.found() glusterfs_ftruncate_has_stat =3D cc.links(''' #include @@ -744,7 +747,7 @@ libbzip2 =3D not_found if not get_option('bzip2').auto() or have_block libbzip2 =3D cc.find_library('bz2', has_headers: ['bzlib.h'], required: get_option('bzip2'), - static: enable_static) + kwargs: static_kwargs) if libbzip2.found() and not cc.links(''' #include int main(void) { BZ2_bzlibVersion(); return 0; }''', dependencies: li= bbzip2) @@ -761,7 +764,7 @@ liblzfse =3D not_found if not get_option('lzfse').auto() or have_block liblzfse =3D cc.find_library('lzfse', has_headers: ['lzfse.h'], required: get_option('lzfse'), - static: enable_static) + kwargs: static_kwargs) endif if liblzfse.found() and not cc.links(''' #include @@ -798,12 +801,12 @@ if not get_option('gtk').auto() or (have_system and n= ot cocoa.found()) gtk =3D dependency('gtk+-3.0', version: '>=3D3.22.0', method: 'pkg-config', required: get_option('gtk'), - static: enable_static) + kwargs: static_kwargs) if gtk.found() gtkx11 =3D dependency('gtk+-x11-3.0', version: '>=3D3.22.0', method: 'pkg-config', required: false, - static: enable_static) + kwargs: static_kwargs) gtk =3D declare_dependency(dependencies: [gtk, gtkx11]) endif endif @@ -816,7 +819,7 @@ endif x11 =3D not_found if gtkx11.found() or 'lm32-softmmu' in target_dirs x11 =3D dependency('x11', method: 'pkg-config', required: gtkx11.found(), - static: enable_static) + kwargs: static_kwargs) endif vnc =3D not_found png =3D not_found @@ -825,12 +828,12 @@ sasl =3D not_found if get_option('vnc').enabled() vnc =3D declare_dependency() # dummy dependency png =3D dependency('libpng', required: get_option('vnc_png'), - method: 'pkg-config', static: enable_static) + method: 'pkg-config', kwargs: static_kwargs) jpeg =3D dependency('libjpeg', required: get_option('vnc_jpeg'), - method: 'pkg-config', static: enable_static) + method: 'pkg-config', kwargs: static_kwargs) sasl =3D cc.find_library('sasl2', has_headers: ['sasl/sasl.h'], required: get_option('vnc_sasl'), - static: enable_static) + kwargs: static_kwargs) if sasl.found() sasl =3D declare_dependency(dependencies: sasl, compile_args: '-DSTRUCT_IOVEC_DEFINED') @@ -841,7 +844,7 @@ snappy =3D not_found if not get_option('snappy').auto() or have_system snappy =3D cc.find_library('snappy', has_headers: ['snappy-c.h'], required: get_option('snappy'), - static: enable_static) + kwargs: static_kwargs) endif if snappy.found() and not cc.links(''' #include @@ -858,7 +861,7 @@ lzo =3D not_found if not get_option('lzo').auto() or have_system lzo =3D cc.find_library('lzo2', has_headers: ['lzo/lzo1x.h'], required: get_option('lzo'), - static: enable_static) + kwargs: static_kwargs) endif if lzo.found() and not cc.links(''' #include @@ -893,7 +896,7 @@ u2f =3D not_found if have_system u2f =3D dependency('u2f-emu', required: get_option('u2f'), method: 'pkg-config', - static: enable_static) + kwargs: static_kwargs) endif usbredir =3D not_found if 'CONFIG_USB_REDIR' in config_host @@ -920,7 +923,7 @@ if 'CONFIG_TASN1' in config_host link_args: config_host['TASN1_LIBS'].split()) endif keyutils =3D dependency('libkeyutils', required: false, - method: 'pkg-config', static: enable_static) + method: 'pkg-config', kwargs: static_kwargs) =20 has_gettid =3D cc.has_function('gettid') =20 @@ -979,7 +982,7 @@ endif =20 fuse =3D dependency('fuse3', required: get_option('fuse'), version: '>=3D3.1', method: 'pkg-config', - static: enable_static) + kwargs: static_kwargs) =20 fuse_lseek =3D not_found if not get_option('fuse_lseek').disabled() @@ -1364,7 +1367,7 @@ capstone_opt =3D get_option('capstone') if capstone_opt in ['enabled', 'auto', 'system'] have_internal =3D fs.exists(meson.current_source_dir() / 'capstone/Makef= ile') capstone =3D dependency('capstone', version: '>=3D4.0', - static: enable_static, method: 'pkg-config', + kwargs: static_kwargs, method: 'pkg-config', required: capstone_opt =3D=3D 'system' or capstone_opt =3D=3D 'enabled' and not ha= ve_internal) if capstone.found() @@ -1474,7 +1477,7 @@ if have_system slirp_opt =3D get_option('slirp') if slirp_opt in ['enabled', 'auto', 'system'] have_internal =3D fs.exists(meson.current_source_dir() / 'slirp/meson.= build') - slirp =3D dependency('slirp', static: enable_static, + slirp =3D dependency('slirp', kwargs: static_kwargs, method: 'pkg-config', required: slirp_opt =3D=3D 'system' or slirp_opt =3D=3D 'enabled' and not have_i= nternal) @@ -1553,7 +1556,7 @@ fdt_opt =3D get_option('fdt') if have_system if fdt_opt in ['enabled', 'auto', 'system'] have_internal =3D fs.exists(meson.current_source_dir() / 'dtc/libfdt/M= akefile.libfdt') - fdt =3D cc.find_library('fdt', static: enable_static, + fdt =3D cc.find_library('fdt', kwargs: static_kwargs, required: fdt_opt =3D=3D 'system' or fdt_opt =3D=3D 'enabled' and not have_= internal) if fdt.found() and cc.links(''' --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921451; cv=none; d=zohomail.com; s=zohoarc; b=n4zHI9TDqsXSx+FcuFQPq3n22OFrHd7EC7qwHvRJYfQC+38UfIbi6liWfH7eq0YCv9/HOzmldhe/0mbG+TKQ1XKbYSCZ86P6YtvB2UoJeaTaGv1NvbnHao+BOImHnzn4LW+Cyuoycb0lC27PPM5ZEYggAdb0YrxgCc0mubwP03M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921451; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Diap6CfCGcENhpM0PyFuX5PsRvTzNZhP3XoEyvjtpJg=; b=iJcsZTy56Tz1y2BXXCgHOuTlwExy7soBnPs4TxnYlG34+9bwhQNZNwwChOzl21e6CPXcxdFe8qZLb6H/c30oaRw4xi9JC5fp7ulOE6oh3aiu/opPpAVIhZno1luYMTym4B63vsAKRzDj15+DFCrAIvNaDsumtP6jSPcbDH/vmkg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921451748457.66659991244717; Fri, 29 Jan 2021 03:57:31 -0800 (PST) Received: from localhost ([::1]:59890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SP4-0007oL-Ca for importer@patchew.org; Fri, 29 Jan 2021 06:57:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnL-0004Qx-U8 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:31 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:42183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnJ-0005xd-0o for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:31 -0500 Received: by mail-ed1-x52e.google.com with SMTP id z22so10125219edb.9 for ; Fri, 29 Jan 2021 03:18:26 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Diap6CfCGcENhpM0PyFuX5PsRvTzNZhP3XoEyvjtpJg=; b=TJFUI2pBg2nKlxm18NlN/Fe0KCbpoKvuRmQmL6DkH1XKIacUewjTW6gO2GnN7sTFhP F8zuhu7dYzYp20Z9m/FcIy/5gLHXz6JVtyM24GtU3clelXM6qAltDxJ9IVLryLY87xOo aPh/vzMeUuMRN8SMzCJAcFO6b2VDtVNrigS91+O56o0ODtGXlzgqud5y3rdN+erroox5 XWzyb4rXhE3mCHKF8AvmPlkSe2kYzMdTtGZvUlKRqzx5px41j+2p+wnp82f71+bktDxt zlY4BrrGFEquZ/Y5Vh0Pc45oCKCISZmleIdvtB2Px4PCQ6vx+b1KgKyR+/23ls+5BDw3 PIQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Diap6CfCGcENhpM0PyFuX5PsRvTzNZhP3XoEyvjtpJg=; b=IpbbO2BrT6XJt4IvBnGrpJCHMWjnZ2Z2i2tnPdXSsZ6mzkqdhaRZ77G3+W+M19EF1t X7tV26CRGHlCBGixW35kxWYrIjrHYeTfXeV+Ry4MAufwtwZiR0ggkNScI/5NcXbNfw+R reZJhF6qDDQJJvJuzy2aU1fq/dMlvvKkZgNtC/rmzHR9cg1rcie/ZYipb8fdFpnrh1ny nr+lSUX93HxG9AlqnCDB6fbc/2BPQGIqtYUO6eQHO6Q8jA6s1vbB/lj2Q4w57PWfqkZ6 BpH6Pk0FSSX/WQHa/QJdmYWP+6zpd9oukGbpXpCC71NDJhasnV5D4Zd8vxfLLculMDL+ pwfQ== X-Gm-Message-State: AOAM533Pf/xav4XLNPKGgdZw8nH6n0Yo7IeV0ILPPKlcaqYqekga9I7X Q7N7C8S3NnXaRxIXRIRINggoFfZUbY+Ofw== X-Google-Smtp-Source: ABdhPJxJLjFurzj2hC/SpPxAdHhbe3ECrnAdpZOx7MlSCIHzXXxlzlnEuclfCztgKoAOpMQ2lLbM3Q== X-Received: by 2002:aa7:cf90:: with SMTP id z16mr4529545edx.218.1611919105924; Fri, 29 Jan 2021 03:18:25 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 11/36] meson: honor --enable-rbd if cc.links test fails Date: Fri, 29 Jan 2021 12:17:49 +0100 Message-Id: <20210129111814.566629-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" If the link test failed, compilation proceeded with RBD disabled, even if --enable-rbd was used on the configure command line. Fix that. Signed-off-by: Paolo Bonzini --- meson.build | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/meson.build b/meson.build index 688124d3da..14e4cb35df 100644 --- a/meson.build +++ b/meson.build @@ -690,15 +690,21 @@ if not get_option('rbd').auto() or have_block librbd =3D cc.find_library('rbd', has_headers: ['rbd/librbd.h'], required: get_option('rbd'), kwargs: static_kwargs) - if librados.found() and librbd.found() and cc.links(''' - #include - #include - int main(void) { - rados_t cluster; - rados_create(&cluster, NULL); - return 0; - }''', dependencies: [librbd, librados]) - rbd =3D declare_dependency(dependencies: [librbd, librados]) + if librados.found() and librbd.found() + if cc.links(''' + #include + #include + int main(void) { + rados_t cluster; + rados_create(&cluster, NULL); + return 0; + }''', dependencies: [librbd, librados]) + rbd =3D declare_dependency(dependencies: [librbd, librados]) + elif get_option('rbd').enabled() + error('could not link librados') + else + warning('could not link librados, disabling') + endif endif endif =20 --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921004; cv=none; d=zohomail.com; s=zohoarc; b=j2HraFZ1kPUmVnaKW8qRSv7axBHPQ8vwNBt7D6RrpldKz2IvoqI+nBVuPkbG+MlPfpGXbGpqD3lN5prQG98LXOtlxayw5+gaXPt1AyTc04l4Q+1db7oY/tozW2CStCoK5vwYn6Lm2HJh5OtWU890WjBKqFfQwlR9i46udLXyG6g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921004; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=81Sp0+tQ+ruTtE13mZTcjfQrSJQnTdfakY5Xykhsupo=; b=mdjwGf5WC2CWOLUz8eQlOwayfzV9p4n/5x0ntzwGxTWQp8qcqrXqxvs3DGn5i8xoSo6YvCh/PIDIxK6Efmjm0dC2q+gA/nLzk+At5dGmIoDnRcOiSmUEflYneWkQVqlH0hwk89GBHoc3h38O3l2nyBdQjnspwJZ8pUUiuxvRk0Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921004317613.5311492676547; Fri, 29 Jan 2021 03:50:04 -0800 (PST) Received: from localhost ([::1]:43734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SHq-00014c-W4 for importer@patchew.org; Fri, 29 Jan 2021 06:50:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnK-0004NN-HV for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:30 -0500 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:44906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnJ-0005xv-0X for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:30 -0500 Received: by mail-ed1-x535.google.com with SMTP id c2so10093661edr.11 for ; Fri, 29 Jan 2021 03:18:27 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=81Sp0+tQ+ruTtE13mZTcjfQrSJQnTdfakY5Xykhsupo=; b=vbHzndOyJcnj7SrC9Ivt0guUZVSWnwWgiNqMLRB0l9bEFd2zCyNnMnx72DLCGaGfsq pRhUYhs+B6d1aJhMQ34veQ3CuYkqJW1Hv8NXR5JtKeebV63IoTyofSbzktq4xx+CJlJy AccWg1BjhyNVgzu4h+vPpyra3lYxnkwvJrvsZeLMvrN1QHCzE0xb9CvGx8BH8PnSPII7 InFbbBsTiqqBAjcLj6jIX9GU/hJuKzWw6DHLq4yyXbDF0O88Zoy/2XPhqOF6v/1MxdJN Aqmxz38gTDGEvb9eu2TKdhCKQpAoc0ue/5awW8nHr94ecB5jzBvuAR2jQEO6FtGEZu6L x7jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=81Sp0+tQ+ruTtE13mZTcjfQrSJQnTdfakY5Xykhsupo=; b=U/vabtDW9OXPA9GSrMTgR3TzR6Eda8OojudKHWGQuwaMprndgO8s2jn+hM4A4oho6v y4LyuTzZB2TvBFbmDOqqlMxXHT5uQCjRlDJFzPhxXXhNF71tx1Ygad33NnBwR7VOZWsU U6nRMXTDsLXy34rIl4Nj0UEJ/CGlNs9j2Luesj3oC4437SAnIAxORxVT0bCpav9ROOkh 4bqaY0XVd87p7WcB6lUfkGFjruZniSPs+NLDvW8B+j6ZHlGO6N4sQd3KMbS/YqgNrFf/ T8zTvwbWMx78ChQph++d+YfNScJ9PogtBOOxhCtpWSVbaaWqKquirlQNynTRYeh+0K9D fewA== X-Gm-Message-State: AOAM533YVcoH7TVQDB0UW0aXW9jnhERu+wy9u2qmSW3/lCwWXwwaF+1t 4Oi6rv4b0dNpZg095exzGd+xyigFOax+Ig== X-Google-Smtp-Source: ABdhPJwGdvn34qEs23mveFCEDliRNRUayqDh7xAmdxG6BKsh7jf0OWhnw8qKfO+k/cV5S9DVeQMIJw== X-Received: by 2002:a05:6402:50ca:: with SMTP id h10mr4430087edb.181.1611919106784; Fri, 29 Jan 2021 03:18:26 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 12/36] x86/cpu: Populate SVM CPUID feature bits Date: Fri, 29 Jan 2021 12:17:50 +0100 Message-Id: <20210129111814.566629-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x535.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wei Huang Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Wei Huang Newer AMD CPUs will add CPUID_0x8000000A_EDX[28] bit, which indicates that SVM instructions (VMRUN/VMSAVE/VMLOAD) will trigger #VMEXIT before CPU checking their EAX against reserved memory regions. This change will allow the hypervisor to avoid intercepting #GP and emulating SVM instructions. KVM turns on this CPUID bit for nested VMs. In order to support it, let us populate this bit, along with other SVM feature bits, in FEAT_SVM. Signed-off-by: Wei Huang Message-Id: <20210126202456.589932-1-wei.huang2@amd.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 6 +++--- target/i386/cpu.h | 24 ++++++++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 2b2c1c5389..a8db1b415d 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -926,11 +926,11 @@ static FeatureWordInfo feature_word_info[FEATURE_WORD= S] =3D { "npt", "lbrv", "svm-lock", "nrip-save", "tsc-scale", "vmcb-clean", "flushbyasid", "decodeassists", NULL, NULL, "pause-filter", NULL, - "pfthreshold", NULL, NULL, NULL, - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, + "pfthreshold", "avic", NULL, "v-vmsave-vmload", + "vgif", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "svme-addr-chk", NULL, NULL, NULL, }, .cpuid =3D { .eax =3D 0x8000000A, .reg =3D R_EDX, }, .tcg_features =3D TCG_SVM_FEATURES, diff --git a/target/i386/cpu.h b/target/i386/cpu.h index d23a5b340a..b39ec505de 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -670,16 +670,20 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS]; #define CPUID_EXT3_PERFCORE (1U << 23) #define CPUID_EXT3_PERFNB (1U << 24) =20 -#define CPUID_SVM_NPT (1U << 0) -#define CPUID_SVM_LBRV (1U << 1) -#define CPUID_SVM_SVMLOCK (1U << 2) -#define CPUID_SVM_NRIPSAVE (1U << 3) -#define CPUID_SVM_TSCSCALE (1U << 4) -#define CPUID_SVM_VMCBCLEAN (1U << 5) -#define CPUID_SVM_FLUSHASID (1U << 6) -#define CPUID_SVM_DECODEASSIST (1U << 7) -#define CPUID_SVM_PAUSEFILTER (1U << 10) -#define CPUID_SVM_PFTHRESHOLD (1U << 12) +#define CPUID_SVM_NPT (1U << 0) +#define CPUID_SVM_LBRV (1U << 1) +#define CPUID_SVM_SVMLOCK (1U << 2) +#define CPUID_SVM_NRIPSAVE (1U << 3) +#define CPUID_SVM_TSCSCALE (1U << 4) +#define CPUID_SVM_VMCBCLEAN (1U << 5) +#define CPUID_SVM_FLUSHASID (1U << 6) +#define CPUID_SVM_DECODEASSIST (1U << 7) +#define CPUID_SVM_PAUSEFILTER (1U << 10) +#define CPUID_SVM_PFTHRESHOLD (1U << 12) +#define CPUID_SVM_AVIC (1U << 13) +#define CPUID_SVM_V_VMSAVE_VMLOAD (1U << 15) +#define CPUID_SVM_VGIF (1U << 16) +#define CPUID_SVM_SVME_ADDR_CHK (1U << 28) =20 /* Support RDFSBASE/RDGSBASE/WRFSBASE/WRGSBASE */ #define CPUID_7_0_EBX_FSGSBASE (1U << 0) --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921637; cv=none; d=zohomail.com; s=zohoarc; b=HBz32nUlO9pP0plOfThvqAebYmFadkjEjpAzzGgSyaH7Xu6lAIWk1rRHVmkQ9S+4CuIY8lUGNTqJLyPSA+Bxaa+EGlG29ehOEpKEVFXvmrmRBtMvtckR+xO9gyG/PZYIRLRmU+f9P3seYLM7nNvWzSyLiY0zkKOyL80Oiopn2gw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921637; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WW9FjE01j//RL/qhn41ULN+iS845r2HT2fAeuJfLQAw=; b=ljqVzslGUVPuB3VGaoj/C2mJqEVoad24CHwFdGdEbx8IECWHyE8+hoxNGd4ha+i6nzV/ZNmJOBoG2IdD7VuQJwjX9fFvd1kVh73AD9k01Nafp10xnlDrsFJYsWnVfkFc4TYN5AX4IHb1HHa4PGVE5YWzESAUSJg3A3kWugj+ASA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921637094465.9712970991437; Fri, 29 Jan 2021 04:00:37 -0800 (PST) Received: from localhost ([::1]:39942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SS2-0002lp-5V for importer@patchew.org; Fri, 29 Jan 2021 07:00:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnM-0004S1-C7 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:32 -0500 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:42186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnJ-0005y8-1w for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:31 -0500 Received: by mail-ed1-x531.google.com with SMTP id z22so10125292edb.9 for ; Fri, 29 Jan 2021 03:18:28 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WW9FjE01j//RL/qhn41ULN+iS845r2HT2fAeuJfLQAw=; b=d4Rm1TECVs8DwaSdmYbr5qd0DsE1ohR5AK9hpTZqZvulLzWyAiQFor7+He2VmO03Ns 1vm6+lYOQPbKFLFRvC5k6U/S49kXg11A1E2kKtl4WS8sz8XmonZ6Jv31Cguxus0EQ7OM ZknZkYwdSQjGm43zZyQqhIh/X6/NdjUzCJ4KazD1JVW0HhYOqJ/MLsE+rTJr9Kq5lRrO OvYM+TQySSqB/RjqLaiAXeU+kV3RejJALxKV8QJt/LDBL+PxCFIkN1a/WtS4wlKo/Jch AcCE5UqODbHq2qlJJpJNCEEnezXWKKQiLoKksRt26N47sCwU3x3wRP+0C/1lKczkKrWl urpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=WW9FjE01j//RL/qhn41ULN+iS845r2HT2fAeuJfLQAw=; b=M0lFra8JCPUdydN7LEH8voff8eJSrbVGOMOFbVP9gsNk3h8EcwTLp2hYrcI7+KOY85 WiQGtyhJtke+Hq+WjgQXaTA3C9X87Qv7CFVB5W82Pga7/fVTolTnOpest0G7qcioqOSh P2hChU8L2twicetoioLT130HqlBrE+CT7Hwqzs83dnj3IUGJeF63bFlHUR5M7d25e4on LnkeLziyYA7u0/a7fqnM9u/IvMTt/1NEEIB51moqLVWnrfzuzxm/PpdY9w7GVB+aVOrq lM1ThecawXPSy6kIbyCHtyB/uWFpBCj5ZjXh4/TXjk9ZmmRprDo9A23mY9tuTkplaKh0 yEKw== X-Gm-Message-State: AOAM530lpl6aDBKUpnAxFVhCTkpJ6x3fMn3dRJxjm3n77pknjh++R7vx aBDOCjio/QAiNagRsdz4yBYhb305dULcpQ== X-Google-Smtp-Source: ABdhPJxVa3J3c0zsW/D0ZuUdQn2XL/xZOk6OosduAs+3+IcZ1NvDoKCxtmkEnGeD24X1Rwvy0/pJmQ== X-Received: by 2002:aa7:d4d7:: with SMTP id t23mr4391203edr.321.1611919107735; Fri, 29 Jan 2021 03:18:27 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 13/36] fuzz: fix wrong index in clear_bits Date: Fri, 29 Jan 2021 12:17:51 +0100 Message-Id: <20210129111814.566629-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x531.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Qiuhao Li Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Qiuhao Li Signed-off-by: Qiuhao Li Message-Id: Signed-off-by: Paolo Bonzini --- scripts/oss-fuzz/minimize_qtest_trace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/oss-fuzz/minimize_qtest_trace.py b/scripts/oss-fuzz/mi= nimize_qtest_trace.py index 4cba96dee2..20825768c2 100755 --- a/scripts/oss-fuzz/minimize_qtest_trace.py +++ b/scripts/oss-fuzz/minimize_qtest_trace.py @@ -261,7 +261,7 @@ def clear_bits(newtrace, outpath): data_try =3D hex(int("".join(data_bin_list), 2)) # It seems qtest only accepts padded hex-values. if len(data_try) % 2 =3D=3D 1: - data_try =3D data_try[:2] + "0" + data_try[2:-1] + data_try =3D data_try[:2] + "0" + data_try[2:] =20 newtrace[i] =3D "{prefix} {data_try}\n".format( prefix=3Dprefix, --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611919273; cv=none; d=zohomail.com; s=zohoarc; b=ZDlqIQRXfAEyBye9kJkHizhptjg44Jt+cPSz5jUzMXCbNQUv6blnLg84YrJo5+sXtfVA4N0ynATEKscD89BDNDfLrWIIIaVGkfMl48lrWLv2CjOeWFGmJJouTIL/quAbVpsTNtPKazdu7Cn7U0t01SB/4I0VAvp6JS6vd5Tw/b8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611919273; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=C8pY6ef/gvyMoBxKzaS6s9owrZc+gVZ4zdWQxqRNCqM=; b=OMR8OEfij2STtb0Idi6UPzdAoeMbzPCrjfRDyYT1ZVrP5RaUR2k+RZUGDcddqInCs5OZ1t/Bh4z6ntsp2yzPEUYIPxz0Y/GijXz13gYSlFoRtQsymoiu0LwbUauObw/2MNpNoPsh9h3oaWwGA62YqrQSoEQ4H/z3C/kuSn0uc7Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611919273857830.3935278265063; Fri, 29 Jan 2021 03:21:13 -0800 (PST) Received: from localhost ([::1]:39934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5Rpw-0006FG-Le for importer@patchew.org; Fri, 29 Jan 2021 06:21:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnM-0004RG-0b for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:32 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:33263) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnJ-0005yF-Rt for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:31 -0500 Received: by mail-ed1-x52a.google.com with SMTP id c6so10160217ede.0 for ; Fri, 29 Jan 2021 03:18:29 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C8pY6ef/gvyMoBxKzaS6s9owrZc+gVZ4zdWQxqRNCqM=; b=qWEdZrzpk0NmXyrPG7Fz1H3dvyuMqkdw5glyEEz3/hk/c/0h1o27jDmOKfZLB3gDb2 htDxpqCWO6Dd/JnqKHlQLBe0lbjGcFXNP1ein93vDv0/hdFHO7tnhK5XsyR9QFIWW2z/ HK4SlSIZ7+m2Db1u3DZC2I5fiNhyLu30f9ZIffFusrOG/Nor0Y1girf592M+/x8RUuWz Lkq81216pse5ircclRzcsgmQpITBiCE+mmzqACE/f6z+ABWex47YLV7y4hbhhK7dw3ei kSLq0NcSAFhpbvQT+++R56qA4gcCkAUN/ZfOXgJGE+j5ccWcTmPmIk6K9wlVtejbODOv EYLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=C8pY6ef/gvyMoBxKzaS6s9owrZc+gVZ4zdWQxqRNCqM=; b=qHelztsSamesIDFuYYmGFILDhjd3T3toLHTrfG42HzkIy8ib+hr8OuGD62lQ0lvk8i hLTLtyWgc40aRi4v4KEGJ/T3w53AG/LXXhsdiGXFXmEgtQRTLpQXs46iQyvjqWHk1vYF 8K6Q109SB/7c1Z3FQH3UOArj9k4qrnY508LsMeZ4xrDJGUNPIw5ocWmkUdVt/NSxMqK3 YvAUSAaA1HUc/GuijVLJOkdSXqwtc21YW7iqspcJiIi16g0Eif4Bbx6cbjiskfzV33bo 0Ao5kBMopWQsV+dDbkZeSwjeC/mu8vrhzbjzHHR9RMnycFT46SSI9t1QYKje9RY84O5a 4gCg== X-Gm-Message-State: AOAM531FU5qLtKbx+RxwiFj15dPwdFW9ofFigB1p1oB/ynqe7q304vrl oEoAKV3v2/DMOsDL6djR+IRW5y+W6qlwvQ== X-Google-Smtp-Source: ABdhPJyySDlRbOfJacXXi6gfEX9tO3YLIXqBkRTKmOzjGoTFOuiOtr8i7gKq69TQM9qVLNt0TthohQ== X-Received: by 2002:a05:6402:1e5:: with SMTP id i5mr4600354edy.86.1611919108539; Fri, 29 Jan 2021 03:18:28 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 14/36] docs: don't install corresponding man page if guest agent is disabled Date: Fri, 29 Jan 2021 12:17:52 +0100 Message-Id: <20210129111814.566629-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Reiter Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Stefan Reiter No sense outputting the qemu-ga and qemu-ga-ref man pages when the guest agent binary itself is disabled. This mirrors behaviour from before the meson switch. Signed-off-by: Stefan Reiter Message-Id: <20210128145801.14384-1-s.reiter@proxmox.com> Signed-off-by: Paolo Bonzini --- docs/meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/meson.build b/docs/meson.build index bb14eaebd3..f84306ba7e 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -46,9 +46,11 @@ if build_docs meson.source_root() / 'docs/sphinx/qmp_lexer.py', qapi_gen_depends ] =20 + have_ga =3D have_tools and config_host.has_key('CONFIG_GUEST_AGENT') + man_pages =3D { - 'qemu-ga.8': (have_tools ? 'man8' : ''), - 'qemu-ga-ref.7': 'man7', + 'qemu-ga.8': (have_ga ? 'man8' : ''), + 'qemu-ga-ref.7': (have_ga ? 'man7' : ''), 'qemu-qmp-ref.7': 'man7', 'qemu-storage-daemon-qmp-ref.7': (have_tools ? 'man7' : ''), 'qemu-img.1': (have_tools ? 'man1' : ''), --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921184; cv=none; d=zohomail.com; s=zohoarc; b=EbojJDClrI/h9iq9LDzFVvjdeXnCAqHUpDO/Fu4phdFxlTwiolkw7M4kZb9nyT0O5GHY1fi5RfeNule7VptNZI1CPAfGqD08muC4jr/DIBbm/QdwLvfs/RQiTyY4+a3gRewLRD3IuWrnKd6RLkJr7w/RZU8nzrEILaljrnogBTQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921184; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+gYBA8EOP9voo6st9l/tKav/btWR7A0x68POX4fuYnY=; b=LkNbk0YBeSZFQfKN2cK5AyFTOWfMMc0ASkmgHzQNRN4jEpBpqjU8079SEBJhRlbCVjKWQKsUcyJ5XpRW+bhnqPJwXMjNAC/yRz4IdwP1tSn5dtn+f5WQgLgQRdTJEeBIFUzbPqFyYr9aUmTVwJ2e4rLXm80ubINrH2ZiZz9SlbI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921184256138.58215003502085; Fri, 29 Jan 2021 03:53:04 -0800 (PST) Received: from localhost ([::1]:50026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SKk-0003la-Ny for importer@patchew.org; Fri, 29 Jan 2021 06:53:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnM-0004S7-DN for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:32 -0500 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:34129) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnK-0005yw-Ld for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:32 -0500 Received: by mail-ej1-x629.google.com with SMTP id hs11so12457776ejc.1 for ; Fri, 29 Jan 2021 03:18:30 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+gYBA8EOP9voo6st9l/tKav/btWR7A0x68POX4fuYnY=; b=XSLGuDFsCtuC2kyiBrfhrxAQO/ulbqz822K6yRmoY6sjzYL43QaNmteiaYHvvWGT7s zkK8bBR210cGHTip9xtDi9gYua0kaq71uNPR0GRaAcsUDnu7TbvCU7omC0AR7OEyr2/Q hHe4C/9OXP7LcUHKGgyVkD412a9eE4K+ycWgYCs3p/WL/uVNlCw+1A3vrDCTXQrRzME5 pUAsPOLjNKudDrccpNF5Z4Qbe5UF6WBSeCEoA2ewEcVBDeSaVsT+OMAxznSgrrXwR0+V sNkUuE9dhMpneq2kiHQLFGim+3i22S9fJGrSto87Kt8F6IOg2/V2uv430Qc4jrq5WD8k gIbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=+gYBA8EOP9voo6st9l/tKav/btWR7A0x68POX4fuYnY=; b=gq+Osdgz0JzUB0k8lHnaRBfh20A3L9tki7nuahVncaqu5fQnomW4gWE/+VWZvmjICq WhpTFZ6CxCda6ngTxXZBPDZrfvhczypvQuNE/8R8Y4KDe2gIujgisrs/f34h7WGzkhej qZ8drMr/GZ6iG617xhf6UO5xFj/zcVV6ruq8GktdIsKjU+rcjMmd65b1UHJVM3tMHV6n OW9ugBMliXcSKb1CDZ2dA31ln/5oet84au9AINCpGsahV0D3Y2THTCFQ5Bzcppc8XXkV xKm9k5uKETf/TYRjH9xCEQaNMZgMuiJZ9kyRNJpqCaPUrQXEe6o0hdUTbwLhMXSSs1fu 5Ong== X-Gm-Message-State: AOAM532Bog1MLesu07uAoplJYp91ixbtvBZ3l2gOSPaAJAcIJYY7/q/g c0nqoyRfd7NI9SpE05lUnx8cs2dQCDSFtw== X-Google-Smtp-Source: ABdhPJymsVZhrLpliz/XHMzaXvApLYQVkAfuke1PLOjRNZM04YVG164UwD8eniKW0N5c3glrGHM4+w== X-Received: by 2002:a17:906:5958:: with SMTP id g24mr3940004ejr.377.1611919109409; Fri, 29 Jan 2021 03:18:29 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 15/36] virtio-scsi: don't uninitialize queues that we didn't initialize Date: Fri, 29 Jan 2021 12:17:53 +0100 Message-Id: <20210129111814.566629-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x629.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Levitsky Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Maxim Levitsky Count number of queues that we initialized and only deinitialize these that= we initialized successfully. Signed-off-by: Maxim Levitsky Message-Id: <20201217150040.906961-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini --- hw/scsi/virtio-scsi-dataplane.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplan= e.c index b995bab3a2..2c83a0ab1f 100644 --- a/hw/scsi/virtio-scsi-dataplane.c +++ b/hw/scsi/virtio-scsi-dataplane.c @@ -126,6 +126,7 @@ int virtio_scsi_dataplane_start(VirtIODevice *vdev) { int i; int rc; + int vq_init_count =3D 0; BusState *qbus =3D qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k =3D VIRTIO_BUS_GET_CLASS(qbus); VirtIOSCSICommon *vs =3D VIRTIO_SCSI_COMMON(vdev); @@ -153,17 +154,22 @@ int virtio_scsi_dataplane_start(VirtIODevice *vdev) if (rc) { goto fail_vrings; } + + vq_init_count++; rc =3D virtio_scsi_vring_init(s, vs->event_vq, 1, virtio_scsi_data_plane_handle_event); if (rc) { goto fail_vrings; } + + vq_init_count++; for (i =3D 0; i < vs->conf.num_queues; i++) { rc =3D virtio_scsi_vring_init(s, vs->cmd_vqs[i], i + 2, virtio_scsi_data_plane_handle_cmd); if (rc) { goto fail_vrings; } + vq_init_count++; } =20 s->dataplane_starting =3D false; @@ -174,7 +180,7 @@ int virtio_scsi_dataplane_start(VirtIODevice *vdev) fail_vrings: aio_wait_bh_oneshot(s->ctx, virtio_scsi_dataplane_stop_bh, s); aio_context_release(s->ctx); - for (i =3D 0; i < vs->conf.num_queues + 2; i++) { + for (i =3D 0; i < vq_init_count; i++) { virtio_bus_set_host_notifier(VIRTIO_BUS(qbus), i, false); virtio_bus_cleanup_host_notifier(VIRTIO_BUS(qbus), i); } --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921348; cv=none; d=zohomail.com; s=zohoarc; b=WSsC52LL9oNW6r7uDmF65xOz3EFdrFInedGf6i/AI8OaOR6BE674OhheDui2RPn7bZqya3VCe4iuSYvuLc7hmV3QBfaSBqjqm3GArcZfOQYqXxodIWBy4yNEDsm5qDId0uJMnVwC9Y+o/jZkKYAi+WLQLrSDCNLeNgAWeVJ3xPM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921348; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BX3ZP47xPXHNjViaL+mWjoCAJTKiSXDCljaMBbMGeYI=; b=VMnEW81CC8CHXSJCZD1AAWXCuxrClBEQz2pL7IwcqZxdxhVSNphVlS+jdABXqdMLRDYDybkON6sqEhE8tg0W4/Cyz4ZCNpkAHp+g3ZKgSHep/JNtuyKurqVqDt5sfhYlbW3Xq+56DZAPc8DSS2H3sqjWknib/azDPjX4AQ81Zt0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921348689185.45585865291957; Fri, 29 Jan 2021 03:55:48 -0800 (PST) Received: from localhost ([::1]:56512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SNP-0006PQ-CM for importer@patchew.org; Fri, 29 Jan 2021 06:55:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnN-0004Ta-2j for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:33 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]:43125) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnL-0005zf-IA for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:32 -0500 Received: by mail-ej1-x634.google.com with SMTP id a10so12414982ejg.10 for ; Fri, 29 Jan 2021 03:18:31 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BX3ZP47xPXHNjViaL+mWjoCAJTKiSXDCljaMBbMGeYI=; b=QUx+D9jSQ+dYm70E6uBoAjLvi3BrjESCdjEm1yw+3lKYQp774bdGjixGRBoOZz760K cimiBApOJfWfhEOgFIYJAD+ASf93n3xQ1PusrUQLBsU0WaJglI0OwwYiMrCpRffYPrXB oZgoMIwCKu7KQGkW5W25LeC+rCuEPbPPfB4Rb6YKr9/52QjQPTrmsKCR/R43qlOHne8n XVFiKGVDoHv1DPvs1U73KR4sqtlhAheAT3mLmy9gH4VFRU85gp7302Jsc6Bh6aeqhwYg RMl8cFTSZwatVJY3SvWofqM+XPt/911ls85oAdBT6oq/sPBclPhmBXD9WsTEm2Mm1OCx Ntmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BX3ZP47xPXHNjViaL+mWjoCAJTKiSXDCljaMBbMGeYI=; b=t7b1dYcNkPYxD24hhDLh7pOx7vn5BdTnUS0fWaXOqXU65pqYJ9W3xAiqTaIAPNgL9h cuRqikAbq1Kz81jgcXotD5xHZRg03xJ+EZH+MwYonRKDGPxHW1w5dbMEjIpFHfpzHu9g lQ6I4DqMqYaLfJo9EVMCGr4G3cmYb5vJ9bRcDKoC6xxkJpOhYmH4iq4soE0Rwp9eEq05 +rx10qpVQ1ZJtjdpMvRidd1BBkCLKIOL0JLzw23VhG2rse41X18rip6JMbIPJ/A1PF5B Uts26+Tgutl2/O/zJCbzlzgfOvPFTX8JWthebi1BGm1KjMLu4dg6hG74+03urrxH520t RpUQ== X-Gm-Message-State: AOAM530NvnGVv5HXz2vQVSZIkhyXG/JNJiSQCrdMKEZZZCH/2JT8/fId 5x20fJT7TkYSzSEaPXJQqXuau32q5TjXPA== X-Google-Smtp-Source: ABdhPJzllg4TiJEeKe6Nkn0lSWUSVk9czCcM2tbvEV3v6YE6s9JsrX7RBdnraqiuLKc/NB6slAWunQ== X-Received: by 2002:a17:906:fa85:: with SMTP id lt5mr4079596ejb.344.1611919110281; Fri, 29 Jan 2021 03:18:30 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 16/36] event_notifier: handle initialization failure better Date: Fri, 29 Jan 2021 12:17:54 +0100 Message-Id: <20210129111814.566629-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Levitsky Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Maxim Levitsky Add 'initialized' field and use it to avoid touching event notifiers which = are either not initialized or if their initialization failed. This is somewhat a hack, but it seems the less intrusive way to make virtio code deal with event notifiers that failed initialization. Signed-off-by: Maxim Levitsky Message-Id: <20201217150040.906961-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini --- include/qemu/event_notifier.h | 1 + util/event_notifier-posix.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/qemu/event_notifier.h b/include/qemu/event_notifier.h index 3380b662f3..b79add035d 100644 --- a/include/qemu/event_notifier.h +++ b/include/qemu/event_notifier.h @@ -24,6 +24,7 @@ struct EventNotifier { #else int rfd; int wfd; + bool initialized; #endif }; =20 diff --git a/util/event_notifier-posix.c b/util/event_notifier-posix.c index 00d93204f9..5b2110e861 100644 --- a/util/event_notifier-posix.c +++ b/util/event_notifier-posix.c @@ -29,6 +29,7 @@ void event_notifier_init_fd(EventNotifier *e, int fd) { e->rfd =3D fd; e->wfd =3D fd; + e->initialized =3D true; } #endif =20 @@ -68,6 +69,7 @@ int event_notifier_init(EventNotifier *e, int active) if (active) { event_notifier_set(e); } + e->initialized =3D true; return 0; =20 fail: @@ -78,12 +80,18 @@ fail: =20 void event_notifier_cleanup(EventNotifier *e) { + if (!e->initialized) { + return; + } + if (e->rfd !=3D e->wfd) { close(e->rfd); } + e->rfd =3D -1; close(e->wfd); e->wfd =3D -1; + e->initialized =3D false; } =20 int event_notifier_get_fd(const EventNotifier *e) @@ -96,6 +104,10 @@ int event_notifier_set(EventNotifier *e) static const uint64_t value =3D 1; ssize_t ret; =20 + if (!e->initialized) { + return -1; + } + do { ret =3D write(e->wfd, &value, sizeof(value)); } while (ret < 0 && errno =3D=3D EINTR); @@ -113,6 +125,10 @@ int event_notifier_test_and_clear(EventNotifier *e) ssize_t len; char buffer[512]; =20 + if (!e->initialized) { + return 0; + } + /* Drain the notify pipe. For eventfd, only 8 bytes will be read. */ value =3D 0; do { --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921828; cv=none; d=zohomail.com; s=zohoarc; b=iGRyf4Wyibo0yHfkulhu4EqojOBi2beouOIT9kNG36WksqFbPmBL8buYDFGtoG0C88vZr0DgDI4VwT0dh6TlHK4KgzQEvc+gD93M1vloBvkDKiWh7Yv/FsejmfYli/lmWnEhwtJfGaOXwhMhELb/es6btesKJfQrdMIDDhJWQMc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921828; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=d+G+BDRQ2Y2nPV4bMRufOluSE675gO6hBAOJ+JNH5TA=; b=CW69TOBJjWZvOe7Hqo3Z8L/1kzqXfZ9zYSqwb1qSzgCzI87FqwQFyqHl1yO34+KWe9rFxSkaweOS4BOsMn2r0HQNNgMBPMzKDtHSqG/SFvSlwlCAwG+VBgk7lHylJ/5np0q8/+9UcfaiG1mBlU2UXrRXtJDKjFqyCBnKzmBkSRY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921828311815.53111316161; Fri, 29 Jan 2021 04:03:48 -0800 (PST) Received: from localhost ([::1]:46012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SV9-0005KB-28 for importer@patchew.org; Fri, 29 Jan 2021 07:03:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnN-0004Vq-VJ for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:33 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]:39509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnM-0005zq-Dc for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:33 -0500 Received: by mail-ej1-x634.google.com with SMTP id g3so12439602ejb.6 for ; Fri, 29 Jan 2021 03:18:31 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d+G+BDRQ2Y2nPV4bMRufOluSE675gO6hBAOJ+JNH5TA=; b=THphlfmEEtL/9SmHP3w9VZGafr6sCiqRj52ZNjWDcz2847KNC76LxWE2i2PKQ+sND4 bthzPZhuhjANlwE0Zb5By6o0POLRr4US61bTclL3oy5pIru4Y/xbazKSeXWcF7HL0pBe i4k0VHTfUfiVsaXp9tdBnW4H4jHFtfDczRhM++Wt8adt1W1kR9lVVr33wsMWouO0Wv6A fvZ7CqXi6XxAz3PBr3Vzz1uBNo3gOXNsEcIkwe9jptMnW3a8w0b/ZTdm98652rnLLKPT CjBD6QFbeDuSopSU9fFxYc7dAvjECtHWKObKOOLs2laroOJWm8snCI+jWcalvU2Snr+5 F1dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=d+G+BDRQ2Y2nPV4bMRufOluSE675gO6hBAOJ+JNH5TA=; b=j0i5wCevVvZwmyiif1othOomBR+ufI6wH3mJ629O2NkRaZzcLI6TMDRZTBd6o1MVQM NNGitshXolEaFOydEUIhP2dqsMuvdOc/5UyxHBWBoYwaQOh0gBF6sFYAwycSrW59Jo3k fw1jkgt0BC3QcsK6N9OxyqY7c/06fQWJ5dMOVmmhFpqowKzMgTUElePDpB8gFyfNJoIH DZouI03zBF3JU0QcrN4lJ/A9D6xPn96d99bEZ4zrnR2cPhPWHmTRLaHuSBvnh4aYJ6ks 2eVIzJ/EmW5HQdeiPkPoVeu67HZ2Kgu2yqYGIyCqZPyRy++6wHO6G30K2XAx7yYR0yvG 9/zA== X-Gm-Message-State: AOAM530dGXnKLXv5Gey43Ctj+yUlPgbtQs19FoievPZyPf/7SLlw4WHP CBOfydM8oa7PKDNO9zkqnr91x3iQneLjGg== X-Google-Smtp-Source: ABdhPJxkMT6fqtJX0WwMCQe3mGsTPnUvdSL0D0rm9zS6K72ItDMHGrwFs2dDhYht30+ehJsU8yYrFA== X-Received: by 2002:a17:906:fa9a:: with SMTP id lt26mr4082773ejb.439.1611919111093; Fri, 29 Jan 2021 03:18:31 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 17/36] target/i386: Fix decoding of certain BMI instructions Date: Fri, 29 Jan 2021 12:17:55 +0100 Message-Id: <20210129111814.566629-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Greenaway Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: David Greenaway This patch fixes a translation bug for a subset of x86 BMI instructions such as the following: c4 e2 f9 f7 c0 shlxq %rax, %rax, %rax Currently, these incorrectly generate an undefined instruction exception when SSE is disabled via CR4, while instructions like "shrxq" work fine. The problem appears to be related to BMI instructions encoded using VEX and with a mandatory prefix of "0x66" (data). Instructions with this data prefix (such as shlxq) are currently rejected. Instructions with other mandatory prefixes (such as shrxq) translate as expected. This patch removes the incorrect check in "gen_sse" that causes the exception to be generated. For the non-BMI cases, the check is redundant: prefixes are already checked at line 3696. Buglink: https://bugs.launchpad.net/qemu/+bug/1748296 Signed-off-by: David Greenaway Message-Id: <20210114063958.1508050-1-dgreenaway@google.com> Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 6a4c31f933..af1faf9342 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -3075,7 +3075,7 @@ static void gen_sse(CPUX86State *env, DisasContext *s= , int b, } if (is_xmm && !(s->flags & HF_OSFXSR_MASK) - && ((b !=3D 0x38 && b !=3D 0x3a) || (s->prefix & PREFIX_DATA))) { + && (b !=3D 0x38 && b !=3D 0x3a)) { goto unknown_op; } if (b =3D=3D 0x0e) { --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921541; cv=none; d=zohomail.com; s=zohoarc; b=bkXX2bh9JkpDyoXg6wjpNn/i1gHUwYAGO62YSTrWo8YpqeSw1y8DStdpcSW44kvOblwFU8sH24d15DmHSAii04j9/oqY4rLgXeasRrkKvog0kGV6GtTEFHqEXBNhDn4eFFKUiZEWI08F0Vi6VEJ0UQvgmW3U1yJmFMT+OQXIQpw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921541; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6EvIZwvKuICXeVjgmQqOWoArIHLhLYSW11eQ+o8WJ5M=; b=l2CDe6OTG8OuxNBPJfK4GvTLRcyshtATEFakJ2ESMlk803jXoeP/OINa2Amc931X3JIOiZX4DWisjD/CTNcRHNFmsYaW74z0jsO8hYAzOCdgbneja+Qrht50V/kafOrReokzOQXme3Gj6S0dyxSNkvkSbGP5GgWBeezSEIPjeHE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921541752324.5173912821955; Fri, 29 Jan 2021 03:59:01 -0800 (PST) Received: from localhost ([::1]:36550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SQW-0001NM-2H for importer@patchew.org; Fri, 29 Jan 2021 06:59:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnP-0004Z5-6V for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:35 -0500 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:40139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnN-00060C-80 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:34 -0500 Received: by mail-ej1-x629.google.com with SMTP id gx5so12424200ejb.7 for ; Fri, 29 Jan 2021 03:18:32 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6EvIZwvKuICXeVjgmQqOWoArIHLhLYSW11eQ+o8WJ5M=; b=epcK8wepqmUgJB6P47Rtw4p67V1GR3pmujhe4S9t4c5m7275OorMxSkJXGAQnppP1y pFFjJl/i5eQgkD2/LVQk80qrRfn+fTyQ2fkg42lI+PPd1vPHM6jKvurBolgdgxCbrPra FQC2BDh9x5Xcd0khDhzdzNcnDOn3y+sEl+2bAeo8k5+saYgZCpc26HSGyKezoy25yBSI +KInuH+EQZftjdbInGKBlI8HcnXABrITjbmY0XSZ9g/GSigtodSt7iBZUPDdHJ5gD2Qa QXEi/mYo1OI4+E5m0pMueRyp0d+aoS8N84Wtl9K7iGa+JeL60XfoX7vpmXDWYqwmYJdi Nfeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6EvIZwvKuICXeVjgmQqOWoArIHLhLYSW11eQ+o8WJ5M=; b=jfEkdlcadgR1kVPq9i91bRgRlAwafLDJyG3vAUA+u/2benHXeL6HHlPFNtNtm3uwCH lXE1c08CPP3CIVlF02M73JiDgPi1G9gyhu1nrgAdF7pDvPmKJ/COm25xNrvgCJED56Cv Rm8oHnH+nGTAWxLxWgf+J42brc2TZBog8jz+AIOl7axa//ll/1Aj5AAwrAozo0G8JK5p fEW1dH4EjrQsWiIxtX+zaDnXO8hsxFa2LfSG7+9D04MvANN26aUZdHS2/g0/pMuCp0pH 5Mbp8NhZTO9R+p+aHJ4He4idmXgq4UQPXcGiXSZSyYeBFauDEiGSMZ7S7HZyzUI46hAa pCcA== X-Gm-Message-State: AOAM5321ITkfBWdxX/jdWyOzNnXfI9vto/QPiWg+iSic4LadR4wgEGoW 7CVin0vykMQLNDAVqG1qQOFTbKKHurzemg== X-Google-Smtp-Source: ABdhPJyR6i6otPmrYVNUltl69w83IaHCphA+4tJWhWMh6nH+rWjB/R7LjV+/o38pIpZa9jnnCEwSUA== X-Received: by 2002:a17:906:ecb3:: with SMTP id qh19mr3950437ejb.113.1611919112003; Fri, 29 Jan 2021 03:18:32 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 18/36] target/i86: implement PKS Date: Fri, 29 Jan 2021 12:17:56 +0100 Message-Id: <20210129111814.566629-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x629.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Protection Keys for Supervisor-mode pages is a simple extension of the PKU feature that QEMU already implements. For supervisor-mode pages, protection key restrictions come from a new MSR. The MSR has no XSAVE state associated to it. PKS is only respected in long mode. However, in principle it is possible to set the MSR even outside long mode, and in fact even the XSAVE state for PKRU could be set outside long mode using XRSTOR. So do not limit the migration subsections for PKRU and PKRS to long mode. Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 4 ++-- target/i386/cpu.h | 5 +++++ target/i386/helper.c | 3 +++ target/i386/machine.c | 24 ++++++++++++++++++++---- target/i386/tcg/excp_helper.c | 32 ++++++++++++++++++++------------ target/i386/tcg/misc_helper.c | 14 ++++++++++++++ 6 files changed, 64 insertions(+), 18 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a8db1b415d..cc41a9101a 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -667,7 +667,7 @@ static void x86_cpu_vendor_words2str(char *dst, uint32_= t vendor1, CPUID_7_0_EBX_RDSEED */ #define TCG_7_0_ECX_FEATURES (CPUID_7_0_ECX_PKU | \ /* CPUID_7_0_ECX_OSPKE is dynamic */ \ - CPUID_7_0_ECX_LA57) + CPUID_7_0_ECX_LA57 | CPUID_7_0_ECX_PKS) #define TCG_7_0_EDX_FEATURES 0 #define TCG_7_1_EAX_FEATURES 0 #define TCG_APM_FEATURES 0 @@ -964,7 +964,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS]= =3D { "la57", NULL, NULL, NULL, NULL, NULL, "rdpid", NULL, NULL, "cldemote", NULL, "movdiri", - "movdir64b", NULL, NULL, NULL, + "movdir64b", NULL, NULL, "pks", }, .cpuid =3D { .eax =3D 7, diff --git a/target/i386/cpu.h b/target/i386/cpu.h index b39ec505de..cc5a26f35b 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -247,6 +247,7 @@ typedef enum X86Seg { #define CR4_SMEP_MASK (1U << 20) #define CR4_SMAP_MASK (1U << 21) #define CR4_PKE_MASK (1U << 22) +#define CR4_PKS_MASK (1U << 24) =20 #define DR6_BD (1 << 13) #define DR6_BS (1 << 14) @@ -357,6 +358,7 @@ typedef enum X86Seg { =20 #define MSR_IA32_TSX_CTRL 0x122 #define MSR_IA32_TSCDEADLINE 0x6e0 +#define MSR_IA32_PKRS 0x6e1 =20 #define FEATURE_CONTROL_LOCKED (1<<0) #define FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX (1<<2) @@ -772,6 +774,8 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS]; #define CPUID_7_0_ECX_MOVDIRI (1U << 27) /* Move 64 Bytes as Direct Store Instruction */ #define CPUID_7_0_ECX_MOVDIR64B (1U << 28) +/* Protection Keys for Supervisor-mode Pages */ +#define CPUID_7_0_ECX_PKS (1U << 31) =20 /* AVX512 Neural Network Instructions */ #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) @@ -1487,6 +1491,7 @@ typedef struct CPUX86State { uint64_t msr_smi_count; =20 uint32_t pkru; + uint32_t pkrs; uint32_t tsx_ctrl; =20 uint64_t spec_ctrl; diff --git a/target/i386/helper.c b/target/i386/helper.c index 6bb0c53182..618ad1c409 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -194,6 +194,9 @@ void cpu_x86_update_cr4(CPUX86State *env, uint32_t new_= cr4) if (!(env->features[FEAT_7_0_ECX] & CPUID_7_0_ECX_PKU)) { new_cr4 &=3D ~CR4_PKE_MASK; } + if (!(env->features[FEAT_7_0_ECX] & CPUID_7_0_ECX_PKS)) { + new_cr4 &=3D ~CR4_PKS_MASK; + } =20 env->cr[4] =3D new_cr4; env->hflags =3D hflags; diff --git a/target/i386/machine.c b/target/i386/machine.c index 1614e8c2f8..3768a753af 100644 --- a/target/i386/machine.c +++ b/target/i386/machine.c @@ -980,7 +980,6 @@ static const VMStateDescription vmstate_umwait =3D { } }; =20 -#ifdef TARGET_X86_64 static bool pkru_needed(void *opaque) { X86CPU *cpu =3D opaque; @@ -999,7 +998,25 @@ static const VMStateDescription vmstate_pkru =3D { VMSTATE_END_OF_LIST() } }; -#endif + +static bool pkrs_needed(void *opaque) +{ + X86CPU *cpu =3D opaque; + CPUX86State *env =3D &cpu->env; + + return env->pkrs !=3D 0; +} + +static const VMStateDescription vmstate_pkrs =3D { + .name =3D "cpu/pkrs", + .version_id =3D 1, + .minimum_version_id =3D 1, + .needed =3D pkrs_needed, + .fields =3D (VMStateField[]){ + VMSTATE_UINT32(env.pkrs, X86CPU), + VMSTATE_END_OF_LIST() + } +}; =20 static bool tsc_khz_needed(void *opaque) { @@ -1480,9 +1497,8 @@ VMStateDescription vmstate_x86_cpu =3D { &vmstate_umwait, &vmstate_tsc_khz, &vmstate_msr_smi_count, -#ifdef TARGET_X86_64 &vmstate_pkru, -#endif + &vmstate_pkrs, &vmstate_spec_ctrl, &vmstate_mcg_ext_ctl, &vmstate_msr_intel_pt, diff --git a/target/i386/tcg/excp_helper.c b/target/i386/tcg/excp_helper.c index a0f44431fe..b7d6259e4a 100644 --- a/target/i386/tcg/excp_helper.c +++ b/target/i386/tcg/excp_helper.c @@ -361,6 +361,7 @@ static int handle_mmu_fault(CPUState *cs, vaddr addr, i= nt size, uint64_t rsvd_mask =3D PG_HI_RSVD_MASK; uint32_t page_offset; target_ulong vaddr; + uint32_t pkr; =20 is_user =3D mmu_idx =3D=3D MMU_USER_IDX; #if defined(DEBUG_MMU) @@ -588,21 +589,28 @@ do_check_protect_pse36: !((env->cr[4] & CR4_SMEP_MASK) && (ptep & PG_USER_MASK)))) { prot |=3D PAGE_EXEC; } - if ((env->cr[4] & CR4_PKE_MASK) && (env->hflags & HF_LMA_MASK) && - (ptep & PG_USER_MASK) && env->pkru) { + + if (!(env->hflags & HF_LMA_MASK)) { + pkr =3D 0; + } else if (ptep & PG_USER_MASK) { + pkr =3D env->cr[4] & CR4_PKE_MASK ? env->pkru : 0; + } else { + pkr =3D env->cr[4] & CR4_PKS_MASK ? env->pkrs : 0; + } + if (pkr) { uint32_t pk =3D (pte & PG_PKRU_MASK) >> PG_PKRU_BIT; - uint32_t pkru_ad =3D (env->pkru >> pk * 2) & 1; - uint32_t pkru_wd =3D (env->pkru >> pk * 2) & 2; - uint32_t pkru_prot =3D PAGE_READ | PAGE_WRITE | PAGE_EXEC; - - if (pkru_ad) { - pkru_prot &=3D ~(PAGE_READ | PAGE_WRITE); - } else if (pkru_wd && (is_user || env->cr[0] & CR0_WP_MASK)) { - pkru_prot &=3D ~PAGE_WRITE; + uint32_t pkr_ad =3D (pkr >> pk * 2) & 1; + uint32_t pkr_wd =3D (pkr >> pk * 2) & 2; + uint32_t pkr_prot =3D PAGE_READ | PAGE_WRITE | PAGE_EXEC; + + if (pkr_ad) { + pkr_prot &=3D ~(PAGE_READ | PAGE_WRITE); + } else if (pkr_wd && (is_user || env->cr[0] & CR0_WP_MASK)) { + pkr_prot &=3D ~PAGE_WRITE; } =20 - prot &=3D pkru_prot; - if ((pkru_prot & (1 << is_write1)) =3D=3D 0) { + prot &=3D pkr_prot; + if ((pkr_prot & (1 << is_write1)) =3D=3D 0) { assert(is_write1 !=3D 2); error_code |=3D PG_ERROR_PK_MASK; goto do_fault_protect; diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c index 0bd6c95749..f02e4fd400 100644 --- a/target/i386/tcg/misc_helper.c +++ b/target/i386/tcg/misc_helper.c @@ -244,6 +244,7 @@ void helper_rdmsr(CPUX86State *env) void helper_wrmsr(CPUX86State *env) { uint64_t val; + CPUState *cs =3D env_cpu(env); =20 cpu_svm_check_intercept_param(env, SVM_EXIT_MSR, 1, GETPC()); =20 @@ -296,6 +297,13 @@ void helper_wrmsr(CPUX86State *env) case MSR_PAT: env->pat =3D val; break; + case MSR_IA32_PKRS: + if (val & 0xFFFFFFFF00000000ull) { + goto error; + } + env->pkrs =3D val; + tlb_flush(cs); + break; case MSR_VM_HSAVE_PA: env->vm_hsave =3D val; break; @@ -399,6 +407,9 @@ void helper_wrmsr(CPUX86State *env) /* XXX: exception? */ break; } + return; +error: + raise_exception_err_ra(env, EXCP0D_GPF, 0, GETPC()); } =20 void helper_rdmsr(CPUX86State *env) @@ -430,6 +441,9 @@ void helper_rdmsr(CPUX86State *env) case MSR_PAT: val =3D env->pat; break; + case MSR_IA32_PKRS: + val =3D env->pkrs; + break; case MSR_VM_HSAVE_PA: val =3D env->vm_hsave; break; --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611922024; cv=none; d=zohomail.com; s=zohoarc; b=kROu5sO/OKCb0laXESkpsYHuRKIS21CTAlXGeaYuCIvnfgCEkIhTQqygw1+ogLX0a9lHImnapqe0D16XBKhVozMZ80Uy+5slcDpLQgpJyTdIc+NhnQVJi7TW/UOp61E42+Wv567REKDO+3HI10ZhuJk/fy6F8y68hMnfWeRWykY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611922024; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=N1redxJJGMDjD8aDmJ5AuNIZ5p761sXDiGTCZxZj28U=; b=HbcRoNBFgt9bQKlc1nE5kIhN4aucVx0yM5NPGc8ZtBf5cG1AMnvqize+Zm2rlDWuJ6h+znYTBnuU7nyVgDpMrvBPWjJsbO5QB/rlMRShrrJJtzmD2OJ68qPSDMqtYHRFuGGTf3MYoe+U4VAWdUjBorfIiIrKKg/yQ9olGTUbfnk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611922024796679.0283666980683; Fri, 29 Jan 2021 04:07:04 -0800 (PST) Received: from localhost ([::1]:54108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SYG-0000BN-RQ for importer@patchew.org; Fri, 29 Jan 2021 07:07:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnP-0004aC-Jx for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:35 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:46219) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnO-00061Q-47 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:35 -0500 Received: by mail-ej1-x633.google.com with SMTP id rv9so12390864ejb.13 for ; Fri, 29 Jan 2021 03:18:33 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=N1redxJJGMDjD8aDmJ5AuNIZ5p761sXDiGTCZxZj28U=; b=YHtJW/P02woH+bpIyTVUjjeTgMMKZb2chhYsLcxbEC0gwfAlqKRQufaNSSlgf/N/IY dZ0RxOBriUzupvgr/vCx9dnvKVuagdm4gkp74vVYQZpzRm2+KTPCV0MtqY1dpEpp/OLc sMNLDMRyNAKtjFuYNUdDztAqEWBeq4qNKQfC3pAK88p94prtffOQm0kheBhm751wghUd tq11+ln05KrWLVJyI+wgWRfxn5uQ76RJlVCCioQOPEHi6qSpvsgSKgQOqwiIuKH3DwIq W1TJpU1FzzbJCixxF/4ZZ3EAxPL41S6v+1tRcwy0tHhC40f5CYxFg6aIuQfURhDAiEIF v/ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=N1redxJJGMDjD8aDmJ5AuNIZ5p761sXDiGTCZxZj28U=; b=HxtboGgC029MtMNeomVlglvsY+zxfWPQKw7imW6RPcWw2DSPWSbrSdWou2BcOhDwfU 8dJJNlSA2OaZPhI4rly6Iwb/MGDamjeR0CNm2TFmjafhBSLeMgZ+u6nKvUHxE+/lpu01 GDWpiBz482KhSUyB8Zjp+t00d0LUR5D6mA0PjCz4WWYb/1EjE9+3Y4/3I5hhBmUu8Zfy iNVfD/xXL3nZfXEAFSJcf32dki1nKRBzmvR1RKkOntMJW92gZJRdPxC1w3VkgQH+IWvI ke9qjg9lp0pIiEnw1BglpDz8U/t4D2Ra9W/0zKHVM9pRsb5Ui/nFFmU9AEHIdW8CCB/S jTqw== X-Gm-Message-State: AOAM530ZUvrJ5DPtSfxFWYO197JSuNA0IVt7Kq0IEA1qvnPuJ6XgVExy yRn5BR0aCdGkH3DyBb6M4XGPCUce2a4UsQ== X-Google-Smtp-Source: ABdhPJx+9O6wkbjPfUl5SKcZxyZ1jRjf1F3KxmUTwD7Is1LqIVuVLzT9Uwryl1JggolOHPvFXi/Caw== X-Received: by 2002:a17:906:1c0c:: with SMTP id k12mr4116341ejg.354.1611919112916; Fri, 29 Jan 2021 03:18:32 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 19/36] configure: Fix --enable-tcg-interpreter Date: Fri, 29 Jan 2021 12:17:57 +0100 Message-Id: <20210129111814.566629-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x633.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Weil Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Richard Henderson The configure option was backward, and we failed to pass the value on to meson. Fixes: 23a77b2d18b ("build-system: clean up TCG/TCI configury") Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210124211119.35563-1-richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Stefan Weil Message-Id: <20210125144530.2837481-2-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 87de49e2c2..8f3c4a6a5c 100755 --- a/configure +++ b/configure @@ -1119,9 +1119,9 @@ for opt do ;; --enable-whpx) whpx=3D"enabled" ;; - --disable-tcg-interpreter) tcg_interpreter=3D"true" + --disable-tcg-interpreter) tcg_interpreter=3D"false" ;; - --enable-tcg-interpreter) tcg_interpreter=3D"false" + --enable-tcg-interpreter) tcg_interpreter=3D"true" ;; --disable-cap-ng) cap_ng=3D"disabled" ;; @@ -6367,6 +6367,7 @@ NINJA=3D$ninja $meson setup \ -Dmalloc=3D$malloc -Dmalloc_trim=3D$malloc_trim -Dsparse=3D$sparse= \ -Dkvm=3D$kvm -Dhax=3D$hax -Dwhpx=3D$whpx -Dhvf=3D$hvf \ -Dxen=3D$xen -Dxen_pci_passthrough=3D$xen_pci_passthrough -Dtcg=3D= $tcg \ + -Dtcg_interpreter=3D$tcg_interpreter \ -Dcocoa=3D$cocoa -Dgtk=3D$gtk -Dmpath=3D$mpath -Dsdl=3D$sdl -Dsdl_= image=3D$sdl_image \ -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_p= ng=3D$vnc_png \ -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f -Dvirti= ofsd=3D$virtiofsd \ --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921752; cv=none; d=zohomail.com; s=zohoarc; b=OuSKJnbpPN29AOT3swcBz2V+BJetkSpvtdNfPb0aaGMCqnwHMTCjDgnD/H5HciZbLUXBdGfWs9L/Wkl9pcKB3+lLIN3ZB4B0C7+dDak3lL5DOG/b6HaOVmPdGLWE9Dyd5ob4CPxBf4p2sQz7j5yGLO01RZc/vtL+KhiDgoM+Yjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921752; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dXD7Fo2yC7I86y7CAeIND3a3JrzMld9M7rvgq9x0zxI=; b=Bbb8NiJE6Lc1gx8gtJUYwBK1FSiN8z6paScLEGjVKLM+jShEm8dgifA0b6tsapWpLfr8BClO3E0zhZWRL0y/FbYcJdXt763fCjtg7pceUDN9wXVU6zS3Dv2TWcNgD4su1LohjpmRuL6WBhr5+3JTs4lvDPwGgboFkKb0YbFoKrk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921752413904.4763783707292; Fri, 29 Jan 2021 04:02:32 -0800 (PST) Received: from localhost ([::1]:43544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5STv-0004Jg-9Q for importer@patchew.org; Fri, 29 Jan 2021 07:02:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnQ-0004dX-Pe for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:36 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:39691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnP-00061q-3N for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:36 -0500 Received: by mail-ed1-x52f.google.com with SMTP id b21so10123412edy.6 for ; Fri, 29 Jan 2021 03:18:34 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dXD7Fo2yC7I86y7CAeIND3a3JrzMld9M7rvgq9x0zxI=; b=ATNbgjGcl0rFVREg1CSkfROb3x1pblYT6oVOvV6lupoQTjo3FP/euhTEMm8OKwKaD3 XG2CY5kJ1jbwBWqshtUlz8mIHJTZ2QFU5vcP8bfcZZOGO/JvhTD8rSxQWV82YCmiS3gq EceCvup3vuvbGJ8kgGC+HkAQZPWPGGXVGiZwBgasErS3JohiBkPMOmBTPVBkURltvDsh JPRpogaaUf3FfbjbvjxF1yV89snEO7H0zc4dDsn+YFLcTwhgN9Zxzw/1L6/LEBexgt0n EtknXehtu0d8xtBkVFg0aNqLa+Mp9TUjqJ9ErW7QQ6nYVQrJ5OxxopHBAPg1SafQ2+sY 4R3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=dXD7Fo2yC7I86y7CAeIND3a3JrzMld9M7rvgq9x0zxI=; b=A6gW0QDg+I74SYOBA3OPE3Va9zHfmcJWLLBZzfdt2w2x7wLPUOvDfmzwPlR1q5GsFA vyWf6guR4d/94Hjj+oChkOdxQ+/IJppowvrecyIpqaihvf9Aka+CU7HE/QBe6FMtuEBJ mMjEOUM6xbXwSZJFPj8xkuThae7Y8rUDCFM0twUQFpoRr7Q2Z9OCiK9nhP1bssIWB8Iq /pTiNBT6UEbAPkYXn+bV8tJ1Z9V8SKzO/3d4oFao6eUPWTerhrsWb1qdZigU1Ws9rDsj nTn0V31hSOG3JYNkExkOm8I0kYXqFOcOpxQlynZdO86hsm6mTn12DHsvHslE3Z38XUAc zExw== X-Gm-Message-State: AOAM533iCMLCKT+qJBPoBZFZjqdEIw978L6/FxwRU9JUh9yignBeXH6I pgbkJzgNY9WW3Aby9SriNZh0SEWXUrl8mw== X-Google-Smtp-Source: ABdhPJxYhMjbxdEhvA/KWIdiwQwvcin2imGYH5/YR+xaNCa4TLM7VSZ8Jejrfz/+vfAhRQy+IpL+ow== X-Received: by 2002:aa7:c308:: with SMTP id l8mr4584950edq.246.1611919113831; Fri, 29 Jan 2021 03:18:33 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 20/36] configure: Improve TCI feature description Date: Fri, 29 Jan 2021 12:17:58 +0100 Message-Id: <20210129111814.566629-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Users might want to enable all features, without realizing some features have negative effect. Mention the TCI feature is slow and experimental, hoping it will be selected knowingly. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Message-Id: <20210125144530.2837481-3-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 2 +- meson_options.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 8f3c4a6a5c..21369efc63 100755 --- a/configure +++ b/configure @@ -1748,7 +1748,7 @@ Advanced options (experts only): --with-trace-file=3DNAME Full PATH,NAME of file to store traces Default:trace- --disable-slirp disable SLIRP userspace network connectivity - --enable-tcg-interpreter enable TCG with bytecode interpreter (TCI) + --enable-tcg-interpreter enable TCI (TCG with bytecode interpreter, expe= rimental and slow) --enable-malloc-trim enable libc malloc_trim() for memory optimizati= on --oss-lib path to OSS library --cpu=3DCPU Build for host CPU [$cpu] diff --git a/meson_options.txt b/meson_options.txt index 95f1079829..675a9c500a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -40,7 +40,7 @@ option('xen_pci_passthrough', type: 'feature', value: 'au= to', option('tcg', type: 'feature', value: 'auto', description: 'TCG support') option('tcg_interpreter', type: 'boolean', value: false, - description: 'TCG bytecode interpreter (TCI)') + description: 'TCG with bytecode interpreter (experimental and slow)= ') option('cfi', type: 'boolean', value: 'false', description: 'Control-Flow Integrity (CFI)') option('cfi_debug', type: 'boolean', value: 'false', --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921941; cv=none; d=zohomail.com; s=zohoarc; b=mXZqXn1Ym7InnqO+eTkjJVCeHEPKOnpT5HC6+oL6Mkq6hrMdWvzEpUexqsG0YtElXSdXAh8K9cZoZEliDZp9lrhGxr2QNFEaDvReNhRzuhlinxY+4jpGwRI9T/GFKJncfKTb53mmYsv4DsXr2IR1LuFaEkCapRGXyMQ8XJnzdL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921941; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pjDunBhovqdCvUb8BrsFl/4RcBvBG2dqU8XujtA0f5w=; b=gDuFGC91XFsuW3elq0Xk+cmH3Q5voOZ8VGukLkHI1MR3QWyIRGqHZHhXZdylgUFphD+eynCbj/vFzox4j35dqQv8FLfl1WW3lFerZp5L0EujfxPivstT3ZrXaKpagHRePmGTRIE/tSM1HHnagEJqLj/r3y5baIr+STjGGji8r/I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921941879916.8116541927434; Fri, 29 Jan 2021 04:05:41 -0800 (PST) Received: from localhost ([::1]:50428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SWy-00077y-PN for importer@patchew.org; Fri, 29 Jan 2021 07:05:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnR-0004fW-GI for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:37 -0500 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:36503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnQ-000622-0w for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:37 -0500 Received: by mail-ej1-x636.google.com with SMTP id l9so12455779ejx.3 for ; Fri, 29 Jan 2021 03:18:35 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pjDunBhovqdCvUb8BrsFl/4RcBvBG2dqU8XujtA0f5w=; b=Iu5gMfg6PShWvcQJxh/BYqTCDg4RI+5ivnl8/bgNNQtJZiWf2uthVDesxaWEqu5j7m TQ12XS8SZjmiR0IWkSpFFTsWKxpiApQ1SuCFBaA+Mn/v58eW3W3j6Fm4ScbcsYYja7gg PCbz7k3ZaUM4nX6IL4T0xlg2P9euVjqrLfIfu1Y1G6mdbacKEyc497XS53Z/f2WAhjc9 OAHItbL7lwEsRS4+IDWjE8KB+9RtkRtTUJk8ZszirrQYyTP4SSwwTyWo3Wk/pWlefe0b Ij76DYWVWybXpcTMmrUSuDcdkSFp28cjjFaYK3HfmZdUBwl6K/TPxShtQoSN6KsnBZQk zNUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=pjDunBhovqdCvUb8BrsFl/4RcBvBG2dqU8XujtA0f5w=; b=WMw0NCTv/aKyeF4aRUT6UB/5ZmEEjyai5BePgbyXUreK3rmrqx78xFd8j1sg1WNMNE Kn0H3bbH0bRcuS9GD75MD7SCjV2gD8nTs3AGZ6zGADmdOZJunVjxqvDOy28FtSp21Jn5 Edblm3zg3/PclNWXj5lfr4rhisF4/3pl+w8aFDC5B0rrxx/pu52MC8EMyhknN7yoQ35G ANDjLNCcWCOVFWW2akU9EN4R+QJbFVL3U2rE18SHUlaUHleFP4YYrS9p1pTzteOCi4Wj KuCw+GBoJqhsQKu7Ae4cQq8DuRqrcvRotRAZjpLa0OnDc4O97dyMLGgoJ7lMtgaIPX5d aP7A== X-Gm-Message-State: AOAM532Npw6wh0SQBQjK6xjpapRIr+PnvBMN0xpSp/5Lk9q+9mDvUWsu 7JoueSL9dyR1VOfDP0ap3FbobwSu2nlxDw== X-Google-Smtp-Source: ABdhPJwSGZ+qm8b5D+bIneJWI6ejyDO6lcewaEl5tNxThYAzoISUnlWtSc+rTeQ4sg07AyQfGMvBqg== X-Received: by 2002:a17:906:ada:: with SMTP id z26mr4043713ejf.127.1611919114705; Fri, 29 Jan 2021 03:18:34 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 21/36] meson: Explicit TCG backend used Date: Fri, 29 Jan 2021 12:17:59 +0100 Message-Id: <20210129111814.566629-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x636.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Weil , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Stefan Weil Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Message-Id: <20210125144530.2837481-4-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 14e4cb35df..21bc9f1b2c 100644 --- a/meson.build +++ b/meson.build @@ -227,7 +227,7 @@ tcg_arch =3D config_host['ARCH'] if not get_option('tcg').disabled() if cpu not in supported_cpus if get_option('tcg_interpreter') - warning('Unsupported CPU @0@, will use TCG with TCI (experimental)'.= format(cpu)) + warning('Unsupported CPU @0@, will use TCG with TCI (experimental an= d slow)'.format(cpu)) else error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu= )) endif @@ -2459,8 +2459,12 @@ if have_system endif summary_info +=3D {'TCG support': config_all.has_key('CONFIG_TCG')} if config_all.has_key('CONFIG_TCG') + if get_option('tcg_interpreter') + summary_info +=3D {'TCG backend': 'TCI (TCG with bytecode interprete= r, experimental and slow)'} + else + summary_info +=3D {'TCG backend': 'native (@0@)'.format(cpu)} + endif summary_info +=3D {'TCG debug enabled': config_host.has_key('CONFIG_DEBU= G_TCG')} - summary_info +=3D {'TCG interpreter': tcg_arch =3D=3D 'tci'} endif summary_info +=3D {'target list': ' '.join(target_dirs)} if have_system --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611922149; cv=none; d=zohomail.com; s=zohoarc; b=FYLxxyyiOlGEgt1JFtBXSgaBWyF2eX8XCAPpGHxKDEuJ9/JwDYasbrmYNe5PgIVIWCIqYkzDjfULZH4lcZmEpfklBN02X3DhAsNXm1pKtpekqcXrpl+0URQvPhTUbm8mQPbpQfrVB/k3JhCf68Bb4cAbscwbzcnlA0PswWj0/Dg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611922149; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YprS6WLIVkaeg2n5pH1EgvoQ2qIhYa6VfFQv4EDnEHw=; b=OywmUPNT/FXI76/ZFJSYw+C3jwMs8Ig2p3cBCAVqwuFdBkCTA7JAekIH59e/PJ69AzNd1naiocM5vSNVmEmojuCa3jvUzT+I/IJ0gIjYXg7seeKS4OYTLDsg8Wup91DVQmQMwcMz8jvy+CHkU88hNI0nMmlJjb8BuDzKCC81des= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611922149048434.7774821714671; Fri, 29 Jan 2021 04:09:09 -0800 (PST) Received: from localhost ([::1]:58304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SaK-0001uv-3g for importer@patchew.org; Fri, 29 Jan 2021 07:09:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnS-0004j5-C6 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:38 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:39507) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnQ-00063R-Qw for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:38 -0500 Received: by mail-ej1-x631.google.com with SMTP id g3so12439952ejb.6 for ; Fri, 29 Jan 2021 03:18:36 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YprS6WLIVkaeg2n5pH1EgvoQ2qIhYa6VfFQv4EDnEHw=; b=FSu/p+2zzUugeEa6crqE4Tl+uja/V0ZWOtuHhCyamgijAo+goK0y0VfErjNiqKvd9b EibXmFlQyeat1RQu2sMvbl7MTdDFoR4HasYxXE2MVTlWqpXenCJ6cLjr5jpk/nJ0rvKH /thfy/i3KQVj5jswigtoTtkQ2qAMlA6BR/hcnBz/YCBtA8f2aYlg3Yit2fby2h2CTT1Z aXhk+fMZrhD4M+q2x6gYUKRB8gT0TcqUTRxni3vpicm8alpnSgbNkwEDEYysrjjQiRaN AYgz+V0LCox83ntHuJuIIoHj+UjQUQ9EiDkkiPA2rEQigCwuQIumNCbaruif7LH+B3KE bCdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=YprS6WLIVkaeg2n5pH1EgvoQ2qIhYa6VfFQv4EDnEHw=; b=gUk57JjmK2ld/s60pTMqsuoiJJHs85sUXwbo3HWPT45nUzl+CGYdXTAkcEX0OmmPow EK4UA9gnx2in2gEURSOj1102hXG7E1mbYBY5KUkgnL3m/p4LMgYWqDzEXSlFOxaLgAOX Zxxsfm9NbOtyqfHx26q3BNFWDoW/+VrLzDaSuxklFCdxqZM81BlRknF9rgZ2Zka+9cBM khI/foBTP9ToRql9/ud2xK0ZsNeF1THnEsTVIOymz0d/oYXJQqc6Ph874NfUQhCKnx35 a1nguDevsMRNxPotZn4NeFJ9Pj4XC1aYS1nZUflC8+aiKq0K2I62B3wiTfGcZH3dzI2l KgXg== X-Gm-Message-State: AOAM530BgvQtLq+WVTw5rRlPvD1a9qyd+tZbCwc0Ih/moO4oQt2wMJh9 MPFixcAX9sK+1yoi8QyZ3NGZhLr/7VdThA== X-Google-Smtp-Source: ABdhPJx2gCmFdXmNAzQ/B8GIiHqKMmUqadG6R1bixB0XI9IIt+q7JpVVoYBxsZAGYEypj3mi/5Q14g== X-Received: by 2002:a17:907:7785:: with SMTP id ky5mr4150811ejc.176.1611919115645; Fri, 29 Jan 2021 03:18:35 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 22/36] meson: Warn when TCI is selected but TCG backend is available Date: Fri, 29 Jan 2021 12:18:00 +0100 Message-Id: <20210129111814.566629-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Daniel=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Some new users get confused with 'TCG' and 'TCI', and enable TCI support expecting to enable TCG. Emit a warning when native TCG backend is available on the host architecture, mentioning this is a suboptimal configuration. Reviewed-by: Thomas Huth Suggested-by: Daniel Berrang=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Message-Id: <20210125144530.2837481-5-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meson.build b/meson.build index 21bc9f1b2c..b6c9db613b 100644 --- a/meson.build +++ b/meson.build @@ -231,6 +231,13 @@ if not get_option('tcg').disabled() else error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu= )) endif + elif get_option('tcg_interpreter') + warning('Use of the TCG interpretor is not recommended on this host') + warning('architecture. There is a native TCG execution backend availab= le') + warning('which provides substantially better performance and reliabili= ty.') + warning('It is strongly recommended to remove the --enable-tcg-interpr= eter') + warning('configuration option on this architecture to use the native') + warning('backend.') endif if get_option('tcg_interpreter') tcg_arch =3D 'tci' --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611919412; cv=none; d=zohomail.com; s=zohoarc; b=DI1insYqlg8N1iC/Qz1DL+b3OEkLmx8YC9f/qa1RYhPsORZUkpI3TZRpbuA9FSkcpY7zT7PVMGD7AruCM2uUplZIqfqjkgpZkHa/nnJKOpBOQIEjarwxajCiKR83/IKRxfm4QO2fhWvW4pstSou5uC9m/P4N1f75urA9Au8FA2Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611919412; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Wh5EmA8AJ+dbguUcmgrU6UUWAV7n6Xaj2Ghuf3FVxNM=; b=B/nyFd6i9Jxsqa1dr7n+wt4qXkjKGFLdd1qMdp1vOFXCNe1FFAOh3dFFk7vGL0x7Q+TUwhv1dUzAYpjyCMeO7Xw5/CEv27ziMIA/QFb1e7mI+cGo816MUOah/v1FQvnO2G0RWQ/0ksUoq+d7NQr3lzIUuzgtiq867n6v+tpEdUI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611919412893555.5214252688032; Fri, 29 Jan 2021 03:23:32 -0800 (PST) Received: from localhost ([::1]:48452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5RsB-0001Jx-SW for importer@patchew.org; Fri, 29 Jan 2021 06:23:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnT-0004lT-7s for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:39 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:40728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnR-00064N-Lt for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:38 -0500 Received: by mail-ed1-x52b.google.com with SMTP id a14so10126141edu.7 for ; Fri, 29 Jan 2021 03:18:37 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Wh5EmA8AJ+dbguUcmgrU6UUWAV7n6Xaj2Ghuf3FVxNM=; b=abn5ZKUheQBU6UBjQygT7SkGtrmnAkju63SxkAqzndz5go9luiMYOTwdqbeDohvBSQ BBTbxHccjvGpy0uGOGfOznhVS+fbJdFk3mjZS/SspeO8KLW7aINnIkdvHZe9lamhdoX8 HUls6gAGg37QKSM0pMrnP75/WFNWPTG7auvTX8LjHff0eYvvPKt7fKuAe1OpsrVlqrbM nOASY6Bmf6e5DSbIUKGWZ27EdLXLRe83B7I3IJizX3hUY5rLVg01YueXVUWVSXSKf+g4 nPrOz/nvhGv+Lapss5Bo5EQxFg9yiRTL+6hk+LbsAvOgGLosj2aY1nbV4PfeUiuieGve VMTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Wh5EmA8AJ+dbguUcmgrU6UUWAV7n6Xaj2Ghuf3FVxNM=; b=jhaL++EAXbTwn/Y7AsEizun4bG5E27WmKHjwC8bN6C4ssfNSTHuniwQYoSeNc+wZYo lj3RNNOKCzmm7/mGvjJG7/WyfSD9W6D0bek3RpxkBBH7nu4qO3Pdi188qygoBIvP8Oem ckxyPYtvzXwbsE4bERb0sPoBE9xj4wi2pFhglWz94waSiGBgsgdZPz6c9AGDn/FEY2cv xqOQULVquQ7QQPsQgTEy2k7Z7g+BGOq0+L4i9cTHmHuVyQFLxPmj+MJ2b/PxfQMdGtZS nlFW13B5Z6FzMI5YXfwYptK403eW6HyT+ieoj4lnscnl8YawEm9scbKUBd6+/RYmOc2Y 12rQ== X-Gm-Message-State: AOAM530ux3XoXtxHQFwKTD7R/PLix5LSzzLQAd4vSn9XIULKQW0BIJT4 dikheFn7AzqHe7shVliKGF3d7cXBmfu3vA== X-Google-Smtp-Source: ABdhPJwFbIQasrdaauDGiRNDnGYd62Ir2ZQZU2BrPDrLthbqSSJZ/f3xlQeDz9W6CQ8WXx/Ab01jiQ== X-Received: by 2002:a50:b746:: with SMTP id g64mr4512118ede.33.1611919116426; Fri, 29 Jan 2021 03:18:36 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 23/36] slirp: update to git master Date: Fri, 29 Jan 2021 12:18:01 +0100 Message-Id: <20210129111814.566629-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau git cherry-diff: Commits on bacb71f1c3ed5f40e393afd8be81bedfba13a401 branch that is not on 8= f43a99191afb47ca3f3c6972f6306209f367ece branch + 1021b0dc38d39f1dc95a296fe3e05a24a087cdc6 disable_dns option + 0f94ceec752592e4ac632a24e3c64a97dd09bf4c limit vnameserver_addr to port 53 + b57bafa852ef16b133907a13678ec69e9531f177 libslirp.h: fix SlirpConfig v3 d= ocumentation + 1abf18b2b5edb462797629ed47ad4515a195686e Update CHANGELOG + ff4ecf9b6c6542b24b4ac6ea178be9d44e159f79 Release v4.3.0 + 21f1d933050a40d62612c6274c32de60b811d9ea changelog: post-release + 376187c4b14c795763d472214812826eebe7e9c2 Release v4.3.1 + 73336e08902a7e826f7d960453df037380266186 changelog: post-release + 5c1c9d43be61571608e9b14615045b67b830daf5 udp, udp6, icmp: handle TTL value + 73ed49ab71998d4288e71e954ef6214b70f23d79 icmp, icmp6: Add icmp_forward_er= ror and icmp6_forward_error + 7a4840a57ec7dbc37cca1ab96f058a9610b26950 udp, udp6, icmp, icmp6: Enable f= orwarding errors on Linux + e9b2bc19ae652a2907f247e621b2e4773bdd2aab TCPIPHDR_DELTA: Fix potential ne= gative value + 39f9a363eec082f04513413046321abd04163148 .gitlab-ci: add a Coverity stage + 1b0093b973cfa0dc041522e5d4e6f576b2df642e sosendoob: better document what = urgc is used for + 5b9ad89ebbb8afa50162c9156fabd5fc56291088 Add G_GNUC_PRINTF to local funct= ion slirp_vsnprintf + 8a808aa493980e212b4d5f5465330905c8294e59 meson: remove meson-dist script + 0b669b5fbe4d3c25a682a67f1059d8633c963b3d meson: support compiling as subp= roject + 9f82a47b81f2864422b82c1e40e51a2ed9c6ac32 Add DNS resolving for iOS + c0eac03e8ce1b9a743231f2fe21e7cb579fc9339 Remove the QEMU-special make bui= ld-system + 1bfd4d9368f9fa2e4f0731e1266bec05bbc83a80 socket: consume empty packets + 92413be68914f8cae2f5bad4bf3ab8491dcbc5d7 Release v4.4.0 + 07e8cfac69766081871ab620d9f16a630543d302 changelog: post-release + 4c4e035813313d02b63fdeb920d56fb2fdc0a5b1 Remove some needless (void)casts + eee9db9d115d91aa82f33685c4e76d656db92976 fork_exec_child_setup: improve s= ignal handling + 216f434a018b3af182a4f31bbe5a00daee170343 Fix unused variables Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20210125073427.3970606-2-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- slirp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slirp b/slirp index 8f43a99191..5dce846e3e 160000 --- a/slirp +++ b/slirp @@ -1 +1 @@ -Subproject commit 8f43a99191afb47ca3f3c6972f6306209f367ece +Subproject commit 5dce846e3ee82d93462bc637bb0db2fd49f0fc5a --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611922256; cv=none; d=zohomail.com; s=zohoarc; b=nIvgY+K0E9Khkrb3jkE262NXnHFUngEvTX/9Q+0mvnl1OJOysGxuG2/uau347mklNg/Jv/8rJ9jQznfMl4i3qJKaXnaB49+Ibkke4HQLfq40k6KQ0My10jk+0gqJ+t6Jff82AWLAsQclQa4yLchNPHXrFhZISSpodnWiedB5Ci0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611922256; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=arnSVt9lOmMwKmuctZoOsBkro1arS1NxpWf+at120yg=; b=iIlsFiByw6bYn3wcZbhGA2AwdtgBQh/aKKwgrOAqK93VEWQqwtQPaMVCbAwRugR9slBBYychOtMs5fSzc5vMXNCWL+LFjQxtrsZW3A287XcHkmB23CbSnVXAlpUExICkMbegA3oLKcLdncDwAyIJcbtvp85lJxZnpjmjVXCJliA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611922255957476.20474595733685; Fri, 29 Jan 2021 04:10:55 -0800 (PST) Received: from localhost ([::1]:34798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5Sc2-0003r2-Jc for importer@patchew.org; Fri, 29 Jan 2021 07:10:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnU-0004mt-Ap for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:40 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:41551) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnS-00064o-FC for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:40 -0500 Received: by mail-ed1-x533.google.com with SMTP id bx12so10108496edb.8 for ; Fri, 29 Jan 2021 03:18:38 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=arnSVt9lOmMwKmuctZoOsBkro1arS1NxpWf+at120yg=; b=cuUhsm/7qGqYIp7zmKoJy7ptiFWcHzv+B2LZFUsWyerfYqpYZHLPTtw8Ukf5BlRYBz W33xboQzG+3HYc3s8D/fW1G0fNnb2k/3fQ5CjCSPbsUFDy06Ni5MDYOaMQOem/uISfic rEtFPu5/Y5TnjcwyazzvRrcr61PZuk/XXtmo3ymeF3PxU/KJKZXVHPBJM79qnfwaDC+r OBmzYvGe7t/i21r0b0X2M9PIMkNu88LV+Im5Ug9OC50H/XOqxUMOgxqoHdGmXHnA8X8d xx/n44wSsV9IIkCPnq60aoopKVuP9Rft0QhFuzgJ0gAxv2QWZukTEdL0Lp9qiMWCgrW2 LP6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=arnSVt9lOmMwKmuctZoOsBkro1arS1NxpWf+at120yg=; b=SnUrt5sYMHfiNjXvkjHPNbUccnT2OAoKqoyr9aZEYomH9462OhdXuHkVag/HkKpB9n uXALN5tlcwuvrPJyrPjVAhAiyXk4zKrj8j2HL1OjjbZUR71F/yge+7BuahELo5SG52T2 KVVs2KhRUC73f4em0lZHot9+rQ9AB6m5uA8VMw191kmwRYZLrNWZis3XMr1/bU9sof3f iJjNQGNPjGWcyZah5JxxpXGNhVvuiVBd6Y6euP6aa0GK0a92muCpyn2OaEDJgXSvQyjP THGZxyv/8rWeSBhHH6zjS5l99fnL21CawTomTTMumjvushwBQe5v0if0yeNI26wgdlIH olbQ== X-Gm-Message-State: AOAM531m+h3d00kkalgQNvqkPL43tNQRtOgQKMMNyHDKzb9V8E3x9WTH cFayViqydqkw+NzvrciZLjM90uiyKHZE/Q== X-Google-Smtp-Source: ABdhPJwD9UwkahE6oa+rzfyvLtox4/98OPdLPKp+xk/mHabgUzkTPEoliRliDKMPbzY/t+LGqugyFA== X-Received: by 2002:aa7:d919:: with SMTP id a25mr4535922edr.243.1611919117199; Fri, 29 Jan 2021 03:18:37 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 24/36] build-sys: make libslirp a meson subproject Date: Fri, 29 Jan 2021 12:18:02 +0100 Message-Id: <20210129111814.566629-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x533.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau Remove the manual build. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20210125073427.3970606-3-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- .gitmodules | 4 ++-- configure | 2 +- meson.build | 63 ++++------------------------------------------------- 3 files changed, 7 insertions(+), 62 deletions(-) diff --git a/.gitmodules b/.gitmodules index 2bdeeacef8..0fb15efacd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -49,8 +49,8 @@ [submodule "roms/edk2"] path =3D roms/edk2 url =3D https://git.qemu.org/git/edk2.git -[submodule "slirp"] - path =3D slirp +[submodule "subprojects/libslirp"] + path =3D subprojects/libslirp url =3D https://git.qemu.org/git/libslirp.git [submodule "roms/opensbi"] path =3D roms/opensbi diff --git a/configure b/configure index 21369efc63..337283571a 100755 --- a/configure +++ b/configure @@ -5212,7 +5212,7 @@ case "$slirp" in auto | enabled | internal) # Simpler to always update submodule, even if not needed. if test -e "${source_path}/.git" && test $git_update =3D 'yes' ; then - git_submodules=3D"${git_submodules} slirp" + git_submodules=3D"${git_submodules} subprojects/libslirp" fi ;; esac diff --git a/meson.build b/meson.build index b6c9db613b..4e694e78a0 100644 --- a/meson.build +++ b/meson.build @@ -1489,7 +1489,7 @@ slirp_opt =3D 'disabled' if have_system slirp_opt =3D get_option('slirp') if slirp_opt in ['enabled', 'auto', 'system'] - have_internal =3D fs.exists(meson.current_source_dir() / 'slirp/meson.= build') + have_internal =3D fs.exists(meson.current_source_dir() / 'subprojects/= libslirp/meson.build') slirp =3D dependency('slirp', kwargs: static_kwargs, method: 'pkg-config', required: slirp_opt =3D=3D 'system' or @@ -1503,64 +1503,9 @@ if have_system endif endif if slirp_opt =3D=3D 'internal' - slirp_deps =3D [] - if targetos =3D=3D 'windows' - slirp_deps =3D cc.find_library('iphlpapi') - endif - slirp_conf =3D configuration_data() - slirp_conf.set('SLIRP_MAJOR_VERSION', meson.project_version().split('.= ')[0]) - slirp_conf.set('SLIRP_MINOR_VERSION', meson.project_version().split('.= ')[1]) - slirp_conf.set('SLIRP_MICRO_VERSION', meson.project_version().split('.= ')[2]) - slirp_conf.set_quoted('SLIRP_VERSION_STRING', meson.project_version()) - slirp_cargs =3D ['-DG_LOG_DOMAIN=3D"Slirp"'] - slirp_files =3D [ - 'slirp/src/arp_table.c', - 'slirp/src/bootp.c', - 'slirp/src/cksum.c', - 'slirp/src/dhcpv6.c', - 'slirp/src/dnssearch.c', - 'slirp/src/if.c', - 'slirp/src/ip6_icmp.c', - 'slirp/src/ip6_input.c', - 'slirp/src/ip6_output.c', - 'slirp/src/ip_icmp.c', - 'slirp/src/ip_input.c', - 'slirp/src/ip_output.c', - 'slirp/src/mbuf.c', - 'slirp/src/misc.c', - 'slirp/src/ncsi.c', - 'slirp/src/ndp_table.c', - 'slirp/src/sbuf.c', - 'slirp/src/slirp.c', - 'slirp/src/socket.c', - 'slirp/src/state.c', - 'slirp/src/stream.c', - 'slirp/src/tcp_input.c', - 'slirp/src/tcp_output.c', - 'slirp/src/tcp_subr.c', - 'slirp/src/tcp_timer.c', - 'slirp/src/tftp.c', - 'slirp/src/udp.c', - 'slirp/src/udp6.c', - 'slirp/src/util.c', - 'slirp/src/version.c', - 'slirp/src/vmstate.c', - ] - - configure_file( - input : 'slirp/src/libslirp-version.h.in', - output : 'libslirp-version.h', - configuration: slirp_conf) - - slirp_inc =3D include_directories('slirp', 'slirp/src') - libslirp =3D static_library('slirp', - build_by_default: false, - sources: slirp_files, - c_args: slirp_cargs, - include_directories: slirp_inc) - slirp =3D declare_dependency(link_with: libslirp, - dependencies: slirp_deps, - include_directories: slirp_inc) + libslirp =3D subproject('libslirp', + default_options: ['default_library=3Dstatic']) + slirp =3D libslirp.get_variable('libslirp_dep') endif endif =20 --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611919574; cv=none; d=zohomail.com; s=zohoarc; b=bgfNpB0UYLaaAi6x4iDx1XqzAATVLj9ykPOdknYWz/bw7pe7prVgvpwtn+qChjbv33c5K2L4DIp+OD8xHT5iMDMvKSgwKB6ZRTPhclv1QwiyyZ95745Ey1kWIGTZCJTpOjxoxWl2ekV1Jy4PzeoyfrCPt+TD6j4LUMLbp3th4ho= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611919574; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0WilWvWorACj3g5EAvXIIkMK139ofJdUm71cXfooZT8=; b=G1KvwOuvjI5iC6IXipouOHxwqMICXDc6yXjZBIvFmNVSYsKGGgycDpXUC+sd55R6oFtBKMQE8mNaT740FhMW5q8afNs+Ldp3epc8ljBgMWl6HCJWh0P4SkAfmIWUYiUN9D84RmiF2MrylCGZfdgQCsvdR5XTb4+t5t/9Rm4X/tY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611919574783471.91001931784433; Fri, 29 Jan 2021 03:26:14 -0800 (PST) Received: from localhost ([::1]:56962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5Run-0004kA-J2 for importer@patchew.org; Fri, 29 Jan 2021 06:26:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnU-0004n0-Og for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:44 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:44897) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnT-00064z-Aw for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:40 -0500 Received: by mail-ed1-x52a.google.com with SMTP id c2so10094194edr.11 for ; Fri, 29 Jan 2021 03:18:38 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0WilWvWorACj3g5EAvXIIkMK139ofJdUm71cXfooZT8=; b=FYQsnb9YI9Z/3nbuDjwQ73Q3Wo8jSOR3DML2SLmjt22WjDYWaMTDvxd2ZnXBTMRCpQ +w0Rfc+g7aJqMymP30S/Qqtix++pvMGMSwJZ3PW0g484XatKfYUE7zjEBJ5SQ8qdlxq9 xhmZ0vNAq/HU0r8q5Pc78KqpAbGKxFPs32pFnCz4PsLvtVFKtUblIFdRqQNmhz6S8uxI DKJ/8Zobw4B0tR9WOreDTjvFv5i5SJdocMAB+3E4VuG70IpXEUbJ2tohQDKx3MJrx/vr oWRIms5iTsZG7CoeniQkcHdlCZoES+dwE6kArp7BxBeeSalGx/Oh+XGdlZkY5ykDUrO5 CXXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=0WilWvWorACj3g5EAvXIIkMK139ofJdUm71cXfooZT8=; b=MqQJu4R6McQGM3aaj0GKnwn/4MnvrpcKZqxoN2dYaOriP0bYap6Hbzxk1MnoItRUYF DiMpby3nV0R/wI26oiACefjQ/VfD+4tCEoEYW1FvwecFwBHR0WiEYk1U5cyHWWERHoDo 1c7IVr4Ich3U945Bwj90U2XreH0WdSEuf8f4gG0Rqh2Nkqv6Zfx6be6cmGLSRZWVx0s+ Z2rtllFGAyHqUjvBmQahxLgTvd1j/uOoqONbpQRGfrhtY54rDgbRHHAsRR6IcaInRx0B BBuw0sClx6vmzh5qNNOHKwigk7+Jh06GQBZxcaaNodAunRKc/quJt+iCvqiSQE4jx38F 34zA== X-Gm-Message-State: AOAM531jnEdGwXaQpXpG3mpTXLfu8AVxzwHjy8q8+JiWtWwkPEejfYgE bv9eW21nSL8chaA2c7zjrIq9GjnCl/S/JA== X-Google-Smtp-Source: ABdhPJxwzlI+/MrXbKBRO2YkMXqyJY9J/3Q3uwAMR4APldB8f2oG84QpoB9vl+eXgAgWjsrN48MQfg== X-Received: by 2002:a50:b246:: with SMTP id o64mr4329447edd.132.1611919118018; Fri, 29 Jan 2021 03:18:38 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 25/36] tests/meson: Only build softfloat objects if TCG is selected Date: Fri, 29 Jan 2021 12:18:03 +0100 Message-Id: <20210129111814.566629-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Reviewed-by: Alex Benn=C3=A9e Message-Id: <20210122204441.2145197-3-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- tests/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index 29ebaba48d..6f1ff926d2 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -276,7 +276,9 @@ test('decodetree', sh, workdir: meson.current_source_dir() / 'decode', suite: 'decodetree') =20 -subdir('fp') +if 'CONFIG_TCG' in config_all + subdir('fp') +endif =20 if not get_option('tcg').disabled() if 'CONFIG_PLUGIN' in config_host --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611920585; cv=none; d=zohomail.com; s=zohoarc; b=lguuZH2cImFaGBDcNoSBB7P6iWqdTUroMWE7Aw2RzuLDc6USwXg6RCGyg8w88f5hzKTQg8nWsgteO0D1GvTnz6Zd9bHh3N8oy6SbAGfaEqdXcAXFzjhRNBSRcN8uuqO4mkas0UUXgHrqv+eiqS6idqOQH5WreMumaDU+jxzzEIE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611920585; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=n0oc9vUhZzR8ZVs9lZClM6fTo+wKdeM1A7PGawhfO4U=; b=HSYj4uzHc1VKkHWg1Vk/n168cOnpurVSHO725xXvLud9u8RLVXwh2d2vXvHtAH3yk4HIf4HFVosMCTQu6l7sXr6Ir6/gkcWyeOcbHwZNci4m3gLUZeT1+VC+G5/3w2m8d7gxrz45HTdy2qLo22hekhJ8TpGTHzhAjriUKm6sByU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611920585741198.4954521929301; Fri, 29 Jan 2021 03:43:05 -0800 (PST) Received: from localhost ([::1]:53776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SB2-0001tm-Pf for importer@patchew.org; Fri, 29 Jan 2021 06:43:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5RnY-0004nS-Tq for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:45 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:45906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnU-00065C-3i for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:41 -0500 Received: by mail-ed1-x52e.google.com with SMTP id f1so10085547edr.12 for ; Fri, 29 Jan 2021 03:18:39 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n0oc9vUhZzR8ZVs9lZClM6fTo+wKdeM1A7PGawhfO4U=; b=jAiKzL01gYAnzbn2ajF6jqUyiOBVCF7Ktr2apv45aTSoD9Zshx7pgfvXXbqThwro9z Bmty1G3WRECnf+CHbUsDra3p+6+EcR/pMFj7bnl3C/f3Ksw6dkG1mtPrCDjNBYAtKiR+ LnK5akRa4viTaKTDLGISu31mZWsG3fUErRkuzqOmHOlrVOcjPi1CRwTgNHTof458Y//R TbohXIfhjGRPP4S+sHGkuwtdi4Q4kV/euXZdubMWj/mjI+gZhYY62fg+VVkY0W4U+JaG l3qQGJfkA6XsAR3KaorpvdD0lsirx+fHbFQL/9yOfwkJNUbfuWx5uW49vBKoK3IImO9e 22eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=n0oc9vUhZzR8ZVs9lZClM6fTo+wKdeM1A7PGawhfO4U=; b=mUhqVPM9DAM3fDMzqQNTcgLLdxtZLXFQ15df+DhoD3Y4H4AaXvOXM2v0vZUnmp/5mN Fyo3yN8QMwU5qT6LIEYaQ12HYD0JkFaTNIPL5HXBQe2zJ+v8t8ZwsynPqMYbvbKSxlR0 /EgfJRdcYNWHLa7WIPs5moSYxeUM5NtDF8szYMXBBV8SUsb7PRNIrCWVq4Cpw2NEqZl7 slav2+j1wMc7+viWQ2Rh120R2fpn1LBqI/KyqbGrN8IL3CThUMEStL/eBDAgoxpL7k0H ohu/4gLGr1WcOKSEwiOu4G8UWtQyLNVanKL0x5yKppA/GN7BS4AK/gPRGIF5iPegTT6P O6Og== X-Gm-Message-State: AOAM533SydXxdbGKbL7GvEQO3+qlO7QjMQklCaehC3mFLGCxsUG9n0kW QjuMhLIhaFSoMYFJ356WVXSl58FnZ0RX5A== X-Google-Smtp-Source: ABdhPJxRSkCapsCJNRnHxuyB3CudS1P/1Rst4pmlQAT70QtVqc9jAcfRBZTmNFzxgBJIQvnct7nXhA== X-Received: by 2002:aa7:c84b:: with SMTP id g11mr4411182edt.169.1611919118969; Fri, 29 Jan 2021 03:18:38 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 26/36] pc-bios/meson: Only install EDK2 blob firmwares with system emulation Date: Fri, 29 Jan 2021 12:18:04 +0100 Message-Id: <20210129111814.566629-27-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Message-Id: <20210122204441.2145197-4-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- pc-bios/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/pc-bios/meson.build b/pc-bios/meson.build index af95c5d1f1..f2b32598af 100644 --- a/pc-bios/meson.build +++ b/pc-bios/meson.build @@ -12,6 +12,7 @@ if install_edk2_blobs =20 foreach f : fds custom_target(f, + build_by_default: have_system, output: f, input: '@0@.bz2'.format(f), capture: true, --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611920687; cv=none; d=zohomail.com; s=zohoarc; b=PIrMG344rxgzbyu+okY9+GoLVono7+dyAtNaPoTPbzlrL36sFI/mrdwzEdjkCuC9Kj9NHL38fCi4vtltB+DHBAfgp4vatV9dDMB0+GVrrwCRF7KmrHpNNeC9zcxIITL1K181rh4e8LUSYLvq/R0LL/iVWv7FSv6ykDCOESdoKTA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611920687; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IobH1KJ6mGisgw/tAQlnKjDO+QJUnt//1InQBRilGMk=; b=ZQ5HLly8lbhypJGNFCWS9Gr33cw/pwUW/wdCMG6GbYM+Vn6T+1kCyHT6EPH9X08S+3c9o5PO59A/+Aq1F/1jNbqsssgPL9J/Pi3JzXncVCC8Lk8e/fMqGvrwptdPyupjsikIIbFKryU4vszvAnuSGYm82nsn1MguIH4t9JdJKGY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611920687439833.1536009171823; Fri, 29 Jan 2021 03:44:47 -0800 (PST) Received: from localhost ([::1]:59988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SCk-0004S5-93 for importer@patchew.org; Fri, 29 Jan 2021 06:44:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5Rna-0004qk-68 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:46 -0500 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:43404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnY-000667-L5 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:45 -0500 Received: by mail-ed1-x531.google.com with SMTP id n6so10098401edt.10 for ; Fri, 29 Jan 2021 03:18:40 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IobH1KJ6mGisgw/tAQlnKjDO+QJUnt//1InQBRilGMk=; b=vZCMF4sGxalNIulKhDd8datZmClK98ltcdWQFvnpyt8+7BaCuRVxqMNbwS3w8iXfc/ tT+GVBGG7Qg4S5exNVLVVwEsFAy5HDUXBSQ1R8tBdlTLjt60Il1n4vxxp3d+rCWqHoXl WNa6OsPttsJXXCTcZ4tctmiZa8XTOTvyU73qBY5sLORBBs8yLa1Uu0nvf4JHXdo1eJJW N5ueSjvGjI3icEHImYj2llG/dkNVSNDQUcCX7iFcc3G+iVSqBoLWSKLWeNokbOnrznEJ chk00MsXyyIUfoWsfFAcCOoR/SFtXUtbIVtHFqqCHqwiaY9Hn3wizN547IU9EzwFvFqv ncXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=IobH1KJ6mGisgw/tAQlnKjDO+QJUnt//1InQBRilGMk=; b=uOL6WsTR4jfhBbqlpOxYK/Xuuu8kFVpuc1YXr2tPkgsi/yL8JjXhlGy7CeZ8sRqrG6 lYE4NXG9d1h98lylBtzaKqV/BXmxw54syVl2RwV74gTJ/mcG2NhpHbBxBlo/tp8pDkv3 +Oi+XkJtkK9OLyXSSjzyuGvZVySESoc+kO3T6sCSdl9woDsAIjo43kWYlJ6jA334vRCM m5dH33u9wO0qFp5vU6xdGGJYnlqp+T1L65ke6wbCDLUc8JD0QFU4aQ7KIMWcg1aBOdN5 CvTVgCHEq0OIexfGNXEXSWGLswWhM696jS6UrX6jU8cn/mgdt5kgwyEdCM+fHW03H/bC FbLw== X-Gm-Message-State: AOAM533OxWjyXUcBpvOgJe4w+pjs1aMkqEWHyYTmZIcKsmi+VohiD4kB klhNdqUlHUOHUvaXoPzFIUevR9f2KoPfTQ== X-Google-Smtp-Source: ABdhPJyGOt6Fvc7wIRgEfxyORzoewlZo18x+o/Cu2VBm7t/iqHZsoHS9Y817yTC8yG1xw6oFFJ1f8g== X-Received: by 2002:a05:6402:757:: with SMTP id p23mr4541305edy.245.1611919119742; Fri, 29 Jan 2021 03:18:39 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 27/36] meson: Restrict block subsystem processing Date: Fri, 29 Jan 2021 12:18:05 +0100 Message-Id: <20210129111814.566629-28-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x531.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Avoid generating module_block.h and block-gen.c if we are not going to use them. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Message-Id: <20210122204441.2145197-6-philmd@redhat.com> [Extend to nearby files and directories. - Paolo] Signed-off-by: Paolo Bonzini --- meson.build | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/meson.build b/meson.build index 4e694e78a0..0bebab037c 100644 --- a/meson.build +++ b/meson.build @@ -1794,29 +1794,31 @@ subdir('libdecnumber') subdir('target') subdir('dump') =20 -block_ss.add(files( - 'block.c', - 'blockjob.c', - 'job.c', - 'qemu-io-cmds.c', -)) -block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c')) - -subdir('nbd') -subdir('scsi') -subdir('block') - -blockdev_ss.add(files( - 'blockdev.c', - 'blockdev-nbd.c', - 'iothread.c', - 'job-qmp.c', -), gnutls) - -# os-posix.c contains POSIX-specific functions used by qemu-storage-daemon, -# os-win32.c does not -blockdev_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c')) -softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')]) +if have_block + block_ss.add(files( + 'block.c', + 'blockjob.c', + 'job.c', + 'qemu-io-cmds.c', + )) + block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c')) + + subdir('nbd') + subdir('scsi') + subdir('block') + + blockdev_ss.add(files( + 'blockdev.c', + 'blockdev-nbd.c', + 'iothread.c', + 'job-qmp.c', + ), gnutls) + + # os-posix.c contains POSIX-specific functions used by qemu-storage-daem= on, + # os-win32.c does not + blockdev_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c')) + softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')]) +endif =20 common_ss.add(files('cpus-common.c')) =20 --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611920877; cv=none; d=zohomail.com; s=zohoarc; b=ELX9F38R3+rbKOFU39TnqslVE2NxtvenxgwJBgW39BAcom4rn5ZofmFDspa/fKfW6CyLTopMDDT3inYWkRWX3vKntYb5A6cq1EjRad1hUspwzkQ9EiW7slLVBobXOQGExKYa/0RnEvC2W21sE14WRmFqAAc3xIFLAEgA3+Kke0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611920877; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HeLrWSEt6vvAQuhrLqgMFFnKDJsj3Kb9xwacLVjZJkg=; b=YJ64rptoLiO75Ly5ZgXhVRP6hEgp6AUlczlAg3B8J7gNoG/vpcXNGW1FhhXXn8cpVGG5NRfW9eHZHdBA+8PByb1RbzpZYbCpl60P/yHynYyZQq0krPPf2UhHeGFqRc+Mi7QGZGbZo6Ombonnumu+xs5xJ0Y6dyMJKxphmGQ4HnE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16119208776631022.8547289580617; Fri, 29 Jan 2021 03:47:57 -0800 (PST) Received: from localhost ([::1]:37926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SFo-00072y-Dz for importer@patchew.org; Fri, 29 Jan 2021 06:47:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5Rna-0004qp-6r for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:46 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:34953) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnY-00066c-MD for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:45 -0500 Received: by mail-ed1-x52e.google.com with SMTP id j13so10149161edp.2 for ; Fri, 29 Jan 2021 03:18:41 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HeLrWSEt6vvAQuhrLqgMFFnKDJsj3Kb9xwacLVjZJkg=; b=f9hClCCjVnZsfGfJJAbqEgzJ1V+/Z8CywcK65tjg7orWb3VbRJhdv/hR0bDBpGha/i fazfRghu9f3Yt1Pcm1sigjMHaHkp20w9IREfat0JEgBk27xOGpFqQRSLQMEOkrJWzyBI bk2FMB9s8y4s6c3b9VfzW9DDrbbxWpj1dLLrs0CvzI77d6L9hMVgrFJcph0F4P67Zlc5 c4pVFr4QOT8fH2X5HapKJxwI3WtPHDRvvT4Q2QH6Krj7B+SHK13CR0JfVBPdg8JiT2H+ X3gQBBm3Wu1KbHwyUn/ZW7rne2HcGF96jL4+w/mEvPexZe5RdAl7ceTEe4+xAv0F8eQY 3VlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=HeLrWSEt6vvAQuhrLqgMFFnKDJsj3Kb9xwacLVjZJkg=; b=p+VDU5KLtC1djjEGzcEPvY82eorXAiVNL87rTSx1cB8V8QX9CXBKspuLsR9+L9KLKp dcCF267pdzA6Y9gFTifnbyQjgt2zwpimIq5WjQl5XqRw0qrI8DRRiYbSrI+oTlGApxaC Ob4T0sf/AotemG1pV01yMB+o4EuWsYX48GE+xStUHHuReKh3CoH+gn8nFxt1r+zCOYsO PYD0TKeWg+2Y9z1tFw4TK/I1duu87sjtthucwE9rDIvKmve8i7s1CvEa1KBUF76ES/Ms 4NdZ7NClQhiY9za2hRUuIiwEYdIHcN0pBI+yEpyn4dhNWbwsnukEqzMO+HmDO6q5s2Rj qgJQ== X-Gm-Message-State: AOAM532knJ+bwRyVT6nuN/aiInFI6sQt/jILAQyyRy5Fefas8EMIHQom Na8juP6PfOanwh2Q8FgCWIVM6fdA4EsbwA== X-Google-Smtp-Source: ABdhPJxRkjYRILWNPhhquEjFS5oW2vPehAIwON7/TbVf2y7mHTJS0eamGXTzZsN2Y/X+gyHV6imOCA== X-Received: by 2002:aa7:da98:: with SMTP id q24mr4526918eds.370.1611919120583; Fri, 29 Jan 2021 03:18:40 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 28/36] meson: Merge trace_events_subdirs array Date: Fri, 29 Jan 2021 12:18:06 +0100 Message-Id: <20210129111814.566629-29-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Claudio Fontana Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 The trace_events_subdirs array is split in two different locations, merge it as one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Reviewed-by: Claudio Fontana Message-Id: <20210122204441.2145197-7-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 0bebab037c..ec1a9ed0e8 100644 --- a/meson.build +++ b/meson.build @@ -1661,7 +1661,20 @@ trace_events_subdirs =3D [ 'accel/kvm', 'accel/tcg', 'crypto', + 'hw/core', + 'qapi', + 'qom', 'monitor', + 'target/arm', + 'target/hppa', + 'target/i386', + 'target/i386/kvm', + 'target/mips', + 'target/ppc', + 'target/riscv', + 'target/s390x', + 'target/sparc', + 'util', ] if have_user trace_events_subdirs +=3D [ 'linux-user' ] @@ -1734,21 +1747,6 @@ if have_system 'ui', ] endif -trace_events_subdirs +=3D [ - 'hw/core', - 'qapi', - 'qom', - 'target/arm', - 'target/hppa', - 'target/i386', - 'target/i386/kvm', - 'target/mips', - 'target/ppc', - 'target/riscv', - 'target/s390x', - 'target/sparc', - 'util', -] =20 vhost_user =3D not_found if 'CONFIG_VHOST_USER' in config_host --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611922409; cv=none; d=zohomail.com; s=zohoarc; b=IGdfgkiPPAIOOKgTrdohUa7g+ZnCjuam4l28ciFk9YOrt+I2c0VPoLaorIys2XCXNxBz44nFV9PfLn9CpXyq9+u+Itu3qSN0t3i3fV/xn4+LEPFPQAa0JwDYplBcNyAxbEnbVwprkH7M6p1uO9+ZAN51df2VEdn+rLTpS79nvNM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611922409; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=X8GWjMLlCcKpCwU19YuwWH2vJ6BIXRt7o+YeyX8PkM0=; b=JdS7p6O0AxwQNJ/ltf8QZFs7jxu/1ne/cSFo+hTAKCQ6j5Olvkyz8+mExUl1JwA++htbiJTLgia3+S2hLYDY6RjIvLIU20qeBpIrpSuKF1V/Q5PZIjkUfo8rr7mFpYwyXMwRxSQ9mEFWSqX8EVBoiXTVbQkZPWishzdFOdqsIHA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611922409635832.8966727032468; Fri, 29 Jan 2021 04:13:29 -0800 (PST) Received: from localhost ([::1]:40850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SeW-0006Q8-DK for importer@patchew.org; Fri, 29 Jan 2021 07:13:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5Rnb-0004uA-Ko for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:47 -0500 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:46212) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnY-00066i-PF for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:47 -0500 Received: by mail-ej1-x62a.google.com with SMTP id rv9so12391391ejb.13 for ; Fri, 29 Jan 2021 03:18:42 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X8GWjMLlCcKpCwU19YuwWH2vJ6BIXRt7o+YeyX8PkM0=; b=Wl1OmEoJk95AUBcdwCcUDU96xM41RUBqoO4ocidhZGwJxayV0DrxPjSBZHyogPRUuq w1gIpY3szYuRI57PWMdcOyWzbc6VKuY2HrTpqoQUGIJKoInGh8FT2bG/yy5bzaIUtTV2 +SNyMUc5PQNS3xz+62lJyJFpbZT0FRDhWIz61dwLyoGiMiQYxSDrs8FF8Cuq4fyDRtQN GgskPv9HGDJc+SRRjImdt7Gg9v5DQ45sr3qczKErzgSSlZKuAZNMpd56+3Zk7rd88J+8 aemBafkn0c+BzR74aFt/JL9cD0rs5hnmwDfHG39fUKcftFzUE9cxY/NJRO4Fm9PgPDF+ o6IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=X8GWjMLlCcKpCwU19YuwWH2vJ6BIXRt7o+YeyX8PkM0=; b=bWdsiFmtgrkxonfTP6Q+fRcA5/m4EmEHWP4it6nenKagcnAsHOQPJVnwfjvikJO9U6 uJGZ/wP+RavaqaNEJhOmqDbXVzHsAB+EBwRfwGFB1l/++0t3G4a8Kr4l019Z1vEoOdlX 1PsVPR9hW51JHOopm3BiC0b/8P0lF4dMTkFymdXrjFUrlVHdKnPHaj5zMbLyUradgxru YahZxoSHKtZFPMI6b6DsCsJOnY7bPEJ61smfUY5LDr22vgS2f9lQEXWcenmtwscVgnk1 XC/E1xQ+OUSM7A9qri3NJXhvu2DtKdUp/kI4JryTTle+fqHcmq2pOzSU4aAQTg2ls7CD v51w== X-Gm-Message-State: AOAM532bVErkPMf9R1UjYHk6mifCy17JbkHXylvg65mk5ONgAW7NDlBS WSl2KK+JizglFunRY9O+VQQrstXHM+wlzA== X-Google-Smtp-Source: ABdhPJxqo/LMmD1pL/bUwWhBR77fr8hzTcVcOVC3+lPwzMtkZqDol+HVQAyFuIot3DB4aA1ldzfMbw== X-Received: by 2002:a17:906:fcce:: with SMTP id qx14mr3972828ejb.220.1611919121399; Fri, 29 Jan 2021 03:18:41 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 29/36] meson: Restrict some trace event directories to user/system emulation Date: Fri, 29 Jan 2021 12:18:07 +0100 Message-Id: <20210129111814.566629-30-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Message-Id: <20210122204441.2145197-8-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index ec1a9ed0e8..a9dbd2a0db 100644 --- a/meson.build +++ b/meson.build @@ -1658,22 +1658,10 @@ target_softmmu_arch =3D {} # TODO: add each directory to the subdirs from its own meson.build, once # we have those trace_events_subdirs =3D [ - 'accel/kvm', - 'accel/tcg', 'crypto', - 'hw/core', 'qapi', 'qom', 'monitor', - 'target/arm', - 'target/hppa', - 'target/i386', - 'target/i386/kvm', - 'target/mips', - 'target/ppc', - 'target/riscv', - 'target/s390x', - 'target/sparc', 'util', ] if have_user @@ -1690,6 +1678,7 @@ if have_block endif if have_system trace_events_subdirs +=3D [ + 'accel/kvm', 'audio', 'backends', 'backends/tpm', @@ -1747,6 +1736,21 @@ if have_system 'ui', ] endif +if have_system or have_user + trace_events_subdirs +=3D [ + 'accel/tcg', + 'hw/core', + 'target/arm', + 'target/hppa', + 'target/i386', + 'target/i386/kvm', + 'target/mips', + 'target/ppc', + 'target/riscv', + 'target/s390x', + 'target/sparc', + ] +endif =20 vhost_user =3D not_found if 'CONFIG_VHOST_USER' in config_host --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611919731; cv=none; d=zohomail.com; s=zohoarc; b=Yi8kOXj+3Cw4CKugD61wUy1EIWfxeVcv907anhNkImasGN0y8n3IFi0nsIJudp5t1PxF2BEpp+N99K3tkskPHDyE41ZFNmNS6SXqYFMElaUmndhnNFeU4xw7F3iaNvTR7UEH0lKBHKxl614Gg7+dlH6vWE2Xqm+MCx0VLGYJk30= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611919731; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4JrZtYPxgRs4ilVvMy8sIfDqK151Z1Ipvx+lDlV63dY=; b=HcfnrYeXGOoQK6tKt077F0PJuwe6dbEz1/cZd8v2MXcFdQuu2rJRRsmyhNr97soizStuse4f25McjObBf/fbB0msfVKgZZSz/JPLSLM694V9zI1d+DhjPofLfOVygrfDBRx40rlEfXEFgcbbo25N5S1IjH5AYTnMq9d5hpJNWAY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611919731257879.6940523049259; Fri, 29 Jan 2021 03:28:51 -0800 (PST) Received: from localhost ([::1]:37194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5RxJ-0008EB-1S for importer@patchew.org; Fri, 29 Jan 2021 06:28:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5Rnb-0004uk-RW for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:47 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:37002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnY-00066s-PV for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:47 -0500 Received: by mail-ed1-x52f.google.com with SMTP id g1so10129307edu.4 for ; Fri, 29 Jan 2021 03:18:43 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4JrZtYPxgRs4ilVvMy8sIfDqK151Z1Ipvx+lDlV63dY=; b=JB0K60ZAo0Nm6gljhnckNN9upE2pr8RZ0TKlCxh7GcuVj9zBOkQ/0erbPi623x7UI2 y27F57WvYZ9aIKrkLamqfPHgBaxp9YOVsK7yrE9gOzlAqabkT68K5DW/X1VFgp3BH2yZ w6bcqG3YuQyVMkB1i8eCLUNBv+4jhw6WUt8qq2gFmbzmbDrbTOajpAd6+tCoyQ51nmJF jDQQV72avc8hJTo09FQj/35H6I3fDOuIFYuc0YqNpMeME2PpAgU6rdZKWaiKuQUNSmH2 7VUUVHQ/5z4RWdlJhnmKgrc65AemqhHJSUDzg6X7m9Ebs+e9I/vtyrOL6b1ZN5Xr0m+D UxJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4JrZtYPxgRs4ilVvMy8sIfDqK151Z1Ipvx+lDlV63dY=; b=s7yph+BVmNh9QNA+ErohRpUlqTGEh9dVJXxuwT29l3qVFDniNNfnKZhkZwd960qMiz w2t0vU2wR5otiN7xlbmf/pvImKNAgQlPir9ZKJeZxeqjLNsvbvooyInaLo6YWrnJhCze iXH//5UGfbIcWYhjbvR5QEM0PmWSySlj2DK/CGqlVLzo8q2F+ntCl+DNeTuKT4uzM8iS pe7hjAoq5zJJG6+6I1lmw4JDL342z6lKHgYSArORdPINky0XUIyO3SakjVEfjW/vLVYw UKcCeDKrWk3dLhtMfkwsYcVzi8tje9hRSetQJ+T4nFkYXs6gefLwF49bISdcMW7AQchW kK6g== X-Gm-Message-State: AOAM532B5yiIl6IFTsI1cC6GMSGKflN9zddMP5FlDeSLxo/mUMScut2W so54gm7XCFM5uX5MTR78k9UTQ7GO1MVS2Q== X-Google-Smtp-Source: ABdhPJx1pq7SDDkILuZE0RpLvcQ3YbXg7o0RKH9nfdAeHGiL/zuRCg7/4CpsPdJLEvb+d5nKaltALg== X-Received: by 2002:a05:6402:1013:: with SMTP id c19mr4503773edu.298.1611919122210; Fri, 29 Jan 2021 03:18:42 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 30/36] meson: Restrict emulation code Date: Fri, 29 Jan 2021 12:18:08 +0100 Message-Id: <20210129111814.566629-31-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Message-Id: <20210122204441.2145197-9-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index a9dbd2a0db..2734d765e4 100644 --- a/meson.build +++ b/meson.build @@ -1784,16 +1784,18 @@ libqemuutil =3D static_library('qemuutil', qemuutil =3D declare_dependency(link_with: libqemuutil, sources: genh + version_res) =20 -decodetree =3D generator(find_program('scripts/decodetree.py'), - output: 'decode-@BASENAME@.c.inc', - arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OUTP= UT@']) +if have_system or have_user + decodetree =3D generator(find_program('scripts/decodetree.py'), + output: 'decode-@BASENAME@.c.inc', + arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OU= TPUT@']) + subdir('libdecnumber') + subdir('target') +endif =20 subdir('audio') subdir('io') subdir('chardev') subdir('fsdev') -subdir('libdecnumber') -subdir('target') subdir('dump') =20 if have_block --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611921013; cv=none; d=zohomail.com; s=zohoarc; b=DOrDQ8Z2Pk4QtS8phm75Hx2HhyAdDHoNptqNjetgmlIPcgRBOF5SeU9m0zolABAulNt/5jLtro6dAIQrwh8VlgVzZi4VNWS5HM2rF0O2ZFWwTCTrlsu6A02zyWuWWw0jE7G+w3e5e2UYn2BeDW81Q0mHv6i7q/cXn2zaWBZj0i8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611921013; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dMBxoDIDlMoeXVhLAiWNw1X/TiIbPaCf8MYQG1V/XIo=; b=nXK7UHw+gxepCopLtOOX7lkxzoVJSgh3w3lGvTSawsqPQnyhcwJouODCFi3CgpMX2XCbOPFCrZHRTvE50v4yeY93yiccZtCcfcvi8sOXGT6UqlMUw/VO0CrnRoNdsTe718XKUPwcp3vjcOBhykSLEENbiH0BnJmJYFHtObeJDPA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611921013191409.2870802115482; Fri, 29 Jan 2021 03:50:13 -0800 (PST) Received: from localhost ([::1]:44258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SHz-0001Hn-Uc for importer@patchew.org; Fri, 29 Jan 2021 06:50:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5Rnb-0004ui-RG for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:47 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:34271) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnY-00066x-Pr for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:47 -0500 Received: by mail-ed1-x536.google.com with SMTP id d22so10136486edy.1 for ; Fri, 29 Jan 2021 03:18:43 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dMBxoDIDlMoeXVhLAiWNw1X/TiIbPaCf8MYQG1V/XIo=; b=Q5RSTLGO8ZegE9AmrolKCs7R+NnKm2VeXB7aAMMmubPeRfQDMyXG190CSMkyz4uOsJ dEXTcxvIKvNLTLqZqR1qPkeTc4z+kt8/9LRX/hboGkm4QoMFQuBG7k9d0EBCivGXRLwH L/dysVj48OSjFnBIcM+LVpabQoeZTCfhpeNgggjZrErUARKdAZQkd19+0Lf4EZVP4W1E Io15Fifez/ZUEHIVoJ7MdCKUeMhZY4FBrfmsKliou9klwUK/0FggzXjIuPA2LW/n2Tn/ c4UvJ14cxB9YuGgVGG/smTEI1o6pZ72dDeSzh4MpaV6R7+34E130IC8VzjvrXa2Fn/FP MrVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=dMBxoDIDlMoeXVhLAiWNw1X/TiIbPaCf8MYQG1V/XIo=; b=M+U7/bjbCUeKLf5EfQW+em2wfBDfroSvgCWlEFnvseBNCxInzhD4QnflLgyGwxjVqN Azymc/3ytA4uhi5C08lwBAkUTwSlEVAP8XwFCXaKNNRy5Q9qJH2KBt3OKlcccu2YZkXa cVAMkkcolgDinVOV26O+KkfC2HfMXVRneHgL3hhqOGCHGtpgwHB+PXsyEoncRkv/RgiH WbwwNt6YtVQoUs9YgKAZ8l5HpABt3jRm1jYMUw7aDMhAwXlhNYGfAnxKzkafu9Lo5b0R NgnO9ulB/3JWgx4zy037GojP+Yu7OtOwYjAoc/ze7y7V37ekvJzOs5nd6dQUkZ1AjDtb 4gTg== X-Gm-Message-State: AOAM532VDGJuC9pt1iZ0V89I7FIrRiKfRBSyMGZmiApvIl6b3sJ0JTTF SJspzdew7/gbkp/ZpW0eudPveQZzGu0r+g== X-Google-Smtp-Source: ABdhPJw9MfXVOMKrVQAomOHM2km4z12IsvJEW4GbZwscCnG8ThmMunTJnWpI0pCK1I7z8GyX/OuOJg== X-Received: by 2002:aa7:ce87:: with SMTP id y7mr4500969edv.211.1611919122994; Fri, 29 Jan 2021 03:18:42 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 31/36] qapi/meson: Restrict qdev code to system-mode emulation Date: Fri, 29 Jan 2021 12:18:09 +0100 Message-Id: <20210129111814.566629-32-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Beside a CPU device, user-mode emulation doesn't access anything else from qdev subsystem. Tools don't need anything from qdev. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Message-Id: <20210122204441.2145197-10-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- MAINTAINERS | 1 + qapi/meson.build | 6 +++++- stubs/meson.build | 2 ++ stubs/qdev.c | 23 +++++++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 stubs/qdev.c diff --git a/MAINTAINERS b/MAINTAINERS index 34359a99b8..d2dd7c2422 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2523,6 +2523,7 @@ F: qapi/qom.json F: qapi/qdev.json F: scripts/coccinelle/qom-parent-type.cocci F: softmmu/qdev-monitor.c +F: stubs/qdev.c F: qom/ F: tests/check-qom-interface.c F: tests/check-qom-proplist.c diff --git a/qapi/meson.build b/qapi/meson.build index ab68e7900e..2839871b47 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -35,7 +35,6 @@ qapi_all_modules =3D [ 'misc-target', 'net', 'pragma', - 'qdev', 'pci', 'qom', 'rdma', @@ -49,6 +48,11 @@ qapi_all_modules =3D [ 'ui', 'yank', ] +if have_system + qapi_all_modules +=3D [ + 'qdev', + ] +endif =20 qapi_storage_daemon_modules =3D [ 'block-core', diff --git a/stubs/meson.build b/stubs/meson.build index 1a656cd070..a054d5877f 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -53,4 +53,6 @@ endif if have_system stub_ss.add(files('semihost.c')) stub_ss.add(files('xen-hw-stub.c')) +else + stub_ss.add(files('qdev.c')) endif diff --git a/stubs/qdev.c b/stubs/qdev.c new file mode 100644 index 0000000000..92e6143134 --- /dev/null +++ b/stubs/qdev.c @@ -0,0 +1,23 @@ +/* + * QOM stubs + * + * Copyright (c) 2021 Red Hat, Inc. + * + * Author: + * Philippe Mathieu-Daud=C3=A9 + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include "qapi/qapi-events-qdev.h" + +void qapi_event_send_device_deleted(bool has_device, + const char *device, + const char *path) +{ + /* Nothing to do. */ +} --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611922180; cv=none; d=zohomail.com; s=zohoarc; b=f3sfxaS6pHmL5t53fh/+U/a9LqtoeCn7JTIf8S+dqJrWGpXeU1Q14ctn1wBSZnYRb3S1dWaBHhb1fFcM7lQM7LSMTto8wc9IQohIQY4Dxqe0CahYzOLivGU6LSAFzV5LJmySGjZmhdD8NE0Cupholrhja5ta7d0aZXLxeUcikOc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611922180; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QcUQysKIzSM/Au103fYACCSBXfd/a9CnayLthJR5WoQ=; b=cncUqOQ9BO8TIiFDxS6Z9+UUU1fGEN1eEHpCKNnKUYqb0kT9e43XBgMKOtwQ/3qJ82CJvGgc3eEYb+3c1Ib4uvqKHURofLbg/xb7afSUbEuku9G1fJUicoJU+C6QNEbQ3nFkPo0bqYs2JvqyKMO9UX5q8KxSJHD7eDEMLEKYsL4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611922180085490.012597000416; Fri, 29 Jan 2021 04:09:40 -0800 (PST) Received: from localhost ([::1]:60492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5Sap-0002ol-3z for importer@patchew.org; Fri, 29 Jan 2021 07:09:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5Rnb-0004v3-W0 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:48 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:44897) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnZ-000673-16 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:47 -0500 Received: by mail-ed1-x529.google.com with SMTP id c2so10094517edr.11 for ; Fri, 29 Jan 2021 03:18:44 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QcUQysKIzSM/Au103fYACCSBXfd/a9CnayLthJR5WoQ=; b=DkBxv3KreXhtMeucU5pgPSuHUIGI6EuVRCRh2kfel0jJVOgUvPI/22gGs+Zdf+lYVj DVhbZMS9oD44rPQu4DuSD8O6DRgwcHO4kuT51SnfWfIdALl8hWuxGNIv/ZNsblWA1qbe wBYQ8Y1MsLoh0NH9O49Idu+UmCUcrR2RVnLnox0yRyo97nmzzyWCloXeTT2UHFzZj9fu bAeIzx2t8Clr6gSNPev+wO6qMhbEXblKA+qOpW21q6c2f+Evd+SA8Xz9ImzxfyjNnYzb sVoYd9BGnG96jCUrnpKgluQLgYlW8ZAiN9ixQ4WDsYGgMXsI65IrFw+v/x1YDW09i0PX /Uhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=QcUQysKIzSM/Au103fYACCSBXfd/a9CnayLthJR5WoQ=; b=YPWGyoEWhUQZ0jcsFG3XtC5jHRtvrKWA5kmn9dUO9VI1n8yerUAHmnSxUDsd3BKYBm rOM+GxMa82x/leDPL0ClNwl70ZxRkxHc+qcOmcIX+JB6E6SzL1BsxVbym2VItSo1Z1Jt ddywpkPD1Cn5WDRwHx8SAojaLo1/J5tT7NiQ2fAAuEP6tqoY9TSocMScFfvt26d35EY9 p5KYhc8fb2I0/qVAlmGWCsi1/PRxG/LnukCsWHSR2G6MCOf/MDiSkXueC/PpgMMFurox kCZ0igQ0F7fgqg82bTF1EeUpSvii5BSFEVmzL2ccv86hinLXztkMszMcxHBLbksZJ1vI ZvaA== X-Gm-Message-State: AOAM531+uvrowPnX22CBgsE7YdSODhXBlOPywD4AuX6rXfBUAJjO02ul 4zSF4GYfh8nNqCuqT92+1NE9porDSPaBLA== X-Google-Smtp-Source: ABdhPJzVQgiWbgg6OY+DpNCeTLarQ2H6cRcosMPX4KSPHerPgrg+dFdp+NOftEHUbftHk0pTXSAaTw== X-Received: by 2002:aa7:d511:: with SMTP id y17mr4590403edq.112.1611919123754; Fri, 29 Jan 2021 03:18:43 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 32/36] qapi/meson: Remove QMP from user-mode emulation Date: Fri, 29 Jan 2021 12:18:10 +0100 Message-Id: <20210129111814.566629-33-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x529.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Message-Id: <20210122204441.2145197-11-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- qapi/meson.build | 10 +++++++--- tests/meson.build | 7 ++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/qapi/meson.build b/qapi/meson.build index 2839871b47..b301a46f04 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -4,14 +4,18 @@ util_ss.add(files( 'qapi-dealloc-visitor.c', 'qapi-util.c', 'qapi-visit-core.c', - 'qmp-dispatch.c', - 'qmp-event.c', - 'qmp-registry.c', 'qobject-input-visitor.c', 'qobject-output-visitor.c', 'string-input-visitor.c', 'string-output-visitor.c', )) +if have_system or have_tools + util_ss.add(files( + 'qmp-dispatch.c', + 'qmp-event.c', + 'qmp-registry.c', + )) +endif =20 qapi_all_modules =3D [ 'acpi', diff --git a/tests/meson.build b/tests/meson.build index 6f1ff926d2..7d7da6a636 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -86,7 +86,6 @@ tests =3D { 'test-qobject-input-visitor': [testqapi], 'test-string-input-visitor': [testqapi], 'test-string-output-visitor': [testqapi], - 'test-qmp-event': [testqapi], 'test-opts-visitor': [testqapi], 'test-visitor-serialization': [testqapi], 'test-bitmap': [], @@ -117,6 +116,12 @@ tests =3D { 'test-qapi-util': [], } =20 +if have_system or have_tools + tests +=3D { + 'test-qmp-event': [testqapi], + } +endif + test_deps =3D { 'test-qht-par': qht_bench, } --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611922638; cv=none; d=zohomail.com; s=zohoarc; b=AYNQwSWAGIqd0UVDEyJui5JcPaaWEHA/DqwHV+OGDeYIJ9dotHyVauLJlewDiTCiAdmUg9fBGk9Bvd3IfpX9BPjTkcoxzkyhAxinnuXl5DPIhkLfWv37cw6E4FESVJq8bJzjwU7PYZpwTcusxPo3dl/mvN70FzGBdoNlBOIzJQs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611922638; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=huvW24PZNK/dw5M5AF0YaNslMI2dHZzb2WGv43aBMTs=; b=HH54ebcnKXope4POhhW4H/0tJXyDHRs2W099hU7dqEkBeP9KFxdmXCLzlHa/oXFMJpjxQPbLtE7rh71dY7l1W6IHgKJhU69nvPO9WPNlX5/iS9XGmZEF2p3DdXAImXmObr756HbIULCSMMXO+gFRb4e5ewuQN55tVwbSzGXV6oI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611922638016885.7859713245165; Fri, 29 Jan 2021 04:17:18 -0800 (PST) Received: from localhost ([::1]:45658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SiC-0008PU-Ri for importer@patchew.org; Fri, 29 Jan 2021 07:17:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5Rnd-0004yT-0i for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:49 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:38798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5RnZ-00067D-R5 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:48 -0500 Received: by mail-ed1-x52f.google.com with SMTP id s11so10132044edd.5 for ; Fri, 29 Jan 2021 03:18:45 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=huvW24PZNK/dw5M5AF0YaNslMI2dHZzb2WGv43aBMTs=; b=iaGZ1w6QQy95kqBMbB8Fd/4aoNJrEYD3aK1ZGhltnepwM7RDdXkfPwTBbM9d7HYPGt eFiExBj+txG133CyrTIoKfdIU/3M2PEICgXtXhCS2ABb2rrCOfSQzF+B2KH4cMH+oZcp 1XM6VvcsgNDYOmzFIMZkPmLBtiMtD+3SGgf6dOc2SDUH4ww6rYlk1hODKDebtd86L870 logWkS791gCmB7OQjquMUUy97PL6PvxVYMG3L3zPllzg1w7m1ZLPvTIJZM0n5w03POLb 5ua64I5FD7WgDCmcPQilkTI72LdzFhsEhX0WDotn1QVFJDM8UF/mDdu+bz2BWbrUVKDY raUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=huvW24PZNK/dw5M5AF0YaNslMI2dHZzb2WGv43aBMTs=; b=tsvReGYljMzRbQd5lZUHDQRc2HcYTTRK7ndEZaTu2rlUsm2o7MMGbxvfZVuigjQsaD 6DirWy91vjmbpsVYyv5PcF/fTvDeCU7Nm77whzsaZKH33NpuMwJ7Z9ShQfoa4Y9F/l9d NnfPgvLVLVvTGXuFqTw0ph7Wi8mrpEq82Mgj3fvP84/MGwFmAxBM+HXyit47Fr8ACe8f h1BOoValW1a/miUVbrg/fctkkfYQAjQMzeBTQIpcpEvFsJ7EG5Y2avOlybhqmKkvT/iF 5rLgMx9dOPrNX8WEhrJkYbvXflnjLZcNVux4QEs+TOkbMtCRGPggbibPqw3RDqE5eDx3 Wisg== X-Gm-Message-State: AOAM533dlRFI2R9zIXhFJAqCvk7wrPW5+XbYJYiQIHY/LPQwbO6WMNtZ G4h5vNPACBdYfVyL8uh3rdnZM9b1+98E/Q== X-Google-Smtp-Source: ABdhPJx5Sy6132eCxxxLgMjaQfi7KsBAiJJSgjurOkSnzd35/TRiU6TbpC7nnpaPrLabixoenzMpwg== X-Received: by 2002:aa7:d4d2:: with SMTP id t18mr4645412edr.238.1611919124631; Fri, 29 Jan 2021 03:18:44 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 33/36] qapi/meson: Restrict system-mode specific modules Date: Fri, 29 Jan 2021 12:18:11 +0100 Message-Id: <20210129111814.566629-34-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Message-Id: <20210122204441.2145197-12-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- qapi/meson.build | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qapi/meson.build b/qapi/meson.build index b301a46f04..7aca8d5048 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -18,8 +18,6 @@ if have_system or have_tools endif =20 qapi_all_modules =3D [ - 'acpi', - 'audio', 'authz', 'block', 'block-core', @@ -39,14 +37,10 @@ qapi_all_modules =3D [ 'misc-target', 'net', 'pragma', - 'pci', 'qom', - 'rdma', 'replay', - 'rocker', 'run-state', 'sockets', - 'tpm', 'trace', 'transaction', 'ui', @@ -54,7 +48,13 @@ qapi_all_modules =3D [ ] if have_system qapi_all_modules +=3D [ + 'acpi', + 'audio', 'qdev', + 'pci', + 'rdma', + 'rocker', + 'tpm', ] endif =20 --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611922829; cv=none; d=zohomail.com; s=zohoarc; b=DYcaftV0BA7FFIf9kJbQp1Srdz/sEsTHQ/dPwanAe575EcO29u6LW4AkOMelHlbkqeCbk6hV3dHMsY1DlxM0d4V1MyMIqVEz0/9hisYFRgOLjzOL8lDQfxdQ7qGP3mZdSqKhiyF2rOoomZKVFja1q2MpFd9g7w7foZFootRNAnA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611922829; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sl3y6bEhy3bScnbFrCsAd6nm60IxHuqvmVxfBJKGBIE=; b=KXa80t+8bQByJ9NJff8j5TPP4anFT8PNYgtY8EAXIRoNVpIuvsXzPseZDpwKN4vA+7S1Sc4CYdaGpZ9E8Dsw3zOD7C2MKyeYDXb+DZ8LtTjMS1LSXvBzNJObRfCOvODUpvwe1RoxUq4cYpptT5nL2bmrBNiaHbkxrR99qB1kvps= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611922829801836.5434702579549; Fri, 29 Jan 2021 04:20:29 -0800 (PST) Received: from localhost ([::1]:53430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SlH-0003AV-P4 for importer@patchew.org; Fri, 29 Jan 2021 07:20:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5Rnd-0004yh-81 for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:49 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:34265) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5Rna-00067s-IX for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:48 -0500 Received: by mail-ed1-x52f.google.com with SMTP id d22so10136603edy.1 for ; Fri, 29 Jan 2021 03:18:46 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sl3y6bEhy3bScnbFrCsAd6nm60IxHuqvmVxfBJKGBIE=; b=G1ivR2O7I5i6tBBLFV5xVQnD/MBFuW/0V3kDWEPX4GRBsosHuRTRKcuvbowlskeire OmhKygsRpeGnb5FtQL3EE/5eJSA+ClvhRukHzKwQsFtoRhKXarl4x0jRpRbx1+R39+Xe +13SiWIkbXNgbH3Z8lfwywwUpUctZpSdNtAXQmEdWOqlVWh9QJdztC+3NfR33kPI8IWt NnDzT8Y8hbuPx8kbHj10o4Xue6JMkhQOgHmBR8z9gPt3N83J0ihOsh8l4EjsGk9Yo6Xo ZQtqPQ0bpCHj6wtd1yMoYeiSTnscWs9Jc6oLoybWUIY72jRR+IP7IkUubfvN4RwS7s0N zW2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=sl3y6bEhy3bScnbFrCsAd6nm60IxHuqvmVxfBJKGBIE=; b=WshiB+TdfZs1OC4pfkpAiW1CEASzcqjwmgea7/BBPOiGgvOGoPOQP+WLoGZeapxk4P szK7+Ty0wJ+Pg+V2ymLVeQDyunOIHfQEc1wJJhyPnGiiGs2meFsvsQQtnRPcBCC4Cwwz gIeLQiqtbicd05gKiz7tCY55Q4RZrvXIcvaMb2PC5c6B4kHQ69PAv/CKAEIyjZqT4QE/ PzX7FI66n2ImCD1LVUNZKLGAEQ1EtMCHN57F4P0FbyJA6xaPGPMFyOECiYjMZxifre3p rdCTd9YQ5ibGvRXfnqkzTNkDM4mZ6ZZ1YfvKmuNMkqWvGTtUDUr9qjnVz5w8k3yVeLSV 1yTw== X-Gm-Message-State: AOAM532dMa/Xhg396aeivo0TtG9pSSVo8TlKGCRLHPn30UsiXXE+4JQC LO56kDJPq7iMz0zEobyo9RUIsozuP1MdwQ== X-Google-Smtp-Source: ABdhPJz5tLjpA6b/SLa+231Xht9LzKRdXPPjhwGvgtUj42vbldKJUDLCgLVBSmIxDRpe64p3CUGDdg== X-Received: by 2002:a05:6402:2d1:: with SMTP id b17mr4462404edx.95.1611919125438; Fri, 29 Jan 2021 03:18:45 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 34/36] qapi/meson: Restrict UI module to system emulation and tools Date: Fri, 29 Jan 2021 12:18:12 +0100 Message-Id: <20210129111814.566629-35-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini Message-Id: <20210122204441.2145197-13-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- qapi/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qapi/meson.build b/qapi/meson.build index 7aca8d5048..0652569bc4 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -43,7 +43,6 @@ qapi_all_modules =3D [ 'sockets', 'trace', 'transaction', - 'ui', 'yank', ] if have_system @@ -57,6 +56,11 @@ if have_system 'tpm', ] endif +if have_system or have_tools + qapi_all_modules +=3D [ + 'ui', + ] +endif =20 qapi_storage_daemon_modules =3D [ 'block-core', --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611922979; cv=none; d=zohomail.com; s=zohoarc; b=QKuczVW9SsSliosWldjmRCC0BoB3ObJVWK4JbtPRhkLlgKIr0JGwc76IMb7/s88qQg/r6TaURa6ExG5zWwABZFOK6HV+kkHMPO8y6SjAoL865/60wAnGfM3Gs6Pa5UF3kOw2acvM4/FK/6zZiKS+KwMUIeEJ7qaqUFjxmgWlDpE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611922979; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=stTF2/sCknD1Xyj0AFo0/kkV2ifJBYAMHO0Rp0GyT2E=; b=F1OrP5iAwO0OX0It9Y+1qlBR0Z06rSbEUV+Q37BX/ssFxVzw47FcffXIhCwWVs97Xszsnnwr3RQTlXg4ySIDWYPAt8id/jV6tQ/yhqDfInFy/Gy8t6R9O7aF4AF5Q/viIdxba/1DwvWrRJrdGstd979ys2rXMmJ3qRXZ6RPbkog= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611922979706915.6258277109073; Fri, 29 Jan 2021 04:22:59 -0800 (PST) Received: from localhost ([::1]:60864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5Sni-0006JG-K5 for importer@patchew.org; Fri, 29 Jan 2021 07:22:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5Rnd-0004yg-7V for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:49 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:39698) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5Rnb-00068d-Ni for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:49 -0500 Received: by mail-ed1-x534.google.com with SMTP id b21so10124071edy.6 for ; Fri, 29 Jan 2021 03:18:47 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=stTF2/sCknD1Xyj0AFo0/kkV2ifJBYAMHO0Rp0GyT2E=; b=DGjwM2ZeNXjyXudCjiXy+vSjCT3vHGSiyFSGNXqj2A64FWQFuVJjzEolYZV3Fthl6n 7sf04I/M7ux+8To4eMaFOCU32Et2aWkIENVQX9RQd54bWHvitQGDgkOFgMmBnrLMUXZ+ kXEScn2INn9IYxyu7enwBFl9BSYm1m/MEobScfuA3qqtCdWggFXS4ogNn9wwlsdXdNQQ 824w8R6Cka0Uqnuu4EfmNvvFuFsllKQSu4Ds+MBhtzve8rJNjR6bBS1mizihUxJZd7uH e1o8vWhbNPtD1pKg4UVTUetRnGkWlGOfxWlLfP3Tr556KB1WWSLXa0zCxnZoy8qLneZI NkxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=stTF2/sCknD1Xyj0AFo0/kkV2ifJBYAMHO0Rp0GyT2E=; b=mYpapusN2mOFmFK2x+EigBdrHCWAXyVPR/bu351JAu63Ldz/TdHvCdj2GYdut+Ii5C tImo7E42gCuedhUfO/u3B1u4KTl5ic9CsHAxOWaf1KISipMYhflnX/FIVYFOEgrFEGzf 91LE0s8lUiEcRrVxXHCNBbAA7MFoMVS+SuyblZsPpfwCzA0QR+pLvk3SY135mvcJ8AoB N3jgVb0dus6EOEN6J0TSoTjvI8VD0DAw6LrWGrwPC8d2uJPZQsHeiCTEJxqjfTF++sif d0eulPiYcNN/mdkq63Q+VLEkxcsVpkUJNY8I052KOTRCN3qe7j8eMw3664RqV06Dw+E3 Ddkg== X-Gm-Message-State: AOAM531G9KdfiDPTpAbUII6oxrRCnn6YgjWRJhHjuq9ZY3R2DNmvF0Rt UQbKsKAjjO9J4zFmheDXdqNtEgUByj5f4w== X-Google-Smtp-Source: ABdhPJy6uLyPSgt5be3arB3bxQM0HWUfHwVb/q9U+zVYzUQRisv05mjkdLhl/AbCX/Xlxsjwh0nh2w== X-Received: by 2002:a05:6402:11c7:: with SMTP id j7mr4435127edw.290.1611919126276; Fri, 29 Jan 2021 03:18:46 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 35/36] hvf: Fetch cr4 before evaluating CPUID(1) Date: Fri, 29 Jan 2021 12:18:13 +0100 Message-Id: <20210129111814.566629-36-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Asad Ali , Alexander Graf Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Alexander Graf The CPUID function 1 has a bit called OSXSAVE which tells user space the status of the CR4.OSXSAVE bit. Our generic CPUID function injects that bit based on the status of CR4. With Hypervisor.framework, we do not synchronize full CPU state often enough for this function to see the CR4 update before guest user space asks for it. To be on the save side, let's just always synchronize it when we receive a CPUID(1) request. That way we can set the bit with real confidence. Reported-by: Asad Ali Signed-off-by: Alexander Graf Message-Id: <20210123004129.6364-1-agraf@csgraf.de> Signed-off-by: Paolo Bonzini --- target/i386/hvf/hvf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index ed9356565c..79970f3d58 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -734,6 +734,10 @@ int hvf_vcpu_exec(CPUState *cpu) uint32_t rcx =3D (uint32_t)rreg(cpu->hvf_fd, HV_X86_RCX); uint32_t rdx =3D (uint32_t)rreg(cpu->hvf_fd, HV_X86_RDX); =20 + if (rax =3D=3D 1) { + /* CPUID1.ecx.OSXSAVE needs to know CR4 */ + env->cr[4] =3D rvmcs(cpu->hvf->fd, VMCS_GUEST_CR4); + } cpu_x86_cpuid(env, rax, rcx, &rax, &rbx, &rcx, &rdx); =20 wreg(cpu->hvf_fd, HV_X86_RAX, rax); --=20 2.29.2 From nobody Fri May 17 06:43:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611922345; cv=none; d=zohomail.com; s=zohoarc; b=Ypa9Nd6FTjF7dbl7xQ5XuxwiM8WgciS4/qv0h9Hh1h3F+qpC4hbduUxNzb+MLTeItHlfmnt6ljnwyPH8HcZAG4VGjXbM54WTba0qD7pP0HmPtf0/9EeKgT0/jMVYrS0cqfimz5p1NP1qW34pt/MQTH0L44lYY179me7Ctjq2tUI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611922345; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=z7SAxf70vdLe+3oJe0dcId8thjf5y7f8+/o9RGqIicA=; b=PWo+Y/6qMZFUiJu+Iz+V10lQsfq1QTLCYho2deN1skdKE8cBfsd2Y0I6R6qbjMt6Wjaz8Fsctu4fK+k5Hoa65Or0cfbQ6hgA/hDUqqYZRJ7dezC/Li6ulgJWEJD3G0pCuVKtJxkJv8UjA5ixkni/zPVhAZSBUTj3XoD6sGNCKe4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161192234518721.153276449587793; Fri, 29 Jan 2021 04:12:25 -0800 (PST) Received: from localhost ([::1]:37134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5SdU-0004vY-19 for importer@patchew.org; Fri, 29 Jan 2021 07:12:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5Rne-000506-5g for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:50 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:35844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5Rnc-00068q-HD for qemu-devel@nongnu.org; Fri, 29 Jan 2021 06:18:49 -0500 Received: by mail-ed1-x536.google.com with SMTP id d2so10150646edz.3 for ; Fri, 29 Jan 2021 03:18:48 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id zg7sm3745296ejb.31.2021.01.29.03.18.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 03:18:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z7SAxf70vdLe+3oJe0dcId8thjf5y7f8+/o9RGqIicA=; b=hWnXsmGvd0CRp8A0ak03F4I8XouAv0e7v6piuAnWTLy8lEHXhVk6ToZyjLVZ1S+dc7 Tu/lYUm8l5zTiS7FoTRwon7GunY6SzGjn47cQRSpbmmvQOPJouQ75AEp+ptKi22Ivq8u Y0PMr6oXTr2/MGLXy06eY+a1C/ZWYzs441LjWVx1t1hA7KriHawTaCvK7ZKcSIcUjYoO U0Lir8+w4El2OaRWZzHHIZz4D9x3e/cek7qLO8+3QhDpyXa2S32WswPQLNx8bZSPhOGo vkW1Sapxop3+RGtRU/zkkQ6YOe/TVPtsYp3s8GSVDQ0+x2rUT9oSHnrp6N1ZVfr/0FRQ O4fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=z7SAxf70vdLe+3oJe0dcId8thjf5y7f8+/o9RGqIicA=; b=mUthxVRhHKhiyJfCriiGveWWnz8SZnYhUHMM3IkxvKdTQi00lGUk6GJJMPPEk7gr4D 8F9+YkO4xOtVE8c0kMNn+stP3swBXNWssymekfipMEeTZrCSxh3jyEkqzU9E7n2SCdJF wwDKVypJ6mPsUCPB4mQsbVcEm9eaNjke/dYKgM4nyI71KfID5Vt8WFf8L8Nm2nJjXsv2 +fQG0YHIZ3DHeqZyeKrh7frq1MiLNAPlmg8C2oIAa1dlMoIrST3kjLUxVgoJoqeXf4gr RyZfnQwi/fOKidIrWIiVjufnVjpyCb870QtckMozJR5weVbfZwApH0r3f4qayt+iHkGk dozg== X-Gm-Message-State: AOAM530mFDqcZT3OTpVpoFbQ1PV/f+QdYcHQjb0stF31jtOpHXYbKSde RSlwxkMVs7YRPN87kMzGlWA7arSv4llIYw== X-Google-Smtp-Source: ABdhPJy8KK/NOOZh7sbtabaSCvUxykqB3UzOx3sGNEN26ien2dTUOW6zYfiXWksPzXzsaTULGpdzPQ== X-Received: by 2002:a50:fb04:: with SMTP id d4mr4380841edq.315.1611919127152; Fri, 29 Jan 2021 03:18:47 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 36/36] accel/kvm/kvm-all: Fix wrong return code handling in dirty log code Date: Fri, 29 Jan 2021 12:18:14 +0100 Message-Id: <20210129111814.566629-37-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210129111814.566629-1-pbonzini@redhat.com> References: <20210129111814.566629-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Thomas Huth The kvm_vm_ioctl() wrapper already returns -errno if the ioctl itself returned -1, so the callers of kvm_vm_ioctl() should not check for -1 but for a value < 0 instead. This problem has been fixed once already in commit b533f658a98325d0e4 but that commit missed that the ENOENT error code is not fatal for this ioctl, so the commit has been reverted in commit 50212d6346f33d6e since the problem occurred close to a pending release at that point in time. The plan was to fix it properly after the release, but it seems like this has been forgotten. So let's do it now finally instead. Resolves: https://bugs.launchpad.net/qemu/+bug/1294227 Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210129084354.42928-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 3feb17d965..7224596932 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -668,16 +668,19 @@ static int kvm_physical_sync_dirty_bitmap(KVMMemoryLi= stener *kml, =20 d.dirty_bitmap =3D mem->dirty_bmap; d.slot =3D mem->slot | (kml->as_id << 16); - if (kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) =3D=3D -1) { - DPRINTF("ioctl failed %d\n", errno); - ret =3D -1; + ret =3D kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d); + if (ret =3D=3D -ENOENT) { + /* kernel does not have dirty bitmap in this slot */ + ret =3D 0; + } else if (ret < 0) { + error_report("ioctl KVM_GET_DIRTY_LOG failed: %d", errno); goto out; + } else { + subsection.offset_within_region +=3D slot_offset; + subsection.size =3D int128_make64(slot_size); + kvm_get_dirty_pages_log_range(&subsection, d.dirty_bitmap); } =20 - subsection.offset_within_region +=3D slot_offset; - subsection.size =3D int128_make64(slot_size); - kvm_get_dirty_pages_log_range(&subsection, d.dirty_bitmap); - slot_offset +=3D slot_size; start_addr +=3D slot_size; size -=3D slot_size; @@ -774,8 +777,8 @@ static int kvm_log_clear_one_slot(KVMSlot *mem, int as_= id, uint64_t start, d.num_pages =3D bmap_npages; d.slot =3D mem->slot | (as_id << 16); =20 - if (kvm_vm_ioctl(s, KVM_CLEAR_DIRTY_LOG, &d) =3D=3D -1) { - ret =3D -errno; + ret =3D kvm_vm_ioctl(s, KVM_CLEAR_DIRTY_LOG, &d); + if (ret < 0 && ret !=3D -ENOENT) { error_report("%s: KVM_CLEAR_DIRTY_LOG failed, slot=3D%d, " "start=3D0x%"PRIx64", size=3D0x%"PRIx32", errno=3D%d", __func__, d.slot, (uint64_t)d.first_page, --=20 2.29.2