[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 19/20] Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument
On Thu, 20 Feb 2020 14:05:47 +0100 Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> wrote: > Use an explicit boolean type. > > This commit was produced with the included Coccinelle script > scripts/coccinelle/exec_rw_const. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> > --- > scripts/coccinelle/exec_rw_const.cocci | 14 ++++++++++++++ > include/exec/cpu-common.h | 4 ++-- > hw/display/exynos4210_fimd.c | 3 ++- > hw/display/milkymist-tmu2.c | 8 ++++---- > hw/display/omap_dss.c | 2 +- > hw/display/ramfb.c | 2 +- > hw/misc/pc-testdev.c | 2 +- > hw/nvram/spapr_nvram.c | 4 ++-- > hw/ppc/ppc440_uc.c | 6 ++++-- > hw/ppc/spapr_hcall.c | 4 ++-- > hw/s390x/ipl.c | 2 +- > hw/s390x/s390-pci-bus.c | 2 +- > hw/s390x/virtio-ccw.c | 2 +- > hw/xen/xen_pt_graphics.c | 2 +- > target/i386/hax-all.c | 4 ++-- > target/s390x/excp_helper.c | 2 +- > target/s390x/helper.c | 6 +++--- > 17 files changed, 43 insertions(+), 26 deletions(-) > > diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c > index 7773499d7f..0817874b48 100644 > --- a/hw/s390x/ipl.c > +++ b/hw/s390x/ipl.c > @@ -626,7 +626,7 @@ static void s390_ipl_prepare_qipl(S390CPU *cpu) > uint8_t *addr; > uint64_t len = 4096; > > - addr = cpu_physical_memory_map(cpu->env.psa, &len, 1); > + addr = cpu_physical_memory_map(cpu->env.psa, &len, true); > if (!addr || len < QIPL_ADDRESS + sizeof(QemuIplParameters)) { > error_report("Cannot set QEMU IPL parameters"); > return; > diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c > index 7c6a2b3c63..ed8be124da 100644 > --- a/hw/s390x/s390-pci-bus.c > +++ b/hw/s390x/s390-pci-bus.c > @@ -641,7 +641,7 @@ static uint8_t set_ind_atomic(uint64_t ind_loc, uint8_t > to_be_set) > hwaddr len = 1; > uint8_t *ind_addr; > > - ind_addr = cpu_physical_memory_map(ind_loc, &len, 1); > + ind_addr = cpu_physical_memory_map(ind_loc, &len, true); > if (!ind_addr) { > s390_pci_generate_error_event(ERR_EVENT_AIRERR, 0, 0, 0, 0); > return -1; > diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c > index 13f57e7b67..50cf95b781 100644 > --- a/hw/s390x/virtio-ccw.c > +++ b/hw/s390x/virtio-ccw.c > @@ -790,7 +790,7 @@ static uint8_t virtio_set_ind_atomic(SubchDev *sch, > uint64_t ind_loc, > hwaddr len = 1; > uint8_t *ind_addr; > > - ind_addr = cpu_physical_memory_map(ind_loc, &len, 1); > + ind_addr = cpu_physical_memory_map(ind_loc, &len, true); > if (!ind_addr) { > error_report("%s(%x.%x.%04x): unable to access indicator", > __func__, sch->cssid, sch->ssid, sch->schid); > diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c > index 1e9d6f20c1..3b58d10df3 100644 > --- a/target/s390x/excp_helper.c > +++ b/target/s390x/excp_helper.c > @@ -393,7 +393,7 @@ static int mchk_store_vregs(CPUS390XState *env, uint64_t > mcesao) > MchkExtSaveArea *sa; > int i; > > - sa = cpu_physical_memory_map(mcesao, &len, 1); > + sa = cpu_physical_memory_map(mcesao, &len, true); > if (!sa) { > return -EFAULT; > } > diff --git a/target/s390x/helper.c b/target/s390x/helper.c > index a3a49164e4..b810ad431e 100644 > --- a/target/s390x/helper.c > +++ b/target/s390x/helper.c > @@ -151,7 +151,7 @@ LowCore *cpu_map_lowcore(CPUS390XState *env) > LowCore *lowcore; > hwaddr len = sizeof(LowCore); > > - lowcore = cpu_physical_memory_map(env->psa, &len, 1); > + lowcore = cpu_physical_memory_map(env->psa, &len, true); > > if (len < sizeof(LowCore)) { > cpu_abort(env_cpu(env), "Could not map lowcore\n"); > @@ -246,7 +246,7 @@ int s390_store_status(S390CPU *cpu, hwaddr addr, bool > store_arch) > hwaddr len = sizeof(*sa); > int i; > > - sa = cpu_physical_memory_map(addr, &len, 1); > + sa = cpu_physical_memory_map(addr, &len, true); > if (!sa) { > return -EFAULT; > } > @@ -298,7 +298,7 @@ int s390_store_adtl_status(S390CPU *cpu, hwaddr addr, > hwaddr len) > hwaddr save = len; > int i; > > - sa = cpu_physical_memory_map(addr, &save, 1); > + sa = cpu_physical_memory_map(addr, &save, true); > if (!sa) { > return -EFAULT; > } s390 parts Acked-by: Cornelia Huck <cohuck@xxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |