Forráskód Böngészése

Fix 'writeable' typos

We have about 30 instances of the typo/variant spelling 'writeable',
and over 500 of the more common 'writable'.  Standardize on the
latter.

Change produced with:

  sed -i -e 's/\([Ww][Rr][Ii][Tt]\)[Ee]\([Aa][Bb][Ll][Ee]\)/\1\2/g' $(git grep -il writeable)

and then hand-undoing the instance in linux-headers/linux/kvm.h.

Most of these changes are in comments or documentation; the
exceptions are:
 * a local variable in accel/hvf/hvf-accel-ops.c
 * a local variable in accel/kvm/kvm-all.c
 * the PMCR_WRITABLE_MASK macro in target/arm/internals.h
 * the EPT_VIOLATION_GPA_WRITABLE macro in target/i386/hvf/vmcs.h
   (which is never used anywhere)
 * the AR_TYPE_WRITABLE_MASK macro in target/i386/hvf/vmx.h
   (which is never used anywhere)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Message-id: 20220505095015.2714666-1-peter.maydell@linaro.org
Peter Maydell 3 éve
szülő
commit
9323e79f10

+ 2 - 2
accel/hvf/hvf-accel-ops.c

@@ -120,12 +120,12 @@ static void hvf_set_phys_mem(MemoryRegionSection *section, bool add)
 {
 {
     hvf_slot *mem;
     hvf_slot *mem;
     MemoryRegion *area = section->mr;
     MemoryRegion *area = section->mr;
-    bool writeable = !area->readonly && !area->rom_device;
+    bool writable = !area->readonly && !area->rom_device;
     hv_memory_flags_t flags;
     hv_memory_flags_t flags;
     uint64_t page_size = qemu_real_host_page_size();
     uint64_t page_size = qemu_real_host_page_size();
 
 
     if (!memory_region_is_ram(area)) {
     if (!memory_region_is_ram(area)) {
-        if (writeable) {
+        if (writable) {
             return;
             return;
         } else if (!memory_region_is_romd(area)) {
         } else if (!memory_region_is_romd(area)) {
             /*
             /*

+ 2 - 2
accel/kvm/kvm-all.c

@@ -1346,13 +1346,13 @@ static void kvm_set_phys_mem(KVMMemoryListener *kml,
     KVMSlot *mem;
     KVMSlot *mem;
     int err;
     int err;
     MemoryRegion *mr = section->mr;
     MemoryRegion *mr = section->mr;
-    bool writeable = !mr->readonly && !mr->rom_device;
+    bool writable = !mr->readonly && !mr->rom_device;
     hwaddr start_addr, size, slot_size, mr_offset;
     hwaddr start_addr, size, slot_size, mr_offset;
     ram_addr_t ram_start_offset;
     ram_addr_t ram_start_offset;
     void *ram;
     void *ram;
 
 
     if (!memory_region_is_ram(mr)) {
     if (!memory_region_is_ram(mr)) {
-        if (writeable || !kvm_readonly_mem_allowed) {
+        if (writable || !kvm_readonly_mem_allowed) {
             return;
             return;
         } else if (!mr->romd_mode) {
         } else if (!mr->romd_mode) {
             /* If the memory device is not in romd_mode, then we actually want
             /* If the memory device is not in romd_mode, then we actually want

+ 3 - 3
accel/tcg/user-exec.c

@@ -101,10 +101,10 @@ MMUAccessType adjust_signal_pc(uintptr_t *pc, bool is_write)
  * Return true if the write fault has been handled, and should be re-tried.
  * Return true if the write fault has been handled, and should be re-tried.
  *
  *
  * Note that it is important that we don't call page_unprotect() unless
  * Note that it is important that we don't call page_unprotect() unless
- * this is really a "write to nonwriteable page" fault, because
+ * this is really a "write to nonwritable page" fault, because
  * page_unprotect() assumes that if it is called for an access to
  * page_unprotect() assumes that if it is called for an access to
- * a page that's writeable this means we had two threads racing and
- * another thread got there first and already made the page writeable;
+ * a page that's writable this means we had two threads racing and
+ * another thread got there first and already made the page writable;
  * so we will retry the access. If we were to call page_unprotect()
  * so we will retry the access. If we were to call page_unprotect()
  * for some other kind of fault that should really be passed to the
  * for some other kind of fault that should really be passed to the
  * guest, we'd end up in an infinite loop of retrying the faulting access.
  * guest, we'd end up in an infinite loop of retrying the faulting access.

+ 1 - 1
docs/interop/vhost-user.rst

@@ -222,7 +222,7 @@ Virtio device config space
 :size: a 32-bit configuration space access size in bytes
 :size: a 32-bit configuration space access size in bytes
 
 
 :flags: a 32-bit value:
 :flags: a 32-bit value:
-  - 0: Vhost front-end messages used for writeable fields
+  - 0: Vhost front-end messages used for writable fields
   - 1: Vhost front-end messages used for live migration
   - 1: Vhost front-end messages used for live migration
 
 
 :payload: Size bytes array holding the contents of the virtio
 :payload: Size bytes array holding the contents of the virtio

+ 2 - 2
docs/specs/vmgenid.txt

@@ -153,7 +153,7 @@ change the contents of the memory at runtime, specifically when starting a
 backed-up or snapshotted image.  In order to do this, QEMU must know the
 backed-up or snapshotted image.  In order to do this, QEMU must know the
 address that has been allocated.
 address that has been allocated.
 
 
-The mechanism chosen for this memory sharing is writeable fw_cfg blobs.
+The mechanism chosen for this memory sharing is writable fw_cfg blobs.
 These are data object that are visible to both QEMU and guests, and are
 These are data object that are visible to both QEMU and guests, and are
 addressable as sequential files.
 addressable as sequential files.
 
 
@@ -164,7 +164,7 @@ Two fw_cfg blobs are used in this case:
 /etc/vmgenid_guid - contains the actual VM Generation ID GUID
 /etc/vmgenid_guid - contains the actual VM Generation ID GUID
                   - read-only to the guest
                   - read-only to the guest
 /etc/vmgenid_addr - contains the address of the downloaded vmgenid blob
 /etc/vmgenid_addr - contains the address of the downloaded vmgenid blob
-                  - writeable by the guest
+                  - writable by the guest
 
 
 
 
 QEMU sends the following commands to the guest at startup:
 QEMU sends the following commands to the guest at startup:

+ 1 - 1
hw/acpi/ghes.c

@@ -249,7 +249,7 @@ void build_ghes_error_table(GArray *hardware_errors, BIOSLinker *linker)
     for (i = 0; i < ACPI_GHES_ERROR_SOURCE_COUNT; i++) {
     for (i = 0; i < ACPI_GHES_ERROR_SOURCE_COUNT; i++) {
         /*
         /*
          * Initialize the value of read_ack_register to 1, so GHES can be
          * Initialize the value of read_ack_register to 1, so GHES can be
-         * writeable after (re)boot.
+         * writable after (re)boot.
          * ACPI 6.2: 18.3.2.8 Generic Hardware Error Source version 2
          * ACPI 6.2: 18.3.2.8 Generic Hardware Error Source version 2
          * (GHESv2 - Type 10)
          * (GHESv2 - Type 10)
          */
          */

+ 1 - 1
hw/intc/arm_gicv3_cpuif.c

@@ -2047,7 +2047,7 @@ static void icc_ctlr_el3_write(CPUARMState *env, const ARMCPRegInfo *ri,
         cs->icc_ctlr_el1[GICV3_S] |= ICC_CTLR_EL1_CBPR;
         cs->icc_ctlr_el1[GICV3_S] |= ICC_CTLR_EL1_CBPR;
     }
     }
 
 
-    /* The only bit stored in icc_ctlr_el3 which is writeable is EOIMODE_EL3: */
+    /* The only bit stored in icc_ctlr_el3 which is writable is EOIMODE_EL3: */
     mask = ICC_CTLR_EL3_EOIMODE_EL3;
     mask = ICC_CTLR_EL3_EOIMODE_EL3;
 
 
     cs->icc_ctlr_el3 &= ~mask;
     cs->icc_ctlr_el3 &= ~mask;

+ 1 - 1
hw/intc/arm_gicv3_dist.c

@@ -611,7 +611,7 @@ static bool gicd_writel(GICv3State *s, hwaddr offset,
         if (value & mask & GICD_CTLR_DS) {
         if (value & mask & GICD_CTLR_DS) {
             /* We just set DS, so the ARE_NS and EnG1S bits are now RES0.
             /* We just set DS, so the ARE_NS and EnG1S bits are now RES0.
              * Note that this is a one-way transition because if DS is set
              * Note that this is a one-way transition because if DS is set
-             * then it's not writeable, so it can only go back to 0 with a
+             * then it's not writable, so it can only go back to 0 with a
              * hardware reset.
              * hardware reset.
              */
              */
             s->gicd_ctlr &= ~(GICD_CTLR_EN_GRP1S | GICD_CTLR_ARE_NS);
             s->gicd_ctlr &= ~(GICD_CTLR_EN_GRP1S | GICD_CTLR_ARE_NS);

+ 2 - 2
hw/intc/arm_gicv3_redist.c

@@ -257,7 +257,7 @@ static void gicr_write_vpendbaser(GICv3CPUState *cs, uint64_t newval)
 
 
     /*
     /*
      * The DIRTY bit is read-only and for us is always zero;
      * The DIRTY bit is read-only and for us is always zero;
-     * other fields are writeable.
+     * other fields are writable.
      */
      */
     newval &= R_GICR_VPENDBASER_INNERCACHE_MASK |
     newval &= R_GICR_VPENDBASER_INNERCACHE_MASK |
         R_GICR_VPENDBASER_SHAREABILITY_MASK |
         R_GICR_VPENDBASER_SHAREABILITY_MASK |
@@ -491,7 +491,7 @@ static MemTxResult gicr_writel(GICv3CPUState *cs, hwaddr offset,
         /* RAZ/WI for our implementation */
         /* RAZ/WI for our implementation */
         return MEMTX_OK;
         return MEMTX_OK;
     case GICR_WAKER:
     case GICR_WAKER:
-        /* Only the ProcessorSleep bit is writeable. When the guest sets
+        /* Only the ProcessorSleep bit is writable. When the guest sets
          * it it requests that we transition the channel between the
          * it it requests that we transition the channel between the
          * redistributor and the cpu interface to quiescent, and that
          * redistributor and the cpu interface to quiescent, and that
          * we set the ChildrenAsleep bit once the inteface has reached the
          * we set the ChildrenAsleep bit once the inteface has reached the

+ 1 - 1
hw/intc/riscv_aclint.c

@@ -463,7 +463,7 @@ static void riscv_aclint_swi_realize(DeviceState *dev, Error **errp)
     /* Claim software interrupt bits */
     /* Claim software interrupt bits */
     for (i = 0; i < swi->num_harts; i++) {
     for (i = 0; i < swi->num_harts; i++) {
         RISCVCPU *cpu = RISCV_CPU(qemu_get_cpu(swi->hartid_base + i));
         RISCVCPU *cpu = RISCV_CPU(qemu_get_cpu(swi->hartid_base + i));
-        /* We don't claim mip.SSIP because it is writeable by software */
+        /* We don't claim mip.SSIP because it is writable by software */
         if (riscv_cpu_claim_interrupts(cpu, swi->sswi ? 0 : MIP_MSIP) < 0) {
         if (riscv_cpu_claim_interrupts(cpu, swi->sswi ? 0 : MIP_MSIP) < 0) {
             error_report("MSIP already claimed");
             error_report("MSIP already claimed");
             exit(1);
             exit(1);

+ 1 - 1
hw/intc/riscv_aplic.c

@@ -646,7 +646,7 @@ static void riscv_aplic_write(void *opaque, hwaddr addr, uint64_t value,
     }
     }
 
 
     if (addr == APLIC_DOMAINCFG) {
     if (addr == APLIC_DOMAINCFG) {
-        /* Only IE bit writeable at the moment */
+        /* Only IE bit writable at the moment */
         value &= APLIC_DOMAINCFG_IE;
         value &= APLIC_DOMAINCFG_IE;
         aplic->domaincfg = value;
         aplic->domaincfg = value;
     } else if ((APLIC_SOURCECFG_BASE <= addr) &&
     } else if ((APLIC_SOURCECFG_BASE <= addr) &&

+ 1 - 1
hw/pci/shpc.c

@@ -456,7 +456,7 @@ static int shpc_cap_add_config(PCIDevice *d, Error **errp)
     pci_set_byte(config + SHPC_CAP_CxP, 0);
     pci_set_byte(config + SHPC_CAP_CxP, 0);
     pci_set_long(config + SHPC_CAP_DWORD_DATA, 0);
     pci_set_long(config + SHPC_CAP_DWORD_DATA, 0);
     d->shpc->cap = config_offset;
     d->shpc->cap = config_offset;
-    /* Make dword select and data writeable. */
+    /* Make dword select and data writable. */
     pci_set_byte(d->wmask + config_offset + SHPC_CAP_DWORD_SELECT, 0xff);
     pci_set_byte(d->wmask + config_offset + SHPC_CAP_DWORD_SELECT, 0xff);
     pci_set_long(d->wmask + config_offset + SHPC_CAP_DWORD_DATA, 0xffffffff);
     pci_set_long(d->wmask + config_offset + SHPC_CAP_DWORD_DATA, 0xffffffff);
     return 0;
     return 0;

+ 1 - 1
hw/scsi/mfi.h

@@ -633,7 +633,7 @@ struct mfi_ctrl_props {
                               * metadata and user data
                               * metadata and user data
                               * 1=5%, 2=10%, 3=15% and so on
                               * 1=5%, 2=10%, 3=15% and so on
                               */
                               */
-    uint8_t viewSpace;       /* snapshot writeable VIEWs
+    uint8_t viewSpace;       /* snapshot writable VIEWs
                               * capacity as a % of source LD
                               * capacity as a % of source LD
                               * capacity. 0=READ only
                               * capacity. 0=READ only
                               * 1=5%, 2=10%, 3=15% and so on
                               * 1=5%, 2=10%, 3=15% and so on

+ 1 - 1
hw/sparc64/sun4u_iommu.c

@@ -165,7 +165,7 @@ static IOMMUTLBEntry sun4u_translate_iommu(IOMMUMemoryRegion *iommu,
     }
     }
 
 
     if (tte & IOMMU_TTE_DATA_W) {
     if (tte & IOMMU_TTE_DATA_W) {
-        /* Writeable */
+        /* Writable */
         ret.perm = IOMMU_RW;
         ret.perm = IOMMU_RW;
     } else {
     } else {
         ret.perm = IOMMU_RO;
         ret.perm = IOMMU_RO;

+ 1 - 1
hw/timer/sse-timer.c

@@ -324,7 +324,7 @@ static void sse_timer_write(void *opaque, hwaddr offset, uint64_t value,
     {
     {
         uint32_t old_ctl = s->cntp_aival_ctl;
         uint32_t old_ctl = s->cntp_aival_ctl;
 
 
-        /* EN bit is writeable; CLR bit is write-0-to-clear, write-1-ignored */
+        /* EN bit is writable; CLR bit is write-0-to-clear, write-1-ignored */
         s->cntp_aival_ctl &= ~R_CNTP_AIVAL_CTL_EN_MASK;
         s->cntp_aival_ctl &= ~R_CNTP_AIVAL_CTL_EN_MASK;
         s->cntp_aival_ctl |= value & R_CNTP_AIVAL_CTL_EN_MASK;
         s->cntp_aival_ctl |= value & R_CNTP_AIVAL_CTL_EN_MASK;
         if (!(value & R_CNTP_AIVAL_CTL_CLR_MASK)) {
         if (!(value & R_CNTP_AIVAL_CTL_CLR_MASK)) {

+ 1 - 1
python/qemu/machine/machine.py

@@ -495,7 +495,7 @@ def _early_cleanup(self) -> None:
         """
         """
         # If we keep the console socket open, we may deadlock waiting
         # If we keep the console socket open, we may deadlock waiting
         # for QEMU to exit, while QEMU is waiting for the socket to
         # for QEMU to exit, while QEMU is waiting for the socket to
-        # become writeable.
+        # become writable.
         if self._console_socket is not None:
         if self._console_socket is not None:
             self._console_socket.close()
             self._console_socket.close()
             self._console_socket = None
             self._console_socket = None

+ 1 - 1
target/arm/gdbstub.c

@@ -118,7 +118,7 @@ int arm_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
             /*
             /*
              * Don't allow writing to XPSR.Exception as it can cause
              * Don't allow writing to XPSR.Exception as it can cause
              * a transition into or out of handler mode (it's not
              * a transition into or out of handler mode (it's not
-             * writeable via the MSR insn so this is a reasonable
+             * writable via the MSR insn so this is a reasonable
              * restriction). Other fields are safe to update.
              * restriction). Other fields are safe to update.
              */
              */
             xpsr_write(env, tmp, ~XPSR_EXCP);
             xpsr_write(env, tmp, ~XPSR_EXCP);

+ 2 - 2
target/arm/helper.c

@@ -1411,8 +1411,8 @@ static void pmcr_write(CPUARMState *env, const ARMCPRegInfo *ri,
         }
         }
     }
     }
 
 
-    env->cp15.c9_pmcr &= ~PMCR_WRITEABLE_MASK;
-    env->cp15.c9_pmcr |= (value & PMCR_WRITEABLE_MASK);
+    env->cp15.c9_pmcr &= ~PMCR_WRITABLE_MASK;
+    env->cp15.c9_pmcr |= (value & PMCR_WRITABLE_MASK);
 
 
     pmu_op_finish(env);
     pmu_op_finish(env);
 }
 }

+ 2 - 2
target/arm/hvf/hvf.c

@@ -978,8 +978,8 @@ static int hvf_sysreg_write(CPUState *cpu, uint32_t reg, uint64_t val)
             }
             }
         }
         }
 
 
-        env->cp15.c9_pmcr &= ~PMCR_WRITEABLE_MASK;
-        env->cp15.c9_pmcr |= (val & PMCR_WRITEABLE_MASK);
+        env->cp15.c9_pmcr &= ~PMCR_WRITABLE_MASK;
+        env->cp15.c9_pmcr |= (val & PMCR_WRITABLE_MASK);
 
 
         pmu_op_finish(env);
         pmu_op_finish(env);
         break;
         break;

+ 2 - 2
target/arm/internals.h

@@ -1280,10 +1280,10 @@ enum MVEECIState {
 #define PMCRP   0x2
 #define PMCRP   0x2
 #define PMCRE   0x1
 #define PMCRE   0x1
 /*
 /*
- * Mask of PMCR bits writeable by guest (not including WO bits like C, P,
+ * Mask of PMCR bits writable by guest (not including WO bits like C, P,
  * which can be written as 1 to trigger behaviour but which stay RAZ).
  * which can be written as 1 to trigger behaviour but which stay RAZ).
  */
  */
-#define PMCR_WRITEABLE_MASK (PMCRLC | PMCRDP | PMCRX | PMCRD | PMCRE)
+#define PMCR_WRITABLE_MASK (PMCRLC | PMCRDP | PMCRX | PMCRD | PMCRE)
 
 
 #define PMXEVTYPER_P          0x80000000
 #define PMXEVTYPER_P          0x80000000
 #define PMXEVTYPER_U          0x40000000
 #define PMXEVTYPER_U          0x40000000

+ 1 - 1
target/i386/cpu-sysemu.c

@@ -103,7 +103,7 @@ static void x86_cpu_to_dict(X86CPU *cpu, QDict *props)
 
 
 /* Convert CPU model data from X86CPU object to a property dictionary
 /* Convert CPU model data from X86CPU object to a property dictionary
  * that can recreate exactly the same CPU model, including every
  * that can recreate exactly the same CPU model, including every
- * writeable QOM property.
+ * writable QOM property.
  */
  */
 static void x86_cpu_to_dict_full(X86CPU *cpu, QDict *props)
 static void x86_cpu_to_dict_full(X86CPU *cpu, QDict *props)
 {
 {

+ 1 - 1
target/i386/hvf/vmcs.h

@@ -330,7 +330,7 @@
 #define EPT_VIOLATION_DATA_WRITE (1UL << 1)
 #define EPT_VIOLATION_DATA_WRITE (1UL << 1)
 #define EPT_VIOLATION_INST_FETCH (1UL << 2)
 #define EPT_VIOLATION_INST_FETCH (1UL << 2)
 #define EPT_VIOLATION_GPA_READABLE (1UL << 3)
 #define EPT_VIOLATION_GPA_READABLE (1UL << 3)
-#define EPT_VIOLATION_GPA_WRITEABLE (1UL << 4)
+#define EPT_VIOLATION_GPA_WRITABLE (1UL << 4)
 #define EPT_VIOLATION_GPA_EXECUTABLE (1UL << 5)
 #define EPT_VIOLATION_GPA_EXECUTABLE (1UL << 5)
 #define EPT_VIOLATION_GLA_VALID (1UL << 7)
 #define EPT_VIOLATION_GLA_VALID (1UL << 7)
 #define EPT_VIOLATION_XLAT_VALID (1UL << 8)
 #define EPT_VIOLATION_XLAT_VALID (1UL << 8)

+ 1 - 1
target/i386/hvf/vmx.h

@@ -80,7 +80,7 @@ static inline uint64_t cap2ctrl(uint64_t cap, uint64_t ctrl)
 
 
 #define AR_TYPE_ACCESSES_MASK 1
 #define AR_TYPE_ACCESSES_MASK 1
 #define AR_TYPE_READABLE_MASK (1 << 1)
 #define AR_TYPE_READABLE_MASK (1 << 1)
-#define AR_TYPE_WRITEABLE_MASK (1 << 2)
+#define AR_TYPE_WRITABLE_MASK (1 << 2)
 #define AR_TYPE_CODE_MASK (1 << 3)
 #define AR_TYPE_CODE_MASK (1 << 3)
 #define AR_TYPE_MASK 0x0f
 #define AR_TYPE_MASK 0x0f
 #define AR_TYPE_BUSY_64_TSS 11
 #define AR_TYPE_BUSY_64_TSS 11

+ 1 - 1
target/s390x/ioinst.c

@@ -284,7 +284,7 @@ void ioinst_handle_stsch(S390CPU *cpu, uint64_t reg1, uint32_t ipb,
         g_assert(!s390_is_pv());
         g_assert(!s390_is_pv());
         /*
         /*
          * As operand exceptions have a lower priority than access exceptions,
          * As operand exceptions have a lower priority than access exceptions,
-         * we check whether the memory area is writeable (injecting the
+         * we check whether the memory area is writable (injecting the
          * access execption if it is not) first.
          * access execption if it is not) first.
          */
          */
         if (!s390_cpu_virt_mem_check_write(cpu, addr, ar, sizeof(schib))) {
         if (!s390_cpu_virt_mem_check_write(cpu, addr, ar, sizeof(schib))) {

+ 1 - 1
tests/tcg/x86_64/system/boot.S

@@ -56,7 +56,7 @@
 	*
 	*
 	* - `ebx`: contains the physical memory address where the loader has placed
 	* - `ebx`: contains the physical memory address where the loader has placed
 	*          the boot start info structure.
 	*          the boot start info structure.
-	* - `cr0`: bit 0 (PE) must be set. All the other writeable bits are cleared.
+	* - `cr0`: bit 0 (PE) must be set. All the other writable bits are cleared.
 	* - `cr4`: all bits are cleared.
 	* - `cr4`: all bits are cleared.
 	* - `cs `: must be a 32-bit read/execute code segment with a base of ‘0’
 	* - `cs `: must be a 32-bit read/execute code segment with a base of ‘0’
 	*          and a limit of ‘0xFFFFFFFF’. The selector value is unspecified.
 	*          and a limit of ‘0xFFFFFFFF’. The selector value is unspecified.