From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: KVM <kvm@vger.kernel.org>, Jan Kiszka <jan.kiszka@siemens.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org, Kevin O'Connor <kevin@koconnor.net>,
Avi Kivity <avi@redhat.com>,
Anthony Liguori <anthony@codemonkey.ws>,
Liu Sheng <liusheng@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v2 5/5] Qemu: mark pci rom readonly
Date: Thu, 25 Oct 2012 17:23:19 +0800 [thread overview]
Message-ID: <50890507.8030501@linux.vnet.ibm.com> (raw)
In-Reply-To: <50890462.5010307@linux.vnet.ibm.com>
Since it is ROM which is really readonly in the system
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
---
hw/pci.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 2ca6ff6..2a287bb 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1803,6 +1803,7 @@ static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom)
}
pdev->has_rom = true;
memory_region_init_ram(&pdev->rom, name, size);
+ memory_region_set_readonly(&pdev->rom, true);
vmstate_register_ram(&pdev->rom, &pdev->qdev);
ptr = memory_region_get_ram_ptr(&pdev->rom);
load_image(path, ptr);
--
1.7.7.6
prev parent reply other threads:[~2012-10-25 9:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 9:20 [Qemu-devel] [PATCH v2 0/5] Qemu: implement readonly memory Xiao Guangrong
2012-10-25 9:21 ` [Qemu-devel] [PATCH v2 1/5] KVM: define KVM_CAP_READONLY_MEM unconditionally Xiao Guangrong
2012-10-25 12:14 ` Jan Kiszka
2012-10-25 9:21 ` [Qemu-devel] [PATCH v2 2/5] Qemu: update header files Xiao Guangrong
2012-10-25 11:03 ` Peter Maydell
2012-10-25 9:22 ` [Qemu-devel] [PATCH v2 3/5] Qemu: do not mark bios readonly Xiao Guangrong
2012-10-26 10:35 ` Jan Kiszka
2012-10-29 7:09 ` Xiao Guangrong
2012-10-29 7:44 ` Jan Kiszka
2012-10-29 8:31 ` Xiao Guangrong
2012-10-31 6:03 ` Jan Kiszka
2012-10-31 6:35 ` Xiao Guangrong
2012-10-31 6:46 ` Jan Kiszka
2012-10-31 7:01 ` Xiao Guangrong
2012-10-31 7:21 ` Jan Kiszka
2012-10-25 9:22 ` [Qemu-devel] [PATCH v2 4/5] Qemu: implement readonly memory Xiao Guangrong
2012-10-25 9:23 ` Xiao Guangrong [this message]
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=50890507.8030501@linux.vnet.ibm.com \
--to=xiaoguangrong@linux.vnet.ibm.com \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kevin@koconnor.net \
--cc=kvm@vger.kernel.org \
--cc=liusheng@linux.vnet.ibm.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).