From: Mark McLoughlin <markmc@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing
Date: Thu, 15 Jan 2009 14:24:18 +0000 [thread overview]
Message-ID: <1232029458.5205.21.camel@localhost.localdomain> (raw)
In-Reply-To: <496F4017.5020603@redhat.com>
On Thu, 2009-01-15 at 15:54 +0200, Avi Kivity wrote:
> Mark McLoughlin wrote:
> > Use write() instead of write_rom() to write the device number.
> >
> > Cast the struct option_rom_header* to uint8_t* for write_rom().
> >
> > Fixes:
> >
> > qemu/hw/device-assignment.c: In function ‘scan_option_rom’:
> > qemu/hw/device-assignment.c:766: warning: passing argument 2 of ‘cpu_physical_memory_write_rom’ from incompatible pointer type
> >
> > Signed-off-by: Mark McLoughlin <markmc@redhat.com>
> > ---
> > qemu/hw/device-assignment.c | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
> > index f8faf5b..e0c01ce 100644
> > --- a/qemu/hw/device-assignment.c
> > +++ b/qemu/hw/device-assignment.c
> > @@ -760,8 +760,8 @@ static int scan_option_rom(uint8_t devfn, void *roms, ram_addr_t offset)
> > cpu_register_physical_memory(0xd0000 + offset, total_size, addr | IO_MEM_ROM);
> >
> > /* Write ROM data and devfn to phys_addr */
> > - cpu_physical_memory_write_rom(0xd0000 + offset, rom, size);
> > - cpu_physical_memory_write_rom(0xd0000 + offset + size, &devfn, 1);
> > + cpu_physical_memory_write_rom(0xd0000 + offset, (uint8_t *)rom, size);
> > + cpu_physical_memory_write(0xd0000 + offset + size, &devfn, 1);
> >
> > return total_size;
> >
>
> Why drop _rom? The memory region is registered as a rom, a few lines
> earlier?
My mistake, can you just apply the change to the first line?
Thanks,
Mark.
next prev parent reply other threads:[~2009-01-15 14:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 13:47 [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init() Mark McLoughlin
2009-01-15 13:47 ` [PATCH 02/18] kvm: qemu: make qemu_alloc_physram() and alloc_mem_area() static Mark McLoughlin
2009-01-15 13:47 ` [PATCH 03/18] kvm: qemu: kill some redundant declarations Mark McLoughlin
2009-01-15 13:47 ` [PATCH 04/18] kvm: qemu: make lsi_scsi_uninit() static Mark McLoughlin
2009-01-15 13:47 ` [PATCH 05/18] kvm: qemu: Fix virtio_blk_init() calls Mark McLoughlin
2009-01-15 13:47 ` [PATCH 06/18] kvm: qemu: device-assignment: don't use libkvm's private get_slot() Mark McLoughlin
2009-01-15 13:47 ` [PATCH 07/18] kvm: libkvm: make get_slot() and co. static Mark McLoughlin
2009-01-15 13:47 ` [PATCH 08/18] kvm: qemu: device-assignment: add kvm_add_ioperm_data() prototype Mark McLoughlin
2009-01-15 13:47 ` [PATCH 09/18] kvm: qemu: device-assignment: add assigned_dev_update_irq() prototype Mark McLoughlin
2009-01-15 13:47 ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Mark McLoughlin
2009-01-15 13:47 ` [PATCH 11/18] kvm: qemu: kill unused variable Mark McLoughlin
2009-01-15 13:47 ` [PATCH 12/18] kvm: qemu: kill redundant declarion of perror() Mark McLoughlin
2009-01-15 13:47 ` [PATCH 13/18] kvm: qemu: kill redundant declaration of smp_cpus and vm_running Mark McLoughlin
2009-01-15 13:47 ` [PATCH 14/18] kvm: qemu: make qemu_kvm_system_reset() static Mark McLoughlin
2009-01-15 13:47 ` [PATCH 15/18] kvm: qemu: kill unused variable in kvm_init_vcpu() Mark McLoughlin
2009-01-15 13:47 ` [PATCH 16/18] kvm: qemu: make another couple of functions static Mark McLoughlin
2009-01-15 13:47 ` [PATCH 17/18] kvm: qemu: fix update_vbios_real_tpr declaration Mark McLoughlin
2009-01-15 13:47 ` [PATCH 18/18] kvm: qemu: kill unused variable in enable_vapic() Mark McLoughlin
2009-01-15 13:54 ` [PATCH 10/18] kvm: qemu: device-assignment: fix ROM writing Avi Kivity
2009-01-15 14:24 ` Mark McLoughlin [this message]
2009-01-15 14:35 ` Avi Kivity
2009-01-15 13:58 ` [PATCH 01/18] kvm: qemu: fix the prototype of virtio_net_init() Avi Kivity
2009-01-15 14:28 ` Mark McLoughlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1232029458.5205.21.camel@localhost.localdomain \
--to=markmc@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox