Received: by 2002:ac2:5cd0:0:0:0:0:0 with SMTP id f16csp1814480lfq; Mon, 28 Feb 2022 06:13:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWo/vX56qPlXErEnZnuTEQAXVIhqi+uGqQM7NKrqWHfEiIj7ClA3yCexGr0Cva/52vJFJ6 X-Received: by 2002:a81:1784:0:b0:2d6:b6cc:8f75 with SMTP id 126-20020a811784000000b002d6b6cc8f75mr20498210ywx.46.1646057587952; Mon, 28 Feb 2022 06:13:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646057587; cv=none; d=google.com; s=arc-20160816; b=PLKNMb9oKpwR1FCgpJwzatEFMLS8zKVO2JZeijl5rLPYX6WSzaap1dWnKlBj2Au/od 4KCST4qwclbOT8KHyoZiefSqRxkctUImKjdcZWJiqW/ExLzvvs0jT/p5K2jHzJPW7/qO vtEbFpo1UNnYqTIpFxW1usMx+sC1NjBsCJDHJOj+Uenov6AX/5mQlR4XlLxXdyAWHAq+ PJ7fAVzQz3JQ1mksXJaJzuuJjJvsJPj5oV1CYomMcZIXZ+TVAPHMAiB+88Gc9jxdKFnr m9CfcvuLTxZSAA+e3R2pjat/4sdYIp/TcWJzL9hDBEAgSVSjdR5kX626J6+3FKpFWz9/ YXXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:to:in-reply-to:message-id:subject:date :from; bh=ZxBm8emsh1bG46e6+DVXu+9bXaeo4IkAD+sD9oC+S1A=; b=uuRqkqoJzMMryXCiVXk2fWBHuKuAXRz8kpfq64bdkpz5aWJ5/dehaXLm14lMTj/ycd E1ZL+yX3XUWDHuX4hA5u+3XNttplwYz1FNoFpoAPaAc9A67ylkemLBDz3Egyan+ZUJmY BbI6axIJjZ4C/kjhn1R6cDGEhLGVHHYgIuAe+B0lg0nFIGfvOkxXRgGzyRFpNa1EZI4E c/Swu1o8zW1BJAj2Up/c0oM8hdLP+XsVARljlKHdhZdN9+UKKWxN0LCh4wQRmQtCRem2 aRuwaBXKrITO8v7L4LCqZLtPjCfwsh+/dhAUgZWHGwvgACuv7SWdjRSEQnwSza+lcdpi LHZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sr.ht Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d17-20020a5b00d1000000b006220e248ea7si9016539ybp.433.2022.02.28.06.13.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Feb 2022 06:13:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sr.ht Received: from localhost ([::1]:39988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOglv-0001Px-9c for alex.bennee@linaro.org; Mon, 28 Feb 2022 09:13:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOZn6-0001Ye-Ks; Mon, 28 Feb 2022 01:45:52 -0500 Received: from mail-b.sr.ht ([173.195.146.151]:58200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOZn2-0003IP-Lm; Mon, 28 Feb 2022 01:45:51 -0500 Authentication-Results: mail-b.sr.ht; dkim=none Received: from git.sr.ht (unknown [173.195.146.142]) by mail-b.sr.ht (Postfix) with ESMTPSA id 37CDE11EF41; Mon, 28 Feb 2022 06:45:46 +0000 (UTC) From: ~ubzeme Date: Mon, 28 Feb 2022 09:15:36 +0800 Subject: [PATCH qemu 4/7] hvf: rename struct hvf_slot to HVFSlot Message-ID: <164603074537.20094.1732342403585879912-4@git.sr.ht> X-Mailer: git.sr.ht In-Reply-To: <164603074537.20094.1732342403585879912-0@git.sr.ht> To: qemu-devel@nongnu.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received-SPF: pass client-ip=173.195.146.151; envelope-from=outgoing@sr.ht; helo=mail-b.sr.ht X-Spam_score_int: 18 X-Spam_score: 1.8 X-Spam_bar: + X-Spam_report: (1.8 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, FREEMAIL_FORGED_REPLYTO=2.095, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 28 Feb 2022 09:07:40 -0500 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ~ubzeme Cc: Yan-Jie Wang , qemu-devel@nongnu.org, Cameron Esfahani , Roman Bolshakov , Alexander Graf , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-devel" X-TUID: cYnt4VZMZTqy From: Yan-Jie Wang Follow the QEMU coding style. Structured type names are in CamelCase. Signed-off-by: Yan-Jie Wang --- accel/hvf/hvf-mem.c | 14 +++++++------- include/sysemu/hvf_int.h | 8 ++++---- target/i386/hvf/hvf.c | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/accel/hvf/hvf-mem.c b/accel/hvf/hvf-mem.c index e8cd6b9251..36ae1abc06 100644 --- a/accel/hvf/hvf-mem.c +++ b/accel/hvf/hvf-mem.c @@ -30,11 +30,11 @@ =20 #define HVF_NUM_SLOTS 32 =20 -static hvf_slot memslots[HVF_NUM_SLOTS]; +static HVFSlot memslots[HVF_NUM_SLOTS]; =20 -hvf_slot *hvf_find_overlap_slot(hwaddr start, hwaddr size) +HVFSlot *hvf_find_overlap_slot(hwaddr start, hwaddr size) { - hvf_slot *slot; + HVFSlot *slot; int x; for (x =3D 0; x < HVF_NUM_SLOTS; ++x) { slot =3D &memslots[x]; @@ -46,9 +46,9 @@ hvf_slot *hvf_find_overlap_slot(hwaddr start, hwaddr size) return NULL; } =20 -static hvf_slot *hvf_find_free_slot(void) +static HVFSlot *hvf_find_free_slot(void) { - hvf_slot *slot; + HVFSlot *slot; int x; for (x =3D 0; x < HVF_NUM_SLOTS; x++) { slot =3D &memslots[x]; @@ -91,7 +91,7 @@ static hwaddr hvf_align_section(MemoryRegionSection *sectio= n, =20 static void hvf_set_phys_mem(MemoryRegionSection *section, bool add) { - hvf_slot *slot; + HVFSlot *slot; hwaddr start, size, offset, delta; uint8_t *host_addr; MemoryRegion *area =3D section->mr; @@ -172,7 +172,7 @@ static void hvf_set_phys_mem(MemoryRegionSection *section= , bool add) =20 static void hvf_set_dirty_tracking(MemoryRegionSection *section, bool on) { - hvf_slot *slot; + HVFSlot *slot; =20 slot =3D hvf_find_overlap_slot( section->offset_within_address_space, diff --git a/include/sysemu/hvf_int.h b/include/sysemu/hvf_int.h index 2c4a97debe..0aafbc9357 100644 --- a/include/sysemu/hvf_int.h +++ b/include/sysemu/hvf_int.h @@ -17,17 +17,17 @@ #include #endif =20 -/* hvf_slot flags */ +/* HVFSlot flags */ #define HVF_SLOT_LOG (1 << 0) #define HVF_SLOT_READONLY (1 << 1) =20 -typedef struct hvf_slot { +typedef struct HVFSlot { hwaddr start; hwaddr size; /* 0 if the slot is free */ hwaddr offset; /* offset within memory region */ uint32_t flags; MemoryRegion *region; -} hvf_slot; +} HVFSlot; =20 typedef struct hvf_vcpu_caps { uint64_t vmx_cap_pinbased; @@ -58,7 +58,7 @@ int hvf_arch_init(void); int hvf_arch_init_vcpu(CPUState *cpu); void hvf_arch_vcpu_destroy(CPUState *cpu); int hvf_vcpu_exec(CPUState *); -hvf_slot *hvf_find_overlap_slot(hwaddr, hwaddr); +HVFSlot *hvf_find_overlap_slot(hwaddr, hwaddr); int hvf_put_registers(CPUState *); int hvf_get_registers(CPUState *); void hvf_kick_vcpu_thread(CPUState *cpu); diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 4ba6e82fab..2ddb4fc825 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -113,7 +113,7 @@ void hvf_handle_io(CPUArchState *env, uint16_t port, void= *buffer, } } =20 -static bool ept_emulation_fault(hvf_slot *slot, uint64_t gpa, uint64_t ept_q= ual) +static bool ept_emulation_fault(HVFSlot *slot, uint64_t gpa, uint64_t ept_qu= al) { int read, write; =20 @@ -469,7 +469,7 @@ int hvf_vcpu_exec(CPUState *cpu) /* Need to check if MMIO or unmapped fault */ case EXIT_REASON_EPT_FAULT: { - hvf_slot *slot; + HVFSlot *slot; uint64_t gpa =3D rvmcs(cpu->hvf->fd, VMCS_GUEST_PHYSICAL_ADDRESS= ); =20 if (((idtvec_info & VMCS_IDT_VEC_VALID) =3D=3D 0) && --=20 2.34.1