* [Bug 1868527] [NEW] alignment may overlap the TLB flags
@ 2020-03-23 8:34 Hansni Bu
2020-03-23 17:52 ` [Bug 1868527] " Richard Henderson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hansni Bu @ 2020-03-23 8:34 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
Hi,
In QEMU-4.2.0, or git-9b26a610936deaf436af9b7e39e4b7f0a35e4409, alignment may overlap the TLB flags.
For example, the alignment: MO_ALIGN_32,
MO_ALIGN_32 = 5 << MO_ASHIFT,
and the TLB flag: TLB_DISCARD_WRITE
#define TLB_DISCARD_WRITE (1 << (TARGET_PAGE_BITS_MIN - 6))
then, in the function "get_alignment_bits", the assert may fail:
#if defined(CONFIG_SOFTMMU)
/* The requested alignment cannot overlap the TLB flags. */
tcg_debug_assert((TLB_FLAGS_MASK & ((1 << a) - 1)) == 0);
#endif
However, the alignment of MO_ALIGN_32 is not used for now, so the assert
cannot be triggered in current version. Anyway it seems like a potential
conflict.
** Affects: qemu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1868527
Title:
alignment may overlap the TLB flags
Status in QEMU:
New
Bug description:
Hi,
In QEMU-4.2.0, or git-9b26a610936deaf436af9b7e39e4b7f0a35e4409, alignment may overlap the TLB flags.
For example, the alignment: MO_ALIGN_32,
MO_ALIGN_32 = 5 << MO_ASHIFT,
and the TLB flag: TLB_DISCARD_WRITE
#define TLB_DISCARD_WRITE (1 << (TARGET_PAGE_BITS_MIN - 6))
then, in the function "get_alignment_bits", the assert may fail:
#if defined(CONFIG_SOFTMMU)
/* The requested alignment cannot overlap the TLB flags. */
tcg_debug_assert((TLB_FLAGS_MASK & ((1 << a) - 1)) == 0);
#endif
However, the alignment of MO_ALIGN_32 is not used for now, so the
assert cannot be triggered in current version. Anyway it seems like a
potential conflict.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1868527/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 1868527] Re: alignment may overlap the TLB flags
2020-03-23 8:34 [Bug 1868527] [NEW] alignment may overlap the TLB flags Hansni Bu
@ 2020-03-23 17:52 ` Richard Henderson
2020-03-24 1:32 ` Hansni Bu
2020-03-27 3:40 ` Hansni Bu
2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2020-03-23 17:52 UTC (permalink / raw)
To: qemu-devel
That is of course completely dependent on the target page size. So,
yes, a target with a very small page size cannot use large alignments.
The assert makes sure.
Is this comment simply by inspection, or did you have an actual bug to
report?
** Changed in: qemu
Status: New => Incomplete
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1868527
Title:
alignment may overlap the TLB flags
Status in QEMU:
Incomplete
Bug description:
Hi,
In QEMU-4.2.0, or git-9b26a610936deaf436af9b7e39e4b7f0a35e4409, alignment may overlap the TLB flags.
For example, the alignment: MO_ALIGN_32,
MO_ALIGN_32 = 5 << MO_ASHIFT,
and the TLB flag: TLB_DISCARD_WRITE
#define TLB_DISCARD_WRITE (1 << (TARGET_PAGE_BITS_MIN - 6))
then, in the function "get_alignment_bits", the assert may fail:
#if defined(CONFIG_SOFTMMU)
/* The requested alignment cannot overlap the TLB flags. */
tcg_debug_assert((TLB_FLAGS_MASK & ((1 << a) - 1)) == 0);
#endif
However, the alignment of MO_ALIGN_32 is not used for now, so the
assert cannot be triggered in current version. Anyway it seems like a
potential conflict.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1868527/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 1868527] Re: alignment may overlap the TLB flags
2020-03-23 8:34 [Bug 1868527] [NEW] alignment may overlap the TLB flags Hansni Bu
2020-03-23 17:52 ` [Bug 1868527] " Richard Henderson
@ 2020-03-24 1:32 ` Hansni Bu
2020-03-27 3:40 ` Hansni Bu
2 siblings, 0 replies; 4+ messages in thread
From: Hansni Bu @ 2020-03-24 1:32 UTC (permalink / raw)
To: qemu-devel
This is an inspection yet.
For ARM SMMU simulation, TARGET_PAGE_BITS_MIN is 10. All low bits of the TLB virtual address are used up by TLB flags and alignment flags. It's a little crowded.
/*
* ARMv7 and later CPUs have 4K pages minimum, but ARMv5 and v6
* have to support 1K tiny pages.
*/
# define TARGET_PAGE_BITS_VARY
# define TARGET_PAGE_BITS_MIN 10
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1868527
Title:
alignment may overlap the TLB flags
Status in QEMU:
Incomplete
Bug description:
Hi,
In QEMU-4.2.0, or git-9b26a610936deaf436af9b7e39e4b7f0a35e4409, alignment may overlap the TLB flags.
For example, the alignment: MO_ALIGN_32,
MO_ALIGN_32 = 5 << MO_ASHIFT,
and the TLB flag: TLB_DISCARD_WRITE
#define TLB_DISCARD_WRITE (1 << (TARGET_PAGE_BITS_MIN - 6))
then, in the function "get_alignment_bits", the assert may fail:
#if defined(CONFIG_SOFTMMU)
/* The requested alignment cannot overlap the TLB flags. */
tcg_debug_assert((TLB_FLAGS_MASK & ((1 << a) - 1)) == 0);
#endif
However, the alignment of MO_ALIGN_32 is not used for now, so the
assert cannot be triggered in current version. Anyway it seems like a
potential conflict.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1868527/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 1868527] Re: alignment may overlap the TLB flags
2020-03-23 8:34 [Bug 1868527] [NEW] alignment may overlap the TLB flags Hansni Bu
2020-03-23 17:52 ` [Bug 1868527] " Richard Henderson
2020-03-24 1:32 ` Hansni Bu
@ 2020-03-27 3:40 ` Hansni Bu
2 siblings, 0 replies; 4+ messages in thread
From: Hansni Bu @ 2020-03-27 3:40 UTC (permalink / raw)
To: qemu-devel
** Changed in: qemu
Status: Incomplete => Invalid
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1868527
Title:
alignment may overlap the TLB flags
Status in QEMU:
Invalid
Bug description:
Hi,
In QEMU-4.2.0, or git-9b26a610936deaf436af9b7e39e4b7f0a35e4409, alignment may overlap the TLB flags.
For example, the alignment: MO_ALIGN_32,
MO_ALIGN_32 = 5 << MO_ASHIFT,
and the TLB flag: TLB_DISCARD_WRITE
#define TLB_DISCARD_WRITE (1 << (TARGET_PAGE_BITS_MIN - 6))
then, in the function "get_alignment_bits", the assert may fail:
#if defined(CONFIG_SOFTMMU)
/* The requested alignment cannot overlap the TLB flags. */
tcg_debug_assert((TLB_FLAGS_MASK & ((1 << a) - 1)) == 0);
#endif
However, the alignment of MO_ALIGN_32 is not used for now, so the
assert cannot be triggered in current version. Anyway it seems like a
potential conflict.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1868527/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-27 3:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 8:34 [Bug 1868527] [NEW] alignment may overlap the TLB flags Hansni Bu
2020-03-23 17:52 ` [Bug 1868527] " Richard Henderson
2020-03-24 1:32 ` Hansni Bu
2020-03-27 3:40 ` Hansni Bu
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).