qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, lersek@redhat.com,
	Gerd Hoffmann <kraxel@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH] [hack] tseg test
Date: Mon, 20 Apr 2015 15:25:24 +0200	[thread overview]
Message-ID: <1429536324-27737-1-git-send-email-kraxel@redhat.com> (raw)

Put some unique content into tseg area
when locked down for easy testing.
---
 hw/pci-host/q35.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 7d21399..1b2698f 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -200,7 +200,8 @@ static const TypeInfo q35_host_info = {
 
 static uint64_t tseg_blackhole_read(void *ptr, hwaddr reg, unsigned size)
 {
-    return 0xffffffff;
+    static const char msg[] = "No access to tseg for you. ";
+    return msg[reg%sizeof(msg)];
 }
 
 static void tseg_blackhole_write(void *opaque, hwaddr addr, uint64_t val,
@@ -215,8 +216,8 @@ static const MemoryRegionOps tseg_blackhole_ops = {
     .endianness = DEVICE_NATIVE_ENDIAN,
     .valid.min_access_size = 1,
     .valid.max_access_size = 4,
-    .impl.min_access_size = 4,
-    .impl.max_access_size = 4,
+    .impl.min_access_size = 1,
+    .impl.max_access_size = 1,
     .endianness = DEVICE_LITTLE_ENDIAN,
 };
 
-- 
1.8.3.1

                 reply	other threads:[~2015-04-20 13:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1429536324-27737-1-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@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).